36 const libMesh::Point& n,
44 libMesh::MeshFunction&
55 std::vector<libMesh::Gradient> gradients;
56 function.gradient(p, 0., gradients);
62 rot = RealVectorX::Zero(3);
64 rot(0) = gradients[2](1) - gradients[1](2);
65 rot(1) = gradients[0](2) - gradients[2](0);
66 rot(2) = gradients[1](0) - gradients[0](1);
69 dn_rot(0) = rot(1) * n(2) - rot(2) * n(1);
70 dn_rot(1) = -(rot(0) * n(2) - rot(2) * n(0));
71 dn_rot(2) = rot(0) * n(1) - rot(1) * n(0);
78 const libMesh::Point& n,
86 libMesh::MeshFunction&
92 perturbed_function(p, 0., v);
97 std::vector<libMesh::Gradient> gradients;
98 perturbed_function.gradient(p, 0., gradients);
104 rot = RealVectorX::Zero(3);
106 rot(0) = gradients[2](1) - gradients[1](2);
107 rot(1) = gradients[0](2) - gradients[2](0);
108 rot(2) = gradients[1](0) - gradients[0](1);
111 dn_rot(0) = rot(1) * n(2) - rot(2) * n(1);
112 dn_rot(1) = -(rot(0) * n(2) - rot(2) * n(0));
113 dn_rot(2) = rot(0) * n(1) - rot(1) * n(0);
This uses the displacement gradient to calculate the rotation in a given surface normal.
MAST::MeshFieldFunction & _func
mesh field function
This provides a wrapper FieldFunction compatible class that interpolates the solution using libMesh's...
virtual void operator()(const libMesh::Point &p, const libMesh::Point &n, const Real t, RealVectorX &dn_rot) const
virtual void perturbation(const libMesh::Point &p, const libMesh::Point &n, const Real t, RealVectorX &dn_rot) const
libMesh::DenseVector< Real > DenseRealVector
libMesh::MeshFunction & get_perturbed_function()
Matrix< Real, Dynamic, 1 > RealVectorX
libMesh::MeshFunction & get_function()
NormalRotationMeshFunction(const std::string &nm, MAST::MeshFieldFunction &func)