Calculate zero, first and second moments of inertia.Example intended to show how to write user data operator and integrate scalar field.