📄 fe.h
字号:
* @returns d(xyz)/deta (in physical space) of the point * \p p located on the reference element. */ static Point map_eta (const Elem* elem, const Point& reference_point); /** * @returns d(xyz)/dzeta (in physical space) of the point * \p p located on the reference element. */ static Point map_zeta (const Elem* elem, const Point& reference_point);#ifdef ENABLE_INFINITE_ELEMENTS /** * make InfFE classes friends, so that these may access * the private \p map, map_xyz methods */ template <unsigned int friend_Dim, FEFamily friend_T_radial, InfMapType friend_T_map> friend class InfFE;#endifprotected: /** * An array of the node locations on the last * element we computed on */ std::vector<Point> cached_nodes; /** * The last side and last edge we did a reinit on */ unsigned int last_side, last_edge;};/** * Clough-Tocher finite elements. Still templated on the dimension, * \p Dim. * * \author Roy Stogner * \date 2004 * \version $Revision: 2789 $ *///-------------------------------------------------------------// FEHierarchic class definitiontemplate <unsigned int Dim>class FEClough : public FE<Dim,CLOUGH>{public: /** * Constructor. Creates a hierarchic finite element * to be used in dimension \p Dim. */ FEClough(const FEType& fet);};/** * Hermite finite elements. Still templated on the dimension, * \p Dim. * * \author Roy Stogner * \date 2005 * \version $Revision: 2789 $ *///-------------------------------------------------------------// FEHierarchic class definitiontemplate <unsigned int Dim>class FEHermite : public FE<Dim,HERMITE>{public: /** * Constructor. Creates a hierarchic finite element * to be used in dimension \p Dim. */ FEHermite(const FEType& fet); /** * 1D hermite functions on unit interval */ static Real hermite_raw_shape_second_deriv(const unsigned int basis_num, const Real xi); static Real hermite_raw_shape_deriv(const unsigned int basis_num, const Real xi); static Real hermite_raw_shape(const unsigned int basis_num, const Real xi);};/** * Hierarchic finite elements. Still templated on the dimension, * \p Dim. * * \author Benjamin S. Kirk * \date 2002-2007 * \version $Revision: 2789 $ *///-------------------------------------------------------------// FEHierarchic class definitiontemplate <unsigned int Dim>class FEHierarchic : public FE<Dim,HIERARCHIC>{public: /** * Constructor. Creates a hierarchic finite element * to be used in dimension \p Dim. */ FEHierarchic(const FEType& fet);};/** * Lagrange finite elements. Still templated on the dimension, * \p Dim. * * \author Benjamin S. Kirk * \date 2002-2007 * \version $Revision: 2789 $ *///-------------------------------------------------------------// FELagrange class definitiontemplate <unsigned int Dim>class FELagrange : public FE<Dim,LAGRANGE>{public: /** * Constructor. Creates a Lagrange finite element * to be used in dimension \p Dim. */ FELagrange(const FEType& fet);};/** * Monomial finite elements. Still templated on the dimension, * \p Dim. * * \author Benjamin S. Kirk * \date 2002-2007 * \version $Revision: 2789 $ *///-------------------------------------------------------------// FEMonomial class definitiontemplate <unsigned int Dim>class FEMonomial : public FE<Dim,MONOMIAL>{public: /** * Constructor. Creates a monomial finite element * to be used in dimension \p Dim. */ FEMonomial(const FEType& fet);};/** * XYZ finite elements. These require specialization * because the shape functions are defined in terms of * physical XYZ coordinates rather than local coordinates. * * \author Benjamin S. Kirk * \date 2002-2007 * \version $Revision: 2789 $ *///-------------------------------------------------------------// FEXYZ class definitiontemplate <unsigned int Dim>class FEXYZ : public FE<Dim,XYZ>{public: /** * Constructor. Creates a monomial finite element * to be used in dimension \p Dim. */ FEXYZ(const FEType& fet); /** * Explicitly call base class method. This prevents some * compilers being confused by partially overriding this virtual function. */ virtual void reinit (const Elem* elem, const std::vector<Point>* const pts = NULL) { FE<Dim,XYZ>::reinit (elem, pts); } /** * Reinitializes all the physical element-dependent data based on * the \p side of \p face. */ virtual void reinit (const Elem* elem, const unsigned int side, const Real tolerance = TOLERANCE);protected: /** * Update the various member data fields \p phi, * \p dphidxi, \p dphideta, \p dphidzeta, etc. * for the current element. These data will be computed * at the points \p qp, which are generally (but need not be) * the quadrature points. */ virtual void init_shape_functions(const std::vector<Point>& qp, const Elem* e); /** * After having updated the jacobian and the transformation * from local to global coordinates in \p FEBase::compute_map(), * the first derivatives of the shape functions are * transformed to global coordinates, giving \p dphi, * \p dphidx, \p dphidy, and \p dphidz. This method * should rarely be re-defined in derived classes, but * still should be usable for children. Therefore, keep * it protected. */ virtual void compute_shape_functions(const Elem*); /** * Compute the map & shape functions for this face. */ void compute_face_values (const Elem* elem, const Elem* side);};/** * Provide Typedefs for various element types. */namespace FiniteElements{ /** * Convenient definition for a 2D * Clough-Tocher finite element. */ typedef FEClough<2> FEClough2D; /** * Convenient definition for a 1D * Hierarchic finite element. */ typedef FE<1,HIERARCHIC> FEHierarchic1D; /** * Convenient definition for a 2D * Hierarchic finite element. */ typedef FE<2,HIERARCHIC> FEHierarchic2D; /** * Convenient definition for a 3D * Hierarchic finite element. */ typedef FE<3,HIERARCHIC> FEHierarchic3D; /** * Convenient definition for a 1D * Lagrange finite element. */ typedef FE<1,LAGRANGE> FELagrange1D; /** * Convenient definition for a 2D * Lagrange finite element. */ typedef FE<2,LAGRANGE> FELagrange2D; /** * Convenient definition for a 3D * Lagrange finite element. */ typedef FE<3,LAGRANGE> FELagrange3D; /** * Convenient definition for a 1D * Monomial finite element. */ typedef FE<1,MONOMIAL> FEMonomial1D; /** * Convenient definition for a 2D * Monomial finite element. */ typedef FE<2,MONOMIAL> FEMonomial2D; /** * Convenient definition for a 3D * Monomial finite element. */ typedef FE<3,MONOMIAL> FEMonomial3D;}// ------------------------------------------------------------// FE class inline memberstemplate <unsigned int Dim, FEFamily T>inlineFE<Dim,T>::FE (const FEType& fet) : FEBase (Dim,fet), last_side(libMesh::invalid_uint), last_edge(libMesh::invalid_uint){ // Sanity check. Make sure the // Family specified in the template instantiation // matches the one in the FEType object libmesh_assert (T == fe_type.family);}// ------------------------------------------------------------// FEClough class inline memberstemplate <unsigned int Dim>inlineFEClough<Dim>::FEClough (const FEType& fet) : FE<Dim,CLOUGH> (fet){}// ------------------------------------------------------------// FEHermite class inline memberstemplate <unsigned int Dim>inlineFEHermite<Dim>::FEHermite (const FEType& fet) : FE<Dim,HERMITE> (fet){}// ------------------------------------------------------------// FEHierarchic class inline memberstemplate <unsigned int Dim>inlineFEHierarchic<Dim>::FEHierarchic (const FEType& fet) : FE<Dim,HIERARCHIC> (fet){}// ------------------------------------------------------------// FELagrange class inline memberstemplate <unsigned int Dim>inlineFELagrange<Dim>::FELagrange (const FEType& fet) : FE<Dim,LAGRANGE> (fet){}// ------------------------------------------------------------// FEMonomial class inline memberstemplate <unsigned int Dim>inlineFEMonomial<Dim>::FEMonomial (const FEType& fet) : FE<Dim,MONOMIAL> (fet){}// ------------------------------------------------------------// FELagrange class inline memberstemplate <unsigned int Dim>inlineFEXYZ<Dim>::FEXYZ (const FEType& fet) : FE<Dim,XYZ> (fet){}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -