36 const libMesh::Point& n,
53 function_re(p, 0., v_re);
54 function_im(p, 0., v_im);
59 std::vector<libMesh::Gradient>
62 function_re.gradient(p, 0., gradients_re);
63 function_im.gradient(p, 0., gradients_im);
69 rot = ComplexVectorX::Zero(3);
71 rot(0) = std::complex<Real>(gradients_re[2](1) - gradients_re[1](2),
72 gradients_im[2](1) - gradients_im[1](2));
73 rot(1) = std::complex<Real>(gradients_re[0](2) - gradients_re[2](0),
74 gradients_im[0](2) - gradients_im[2](0));
75 rot(2) = std::complex<Real>(gradients_re[1](0) - gradients_re[0](1),
76 gradients_im[1](0) - gradients_im[0](1));
79 dn_rot(0) = rot(1) * n(2) - rot(2) * n(1);
80 dn_rot(1) = -(rot(0) * n(2) - rot(2) * n(0));
81 dn_rot(2) = rot(0) * n(1) - rot(1) * n(0);
88 const libMesh::Point& n,
104 perturbed_function_re(p, 0., v_re);
105 perturbed_function_im(p, 0., v_im);
109 std::vector<libMesh::Gradient>
112 perturbed_function_re.gradient(p, 0., gradients_re);
113 perturbed_function_im.gradient(p, 0., gradients_im);
119 rot = ComplexVectorX::Zero(3);
121 rot(0) = std::complex<Real>(gradients_re[2](1) - gradients_re[1](2),
122 gradients_im[2](1) - gradients_im[1](2));
123 rot(1) = std::complex<Real>(gradients_re[0](2) - gradients_re[2](0),
124 gradients_im[0](2) - gradients_im[2](0));
125 rot(2) = std::complex<Real>(gradients_re[1](0) - gradients_re[0](1),
126 gradients_im[1](0) - gradients_im[0](1));
129 dn_rot(0) = rot(1) * n(2) - rot(2) * n(1);
130 dn_rot(1) = -(rot(0) * n(2) - rot(2) * n(0));
131 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.
virtual void perturbation(const libMesh::Point &p, const libMesh::Point &n, const Real t, ComplexVectorX &dn_rot) const
std::pair< libMesh::MeshFunction *, libMesh::MeshFunction * > get_perturbed_function()
MAST::ComplexMeshFieldFunction & _func
mesh field function
Matrix< Complex, Dynamic, 1 > ComplexVectorX
libMesh::DenseVector< Real > DenseRealVector
virtual void operator()(const libMesh::Point &p, const libMesh::Point &n, const Real t, ComplexVectorX &dn_rot) const
This provides a wrapper FieldFunction compatible class that interpolates the solution using libMesh's...
std::pair< libMesh::MeshFunction *, libMesh::MeshFunction * > get_function()
ComplexNormalRotationMeshFunction(const std::string &nm, MAST::ComplexMeshFieldFunction &func)