18 #include "libmesh/hdiv_fe_transformation.h" 19 #include "libmesh/fe_interface.h" 20 #include "libmesh/int_range.h" 25 template<
typename OutputShape>
33 template<
typename OutputShape>
41 template<
typename OutputShape>
45 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 52 template<
typename OutputShape>
54 const Elem *
const elem,
55 const std::vector<Point> & qp,
57 std::vector<std::vector<OutputShape>> & phi,
64 libmesh_error_msg(
"These element transformations only make sense in 2D and 3D.");
77 Real dx_dxi = dxyz_dxi[p](0);
78 Real dx_deta = dxyz_deta[p](0);
80 Real dy_dxi = dxyz_dxi[p](1);
81 Real dy_deta = dxyz_deta[p](1);
83 Real dz_dxi = dxyz_dxi[p](2);
84 Real dz_deta = dxyz_deta[p](2);
92 phi[i][p](0) = (dx_dxi*phi_ref(0) + dx_deta*phi_ref(1))/J[p];
93 phi[i][p](1) = (dy_dxi*phi_ref(0) + dy_deta*phi_ref(1))/J[p];
94 phi[i][p](2) = (dz_dxi*phi_ref(0) + dz_deta*phi_ref(1))/J[p];
111 Real dx_dxi = dxyz_dxi[p](0);
112 Real dx_deta = dxyz_deta[p](0);
113 Real dx_dzeta = dxyz_dzeta[p](0);
115 Real dy_dxi = dxyz_dxi[p](1);
116 Real dy_deta = dxyz_deta[p](1);
117 Real dy_dzeta = dxyz_dzeta[p](1);
119 Real dz_dxi = dxyz_dxi[p](2);
120 Real dz_deta = dxyz_deta[p](2);
121 Real dz_dzeta = dxyz_dzeta[p](2);
129 phi[i][p](0) = (dx_dxi*phi_ref(0) + dx_deta*phi_ref(1) + dx_dzeta*phi_ref(2))/J[p];
130 phi[i][p](1) = (dy_dxi*phi_ref(0) + dy_deta*phi_ref(1) + dy_dzeta*phi_ref(2))/J[p];
131 phi[i][p](2) = (dz_dxi*phi_ref(0) + dz_deta*phi_ref(1) + dz_dzeta*phi_ref(2))/J[p];
138 libmesh_error_msg(
"Invalid dim = " <<
dim);
142 template<
typename OutputShape>
145 const std::vector<Point> &,
153 libmesh_error_msg(
"These element transformations only make sense in 2D and 3D.");
157 const std::vector<std::vector<OutputShape>> & dphi_dxi = fe.
get_dphidxi();
158 const std::vector<std::vector<OutputShape>> & dphi_deta = fe.
get_dphideta();
166 div_phi[i][p] = (dphi_dxi[i][p](0) + dphi_deta[i][p](1))/J[p];
173 const std::vector<std::vector<OutputShape>> & dphi_dxi = fe.
get_dphidxi();
174 const std::vector<std::vector<OutputShape>> & dphi_deta = fe.
get_dphideta();
175 const std::vector<std::vector<OutputShape>> & dphi_dzeta = fe.
get_dphidzeta();
183 div_phi[i][p] = (dphi_dxi[i][p](0) + dphi_deta[i][p](1) + dphi_dzeta[i][p](2))/J[p];
190 libmesh_error_msg(
"Invalid dim = " <<
dim);
199 libmesh_error_msg(
"HDiv transformations only make sense for vector-valued elements.");
205 libmesh_error_msg(
"HDiv transformations only make sense for vector-valued elements.");
211 libmesh_error_msg(
"HDiv transformations only make sense for vector-valued elements.");
217 const std::vector<Point> &,
219 std::vector<std::vector<Real>> &,
222 libmesh_error_msg(
"HDiv transformations only make sense for vector-valued elements.");
228 const std::vector<Point> &,
230 std::vector<std::vector<Real>> &)
const 232 libmesh_error_msg(
"HDiv transformations only make sense for vector-valued elements.");
This is the base class from which all geometric element types are derived.
const std::vector< RealGradient > & get_dxyzdzeta() const
The libMesh namespace provides an interface to certain functionality in the library.
const std::vector< std::vector< OutputShape > > & get_dphideta() const
TensorTools::DecrementRank< OutputShape >::type OutputDivergence
const std::vector< std::vector< OutputShape > > & get_dphidzeta() const
FEType get_fe_type() const
const std::vector< RealGradient > & get_dxyzdxi() const
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
const std::vector< Real > & get_jacobian() const
const std::vector< Real > & get_dxidx() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< RealGradient > & get_dxyzdeta() const
const std::vector< std::vector< OutputShape > > & get_dphidxi() const
const FEMap & get_fe_map() const
const std::vector< std::vector< Real > > & get_d2xidxyz2() const
Second derivatives of "xi" reference coordinate wrt physical coordinates.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
This class forms the foundation from which generic finite elements may be derived.