$extrastylesheet
#include <fe.h>

Public Types | |
| typedef FEGenericBase < typename FEOutputType< T > ::type >::OutputShape | OutputShape |
| typedef TensorTools::IncrementRank < OutputShape >::type | OutputGradient |
| typedef TensorTools::IncrementRank < OutputGradient >::type | OutputTensor |
| typedef TensorTools::DecrementRank < OutputShape >::type | OutputDivergence |
| typedef TensorTools::MakeNumber < OutputShape >::type | OutputNumber |
| typedef TensorTools::IncrementRank < OutputNumber >::type | OutputNumberGradient |
| typedef TensorTools::IncrementRank < OutputNumberGradient >::type | OutputNumberTensor |
| typedef TensorTools::DecrementRank < OutputNumber >::type | OutputNumberDivergence |
Public Member Functions | |
| FE (const FEType &fet) | |
| virtual unsigned int | n_shape_functions () const |
| virtual FEContinuity | get_continuity () const |
| virtual bool | is_hierarchic () const |
| virtual void | reinit (const Elem *elem, const std::vector< Point > *const pts=NULL, const std::vector< Real > *const weights=NULL) |
| virtual void | reinit (const Elem *elem, const unsigned int side, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=NULL, const std::vector< Real > *const weights=NULL) |
| virtual void | edge_reinit (const Elem *elem, const unsigned int edge, const Real tolerance=TOLERANCE, const std::vector< Point > *const pts=NULL, const std::vector< Real > *const weights=NULL) |
| virtual void | side_map (const Elem *elem, const Elem *side, const unsigned int s, const std::vector< Point > &reference_side_points, std::vector< Point > &reference_points) |
| virtual void | attach_quadrature_rule (QBase *q) |
| virtual unsigned int | n_quadrature_points () const |
| virtual bool | shapes_need_reinit () const |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order order, const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *libmesh_dbg_var(elem), const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *libmesh_dbg_var(elem), const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *libmesh_dbg_var(elem), const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order order, const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order order, const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order order, const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order order, const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| RealGradient | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| void | nodal_soln (const Elem *, const Order, const std::vector< Number > &, std::vector< Number > &) |
| template<> | |
| void | nodal_soln (const Elem *, const Order, const std::vector< Number > &, std::vector< Number > &) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| RealGradient | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape (const Elem *, const Order, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape (const Elem *, const Order, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *elem, const Order order, const unsigned int libmesh_dbg_var(i), const unsigned int libmesh_dbg_var(j), const Point &) |
| template<> | |
| RealGradient | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| RealGradient | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| RealGradient | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| RealGradient | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &libmesh_dbg_var(p)) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType type, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType type, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | side_map (const Elem *, const Elem *, const unsigned int, const std::vector< Point > &, std::vector< Point > &) |
| template<> | |
| void | edge_reinit (Elem const *, unsigned int, Real, const std::vector< Point > *const, const std::vector< Real > *const) |
| template<> | |
| Point | inverse_map (const Elem *, const Point &, const Real, const bool) |
| template<> | |
| void | inverse_map (const Elem *, const std::vector< Point > &, std::vector< Point > &, Real, bool) |
| template<> | |
| unsigned int | n_dofs (const ElemType, const Order) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType, const Order) |
| template<> | |
| void | dofs_on_side (const Elem *const, const Order, unsigned int, std::vector< unsigned int > &di) |
| template<> | |
| void | dofs_on_edge (const Elem *const, const Order, unsigned int, std::vector< unsigned int > &di) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const Point &p) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| void | nodal_soln (const Elem *elem, const Order order, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_at_node (const ElemType, const Order, const unsigned int) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| FEContinuity | get_continuity () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| bool | is_hierarchic () const |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| void | compute_constraints (DofConstraints &, DofMap &, const unsigned int, const Elem *) |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| bool | shapes_need_reinit () const |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape (const Elem *, const Order, const unsigned int libmesh_dbg_var(i), const Point &) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const Point &point_in) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &point_in) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int libmesh_dbg_var(j), const Point &point_in) |
| template<> | |
| Real | shape (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const Point &point_in) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &point_in) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &point_in) |
| template<> | |
| Real | shape (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const Point &point_in) |
| template<> | |
| Real | shape_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &point_in) |
| template<> | |
| Real | shape_second_deriv (const ElemType, const Order, const unsigned int, const unsigned int, const Point &) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order libmesh_dbg_var(order), const unsigned int i, const unsigned int j, const Point &point_in) |
| template<> | |
| Real | shape (const Elem *elem, const Order order, const unsigned int i, const Point &p) |
| template<> | |
| Real | shape_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| template<> | |
| Real | shape_second_deriv (const Elem *elem, const Order order, const unsigned int i, const unsigned int j, const Point &p) |
| const std::vector< std::vector < OutputShape > > & | get_phi () const |
| const std::vector< std::vector < OutputGradient > > & | get_dphi () const |
| const std::vector< std::vector < OutputShape > > & | get_curl_phi () const |
| const std::vector< std::vector < OutputDivergence > > & | get_div_phi () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidx () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidy () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidz () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidxi () const |
| const std::vector< std::vector < OutputShape > > & | get_dphideta () const |
| const std::vector< std::vector < OutputShape > > & | get_dphidzeta () const |
| const std::vector< std::vector < OutputTensor > > & | get_d2phi () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidx2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxdy () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxdz () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidy2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidydz () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidz2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxi2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxideta () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidxidzeta () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phideta2 () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidetadzeta () const |
| const std::vector< std::vector < OutputShape > > & | get_d2phidzeta2 () const |
| const std::vector < OutputGradient > & | get_dphase () const |
| const std::vector< Real > & | get_Sobolev_weight () const |
| const std::vector< RealGradient > & | get_Sobolev_dweight () const |
| void | print_phi (std::ostream &os) const |
| void | print_dphi (std::ostream &os) const |
| void | print_d2phi (std::ostream &os) const |
| const std::vector< Point > & | get_xyz () const |
| const std::vector< Real > & | get_JxW () const |
| const std::vector< RealGradient > & | get_dxyzdxi () const |
| const std::vector< RealGradient > & | get_dxyzdeta () const |
| const std::vector< RealGradient > & | get_dxyzdzeta () const |
| const std::vector< RealGradient > & | get_d2xyzdxi2 () const |
| const std::vector< RealGradient > & | get_d2xyzdeta2 () const |
| const std::vector< RealGradient > & | get_d2xyzdzeta2 () const |
| const std::vector< RealGradient > & | get_d2xyzdxideta () const |
| const std::vector< RealGradient > & | get_d2xyzdxidzeta () const |
| const std::vector< RealGradient > & | get_d2xyzdetadzeta () const |
| const std::vector< Real > & | get_dxidx () const |
| const std::vector< Real > & | get_dxidy () const |
| const std::vector< Real > & | get_dxidz () const |
| const std::vector< Real > & | get_detadx () const |
| const std::vector< Real > & | get_detady () const |
| const std::vector< Real > & | get_detadz () const |
| const std::vector< Real > & | get_dzetadx () const |
| const std::vector< Real > & | get_dzetady () const |
| const std::vector< Real > & | get_dzetadz () const |
| const std::vector< std::vector < Point > > & | get_tangents () const |
| const std::vector< Point > & | get_normals () const |
| const std::vector< Real > & | get_curvatures () const |
| ElemType | get_type () const |
| unsigned int | get_p_level () const |
| FEType | get_fe_type () const |
| Order | get_order () const |
| FEFamily | get_family () const |
| const FEMap & | get_fe_map () const |
| void | print_JxW (std::ostream &os) const |
| void | print_xyz (std::ostream &os) const |
| void | print_info (std::ostream &os) const |
Static Public Member Functions | |
| static OutputShape | shape (const ElemType t, const Order o, const unsigned int i, const Point &p) |
| static OutputShape | shape (const Elem *elem, const Order o, const unsigned int i, const Point &p) |
| static OutputShape | shape_deriv (const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p) |
| static OutputShape | shape_deriv (const Elem *elem, const Order o, const unsigned int i, const unsigned int j, const Point &p) |
| static OutputShape | shape_second_deriv (const ElemType t, const Order o, const unsigned int i, const unsigned int j, const Point &p) |
| static OutputShape | shape_second_deriv (const Elem *elem, const Order o, const unsigned int i, const unsigned int j, const Point &p) |
| static void | nodal_soln (const Elem *elem, const Order o, const std::vector< Number > &elem_soln, std::vector< Number > &nodal_soln) |
| static unsigned int | n_shape_functions (const ElemType t, const Order o) |
| static unsigned int | n_dofs (const ElemType t, const Order o) |
| static unsigned int | n_dofs_at_node (const ElemType t, const Order o, const unsigned int n) |
| static unsigned int | n_dofs_per_elem (const ElemType t, const Order o) |
| static void | dofs_on_side (const Elem *const elem, const Order o, unsigned int s, std::vector< unsigned int > &di) |
| static void | dofs_on_edge (const Elem *const elem, const Order o, unsigned int e, std::vector< unsigned int > &di) |
| static Point | inverse_map (const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true) |
| static void | inverse_map (const Elem *elem, const std::vector< Point > &physical_points, std::vector< Point > &reference_points, const Real tolerance=TOLERANCE, const bool secure=true) |
| static void | compute_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| static Point | map (const Elem *elem, const Point &reference_point) |
| static Point | map_xi (const Elem *elem, const Point &reference_point) |
| static Point | map_eta (const Elem *elem, const Point &reference_point) |
| static Point | map_zeta (const Elem *elem, const Point &reference_point) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| template<> | |
| Real | shape (const ElemType, const Order, const unsigned int, const Point &) |
| static UniquePtr< FEGenericBase > | build (const unsigned int dim, const FEType &type) |
| static UniquePtr< FEGenericBase > | build_InfFE (const unsigned int dim, const FEType &type) |
| static void | compute_proj_constraints (DofConstraints &constraints, DofMap &dof_map, const unsigned int variable_number, const Elem *elem) |
| static void | coarsened_dof_values (const NumericVector< Number > &global_vector, const DofMap &dof_map, const Elem *coarse_elem, DenseVector< Number > &coarse_dofs, const unsigned int var, const bool use_old_dof_indices=false) |
| static void | compute_periodic_constraints (DofConstraints &constraints, DofMap &dof_map, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const unsigned int variable_number, const Elem *elem) |
| static bool | on_reference_element (const Point &p, const ElemType t, const Real eps=TOLERANCE) |
| static void | get_refspace_nodes (const ElemType t, std::vector< Point > &nodes) |
| static void | compute_node_constraints (NodeConstraints &constraints, const Elem *elem) |
| static void | compute_periodic_node_constraints (NodeConstraints &constraints, const PeriodicBoundaries &boundaries, const MeshBase &mesh, const PointLocatorBase *point_locator, const Elem *elem) |
| static void | print_info (std::ostream &out=libMesh::out) |
| static std::string | get_info () |
| static unsigned int | n_objects () |
| static void | enable_print_counter_info () |
| static void | disable_print_counter_info () |
Protected Types | |
| typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Protected Member Functions | |
| virtual void | init_shape_functions (const std::vector< Point > &qp, const Elem *e) |
| virtual void | init_base_shape_functions (const std::vector< Point > &qp, const Elem *e) |
| virtual void | compute_shape_functions (const Elem *elem, const std::vector< Point > &qp) |
| void | increment_constructor_count (const std::string &name) |
| void | increment_destructor_count (const std::string &name) |
Protected Attributes | |
| std::vector< Point > | cached_nodes |
| ElemType | last_side |
| unsigned int | last_edge |
| UniquePtr < FETransformationBase < FEOutputType< T >::type > > | _fe_trans |
| std::vector< std::vector < OutputShape > > | phi |
| std::vector< std::vector < OutputGradient > > | dphi |
| std::vector< std::vector < OutputShape > > | curl_phi |
| std::vector< std::vector < OutputDivergence > > | div_phi |
| std::vector< std::vector < OutputShape > > | dphidxi |
| std::vector< std::vector < OutputShape > > | dphideta |
| std::vector< std::vector < OutputShape > > | dphidzeta |
| std::vector< std::vector < OutputShape > > | dphidx |
| std::vector< std::vector < OutputShape > > | dphidy |
| std::vector< std::vector < OutputShape > > | dphidz |
| std::vector< std::vector < OutputTensor > > | d2phi |
| std::vector< std::vector < OutputShape > > | d2phidxi2 |
| std::vector< std::vector < OutputShape > > | d2phidxideta |
| std::vector< std::vector < OutputShape > > | d2phidxidzeta |
| std::vector< std::vector < OutputShape > > | d2phideta2 |
| std::vector< std::vector < OutputShape > > | d2phidetadzeta |
| std::vector< std::vector < OutputShape > > | d2phidzeta2 |
| std::vector< std::vector < OutputShape > > | d2phidx2 |
| std::vector< std::vector < OutputShape > > | d2phidxdy |
| std::vector< std::vector < OutputShape > > | d2phidxdz |
| std::vector< std::vector < OutputShape > > | d2phidy2 |
| std::vector< std::vector < OutputShape > > | d2phidydz |
| std::vector< std::vector < OutputShape > > | d2phidz2 |
| std::vector< OutputGradient > | dphase |
| std::vector< RealGradient > | dweight |
| std::vector< Real > | weight |
| UniquePtr< FEMap > | _fe_map |
| const unsigned int | dim |
| bool | calculations_started |
| bool | calculate_phi |
| bool | calculate_dphi |
| bool | calculate_d2phi |
| bool | calculate_curl_phi |
| bool | calculate_div_phi |
| bool | calculate_dphiref |
| const FEType | fe_type |
| ElemType | elem_type |
| unsigned int | _p_level |
| QBase * | qrule |
| bool | shapes_on_quadrature |
Static Protected Attributes | |
| static Counts | _counts |
| static Threads::atomic < unsigned int > | _n_objects |
| static Threads::spin_mutex | _mutex |
| static bool | _enable_print_counter = true |
Friends | |
| class | InfFE |
| std::ostream & | operator<< (std::ostream &os, const FEAbstract &fe) |
A specific instatiation of the FEBase class. This class is templated, and specific template instantiations will result in different Finite Element families. Full specialization of the template for specific dimensions(Dim) and families (T) provide support for specific finite element types. The use of templates allows for compile-time optimization, however it requires that the specific finite element family and dimension is also known at compile time. If this is too restricting for your application you can use the FEBase::build() member to create abstract (but still optimized) finite elements.
typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts [protected, inherited] |
Data structure to log the information. The log is identified by the class name.
Definition at line 113 of file reference_counter.h.
typedef TensorTools::DecrementRank<OutputShape>::type libMesh::FEGenericBase< FEOutputType< T >::type >::OutputDivergence [inherited] |
typedef TensorTools::IncrementRank<OutputShape>::type libMesh::FEGenericBase< FEOutputType< T >::type >::OutputGradient [inherited] |
typedef TensorTools::MakeNumber<OutputShape>::type libMesh::FEGenericBase< FEOutputType< T >::type >::OutputNumber [inherited] |
typedef TensorTools::DecrementRank<OutputNumber>::type libMesh::FEGenericBase< FEOutputType< T >::type >::OutputNumberDivergence [inherited] |
typedef TensorTools::IncrementRank<OutputNumber>::type libMesh::FEGenericBase< FEOutputType< T >::type >::OutputNumberGradient [inherited] |
typedef TensorTools::IncrementRank<OutputNumberGradient>::type libMesh::FEGenericBase< FEOutputType< T >::type >::OutputNumberTensor [inherited] |
| typedef FEGenericBase<typename FEOutputType<T>::type>::OutputShape libMesh::FE< Dim, T >::OutputShape |
Convenient typedefs for gradients of output, hessians of output, and potentially-complex-valued versions of same.
Reimplemented from libMesh::FEGenericBase< FEOutputType< T >::type >.
typedef TensorTools::IncrementRank<OutputGradient>::type libMesh::FEGenericBase< FEOutputType< T >::type >::OutputTensor [inherited] |
| libMesh::FE< Dim, T >::FE | ( | const FEType & | fet | ) | [inline, explicit] |
Constructor.
Definition at line 1043 of file fe.h.
References libMesh::FEAbstract::get_family().
: FEGenericBase<typename FEOutputType<T>::type> (Dim,fet), last_side(INVALID_ELEM), 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_equal_to (T, this->get_family()); }
| void libMesh::FE< Dim, T >::attach_quadrature_rule | ( | QBase * | q | ) | [virtual] |
Provides the class with the quadrature rule, which provides the locations (on a reference element) where the shape functions are to be calculated.
Implements libMesh::FEAbstract.
Reimplemented in libMesh::FESubdivision.
Definition at line 44 of file fe.C.
References libMesh::INVALID_ELEM, and libMesh::libmesh_assert().
{
libmesh_assert(q);
this->qrule = q;
// make sure we don't cache results from a previous quadrature rule
this->elem_type = INVALID_ELEM;
return;
}
| static UniquePtr<FEGenericBase> libMesh::FEGenericBase< FEOutputType< T >::type >::build | ( | const unsigned int | dim, |
| const FEType & | type | ||
| ) | [static, inherited] |
Builds a specific finite element type. A UniquePtr<FEGenericBase> is returned to prevent a memory leak. This way the user need not remember to delete the object.
The build call will fail if the OutputType of this class is not compatible with the output required for the requested type
Reimplemented from libMesh::FEAbstract.
| static UniquePtr<FEGenericBase> libMesh::FEGenericBase< FEOutputType< T >::type >::build_InfFE | ( | const unsigned int | dim, |
| const FEType & | type | ||
| ) | [static, inherited] |
Builds a specific infinite element type. A UniquePtr<FEGenericBase> is returned to prevent a memory leak. This way the user need not remember to delete the object.
The build call will fail if the OutputShape of this class is not compatible with the output required for the requested type
| static void libMesh::FEGenericBase< FEOutputType< T >::type >::coarsened_dof_values | ( | const NumericVector< Number > & | global_vector, |
| const DofMap & | dof_map, | ||
| const Elem * | coarse_elem, | ||
| DenseVector< Number > & | coarse_dofs, | ||
| const unsigned int | var, | ||
| const bool | use_old_dof_indices = false |
||
| ) | [static, inherited] |
Creates a local projection on coarse_elem, based on the DoF values in global_vector for it's children.
| void libMesh::FE< 2, SCALAR >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 122 of file fe_scalar.C.
{ }
| void libMesh::FE< 3, SCALAR >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 129 of file fe_scalar.C.
{ }
| void libMesh::FE< 2, L2_HIERARCHIC >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 205 of file fe_l2_hierarchic.C.
{ }
| void libMesh::FE< 3, L2_HIERARCHIC >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 212 of file fe_l2_hierarchic.C.
{ }
| void libMesh::FE< 2, CLOUGH >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 313 of file fe_clough.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 3, CLOUGH >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 320 of file fe_clough.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 2, HERMITE >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 351 of file fe_hermite.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 3, HERMITE >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 358 of file fe_hermite.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 2, HIERARCHIC >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 372 of file fe_hierarchic.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 3, HIERARCHIC >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 379 of file fe_hierarchic.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| static void libMesh::FE< Dim, T >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) | [static] |
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to variable number var_number, using element-specific optimizations if possible.
| void libMesh::FE< 2, MONOMIAL >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 407 of file fe_monomial.C.
{}
| void libMesh::FE< 3, MONOMIAL >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 408 of file fe_monomial.C.
{}
| void libMesh::FE< 2, BERNSTEIN >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 434 of file fe_bernstein.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 3, BERNSTEIN >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 441 of file fe_bernstein.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 2, L2_LAGRANGE >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 494 of file fe_l2_lagrange.C.
{ }
| void libMesh::FE< 3, L2_LAGRANGE >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 501 of file fe_l2_lagrange.C.
{ }
| void libMesh::FE< 0, NEDELEC_ONE >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 569 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| void libMesh::FE< 1, NEDELEC_ONE >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
Definition at line 576 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| void libMesh::FE< 2, NEDELEC_ONE >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 583 of file fe_nedelec_one.C.
{ nedelec_one_compute_constraints(constraints, dof_map, variable_number, elem, /*Dim=*/2); }
| void libMesh::FE< 3, NEDELEC_ONE >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 590 of file fe_nedelec_one.C.
{ nedelec_one_compute_constraints(constraints, dof_map, variable_number, elem, /*Dim=*/3); }
| void libMesh::FE< 2, LAGRANGE >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 895 of file fe_lagrange.C.
{ lagrange_compute_constraints(constraints, dof_map, variable_number, elem, /*Dim=*/2); }
| void libMesh::FE< 3, LAGRANGE >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 902 of file fe_lagrange.C.
{ lagrange_compute_constraints(constraints, dof_map, variable_number, elem, /*Dim=*/3); }
| void libMesh::FE< 2, XYZ >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
| void libMesh::FE< 3, XYZ >::compute_constraints | ( | DofConstraints & | , |
| DofMap & | , | ||
| const unsigned | int, | ||
| const Elem * | |||
| ) |
| void libMesh::FE< 2, LAGRANGE_VEC >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 950 of file fe_lagrange_vec.C.
References libMesh::FEGenericBase< OutputType >::compute_proj_constraints().
{ //libmesh_not_implemented();
FEVectorBase::compute_proj_constraints(constraints, dof_map, variable_number, elem);
}
| void libMesh::FE< 3, LAGRANGE_VEC >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 959 of file fe_lagrange_vec.C.
References libMesh::FEGenericBase< OutputType >::compute_proj_constraints().
{ //libmesh_not_implemented();
FEVectorBase::compute_proj_constraints(constraints, dof_map, variable_number, elem);
}
| void libMesh::FE< 2, SZABAB >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 1295 of file fe_szabab.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FE< 3, SZABAB >::compute_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) |
Definition at line 1302 of file fe_szabab.C.
{ compute_proj_constraints(constraints, dof_map, variable_number, elem); }
| void libMesh::FEAbstract::compute_node_constraints | ( | NodeConstraints & | constraints, |
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the nodal constraint contributions (for non-conforming adapted meshes), using Lagrange geometry
Definition at line 788 of file fe_abstract.C.
References std::abs(), libMesh::Elem::build_side(), libMesh::Elem::default_order(), libMesh::Elem::dim(), libMesh::FEAbstract::fe_type, libMesh::FEInterface::inverse_map(), libMesh::LAGRANGE, libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::FEInterface::n_dofs(), libMesh::Elem::n_sides(), libMesh::Elem::neighbor(), libMesh::Elem::parent(), libMesh::Real, libMesh::remote_elem, libMesh::FEInterface::shape(), libMesh::Threads::spin_mtx, and libMesh::Elem::subactive().
{
libmesh_assert(elem);
const unsigned int Dim = elem->dim();
// Only constrain elements in 2,3D.
if (Dim == 1)
return;
// Only constrain active and ancestor elements
if (elem->subactive())
return;
// We currently always use LAGRANGE mappings for geometry
const FEType fe_type(elem->default_order(), LAGRANGE);
std::vector<const Node*> my_nodes, parent_nodes;
// Look at the element faces. Check to see if we need to
// build constraints.
for (unsigned int s=0; s<elem->n_sides(); s++)
if (elem->neighbor(s) != NULL &&
elem->neighbor(s) != remote_elem)
if (elem->neighbor(s)->level() < elem->level()) // constrain dofs shared between
{ // this element and ones coarser
// than this element.
// Get pointers to the elements of interest and its parent.
const Elem* parent = elem->parent();
// This can't happen... Only level-0 elements have NULL
// parents, and no level-0 elements can be at a higher
// level than their neighbors!
libmesh_assert(parent);
const UniquePtr<Elem> my_side (elem->build_side(s));
const UniquePtr<Elem> parent_side (parent->build_side(s));
const unsigned int n_side_nodes = my_side->n_nodes();
my_nodes.clear();
my_nodes.reserve (n_side_nodes);
parent_nodes.clear();
parent_nodes.reserve (n_side_nodes);
for (unsigned int n=0; n != n_side_nodes; ++n)
my_nodes.push_back(my_side->get_node(n));
for (unsigned int n=0; n != n_side_nodes; ++n)
parent_nodes.push_back(parent_side->get_node(n));
for (unsigned int my_side_n=0;
my_side_n < n_side_nodes;
my_side_n++)
{
libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
const Node* my_node = my_nodes[my_side_n];
// The support point of the DOF
const Point& support_point = *my_node;
// Figure out where my node lies on their reference element.
const Point mapped_point = FEInterface::inverse_map(Dim-1, fe_type,
parent_side.get(),
support_point);
// Compute the parent's side shape function values.
for (unsigned int their_side_n=0;
their_side_n < n_side_nodes;
their_side_n++)
{
libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, parent_side->type()));
const Node* their_node = parent_nodes[their_side_n];
libmesh_assert(their_node);
const Real their_value = FEInterface::shape(Dim-1,
fe_type,
parent_side->type(),
their_side_n,
mapped_point);
const Real their_mag = std::abs(their_value);
#ifdef DEBUG
// Protect for the case u_i ~= u_j,
// in which case i better equal j.
if (their_mag > 0.999)
{
libmesh_assert_equal_to (my_node, their_node);
libmesh_assert_less (std::abs(their_value - 1.), 0.001);
}
else
#endif
// To make nodal constraints useful for constructing
// sparsity patterns faster, we need to get EVERY
// POSSIBLE constraint coupling identified, even if
// there is no coupling in the isoparametric
// Lagrange case.
if (their_mag < 1.e-5)
{
// since we may be running this method concurrently
// on multiple threads we need to acquire a lock
// before modifying the shared constraint_row object.
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
// A reference to the constraint row.
NodeConstraintRow& constraint_row = constraints[my_node].first;
constraint_row.insert(std::make_pair (their_node,
0.));
}
// To get nodal coordinate constraints right, only
// add non-zero and non-identity values for Lagrange
// basis functions.
else // (1.e-5 <= their_mag <= .999)
{
// since we may be running this method concurrently
// on multiple threads we need to acquire a lock
// before modifying the shared constraint_row object.
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
// A reference to the constraint row.
NodeConstraintRow& constraint_row = constraints[my_node].first;
constraint_row.insert(std::make_pair (their_node,
their_value));
}
}
}
}
}
| static void libMesh::FEGenericBase< FEOutputType< T >::type >::compute_periodic_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const PeriodicBoundaries & | boundaries, | ||
| const MeshBase & | mesh, | ||
| const PointLocatorBase * | point_locator, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the constraint matrix contributions (for meshes with periodic boundary conditions) corresponding to variable number var_number, using generic projections.
| void libMesh::FEAbstract::compute_periodic_node_constraints | ( | NodeConstraints & | constraints, |
| const PeriodicBoundaries & | boundaries, | ||
| const MeshBase & | mesh, | ||
| const PointLocatorBase * | point_locator, | ||
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the node position constraint equation contributions (for meshes with periodic boundary conditions)
Definition at line 931 of file fe_abstract.C.
References libMesh::Elem::active(), libMesh::PeriodicBoundaries::boundary(), libMesh::BoundaryInfo::boundary_ids(), libMesh::Elem::build_side(), libMesh::Elem::default_order(), libMesh::Elem::dim(), libMesh::FEAbstract::fe_type, libMesh::MeshBase::get_boundary_info(), libMesh::PeriodicBoundaryBase::get_corresponding_pos(), libMesh::invalid_uint, libMesh::FEInterface::inverse_map(), libMesh::LAGRANGE, libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::FEInterface::n_dofs(), libMesh::Elem::n_sides(), libMesh::PeriodicBoundaries::neighbor(), libMesh::Elem::neighbor(), libMesh::PeriodicBoundaryBase::pairedboundary, libMesh::Real, libMesh::FEInterface::shape(), libMesh::BoundaryInfo::side_with_boundary_id(), and libMesh::Threads::spin_mtx.
{
// Only bother if we truly have periodic boundaries
if (boundaries.empty())
return;
libmesh_assert(elem);
// Only constrain active elements with this method
if (!elem->active())
return;
const unsigned int Dim = elem->dim();
// We currently always use LAGRANGE mappings for geometry
const FEType fe_type(elem->default_order(), LAGRANGE);
std::vector<const Node*> my_nodes, neigh_nodes;
// Look at the element faces. Check to see if we need to
// build constraints.
for (unsigned short int s=0; s<elem->n_sides(); s++)
{
if (elem->neighbor(s))
continue;
const std::vector<boundary_id_type>& bc_ids =
mesh.get_boundary_info().boundary_ids (elem, s);
for (std::vector<boundary_id_type>::const_iterator id_it=bc_ids.begin(); id_it!=bc_ids.end(); ++id_it)
{
const boundary_id_type boundary_id = *id_it;
const PeriodicBoundaryBase *periodic = boundaries.boundary(boundary_id);
if (periodic)
{
libmesh_assert(point_locator);
// Get pointers to the element's neighbor.
const Elem* neigh = boundaries.neighbor(boundary_id, *point_locator, elem, s);
// h refinement constraints:
// constrain dofs shared between
// this element and ones as coarse
// as or coarser than this element.
if (neigh->level() <= elem->level())
{
unsigned int s_neigh =
mesh.get_boundary_info().side_with_boundary_id(neigh, periodic->pairedboundary);
libmesh_assert_not_equal_to (s_neigh, libMesh::invalid_uint);
#ifdef LIBMESH_ENABLE_AMR
libmesh_assert(neigh->active());
#endif // #ifdef LIBMESH_ENABLE_AMR
const UniquePtr<Elem> my_side (elem->build_side(s));
const UniquePtr<Elem> neigh_side (neigh->build_side(s_neigh));
const unsigned int n_side_nodes = my_side->n_nodes();
my_nodes.clear();
my_nodes.reserve (n_side_nodes);
neigh_nodes.clear();
neigh_nodes.reserve (n_side_nodes);
for (unsigned int n=0; n != n_side_nodes; ++n)
my_nodes.push_back(my_side->get_node(n));
for (unsigned int n=0; n != n_side_nodes; ++n)
neigh_nodes.push_back(neigh_side->get_node(n));
// Make sure we're not adding recursive constraints
// due to the redundancy in the way we add periodic
// boundary constraints, or adding constraints to
// nodes that already have AMR constraints
std::vector<bool> skip_constraint(n_side_nodes, false);
for (unsigned int my_side_n=0;
my_side_n < n_side_nodes;
my_side_n++)
{
libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
const Node* my_node = my_nodes[my_side_n];
// Figure out where my node lies on their reference element.
const Point neigh_point = periodic->get_corresponding_pos(*my_node);
const Point mapped_point = FEInterface::inverse_map(Dim-1, fe_type,
neigh_side.get(),
neigh_point);
// If we've already got a constraint on this
// node, then the periodic constraint is
// redundant
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
if (constraints.count(my_node))
{
skip_constraint[my_side_n] = true;
continue;
}
}
// Compute the neighbors's side shape function values.
for (unsigned int their_side_n=0;
their_side_n < n_side_nodes;
their_side_n++)
{
libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, neigh_side->type()));
const Node* their_node = neigh_nodes[their_side_n];
// If there's a constraint on an opposing node,
// we need to see if it's constrained by
// *our side* making any periodic constraint
// on us recursive
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
if (!constraints.count(their_node))
continue;
const NodeConstraintRow& their_constraint_row =
constraints[their_node].first;
for (unsigned int orig_side_n=0;
orig_side_n < n_side_nodes;
orig_side_n++)
{
libmesh_assert_less (orig_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
const Node* orig_node = my_nodes[orig_side_n];
if (their_constraint_row.count(orig_node))
skip_constraint[orig_side_n] = true;
}
}
}
}
for (unsigned int my_side_n=0;
my_side_n < n_side_nodes;
my_side_n++)
{
libmesh_assert_less (my_side_n, FEInterface::n_dofs(Dim-1, fe_type, my_side->type()));
if (skip_constraint[my_side_n])
continue;
const Node* my_node = my_nodes[my_side_n];
// Figure out where my node lies on their reference element.
const Point neigh_point = periodic->get_corresponding_pos(*my_node);
// Figure out where my node lies on their reference element.
const Point mapped_point = FEInterface::inverse_map(Dim-1, fe_type,
neigh_side.get(),
neigh_point);
for (unsigned int their_side_n=0;
their_side_n < n_side_nodes;
their_side_n++)
{
libmesh_assert_less (their_side_n, FEInterface::n_dofs(Dim-1, fe_type, neigh_side->type()));
const Node* their_node = neigh_nodes[their_side_n];
libmesh_assert(their_node);
const Real their_value = FEInterface::shape(Dim-1,
fe_type,
neigh_side->type(),
their_side_n,
mapped_point);
// since we may be running this method concurrently
// on multiple threads we need to acquire a lock
// before modifying the shared constraint_row object.
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
NodeConstraintRow& constraint_row =
constraints[my_node].first;
constraint_row.insert(std::make_pair(their_node,
their_value));
}
}
}
}
}
}
}
}
| static void libMesh::FEGenericBase< FEOutputType< T >::type >::compute_proj_constraints | ( | DofConstraints & | constraints, |
| DofMap & | dof_map, | ||
| const unsigned int | variable_number, | ||
| const Elem * | elem | ||
| ) | [static, inherited] |
Computes the constraint matrix contributions (for non-conforming adapted meshes) corresponding to variable number var_number, using generic projections.
| virtual void libMesh::FEGenericBase< FEOutputType< T >::type >::compute_shape_functions | ( | const Elem * | elem, |
| const std::vector< Point > & | qp | ||
| ) | [protected, virtual, inherited] |
After having updated the jacobian and the transformation from local to global coordinates in FEAbstract::compute_map(), the first derivatives of the shape functions are transformed to global coordinates, giving dphi, dphidx, dphidy, and dphidz. This method should rarely be re-defined in derived classes, but still should be usable for children. Therefore, keep it protected.
Implements libMesh::FEAbstract.
Reimplemented in libMesh::FEXYZ< Dim >.
| void libMesh::ReferenceCounter::disable_print_counter_info | ( | ) | [static, inherited] |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
Referenced by libMesh::LibMeshInit::LibMeshInit().
{
_enable_print_counter = false;
return;
}
| void libMesh::FE< Dim, T >::dofs_on_edge | ( | const Elem *const | elem, |
| const Order | o, | ||
| unsigned int | e, | ||
| std::vector< unsigned int > & | di | ||
| ) | [static] |
Fills the vector di with the local degree of freedom indices associated with edge e of element elem
On a p-refined element, o should be the base order of the element.
Definition at line 89 of file fe.C.
References libMesh::Elem::is_node_on_edge(), libMesh::libmesh_assert(), libMesh::Elem::n_edges(), n_nodes, libMesh::Elem::n_nodes(), libMesh::Elem::p_level(), and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert_less (e, elem->n_edges());
di.clear();
unsigned int nodenum = 0;
const unsigned int n_nodes = elem->n_nodes();
for (unsigned int n = 0; n != n_nodes; ++n)
{
const unsigned int n_dofs = n_dofs_at_node(elem->type(),
static_cast<Order>(o + elem->p_level()), n);
if (elem->is_node_on_edge(n, e))
for (unsigned int i = 0; i != n_dofs; ++i)
di.push_back(nodenum++);
else
nodenum += n_dofs;
}
}
| void libMesh::FE< 2, SUBDIVISION >::dofs_on_edge | ( | const Elem * | const, |
| const Order | , | ||
| unsigned | int, | ||
| std::vector< unsigned int > & | di | ||
| ) |
Definition at line 935 of file fe_subdivision_2D.C.
{ di.resize(0); }
| void libMesh::FE< Dim, T >::dofs_on_side | ( | const Elem *const | elem, |
| const Order | o, | ||
| unsigned int | s, | ||
| std::vector< unsigned int > & | di | ||
| ) | [static] |
Fills the vector di with the local degree of freedom indices associated with side s of element elem
On a p-refined element, o should be the base order of the element.
Definition at line 63 of file fe.C.
References libMesh::Elem::is_node_on_side(), libMesh::libmesh_assert(), n_nodes, libMesh::Elem::n_nodes(), libMesh::Elem::n_sides(), libMesh::Elem::p_level(), and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert_less (s, elem->n_sides());
di.clear();
unsigned int nodenum = 0;
const unsigned int n_nodes = elem->n_nodes();
for (unsigned int n = 0; n != n_nodes; ++n)
{
const unsigned int n_dofs = n_dofs_at_node(elem->type(),
static_cast<Order>(o + elem->p_level()), n);
if (elem->is_node_on_side(n, s))
for (unsigned int i = 0; i != n_dofs; ++i)
di.push_back(nodenum++);
else
nodenum += n_dofs;
}
}
| void libMesh::FE< 2, SUBDIVISION >::dofs_on_side | ( | const Elem * | const, |
| const Order | , | ||
| unsigned | int, | ||
| std::vector< unsigned int > & | di | ||
| ) |
Definition at line 934 of file fe_subdivision_2D.C.
{ di.resize(0); }
| void libMesh::FE< Dim, T >::edge_reinit | ( | const Elem * | elem, |
| const unsigned int | edge, | ||
| const Real | tolerance = TOLERANCE, |
||
| const std::vector< Point > *const | pts = NULL, |
||
| const std::vector< Real > *const | weights = NULL |
||
| ) | [virtual] |
Reinitializes all the physical element-dependent data based on the edge. The tolerance paremeter is passed to the involved call to inverse_map(). By default the shape functions and associated data are computed at the quadrature points specified by the quadrature rule qrule, but may be any points specified on the reference side element specified in the optional argument pts.
Implements libMesh::FEAbstract.
Definition at line 244 of file fe_boundary.C.
References libMesh::Elem::build_edge(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert (this->qrule != NULL || pts != NULL);
// We don't do this for 1D elements!
libmesh_assert_not_equal_to (Dim, 1);
// Build the side of interest
const UniquePtr<Elem> edge(elem->build_edge(e));
// Initialize the shape functions at the user-specified
// points
if (pts != NULL)
{
// The shape functions do not correspond to the qrule
this->shapes_on_quadrature = false;
// Initialize the edge shape functions
this->_fe_map->template init_edge_shape_functions<Dim> (*pts, edge.get());
// Compute the Jacobian*Weight on the face for integration
if (weights != NULL)
{
this->_fe_map->compute_edge_map (Dim, *weights, edge.get());
}
else
{
std::vector<Real> dummy_weights (pts->size(), 1.);
this->_fe_map->compute_edge_map (Dim, dummy_weights, edge.get());
}
}
// If there are no user specified points, we use the
// quadrature rule
else
{
// initialize quadrature rule
this->qrule->init(edge->type(), elem->p_level());
if(this->qrule->shapes_need_reinit())
this->shapes_on_quadrature = false;
// We might not need to reinitialize the shape functions
if ((this->get_type() != elem->type()) ||
(edge->type() != static_cast<int>(last_edge)) || // Comparison between enum and unsigned, cast the unsigned to int
this->shapes_need_reinit() ||
!this->shapes_on_quadrature)
{
// Set the element type
this->elem_type = elem->type();
// Set the last_edge
last_edge = edge->type();
// Initialize the edge shape functions
this->_fe_map->template init_edge_shape_functions<Dim> (this->qrule->get_points(), edge.get());
}
// Compute the Jacobian*Weight on the face for integration
this->_fe_map->compute_edge_map (Dim, this->qrule->get_weights(), edge.get());
// The shape functions correspond to the qrule
this->shapes_on_quadrature = true;
}
// make a copy of the Jacobian for integration
const std::vector<Real> JxW_int(this->_fe_map->get_JxW());
// Find where the integration points are located on the
// full element.
std::vector<Point> qp;
this->inverse_map (elem, this->_fe_map->get_xyz(), qp, tolerance);
// compute the shape function and derivative values
// at the points qp
this->reinit (elem, &qp);
// copy back old data
this->_fe_map->get_JxW() = JxW_int;
}
| void libMesh::FE< 2, SUBDIVISION >::edge_reinit | ( | Elem const * | elem, |
| unsigned | edge, | ||
| Real | tolerance, | ||
| const std::vector< Point > * | pts, | ||
| const std::vector< Real > * | weights | ||
| ) | [virtual] |
Reinitializes all the physical element-dependent data based on the edge of the element elem. The tolerance paremeter is passed to the involved call to inverse_map(). By default the element data are computed at the quadrature points specified by the quadrature rule qrule, but any set of points on the reference edge element may be specified in the optional argument pts.
Implements libMesh::FEAbstract.
Definition at line 894 of file fe_subdivision_2D.C.
{
libmesh_not_implemented();
}
| void libMesh::ReferenceCounter::enable_print_counter_info | ( | ) | [static, inherited] |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
{
_enable_print_counter = true;
return;
}
| FEContinuity libMesh::FE< 0, SCALAR >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 107 of file fe_scalar.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 1, SCALAR >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 108 of file fe_scalar.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 2, SCALAR >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 109 of file fe_scalar.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 3, SCALAR >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 110 of file fe_scalar.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 0, L2_HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 191 of file fe_l2_hierarchic.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 1, L2_HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 192 of file fe_l2_hierarchic.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 2, L2_HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 193 of file fe_l2_hierarchic.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 3, L2_HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 194 of file fe_l2_hierarchic.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| virtual FEContinuity libMesh::FE< Dim, T >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
| FEContinuity libMesh::FE< 0, CLOUGH >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 299 of file fe_clough.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 1, CLOUGH >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 300 of file fe_clough.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 2, CLOUGH >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 301 of file fe_clough.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 3, CLOUGH >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 302 of file fe_clough.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 0, HERMITE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 336 of file fe_hermite.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 1, HERMITE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 337 of file fe_hermite.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 2, HERMITE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 338 of file fe_hermite.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 3, HERMITE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 339 of file fe_hermite.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 0, HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 358 of file fe_hierarchic.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 1, HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 359 of file fe_hierarchic.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 2, HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 360 of file fe_hierarchic.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 3, HIERARCHIC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 361 of file fe_hierarchic.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 0, MONOMIAL >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 390 of file fe_monomial.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 1, MONOMIAL >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 391 of file fe_monomial.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 2, MONOMIAL >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 392 of file fe_monomial.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 3, MONOMIAL >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 393 of file fe_monomial.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 0, BERNSTEIN >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 420 of file fe_bernstein.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 1, BERNSTEIN >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 421 of file fe_bernstein.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 2, BERNSTEIN >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 422 of file fe_bernstein.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 3, BERNSTEIN >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 423 of file fe_bernstein.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 0, L2_LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 473 of file fe_l2_lagrange.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 1, L2_LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 474 of file fe_l2_lagrange.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 2, L2_LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 475 of file fe_l2_lagrange.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 3, L2_LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 476 of file fe_l2_lagrange.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 0, NEDELEC_ONE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 550 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| FEContinuity libMesh::FE< 1, NEDELEC_ONE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 551 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| FEContinuity libMesh::FE< 2, NEDELEC_ONE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 552 of file fe_nedelec_one.C.
References libMesh::H_CURL.
{ return H_CURL; }
| FEContinuity libMesh::FE< 3, NEDELEC_ONE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 553 of file fe_nedelec_one.C.
References libMesh::H_CURL.
{ return H_CURL; }
| FEContinuity libMesh::FE< 0, LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 872 of file fe_lagrange.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 1, LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 873 of file fe_lagrange.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 2, LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 874 of file fe_lagrange.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 3, LAGRANGE >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 875 of file fe_lagrange.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 0, XYZ >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 901 of file fe_xyz.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 1, XYZ >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 902 of file fe_xyz.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 2, XYZ >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 903 of file fe_xyz.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 3, XYZ >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 904 of file fe_xyz.C.
References libMesh::DISCONTINUOUS.
{ return DISCONTINUOUS; }
| FEContinuity libMesh::FE< 0, LAGRANGE_VEC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 927 of file fe_lagrange_vec.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 1, LAGRANGE_VEC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 928 of file fe_lagrange_vec.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 2, LAGRANGE_VEC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 929 of file fe_lagrange_vec.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 3, LAGRANGE_VEC >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 930 of file fe_lagrange_vec.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 2, SUBDIVISION >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 938 of file fe_subdivision_2D.C.
References libMesh::C_ONE.
{ return C_ONE; }
| FEContinuity libMesh::FE< 0, SZABAB >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1281 of file fe_szabab.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 1, SZABAB >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1282 of file fe_szabab.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 2, SZABAB >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1283 of file fe_szabab.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| FEContinuity libMesh::FE< 3, SZABAB >::get_continuity | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1284 of file fe_szabab.C.
References libMesh::C_ZERO.
{ return C_ZERO; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi | ( | ) | const [inline, inherited] |
Definition at line 226 of file fe_base.h.
References libMesh::FEAbstract::calculate_curl_phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::curl_phi, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_curl_phi);
calculate_curl_phi = calculate_dphiref = true; return curl_phi; }
| const std::vector<Real>& libMesh::FEAbstract::get_curvatures | ( | ) | const [inline, inherited] |
Definition at line 380 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_curvatures();}
| const std::vector<std::vector<OutputTensor> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi | ( | ) | const [inline, inherited] |
Definition at line 292 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phi, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phi; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2 | ( | ) | const [inline, inherited] |
Definition at line 372 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phideta2, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phideta2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta | ( | ) | const [inline, inherited] |
Definition at line 380 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidetadzeta, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidetadzeta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2 | ( | ) | const [inline, inherited] |
Definition at line 300 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidx2, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidx2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy | ( | ) | const [inline, inherited] |
Definition at line 308 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxdy, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxdy; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz | ( | ) | const [inline, inherited] |
Definition at line 316 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxdz, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxdz; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2 | ( | ) | const [inline, inherited] |
Definition at line 348 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxi2, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxi2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta | ( | ) | const [inline, inherited] |
Definition at line 356 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxideta, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxideta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta | ( | ) | const [inline, inherited] |
Definition at line 364 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidxidzeta, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidxidzeta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2 | ( | ) | const [inline, inherited] |
Definition at line 324 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidy2, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidy2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz | ( | ) | const [inline, inherited] |
Definition at line 332 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidydz, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidydz; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2 | ( | ) | const [inline, inherited] |
Definition at line 340 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidz2, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidz2; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2 | ( | ) | const [inline, inherited] |
Definition at line 388 of file fe_base.h.
References libMesh::FEAbstract::calculate_d2phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::d2phidzeta2, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_d2phi);
calculate_d2phi = calculate_dphiref = true; return d2phidzeta2; }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdeta2 | ( | ) | const [inline, inherited] |
Definition at line 267 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdeta2(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdetadzeta | ( | ) | const [inline, inherited] |
Definition at line 297 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdetadzeta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxi2 | ( | ) | const [inline, inherited] |
Definition at line 261 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdxi2(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxideta | ( | ) | const [inline, inherited] |
Definition at line 283 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdxideta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdxidzeta | ( | ) | const [inline, inherited] |
Definition at line 291 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdxidzeta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_d2xyzdzeta2 | ( | ) | const [inline, inherited] |
Definition at line 275 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_d2xyzdzeta2(); }
| const std::vector<Real>& libMesh::FEAbstract::get_detadx | ( | ) | const [inline, inherited] |
Definition at line 327 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_detadx(); }
| const std::vector<Real>& libMesh::FEAbstract::get_detady | ( | ) | const [inline, inherited] |
Definition at line 334 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_detady(); }
| const std::vector<Real>& libMesh::FEAbstract::get_detadz | ( | ) | const [inline, inherited] |
Definition at line 341 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_detadz(); }
| const std::vector<std::vector<OutputDivergence> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi | ( | ) | const [inline, inherited] |
Definition at line 234 of file fe_base.h.
References libMesh::FEAbstract::calculate_div_phi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::div_phi, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_div_phi);
calculate_div_phi = calculate_dphiref = true; return div_phi; }
| const std::vector<OutputGradient>& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphase | ( | ) | const [inline, inherited] |
In case of the general finite element class FE this field is initialized to all zero, so that the variational formulation for an infinite element returns correct element matrices for a mesh using both finite and infinite elements.
Definition at line 406 of file fe_base.h.
References libMesh::FEGenericBase< OutputType >::dphase.
{ return dphase; }
| const std::vector<std::vector<OutputGradient> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi | ( | ) | const [inline, inherited] |
Definition at line 218 of file fe_base.h.
References libMesh::FEAbstract::calculate_dphi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dphi, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphi; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta | ( | ) | const [inline, inherited] |
Definition at line 274 of file fe_base.h.
References libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dphideta, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_dphiref);
calculate_dphiref = true; return dphideta; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx | ( | ) | const [inline, inherited] |
Definition at line 242 of file fe_base.h.
References libMesh::FEAbstract::calculate_dphi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dphidx, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphidx; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi | ( | ) | const [inline, inherited] |
Definition at line 266 of file fe_base.h.
References libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dphidxi, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_dphiref);
calculate_dphiref = true; return dphidxi; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy | ( | ) | const [inline, inherited] |
Definition at line 250 of file fe_base.h.
References libMesh::FEAbstract::calculate_dphi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dphidy, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphidy; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz | ( | ) | const [inline, inherited] |
Definition at line 258 of file fe_base.h.
References libMesh::FEAbstract::calculate_dphi, libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dphidz, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_dphi);
calculate_dphi = calculate_dphiref = true; return dphidz; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta | ( | ) | const [inline, inherited] |
Definition at line 282 of file fe_base.h.
References libMesh::FEAbstract::calculate_dphiref, libMesh::FEAbstract::calculations_started, libMesh::FEGenericBase< OutputType >::dphidzeta, and libMesh::libmesh_assert().
{ libmesh_assert(!calculations_started || calculate_dphiref);
calculate_dphiref = true; return dphidzeta; }
| const std::vector<Real>& libMesh::FEAbstract::get_dxidx | ( | ) | const [inline, inherited] |
Definition at line 306 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxidx(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dxidy | ( | ) | const [inline, inherited] |
Definition at line 313 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxidy(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dxidz | ( | ) | const [inline, inherited] |
Definition at line 320 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxidz(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdeta | ( | ) | const [inline, inherited] |
Definition at line 248 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxyzdeta(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdxi | ( | ) | const [inline, inherited] |
Definition at line 241 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dxyzdxi(); }
| const std::vector<RealGradient>& libMesh::FEAbstract::get_dxyzdzeta | ( | ) | const [inline, inherited] |
Definition at line 255 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return _fe_map->get_dxyzdzeta(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dzetadx | ( | ) | const [inline, inherited] |
Definition at line 348 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dzetadx(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dzetady | ( | ) | const [inline, inherited] |
Definition at line 355 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dzetady(); }
| const std::vector<Real>& libMesh::FEAbstract::get_dzetadz | ( | ) | const [inline, inherited] |
Definition at line 362 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_dzetadz(); }
| FEFamily libMesh::FEAbstract::get_family | ( | ) | const [inline, inherited] |
Definition at line 439 of file fe_abstract.h.
References libMesh::FEType::family, and libMesh::FEAbstract::fe_type.
Referenced by libMesh::FE< Dim, T >::FE().
| const FEMap& libMesh::FEAbstract::get_fe_map | ( | ) | const [inline, inherited] |
Definition at line 444 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::HCurlFETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_curl(), libMesh::H1FETransformation< OutputShape >::map_d2phi(), libMesh::H1FETransformation< OutputShape >::map_div(), libMesh::H1FETransformation< OutputShape >::map_dphi(), and libMesh::HCurlFETransformation< OutputShape >::map_phi().
{ return *_fe_map.get(); }
| FEType libMesh::FEAbstract::get_fe_type | ( | ) | const [inline, inherited] |
Definition at line 418 of file fe_abstract.h.
References libMesh::FEAbstract::fe_type.
Referenced by libMesh::FEMContext::build_new_fe(), libMesh::H1FETransformation< OutputShape >::map_phi(), libMesh::HCurlFETransformation< OutputShape >::map_phi(), and libMesh::ProjectFEMSolution::operator()().
{ return fe_type; }
| std::string libMesh::ReferenceCounter::get_info | ( | ) | [static, inherited] |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
{
#if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
std::ostringstream oss;
oss << '\n'
<< " ---------------------------------------------------------------------------- \n"
<< "| Reference count information |\n"
<< " ---------------------------------------------------------------------------- \n";
for (Counts::iterator it = _counts.begin();
it != _counts.end(); ++it)
{
const std::string name(it->first);
const unsigned int creations = it->second.first;
const unsigned int destructions = it->second.second;
oss << "| " << name << " reference count information:\n"
<< "| Creations: " << creations << '\n'
<< "| Destructions: " << destructions << '\n';
}
oss << " ---------------------------------------------------------------------------- \n";
return oss.str();
#else
return "";
#endif
}
| const std::vector<Real>& libMesh::FEAbstract::get_JxW | ( | ) | const [inline, inherited] |
Definition at line 234 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::FEMSystem::init_context(), and libMesh::ProjectFEMSolution::operator()().
{ return this->_fe_map->get_JxW(); }
| const std::vector<Point>& libMesh::FEAbstract::get_normals | ( | ) | const [inline, inherited] |
Definition at line 374 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_normals(); }
| Order libMesh::FEAbstract::get_order | ( | ) | const [inline, inherited] |
Definition at line 423 of file fe_abstract.h.
References libMesh::FEAbstract::_p_level, libMesh::FEAbstract::fe_type, and libMesh::FEType::order.
| unsigned int libMesh::FEAbstract::get_p_level | ( | ) | const [inline, inherited] |
Definition at line 413 of file fe_abstract.h.
References libMesh::FEAbstract::_p_level.
{ return _p_level; }
| const std::vector<std::vector<OutputShape> >& libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi | ( | ) | const [inline, inherited] |
Definition at line 210 of file fe_base.h.
References libMesh::FEAbstract::calculate_phi, libMesh::FEAbstract::calculations_started, libMesh::libmesh_assert(), and libMesh::FEGenericBase< OutputType >::phi.
{ libmesh_assert(!calculations_started || calculate_phi);
calculate_phi = true; return phi; }
| void libMesh::FEAbstract::get_refspace_nodes | ( | const ElemType | t, |
| std::vector< Point > & | nodes | ||
| ) | [static, inherited] |
returns the reference space nodes coordinates given the element type
Definition at line 259 of file fe_abstract.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::TET10, libMesh::TET4, libMesh::TRI3, and libMesh::TRI6.
{
switch(itemType)
{
case EDGE2:
{
nodes.resize(2);
nodes[0] = Point (-1.,0.,0.);
nodes[1] = Point (1.,0.,0.);
return;
}
case EDGE3:
{
nodes.resize(3);
nodes[0] = Point (-1.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,0.,0.);
return;
}
case TRI3:
{
nodes.resize(3);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
return;
}
case TRI6:
{
nodes.resize(6);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
nodes[3] = Point (.5,0.,0.);
nodes[4] = Point (.5,.5,0.);
nodes[5] = Point (0.,.5,0.);
return;
}
case QUAD4:
{
nodes.resize(4);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
return;
}
case QUAD8:
{
nodes.resize(8);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
nodes[4] = Point (0.,-1.,0.);
nodes[5] = Point (1.,0.,0.);
nodes[6] = Point (0.,1.,0.);
nodes[7] = Point (-1.,0.,0.);
return;
}
case QUAD9:
{
nodes.resize(9);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
nodes[4] = Point (0.,-1.,0.);
nodes[5] = Point (1.,0.,0.);
nodes[6] = Point (0.,1.,0.);
nodes[7] = Point (-1.,0.,0.);
nodes[8] = Point (0.,0.,0.);
return;
}
case TET4:
{
nodes.resize(4);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
nodes[3] = Point (0.,0.,1.);
return;
}
case TET10:
{
nodes.resize(10);
nodes[0] = Point (0.,0.,0.);
nodes[1] = Point (1.,0.,0.);
nodes[2] = Point (0.,1.,0.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (.5,0.,0.);
nodes[5] = Point (.5,.5,0.);
nodes[6] = Point (0.,.5,0.);
nodes[7] = Point (0.,0.,.5);
nodes[8] = Point (.5,0.,.5);
nodes[9] = Point (0.,.5,.5);
return;
}
case HEX8:
{
nodes.resize(8);
nodes[0] = Point (-1.,-1.,-1.);
nodes[1] = Point (1.,-1.,-1.);
nodes[2] = Point (1.,1.,-1.);
nodes[3] = Point (-1.,1.,-1.);
nodes[4] = Point (-1.,-1.,1.);
nodes[5] = Point (1.,-1.,1.);
nodes[6] = Point (1.,1.,1.);
nodes[7] = Point (-1.,1.,1.);
return;
}
case HEX20:
{
nodes.resize(20);
nodes[0] = Point (-1.,-1.,-1.);
nodes[1] = Point (1.,-1.,-1.);
nodes[2] = Point (1.,1.,-1.);
nodes[3] = Point (-1.,1.,-1.);
nodes[4] = Point (-1.,-1.,1.);
nodes[5] = Point (1.,-1.,1.);
nodes[6] = Point (1.,1.,1.);
nodes[7] = Point (-1.,1.,1.);
nodes[8] = Point (0.,-1.,-1.);
nodes[9] = Point (1.,0.,-1.);
nodes[10] = Point (0.,1.,-1.);
nodes[11] = Point (-1.,0.,-1.);
nodes[12] = Point (-1.,-1.,0.);
nodes[13] = Point (1.,-1.,0.);
nodes[14] = Point (1.,1.,0.);
nodes[15] = Point (-1.,1.,0.);
nodes[16] = Point (0.,-1.,1.);
nodes[17] = Point (1.,0.,1.);
nodes[18] = Point (0.,1.,1.);
nodes[19] = Point (-1.,0.,1.);
return;
}
case HEX27:
{
nodes.resize(27);
nodes[0] = Point (-1.,-1.,-1.);
nodes[1] = Point (1.,-1.,-1.);
nodes[2] = Point (1.,1.,-1.);
nodes[3] = Point (-1.,1.,-1.);
nodes[4] = Point (-1.,-1.,1.);
nodes[5] = Point (1.,-1.,1.);
nodes[6] = Point (1.,1.,1.);
nodes[7] = Point (-1.,1.,1.);
nodes[8] = Point (0.,-1.,-1.);
nodes[9] = Point (1.,0.,-1.);
nodes[10] = Point (0.,1.,-1.);
nodes[11] = Point (-1.,0.,-1.);
nodes[12] = Point (-1.,-1.,0.);
nodes[13] = Point (1.,-1.,0.);
nodes[14] = Point (1.,1.,0.);
nodes[15] = Point (-1.,1.,0.);
nodes[16] = Point (0.,-1.,1.);
nodes[17] = Point (1.,0.,1.);
nodes[18] = Point (0.,1.,1.);
nodes[19] = Point (-1.,0.,1.);
nodes[20] = Point (0.,0.,-1.);
nodes[21] = Point (0.,-1.,0.);
nodes[22] = Point (1.,0.,0.);
nodes[23] = Point (0.,1.,0.);
nodes[24] = Point (-1.,0.,0.);
nodes[25] = Point (0.,0.,1.);
nodes[26] = Point (0.,0.,0.);
return;
}
case PRISM6:
{
nodes.resize(6);
nodes[0] = Point (0.,0.,-1.);
nodes[1] = Point (1.,0.,-1.);
nodes[2] = Point (0.,1.,-1.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (1.,0.,1.);
nodes[5] = Point (0.,1.,1.);
return;
}
case PRISM15:
{
nodes.resize(15);
nodes[0] = Point (0.,0.,-1.);
nodes[1] = Point (1.,0.,-1.);
nodes[2] = Point (0.,1.,-1.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (1.,0.,1.);
nodes[5] = Point (0.,1.,1.);
nodes[6] = Point (.5,0.,-1.);
nodes[7] = Point (.5,.5,-1.);
nodes[8] = Point (0.,.5,-1.);
nodes[9] = Point (0.,0.,0.);
nodes[10] = Point (1.,0.,0.);
nodes[11] = Point (0.,1.,0.);
nodes[12] = Point (.5,0.,1.);
nodes[13] = Point (.5,.5,1.);
nodes[14] = Point (0.,.5,1.);
return;
}
case PRISM18:
{
nodes.resize(18);
nodes[0] = Point (0.,0.,-1.);
nodes[1] = Point (1.,0.,-1.);
nodes[2] = Point (0.,1.,-1.);
nodes[3] = Point (0.,0.,1.);
nodes[4] = Point (1.,0.,1.);
nodes[5] = Point (0.,1.,1.);
nodes[6] = Point (.5,0.,-1.);
nodes[7] = Point (.5,.5,-1.);
nodes[8] = Point (0.,.5,-1.);
nodes[9] = Point (0.,0.,0.);
nodes[10] = Point (1.,0.,0.);
nodes[11] = Point (0.,1.,0.);
nodes[12] = Point (.5,0.,1.);
nodes[13] = Point (.5,.5,1.);
nodes[14] = Point (0.,.5,1.);
nodes[15] = Point (.5,0.,0.);
nodes[16] = Point (.5,.5,0.);
nodes[17] = Point (0.,.5,0.);
return;
}
case PYRAMID5:
{
nodes.resize(5);
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
nodes[4] = Point (0.,0.,1.);
return;
}
case PYRAMID13:
{
nodes.resize(13);
// base corners
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
// apex
nodes[4] = Point (0.,0.,1.);
// base midedge
nodes[5] = Point (0.,-1.,0.);
nodes[6] = Point (1.,0.,0.);
nodes[7] = Point (0.,1.,0.);
nodes[8] = Point (-1,0.,0.);
// lateral midedge
nodes[9] = Point (-.5,-.5,.5);
nodes[10] = Point (.5,-.5,.5);
nodes[11] = Point (.5,.5,.5);
nodes[12] = Point (-.5,.5,.5);
return;
}
case PYRAMID14:
{
nodes.resize(14);
// base corners
nodes[0] = Point (-1.,-1.,0.);
nodes[1] = Point (1.,-1.,0.);
nodes[2] = Point (1.,1.,0.);
nodes[3] = Point (-1.,1.,0.);
// apex
nodes[4] = Point (0.,0.,1.);
// base midedge
nodes[5] = Point (0.,-1.,0.);
nodes[6] = Point (1.,0.,0.);
nodes[7] = Point (0.,1.,0.);
nodes[8] = Point (-1,0.,0.);
// lateral midedge
nodes[9] = Point (-.5,-.5,.5);
nodes[10] = Point (.5,-.5,.5);
nodes[11] = Point (.5,.5,.5);
nodes[12] = Point (-.5,.5,.5);
// base center
nodes[13] = Point (0.,0.,0.);
return;
}
default:
libmesh_error_msg("ERROR: Unknown element type " << itemType);
}
}
| const std::vector<RealGradient>& libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_dweight | ( | ) | const [inline, inherited] |
get_Sobolev_weight() for details. In case of FE initialized to all zero. Definition at line 430 of file fe_base.h.
References libMesh::FEGenericBase< OutputType >::dweight.
{ return dweight; }
| const std::vector<Real>& libMesh::FEGenericBase< FEOutputType< T >::type >::get_Sobolev_weight | ( | ) | const [inline, inherited] |
In case of the general finite element class FE this field is initialized to all ones, so that the variational formulation for an infinite element returns correct element matrices for a mesh using both finite and infinite elements.
Definition at line 422 of file fe_base.h.
References libMesh::FEGenericBase< OutputType >::weight.
{ return weight; }
| const std::vector<std::vector<Point> >& libMesh::FEAbstract::get_tangents | ( | ) | const [inline, inherited] |
Definition at line 368 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
{ return this->_fe_map->get_tangents(); }
| ElemType libMesh::FEAbstract::get_type | ( | ) | const [inline, inherited] |
Definition at line 407 of file fe_abstract.h.
References libMesh::FEAbstract::elem_type.
{ return elem_type; }
| const std::vector<Point>& libMesh::FEAbstract::get_xyz | ( | ) | const [inline, inherited] |
xyz spatial locations of the quadrature points on the element. Definition at line 227 of file fe_abstract.h.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::ExactSolution::_compute_error(), libMesh::ExactErrorEstimator::find_squared_element_error(), libMesh::DGFEMContext::neighbor_side_fe_reinit(), and libMesh::ProjectFEMSolution::operator()().
{ return this->_fe_map->get_xyz(); }
| void libMesh::ReferenceCounter::increment_constructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the construction counter. Should be called in the constructor of any derived class that will be reference counted.
Definition at line 163 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.first++;
}
| void libMesh::ReferenceCounter::increment_destructor_count | ( | const std::string & | name | ) | [inline, protected, inherited] |
Increments the destruction counter. Should be called in the destructor of any derived class that will be reference counted.
Definition at line 176 of file reference_counter.h.
References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
{
Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
std::pair<unsigned int, unsigned int>& p = _counts[name];
p.second++;
}
| void libMesh::FE< Dim, T >::init_base_shape_functions | ( | const std::vector< Point > & | qp, |
| const Elem * | e | ||
| ) | [protected, virtual] |
Initialize the data fields for the base of an an infinite element.
Implements libMesh::FEGenericBase< FEOutputType< T >::type >.
Definition at line 569 of file fe.C.
References libMesh::Elem::type().
{
// I don't understand infinite elements well enough to risk
// calculating too little. :-( RHS
this->calculate_phi = this->calculate_dphi = this->calculate_d2phi = true;
this->elem_type = e->type();
this->_fe_map->template init_reference_to_physical_map<Dim>(qp, e);
init_shape_functions(qp, e);
}
| void libMesh::FE< Dim, T >::init_shape_functions | ( | const std::vector< Point > & | qp, |
| const Elem * | e | ||
| ) | [protected, virtual] |
Update the various member data fields phi, dphidxi, dphideta, dphidzeta, etc. for the current element. These data will be computed at the points qp, which are generally (but need not be) the quadrature points.
Reimplemented in libMesh::FEXYZ< Dim >, and libMesh::FESubdivision.
Definition at line 277 of file fe.C.
References libMesh::FEInterface::field_type(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::FE< Dim, T >::shape_second_deriv(), libMesh::START_LOG(), libMesh::TYPE_VECTOR, and libMesh::MeshTools::weight().
{
// We can be called with no element. If we're evaluating SCALAR
// dofs we'll still have work to do.
// libmesh_assert(elem);
this->calculations_started = true;
// If the user forgot to request anything, we'll be safe and
// calculate everything:
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (!this->calculate_phi && !this->calculate_dphi && !this->calculate_d2phi
&& !this->calculate_curl_phi && !this->calculate_div_phi)
{
this->calculate_phi = this->calculate_dphi = this->calculate_d2phi = this->calculate_dphiref = true;
if( FEInterface::field_type(T) == TYPE_VECTOR )
{
this->calculate_curl_phi = true;
this->calculate_div_phi = true;
}
}
#else
if (!this->calculate_phi && !this->calculate_dphi && !this->calculate_curl_phi && !this->calculate_div_phi)
{
this->calculate_phi = this->calculate_dphi = this->calculate_dphiref = true;
if( FEInterface::field_type(T) == TYPE_VECTOR )
{
this->calculate_curl_phi = true;
this->calculate_div_phi = true;
}
}
#endif // LIBMESH_ENABLE_SECOND_DERIVATIVES
// Start logging the shape function initialization
START_LOG("init_shape_functions()", "FE");
// The number of quadrature points.
const unsigned int n_qp = cast_int<unsigned int>(qp.size());
// Number of shape functions in the finite element approximation
// space.
const unsigned int n_approx_shape_functions =
this->n_shape_functions(this->get_type(),
this->get_order());
// resize the vectors to hold current data
// Phi are the shape functions used for the FE approximation
// Phi_map are the shape functions used for the FE mapping
if (this->calculate_phi)
this->phi.resize (n_approx_shape_functions);
if (this->calculate_dphi)
{
this->dphi.resize (n_approx_shape_functions);
this->dphidx.resize (n_approx_shape_functions);
this->dphidy.resize (n_approx_shape_functions);
this->dphidz.resize (n_approx_shape_functions);
}
if(this->calculate_dphiref)
{
if (Dim > 0)
this->dphidxi.resize (n_approx_shape_functions);
if (Dim > 1)
this->dphideta.resize (n_approx_shape_functions);
if (Dim > 2)
this->dphidzeta.resize (n_approx_shape_functions);
}
if( this->calculate_curl_phi && (FEInterface::field_type(T) == TYPE_VECTOR) )
this->curl_phi.resize(n_approx_shape_functions);
if( this->calculate_div_phi && (FEInterface::field_type(T) == TYPE_VECTOR) )
this->div_phi.resize(n_approx_shape_functions);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (this->calculate_d2phi)
{
this->d2phi.resize (n_approx_shape_functions);
this->d2phidx2.resize (n_approx_shape_functions);
this->d2phidxdy.resize (n_approx_shape_functions);
this->d2phidxdz.resize (n_approx_shape_functions);
this->d2phidy2.resize (n_approx_shape_functions);
this->d2phidydz.resize (n_approx_shape_functions);
this->d2phidz2.resize (n_approx_shape_functions);
if (Dim > 0)
this->d2phidxi2.resize (n_approx_shape_functions);
if (Dim > 1)
{
this->d2phidxideta.resize (n_approx_shape_functions);
this->d2phideta2.resize (n_approx_shape_functions);
}
if (Dim > 2)
{
this->d2phidxidzeta.resize (n_approx_shape_functions);
this->d2phidetadzeta.resize (n_approx_shape_functions);
this->d2phidzeta2.resize (n_approx_shape_functions);
}
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
for (unsigned int i=0; i<n_approx_shape_functions; i++)
{
if (this->calculate_phi)
this->phi[i].resize (n_qp);
if (this->calculate_dphi)
{
this->dphi[i].resize (n_qp);
this->dphidx[i].resize (n_qp);
this->dphidy[i].resize (n_qp);
this->dphidz[i].resize (n_qp);
}
if(this->calculate_dphiref)
{
if (Dim > 0)
this->dphidxi[i].resize(n_qp);
if (Dim > 1)
this->dphideta[i].resize(n_qp);
if (Dim > 2)
this->dphidzeta[i].resize(n_qp);
}
if(this->calculate_curl_phi && (FEInterface::field_type(T) == TYPE_VECTOR) )
this->curl_phi[i].resize(n_qp);
if(this->calculate_div_phi && (FEInterface::field_type(T) == TYPE_VECTOR) )
this->div_phi[i].resize(n_qp);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (this->calculate_d2phi)
{
this->d2phi[i].resize (n_qp);
this->d2phidx2[i].resize (n_qp);
this->d2phidxdy[i].resize (n_qp);
this->d2phidxdz[i].resize (n_qp);
this->d2phidy2[i].resize (n_qp);
this->d2phidydz[i].resize (n_qp);
this->d2phidz2[i].resize (n_qp);
if (Dim > 0)
this->d2phidxi2[i].resize (n_qp);
if (Dim > 1)
{
this->d2phidxideta[i].resize (n_qp);
this->d2phideta2[i].resize (n_qp);
}
if (Dim > 2)
{
this->d2phidxidzeta[i].resize (n_qp);
this->d2phidetadzeta[i].resize (n_qp);
this->d2phidzeta2[i].resize (n_qp);
}
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
}
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
//------------------------------------------------------------
// Initialize the data fields, which should only be used for infinite
// elements, to some sensible values, so that using a FE with the
// variational formulation of an InfFE, correct element matrices are
// returned
{
this->weight.resize (n_qp);
this->dweight.resize (n_qp);
this->dphase.resize (n_qp);
for (unsigned int p=0; p<n_qp; p++)
{
this->weight[p] = 1.;
this->dweight[p].zero();
this->dphase[p].zero();
}
}
#endif // ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
switch (Dim)
{
//------------------------------------------------------------
// 0D
case 0:
{
break;
}
//------------------------------------------------------------
// 1D
case 1:
{
// Compute the value of the approximation shape function i at quadrature point p
if (this->calculate_dphiref)
for (unsigned int i=0; i<n_approx_shape_functions; i++)
for (unsigned int p=0; p<n_qp; p++)
this->dphidxi[i][p] = FE<Dim,T>::shape_deriv (elem, this->fe_type.order, i, 0, qp[p]);
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (this->calculate_d2phi)
for (unsigned int i=0; i<n_approx_shape_functions; i++)
for (unsigned int p=0; p<n_qp; p++)
this->d2phidxi2[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 0, qp[p]);
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
break;
}
//------------------------------------------------------------
// 2D
case 2:
{
// Compute the value of the approximation shape function i at quadrature point p
if (this->calculate_dphiref)
for (unsigned int i=0; i<n_approx_shape_functions; i++)
for (unsigned int p=0; p<n_qp; p++)
{
this->dphidxi[i][p] = FE<Dim,T>::shape_deriv (elem, this->fe_type.order, i, 0, qp[p]);
this->dphideta[i][p] = FE<Dim,T>::shape_deriv (elem, this->fe_type.order, i, 1, qp[p]);
}
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (this->calculate_d2phi)
for (unsigned int i=0; i<n_approx_shape_functions; i++)
for (unsigned int p=0; p<n_qp; p++)
{
this->d2phidxi2[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 0, qp[p]);
this->d2phidxideta[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 1, qp[p]);
this->d2phideta2[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 2, qp[p]);
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
break;
}
//------------------------------------------------------------
// 3D
case 3:
{
// Compute the value of the approximation shape function i at quadrature point p
if (this->calculate_dphiref)
for (unsigned int i=0; i<n_approx_shape_functions; i++)
for (unsigned int p=0; p<n_qp; p++)
{
this->dphidxi[i][p] = FE<Dim,T>::shape_deriv (elem, this->fe_type.order, i, 0, qp[p]);
this->dphideta[i][p] = FE<Dim,T>::shape_deriv (elem, this->fe_type.order, i, 1, qp[p]);
this->dphidzeta[i][p] = FE<Dim,T>::shape_deriv (elem, this->fe_type.order, i, 2, qp[p]);
}
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
if (this->calculate_d2phi)
for (unsigned int i=0; i<n_approx_shape_functions; i++)
for (unsigned int p=0; p<n_qp; p++)
{
this->d2phidxi2[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 0, qp[p]);
this->d2phidxideta[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 1, qp[p]);
this->d2phideta2[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 2, qp[p]);
this->d2phidxidzeta[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 3, qp[p]);
this->d2phidetadzeta[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 4, qp[p]);
this->d2phidzeta2[i][p] = FE<Dim,T>::shape_second_deriv (elem, this->fe_type.order, i, 5, qp[p]);
}
#endif // ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
break;
}
default:
libmesh_error_msg("Invalid dimension Dim = " << Dim);
}
// Stop logging the shape function initialization
STOP_LOG("init_shape_functions()", "FE");
}
| Point libMesh::FE< Dim, T >::inverse_map | ( | const Elem * | elem, |
| const Point & | p, | ||
| const Real | tolerance = TOLERANCE, |
||
| const bool | secure = true |
||
| ) | [static] |
p located in physical space. This function requires inverting the (possibly nonlinear) transformation map, so it is not trivial. The optional parameter tolerance defines how close is "good enough." The map inversion iteration computes the sequence
, and the iteration is terminated when
Definition at line 889 of file fe_map.C.
References libMesh::TypeVector< T >::add(), libMesh::err, libMesh::DofObject::id(), libMesh::libmesh_assert(), libMesh::FE< Dim, T >::map(), libMesh::FE< Dim, T >::map_eta(), libMesh::FE< Dim, T >::map_xi(), libMesh::FE< Dim, T >::map_zeta(), libMesh::FEAbstract::on_reference_element(), libMesh::Elem::print_info(), libMesh::Real, libMesh::TypeVector< T >::size(), libMesh::START_LOG(), and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert_greater_equal (tolerance, 0.);
// Start logging the map inversion.
START_LOG("inverse_map()", "FE");
// How much did the point on the reference
// element change by in this Newton step?
Real inverse_map_error = 0.;
// The point on the reference element. This is
// the "initial guess" for Newton's method. The
// centroid seems like a good idea, but computing
// it is a little more intensive than, say taking
// the zero point.
//
// Convergence should be insensitive of this choice
// for "good" elements.
Point p; // the zero point. No computation required
// The number of iterations in the map inversion process.
unsigned int cnt = 0;
// The number of iterations after which we give up and declare
// divergence
const unsigned int max_cnt = 10;
// The distance (in master element space) beyond which we give up
// and declare divergence. This is no longer used...
// Real max_step_length = 4.;
// Newton iteration loop.
do
{
// Where our current iterate \p p maps to.
const Point physical_guess = FE<Dim,T>::map (elem, p);
// How far our current iterate is from the actual point.
const Point delta = physical_point - physical_guess;
// Increment in current iterate \p p, will be computed.
Point dp;
// The form of the map and how we invert it depends
// on the dimension that we are in.
switch (Dim)
{
// ------------------------------------------------------------------
// 0D map inversion is trivial
case 0:
{
break;
}
// ------------------------------------------------------------------
// 1D map inversion
//
// Here we find the point on a 1D reference element that maps to
// the point \p physical_point in the domain. This is a bit tricky
// since we do not want to assume that the point \p physical_point
// is also in a 1D domain. In particular, this method might get
// called on the edge of a 3D element, in which case
// \p physical_point actually lives in 3D.
case 1:
{
const Point dxi = FE<Dim,T>::map_xi (elem, p);
// Newton's method in this case looks like
//
// {X} - {X_n} = [J]*dp
//
// Where {X}, {X_n} are 3x1 vectors, [J] is a 3x1 matrix
// d(x,y,z)/dxi, and we seek dp, a scalar. Since the above
// system is either overdetermined or rank-deficient, we will
// solve the normal equations for this system
//
// [J]^T ({X} - {X_n}) = [J]^T [J] {dp}
//
// which involves the trivial inversion of the scalar
// G = [J]^T [J]
const Real G = dxi*dxi;
if (secure)
libmesh_assert_greater (G, 0.);
const Real Ginv = 1./G;
const Real dxidelta = dxi*delta;
dp(0) = Ginv*dxidelta;
// No master elements have radius > 4, but sometimes we
// can take a step that big while still converging
// if (secure)
// libmesh_assert_less (dp.size(), max_step_length);
break;
}
// ------------------------------------------------------------------
// 2D map inversion
//
// Here we find the point on a 2D reference element that maps to
// the point \p physical_point in the domain. This is a bit tricky
// since we do not want to assume that the point \p physical_point
// is also in a 2D domain. In particular, this method might get
// called on the face of a 3D element, in which case
// \p physical_point actually lives in 3D.
case 2:
{
const Point dxi = FE<Dim,T>::map_xi (elem, p);
const Point deta = FE<Dim,T>::map_eta (elem, p);
// Newton's method in this case looks like
//
// {X} - {X_n} = [J]*{dp}
//
// Where {X}, {X_n} are 3x1 vectors, [J] is a 3x2 matrix
// d(x,y,z)/d(xi,eta), and we seek {dp}, a 2x1 vector. Since
// the above system is either overdermined or rank-deficient,
// we will solve the normal equations for this system
//
// [J]^T ({X} - {X_n}) = [J]^T [J] {dp}
//
// which involves the inversion of the 2x2 matrix
// [G] = [J]^T [J]
const Real
G11 = dxi*dxi, G12 = dxi*deta,
G21 = dxi*deta, G22 = deta*deta;
const Real det = (G11*G22 - G12*G21);
if (secure)
libmesh_assert_not_equal_to (det, 0.);
const Real inv_det = 1./det;
const Real
Ginv11 = G22*inv_det,
Ginv12 = -G12*inv_det,
Ginv21 = -G21*inv_det,
Ginv22 = G11*inv_det;
const Real dxidelta = dxi*delta;
const Real detadelta = deta*delta;
dp(0) = (Ginv11*dxidelta + Ginv12*detadelta);
dp(1) = (Ginv21*dxidelta + Ginv22*detadelta);
// No master elements have radius > 4, but sometimes we
// can take a step that big while still converging
// if (secure)
// libmesh_assert_less (dp.size(), max_step_length);
break;
}
// ------------------------------------------------------------------
// 3D map inversion
//
// Here we find the point in a 3D reference element that maps to
// the point \p physical_point in a 3D domain. Nothing special
// has to happen here, since (unless the map is singular because
// you have a BAD element) the map will be invertable and we can
// apply Newton's method directly.
case 3:
{
const Point dxi = FE<Dim,T>::map_xi (elem, p);
const Point deta = FE<Dim,T>::map_eta (elem, p);
const Point dzeta = FE<Dim,T>::map_zeta (elem, p);
// Newton's method in this case looks like
//
// {X} = {X_n} + [J]*{dp}
//
// Where {X}, {X_n} are 3x1 vectors, [J] is a 3x3 matrix
// d(x,y,z)/d(xi,eta,zeta), and we seek {dp}, a 3x1 vector.
// Since the above system is nonsingular for invertable maps
// we will solve
//
// {dp} = [J]^-1 ({X} - {X_n})
//
// which involves the inversion of the 3x3 matrix [J]
dp = RealTensorValue(dxi(0), deta(0), dzeta(0),
dxi(1), deta(1), dzeta(1),
dxi(2), deta(2), dzeta(2)).inverse() * delta;
// No master elements have radius > 4, but sometimes we
// can take a step that big while still converging
// if (secure)
// libmesh_assert_less (dp.size(), max_step_length);
break;
}
// Some other dimension?
default:
libmesh_error_msg("Invalid Dim = " << Dim);
} // end switch(Dim), dp now computed
// ||P_n+1 - P_n||
inverse_map_error = dp.size();
// P_n+1 = P_n + dp
p.add (dp);
// Increment the iteration count.
cnt++;
// Watch for divergence of Newton's
// method. Here's how it goes:
// (1) For good elements, we expect convergence in 10
// iterations, with no too-large steps.
// - If called with (secure == true) and we have not yet converged
// print out a warning message.
// - If called with (secure == true) and we have not converged in
// 20 iterations abort
// (2) This method may be called in cases when the target point is not
// inside the element and we have no business expecting convergence.
// For these cases if we have not converged in 10 iterations forget
// about it.
if (cnt > max_cnt)
{
// Warn about divergence when secure is true - this
// shouldn't happen
if (secure)
{
// Print every time in devel/dbg modes
#ifndef NDEBUG
libmesh_here();
libMesh::err << "WARNING: Newton scheme has not converged in "
<< cnt << " iterations:" << std::endl
<< " physical_point="
<< physical_point
<< " physical_guess="
<< physical_guess
<< " dp="
<< dp
<< " p="
<< p
<< " error=" << inverse_map_error
<< " in element " << elem->id()
<< std::endl;
elem->print_info(libMesh::err);
#else
// In optimized mode, just print once that an inverse_map() call
// had trouble converging its Newton iteration.
libmesh_do_once(libMesh::err << "WARNING: At least one element took more than "
<< max_cnt
<< " iterations to converge in inverse_map()...\n"
<< "Rerun in devel/dbg mode for more details."
<< std::endl;);
#endif // NDEBUG
if (cnt > 2*max_cnt)
{
libMesh::err << "ERROR: Newton scheme FAILED to converge in "
<< cnt
<< " iterations!"
<< " in element "
<< elem->id()
<< std::endl;
elem->print_info(libMesh::err);
libmesh_error_msg("Exiting...");
}
}
// Return a far off point when secure is false - this
// should only happen when we're trying to map a point
// that's outside the element
else
{
for (unsigned int i=0; i != Dim; ++i)
p(i) = 1e6;
STOP_LOG("inverse_map()", "FE");
return p;
}
}
}
while (inverse_map_error > tolerance);
// If we are in debug mode do two sanity checks.
#ifdef DEBUG
if (secure)
{
// Make sure the point \p p on the reference element actually
// does map to the point \p physical_point within a tolerance.
const Point check = FE<Dim,T>::map (elem, p);
const Point diff = physical_point - check;
if (diff.size() > tolerance)
{
libmesh_here();
libMesh::err << "WARNING: diff is "
<< diff.size()
<< std::endl
<< " point="
<< physical_point;
libMesh::err << " local=" << check;
libMesh::err << " lref= " << p;
elem->print_info(libMesh::err);
}
// Make sure the point \p p on the reference element actually
// is
if (!FEAbstract::on_reference_element(p, elem->type(), 2*tolerance))
{
libmesh_here();
libMesh::err << "WARNING: inverse_map of physical point "
<< physical_point
<< "is not on element." << '\n';
elem->print_info(libMesh::err);
}
}
#endif
// Stop logging the map inversion.
STOP_LOG("inverse_map()", "FE");
return p;
}
| void libMesh::FE< Dim, T >::inverse_map | ( | const Elem * | elem, |
| const std::vector< Point > & | physical_points, | ||
| std::vector< Point > & | reference_points, | ||
| const Real | tolerance = TOLERANCE, |
||
| const bool | secure = true |
||
| ) | [static] |
Takes a number points in physical space (in the physical_points vector) and finds their location on the reference element for the input element elem. The values on the reference element are returned in the vector reference_points. The optional parameter tolerance defines how close is "good enough." The map inversion iteration computes the sequence
, and the iteration is terminated when
Definition at line 1247 of file fe_map.C.
References libMesh::TypeVector< T >::size().
{
// The number of points to find the
// inverse map of
const std::size_t n_points = physical_points.size();
// Resize the vector to hold the points
// on the reference element
reference_points.resize(n_points);
// Find the coordinates on the reference
// element of each point in physical space
for (std::size_t p=0; p<n_points; p++)
reference_points[p] =
FE<Dim,T>::inverse_map (elem, physical_points[p], tolerance, secure);
}
| Point libMesh::FE< 2, SUBDIVISION >::inverse_map | ( | const Elem * | , |
| const Point & | , | ||
| const Real | , | ||
| const bool | |||
| ) |
Definition at line 904 of file fe_subdivision_2D.C.
{
libmesh_not_implemented();
}
| void libMesh::FE< 2, SUBDIVISION >::inverse_map | ( | const Elem * | , |
| const std::vector< Point > & | , | ||
| std::vector< Point > & | , | ||
| Real | , | ||
| bool | |||
| ) |
Definition at line 913 of file fe_subdivision_2D.C.
{
libmesh_not_implemented();
}
| bool libMesh::FE< 0, SCALAR >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 113 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 1, SCALAR >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 114 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 2, SCALAR >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 115 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 3, SCALAR >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 116 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 0, L2_HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 197 of file fe_l2_hierarchic.C.
{ return true; }
| bool libMesh::FE< 1, L2_HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 198 of file fe_l2_hierarchic.C.
{ return true; }
| bool libMesh::FE< 2, L2_HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 199 of file fe_l2_hierarchic.C.
{ return true; }
| bool libMesh::FE< 3, L2_HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 200 of file fe_l2_hierarchic.C.
{ return true; }
| virtual bool libMesh::FE< Dim, T >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
| bool libMesh::FE< 0, CLOUGH >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 305 of file fe_clough.C.
{ return false; } // FIXME - this will be changed
| bool libMesh::FE< 1, CLOUGH >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 306 of file fe_clough.C.
{ return false; } // FIXME - this will be changed
| bool libMesh::FE< 2, CLOUGH >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 307 of file fe_clough.C.
{ return false; } // FIXME - this will be changed
| bool libMesh::FE< 3, CLOUGH >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 308 of file fe_clough.C.
{ return false; } // FIXME - this will be changed
| bool libMesh::FE< 0, HERMITE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 342 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 1, HERMITE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 343 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 2, HERMITE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 344 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 3, HERMITE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 345 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 0, HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 364 of file fe_hierarchic.C.
{ return true; }
| bool libMesh::FE< 1, HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 365 of file fe_hierarchic.C.
{ return true; }
| bool libMesh::FE< 2, HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 366 of file fe_hierarchic.C.
{ return true; }
| bool libMesh::FE< 3, HIERARCHIC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 367 of file fe_hierarchic.C.
{ return true; }
| bool libMesh::FE< 0, MONOMIAL >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 397 of file fe_monomial.C.
{ return true; }
| bool libMesh::FE< 1, MONOMIAL >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 398 of file fe_monomial.C.
{ return true; }
| bool libMesh::FE< 2, MONOMIAL >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 399 of file fe_monomial.C.
{ return true; }
| bool libMesh::FE< 3, MONOMIAL >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 400 of file fe_monomial.C.
{ return true; }
| bool libMesh::FE< 0, BERNSTEIN >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 426 of file fe_bernstein.C.
{ return false; }
| bool libMesh::FE< 1, BERNSTEIN >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 427 of file fe_bernstein.C.
{ return false; }
| bool libMesh::FE< 2, BERNSTEIN >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 428 of file fe_bernstein.C.
{ return false; }
| bool libMesh::FE< 3, BERNSTEIN >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 429 of file fe_bernstein.C.
{ return false; }
| bool libMesh::FE< 0, L2_LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 479 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 1, L2_LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 480 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 2, L2_LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 481 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 3, L2_LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 482 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 0, NEDELEC_ONE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 556 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| bool libMesh::FE< 1, NEDELEC_ONE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 557 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| bool libMesh::FE< 2, NEDELEC_ONE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 558 of file fe_nedelec_one.C.
{ return false; }
| bool libMesh::FE< 3, NEDELEC_ONE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 559 of file fe_nedelec_one.C.
{ return false; }
| bool libMesh::FE< 0, LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 878 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 1, LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 879 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 2, LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 880 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 3, LAGRANGE >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 881 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 0, XYZ >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 908 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 1, XYZ >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 909 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 2, XYZ >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 910 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 3, XYZ >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 911 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 0, LAGRANGE_VEC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 933 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 1, LAGRANGE_VEC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 934 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 2, LAGRANGE_VEC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 935 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 3, LAGRANGE_VEC >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 936 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 2, SUBDIVISION >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 941 of file fe_subdivision_2D.C.
{ return false; }
| bool libMesh::FE< 0, SZABAB >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1287 of file fe_szabab.C.
{ return true; }
| bool libMesh::FE< 1, SZABAB >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1288 of file fe_szabab.C.
{ return true; }
| bool libMesh::FE< 2, SZABAB >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1289 of file fe_szabab.C.
{ return true; }
| bool libMesh::FE< 3, SZABAB >::is_hierarchic | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 1290 of file fe_szabab.C.
{ return true; }
| Point libMesh::FE< Dim, T >::map | ( | const Elem * | elem, |
| const Point & | reference_point | ||
| ) | [static] |
p located on the reference element. Definition at line 1272 of file fe_map.C.
References libMesh::TypeVector< T >::add_scaled(), libMesh::Elem::default_order(), libMesh::libmesh_assert(), libMesh::FE< Dim, T >::n_shape_functions(), libMesh::Elem::point(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
Referenced by libMesh::FE< Dim, T >::inverse_map(), libMesh::InfFE< Dim, T_radial, T_map >::inverse_map(), and libMesh::InfFE< Dim, T_radial, T_map >::map().
{
libmesh_assert(elem);
Point p;
const ElemType type = elem->type();
const Order order = elem->default_order();
const unsigned int n_sf = FE<Dim,LAGRANGE>::n_shape_functions(type, order);
// Lagrange basis functions are used for mapping
for (unsigned int i=0; i<n_sf; i++)
p.add_scaled (elem->point(i),
FE<Dim,LAGRANGE>::shape(type,
order,
i,
reference_point)
);
return p;
}
| Point libMesh::FE< Dim, T >::map_eta | ( | const Elem * | elem, |
| const Point & | reference_point | ||
| ) | [static] |
p located on the reference element. Definition at line 1327 of file fe_map.C.
References libMesh::TypeVector< T >::add_scaled(), libMesh::Elem::default_order(), libMesh::libmesh_assert(), libMesh::FE< Dim, T >::n_shape_functions(), libMesh::Elem::point(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
Referenced by libMesh::FE< Dim, T >::inverse_map(), and libMesh::InfFE< Dim, T_radial, T_map >::inverse_map().
{
libmesh_assert(elem);
Point p;
const ElemType type = elem->type();
const Order order = elem->default_order();
const unsigned int n_sf = FE<Dim,LAGRANGE>::n_shape_functions(type, order);
// Lagrange basis functions are used for mapping
for (unsigned int i=0; i<n_sf; i++)
p.add_scaled (elem->point(i),
FE<Dim,LAGRANGE>::shape_deriv(type,
order,
i,
1,
reference_point)
);
return p;
}
| Point libMesh::FE< Dim, T >::map_xi | ( | const Elem * | elem, |
| const Point & | reference_point | ||
| ) | [static] |
p located on the reference element. Definition at line 1299 of file fe_map.C.
References libMesh::TypeVector< T >::add_scaled(), libMesh::Elem::default_order(), libMesh::libmesh_assert(), libMesh::FE< Dim, T >::n_shape_functions(), libMesh::Elem::point(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
Referenced by libMesh::FE< Dim, T >::inverse_map(), and libMesh::InfFE< Dim, T_radial, T_map >::inverse_map().
{
libmesh_assert(elem);
Point p;
const ElemType type = elem->type();
const Order order = elem->default_order();
const unsigned int n_sf = FE<Dim,LAGRANGE>::n_shape_functions(type, order);
// Lagrange basis functions are used for mapping
for (unsigned int i=0; i<n_sf; i++)
p.add_scaled (elem->point(i),
FE<Dim,LAGRANGE>::shape_deriv(type,
order,
i,
0,
reference_point)
);
return p;
}
| Point libMesh::FE< Dim, T >::map_zeta | ( | const Elem * | elem, |
| const Point & | reference_point | ||
| ) | [static] |
p located on the reference element. Definition at line 1355 of file fe_map.C.
References libMesh::TypeVector< T >::add_scaled(), libMesh::Elem::default_order(), libMesh::libmesh_assert(), libMesh::FE< Dim, T >::n_shape_functions(), libMesh::Elem::point(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
Referenced by libMesh::FE< Dim, T >::inverse_map().
{
libmesh_assert(elem);
Point p;
const ElemType type = elem->type();
const Order order = elem->default_order();
const unsigned int n_sf = FE<Dim,LAGRANGE>::n_shape_functions(type, order);
// Lagrange basis functions are used for mapping
for (unsigned int i=0; i<n_sf; i++)
p.add_scaled (elem->point(i),
FE<Dim,LAGRANGE>::shape_deriv(type,
order,
i,
2,
reference_point)
);
return p;
}
| unsigned int libMesh::FE< 0, SCALAR >::n_dofs | ( | const ElemType | , |
| const Order | o | ||
| ) |
Definition at line 87 of file fe_scalar.C.
{ return o; }
| unsigned int libMesh::FE< 1, SCALAR >::n_dofs | ( | const ElemType | , |
| const Order | o | ||
| ) |
Definition at line 88 of file fe_scalar.C.
{ return o; }
| unsigned int libMesh::FE< 2, SCALAR >::n_dofs | ( | const ElemType | , |
| const Order | o | ||
| ) |
Definition at line 89 of file fe_scalar.C.
{ return o; }
| unsigned int libMesh::FE< 3, SCALAR >::n_dofs | ( | const ElemType | , |
| const Order | o | ||
| ) |
Definition at line 90 of file fe_scalar.C.
{ return o; }
| unsigned int libMesh::FE< 0, L2_HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 172 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, L2_HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 173 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, L2_HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 174 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, L2_HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 175 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| static unsigned int libMesh::FE< Dim, T >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) | [static] |
On a p-refined element, o should be the total order of the element.
Referenced by libMesh::FE< Dim, T >::n_dofs(), libMesh::FE< Dim, T >::n_shape_functions(), and libMesh::FE< Dim, LAGRANGE_VEC >::n_shape_functions().
| unsigned int libMesh::FE< 0, CLOUGH >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 280 of file fe_clough.C.
{ return clough_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, CLOUGH >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 281 of file fe_clough.C.
{ return clough_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, CLOUGH >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 282 of file fe_clough.C.
{ return clough_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, CLOUGH >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 283 of file fe_clough.C.
{ return clough_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, HERMITE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 317 of file fe_hermite.C.
{ return hermite_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, HERMITE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 318 of file fe_hermite.C.
{ return hermite_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, HERMITE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 319 of file fe_hermite.C.
{ return hermite_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, HERMITE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 320 of file fe_hermite.C.
{ return hermite_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 340 of file fe_hierarchic.C.
{ return hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 341 of file fe_hierarchic.C.
{ return hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 342 of file fe_hierarchic.C.
{ return hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, HIERARCHIC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 343 of file fe_hierarchic.C.
{ return hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, MONOMIAL >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 370 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, MONOMIAL >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 371 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, MONOMIAL >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 372 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, MONOMIAL >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 373 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, BERNSTEIN >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 402 of file fe_bernstein.C.
{ return bernstein_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, BERNSTEIN >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 403 of file fe_bernstein.C.
{ return bernstein_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, BERNSTEIN >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 404 of file fe_bernstein.C.
{ return bernstein_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, BERNSTEIN >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 405 of file fe_bernstein.C.
{ return bernstein_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, L2_LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 453 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, L2_LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 454 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, L2_LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 455 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, L2_LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 456 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, NEDELEC_ONE >::n_dofs | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 528 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| unsigned int libMesh::FE< 1, NEDELEC_ONE >::n_dofs | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 529 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| unsigned int libMesh::FE< 2, NEDELEC_ONE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 530 of file fe_nedelec_one.C.
{ return nedelec_one_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, NEDELEC_ONE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 531 of file fe_nedelec_one.C.
{ return nedelec_one_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 850 of file fe_lagrange.C.
{ return lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 851 of file fe_lagrange.C.
{ return lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 852 of file fe_lagrange.C.
{ return lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, LAGRANGE >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 853 of file fe_lagrange.C.
{ return lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, XYZ >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 1, XYZ >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 2, XYZ >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 3, XYZ >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 0, LAGRANGE_VEC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 905 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs().
{ return FE<0,LAGRANGE>::n_dofs(t,o); }
| unsigned int libMesh::FE< 1, LAGRANGE_VEC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 906 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs().
{ return FE<1,LAGRANGE>::n_dofs(t,o); }
| unsigned int libMesh::FE< 2, LAGRANGE_VEC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 907 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs().
{ return 2*FE<2,LAGRANGE>::n_dofs(t,o); }
| unsigned int libMesh::FE< 3, LAGRANGE_VEC >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 908 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs().
{ return 3*FE<3,LAGRANGE>::n_dofs(t,o); }
| unsigned int libMesh::FE< 2, SUBDIVISION >::n_dofs | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 925 of file fe_subdivision_2D.C.
{ libmesh_not_implemented(); return 0; }
| unsigned int libMesh::FE< 0, SZABAB >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1263 of file fe_szabab.C.
{ return szabab_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, SZABAB >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1264 of file fe_szabab.C.
{ return szabab_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, SZABAB >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1265 of file fe_szabab.C.
{ return szabab_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, SZABAB >::n_dofs | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1266 of file fe_szabab.C.
{ return szabab_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, SCALAR >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 94 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 1, SCALAR >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 95 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 2, SCALAR >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 96 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 3, SCALAR >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 97 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 0, L2_HIERARCHIC >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 179 of file fe_l2_hierarchic.C.
{ return 0; }
| unsigned int libMesh::FE< 1, L2_HIERARCHIC >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 180 of file fe_l2_hierarchic.C.
{ return 0; }
| unsigned int libMesh::FE< 2, L2_HIERARCHIC >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 181 of file fe_l2_hierarchic.C.
{ return 0; }
| unsigned int libMesh::FE< 3, L2_HIERARCHIC >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 182 of file fe_l2_hierarchic.C.
{ return 0; }
| static unsigned int libMesh::FE< Dim, T >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) | [static] |
n for a finite element of type t and order o.On a p-refined element, o should be the total order of the element.
Referenced by libMesh::FE< Dim, T >::n_dofs_at_node().
| unsigned int libMesh::FE< 0, CLOUGH >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 287 of file fe_clough.C.
{ return clough_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 1, CLOUGH >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 288 of file fe_clough.C.
{ return clough_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 2, CLOUGH >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 289 of file fe_clough.C.
{ return clough_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 3, CLOUGH >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 290 of file fe_clough.C.
{ return clough_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 0, HERMITE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 324 of file fe_hermite.C.
{ return hermite_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 1, HERMITE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 325 of file fe_hermite.C.
{ return hermite_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 2, HERMITE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 326 of file fe_hermite.C.
{ return hermite_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 3, HERMITE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 327 of file fe_hermite.C.
{ return hermite_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 0, HIERARCHIC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 346 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 1, HIERARCHIC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 347 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 2, HIERARCHIC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 348 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 3, HIERARCHIC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 349 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 0, MONOMIAL >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 377 of file fe_monomial.C.
{ return 0; }
| unsigned int libMesh::FE< 1, MONOMIAL >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 378 of file fe_monomial.C.
{ return 0; }
| unsigned int libMesh::FE< 2, MONOMIAL >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 379 of file fe_monomial.C.
{ return 0; }
| unsigned int libMesh::FE< 3, MONOMIAL >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 380 of file fe_monomial.C.
{ return 0; }
| unsigned int libMesh::FE< 0, BERNSTEIN >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 408 of file fe_bernstein.C.
{ return bernstein_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 1, BERNSTEIN >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 409 of file fe_bernstein.C.
{ return bernstein_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 2, BERNSTEIN >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 410 of file fe_bernstein.C.
{ return bernstein_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 3, BERNSTEIN >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 411 of file fe_bernstein.C.
{ return bernstein_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 0, L2_LAGRANGE >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 460 of file fe_l2_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 1, L2_LAGRANGE >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 461 of file fe_l2_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 2, L2_LAGRANGE >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 462 of file fe_l2_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 3, L2_LAGRANGE >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 463 of file fe_l2_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 0, NEDELEC_ONE >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 536 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| unsigned int libMesh::FE< 1, NEDELEC_ONE >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 537 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| unsigned int libMesh::FE< 2, NEDELEC_ONE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 538 of file fe_nedelec_one.C.
{ return nedelec_one_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 3, NEDELEC_ONE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 539 of file fe_nedelec_one.C.
{ return nedelec_one_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 0, LAGRANGE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 858 of file fe_lagrange.C.
{ return lagrange_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 1, LAGRANGE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 859 of file fe_lagrange.C.
{ return lagrange_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 2, LAGRANGE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 860 of file fe_lagrange.C.
{ return lagrange_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 3, LAGRANGE >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 861 of file fe_lagrange.C.
{ return lagrange_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 0, XYZ >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
| unsigned int libMesh::FE< 1, XYZ >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
| unsigned int libMesh::FE< 2, XYZ >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
| unsigned int libMesh::FE< 3, XYZ >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
| unsigned int libMesh::FE< 0, LAGRANGE_VEC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 913 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs_at_node().
{ return FE<0,LAGRANGE>::n_dofs_at_node(t,o,n); }
| unsigned int libMesh::FE< 1, LAGRANGE_VEC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 914 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs_at_node().
{ return FE<1,LAGRANGE>::n_dofs_at_node(t,o,n); }
| unsigned int libMesh::FE< 2, LAGRANGE_VEC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 915 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs_at_node().
{ return 2*FE<2,LAGRANGE>::n_dofs_at_node(t,o,n); }
| unsigned int libMesh::FE< 3, LAGRANGE_VEC >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 916 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::n_dofs_at_node().
{ return 3*FE<2,LAGRANGE>::n_dofs_at_node(t,o,n); }
| unsigned int libMesh::FE< 2, SUBDIVISION >::n_dofs_at_node | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int | ||
| ) |
Definition at line 928 of file fe_subdivision_2D.C.
{ return 1; }
| unsigned int libMesh::FE< 0, SZABAB >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 1269 of file fe_szabab.C.
{ return szabab_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 1, SZABAB >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 1270 of file fe_szabab.C.
{ return szabab_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 2, SZABAB >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 1271 of file fe_szabab.C.
{ return szabab_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 3, SZABAB >::n_dofs_at_node | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | n | ||
| ) |
Definition at line 1272 of file fe_szabab.C.
{ return szabab_n_dofs_at_node(t, o, n); }
| unsigned int libMesh::FE< 0, SCALAR >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 101 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 1, SCALAR >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 102 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 2, SCALAR >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 103 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 3, SCALAR >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 104 of file fe_scalar.C.
{ return 0; }
| unsigned int libMesh::FE< 0, L2_HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 185 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, L2_HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 186 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, L2_HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 187 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, L2_HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 188 of file fe_l2_hierarchic.C.
{ return l2_hierarchic_n_dofs(t, o); }
| static unsigned int libMesh::FE< Dim, T >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) | [static] |
On a p-refined element, o should be the total order of the element.
| unsigned int libMesh::FE< 0, CLOUGH >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 293 of file fe_clough.C.
{ return clough_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 1, CLOUGH >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 294 of file fe_clough.C.
{ return clough_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 2, CLOUGH >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 295 of file fe_clough.C.
{ return clough_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 3, CLOUGH >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 296 of file fe_clough.C.
{ return clough_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 0, HERMITE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 330 of file fe_hermite.C.
{ return hermite_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 1, HERMITE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 331 of file fe_hermite.C.
{ return hermite_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 2, HERMITE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 332 of file fe_hermite.C.
{ return hermite_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 3, HERMITE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 333 of file fe_hermite.C.
{ return hermite_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 0, HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 352 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 1, HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 353 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 2, HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 354 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 3, HIERARCHIC >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 355 of file fe_hierarchic.C.
{ return hierarchic_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 0, MONOMIAL >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 383 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, MONOMIAL >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 384 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, MONOMIAL >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 385 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, MONOMIAL >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 386 of file fe_monomial.C.
{ return monomial_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, BERNSTEIN >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 414 of file fe_bernstein.C.
{ return bernstein_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 1, BERNSTEIN >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 415 of file fe_bernstein.C.
{ return bernstein_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 2, BERNSTEIN >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 416 of file fe_bernstein.C.
{ return bernstein_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 3, BERNSTEIN >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 417 of file fe_bernstein.C.
{ return bernstein_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 0, L2_LAGRANGE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 467 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 1, L2_LAGRANGE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 468 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 2, L2_LAGRANGE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 469 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 3, L2_LAGRANGE >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 470 of file fe_l2_lagrange.C.
{ return l2_lagrange_n_dofs(t, o); }
| unsigned int libMesh::FE< 0, NEDELEC_ONE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 544 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| unsigned int libMesh::FE< 1, NEDELEC_ONE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 545 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| unsigned int libMesh::FE< 2, NEDELEC_ONE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 546 of file fe_nedelec_one.C.
{ return 0; }
| unsigned int libMesh::FE< 3, NEDELEC_ONE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 547 of file fe_nedelec_one.C.
{ return 0; }
| unsigned int libMesh::FE< 0, LAGRANGE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 866 of file fe_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 1, LAGRANGE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 867 of file fe_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 2, LAGRANGE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 868 of file fe_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 3, LAGRANGE >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 869 of file fe_lagrange.C.
{ return 0; }
| unsigned int libMesh::FE< 0, XYZ >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 1, XYZ >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 2, XYZ >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 3, XYZ >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
| unsigned int libMesh::FE< 0, LAGRANGE_VEC >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 921 of file fe_lagrange_vec.C.
{ return 0; }
| unsigned int libMesh::FE< 1, LAGRANGE_VEC >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 922 of file fe_lagrange_vec.C.
{ return 0; }
| unsigned int libMesh::FE< 2, LAGRANGE_VEC >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 923 of file fe_lagrange_vec.C.
{ return 0; }
| unsigned int libMesh::FE< 3, LAGRANGE_VEC >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 924 of file fe_lagrange_vec.C.
{ return 0; }
| unsigned int libMesh::FE< 2, SUBDIVISION >::n_dofs_per_elem | ( | const ElemType | , |
| const Order | |||
| ) |
Definition at line 931 of file fe_subdivision_2D.C.
{ return 0; }
| unsigned int libMesh::FE< 0, SZABAB >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1275 of file fe_szabab.C.
{ return szabab_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 1, SZABAB >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1276 of file fe_szabab.C.
{ return szabab_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 2, SZABAB >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1277 of file fe_szabab.C.
{ return szabab_n_dofs_per_elem(t, o); }
| unsigned int libMesh::FE< 3, SZABAB >::n_dofs_per_elem | ( | const ElemType | t, |
| const Order | o | ||
| ) |
Definition at line 1278 of file fe_szabab.C.
{ return szabab_n_dofs_per_elem(t, o); }
| static unsigned int libMesh::ReferenceCounter::n_objects | ( | ) | [inline, static, inherited] |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 79 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
Referenced by libMesh::LibMeshInit::~LibMeshInit().
{ return _n_objects; }
| unsigned int libMesh::FE< Dim, T >::n_quadrature_points | ( | ) | const [virtual] |
for loop in your simulation for matrix assembly of the current element. Implements libMesh::FEAbstract.
Definition at line 55 of file fe.C.
References libMesh::libmesh_assert().
{
libmesh_assert(this->qrule);
return this->qrule->n_points();
}
| unsigned int libMesh::FE< Dim, T >::n_shape_functions | ( | ) | const [virtual] |
Implements libMesh::FEAbstract.
Definition at line 36 of file fe.C.
References libMesh::FE< Dim, T >::n_dofs().
Referenced by libMesh::FE< Dim, T >::map(), libMesh::FE< Dim, T >::map_eta(), libMesh::FE< Dim, T >::map_xi(), and libMesh::FE< Dim, T >::map_zeta().
{
return FE<Dim,T>::n_dofs (this->elem_type,
static_cast<Order>(this->fe_type.order + this->_p_level));
}
| static unsigned int libMesh::FE< Dim, T >::n_shape_functions | ( | const ElemType | t, |
| const Order | o | ||
| ) | [inline, static] |
t and approximation order o.On a p-refined element, o should be the total order of the element.
Definition at line 226 of file fe.h.
{ return FE<Dim,T>::n_dofs (t,o); }
| void libMesh::FE< 0, SCALAR >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 58 of file fe_scalar.C.
{ scalar_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 1, SCALAR >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 65 of file fe_scalar.C.
{ scalar_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 2, SCALAR >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 72 of file fe_scalar.C.
{ scalar_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 3, SCALAR >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 79 of file fe_scalar.C.
{ scalar_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 0, L2_HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 144 of file fe_l2_hierarchic.C.
{ l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, L2_HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 151 of file fe_l2_hierarchic.C.
{ l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, L2_HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 158 of file fe_l2_hierarchic.C.
{ l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, L2_HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 165 of file fe_l2_hierarchic.C.
{ l2_hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| static void libMesh::FE< Dim, T >::nodal_soln | ( | const Elem * | elem, |
| const Order | o, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) | [static] |
Build the nodal soln from the element soln. This is the solution that will be plotted.
On a p-refined element, o should be the base order of the element.
Referenced by libMesh::FE< Dim, T >::nodal_soln().
| void libMesh::FE< 0, CLOUGH >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 251 of file fe_clough.C.
{ clough_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, CLOUGH >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 258 of file fe_clough.C.
{ clough_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, CLOUGH >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 265 of file fe_clough.C.
{ clough_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, CLOUGH >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 272 of file fe_clough.C.
{ clough_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| void libMesh::FE< 0, HERMITE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 284 of file fe_hermite.C.
{ hermite_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, HERMITE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 291 of file fe_hermite.C.
{ hermite_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, HERMITE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 298 of file fe_hermite.C.
{ hermite_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, HERMITE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 305 of file fe_hermite.C.
{ hermite_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| void libMesh::FE< 0, HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 311 of file fe_hierarchic.C.
{ hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 318 of file fe_hierarchic.C.
{ hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 325 of file fe_hierarchic.C.
{ hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, HIERARCHIC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 332 of file fe_hierarchic.C.
{ hierarchic_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| void libMesh::FE< 0, MONOMIAL >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 341 of file fe_monomial.C.
{ monomial_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, MONOMIAL >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 348 of file fe_monomial.C.
{ monomial_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, MONOMIAL >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 355 of file fe_monomial.C.
{ monomial_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, MONOMIAL >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 362 of file fe_monomial.C.
{ monomial_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| void libMesh::FE< 0, BERNSTEIN >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 373 of file fe_bernstein.C.
{ bernstein_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, BERNSTEIN >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 380 of file fe_bernstein.C.
{ bernstein_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, BERNSTEIN >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 387 of file fe_bernstein.C.
{ bernstein_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, BERNSTEIN >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 394 of file fe_bernstein.C.
{ bernstein_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| void libMesh::FE< 0, L2_LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 422 of file fe_l2_lagrange.C.
{ l2_lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 1, L2_LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 429 of file fe_l2_lagrange.C.
{ l2_lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 2, L2_LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 436 of file fe_l2_lagrange.C.
{ l2_lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 3, L2_LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 443 of file fe_l2_lagrange.C.
{ l2_lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 0, NEDELEC_ONE >::nodal_soln | ( | const Elem * | , |
| const Order | , | ||
| const std::vector< Number > & | , | ||
| std::vector< Number > & | |||
| ) |
Definition at line 497 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| void libMesh::FE< 1, NEDELEC_ONE >::nodal_soln | ( | const Elem * | , |
| const Order | , | ||
| const std::vector< Number > & | , | ||
| std::vector< Number > & | |||
| ) |
Definition at line 504 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| void libMesh::FE< 0, LAGRANGE_VEC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 507 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::nodal_soln().
{ FE<0,LAGRANGE>::nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 2, NEDELEC_ONE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 511 of file fe_nedelec_one.C.
{ nedelec_one_nodal_soln(elem, order, elem_soln, 2 /*dim*/, nodal_soln); }
| void libMesh::FE< 1, LAGRANGE_VEC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 514 of file fe_lagrange_vec.C.
References libMesh::FE< Dim, T >::nodal_soln().
{ FE<1,LAGRANGE>::nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 3, NEDELEC_ONE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 518 of file fe_nedelec_one.C.
{ nedelec_one_nodal_soln(elem, order, elem_soln, 3 /*dim*/, nodal_soln); }
| void libMesh::FE< 2, LAGRANGE_VEC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 521 of file fe_lagrange_vec.C.
{ lagrange_vec_nodal_soln(elem, order, elem_soln, 2 /*dimension*/, nodal_soln); }
| void libMesh::FE< 3, LAGRANGE_VEC >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 528 of file fe_lagrange_vec.C.
{ lagrange_vec_nodal_soln(elem, order, elem_soln, 3 /*dimension*/, nodal_soln); }
| void libMesh::FE< 0, LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 819 of file fe_lagrange.C.
{ lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 1, LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 826 of file fe_lagrange.C.
{ lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 2, LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 833 of file fe_lagrange.C.
{ lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 3, LAGRANGE >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 840 of file fe_lagrange.C.
{ lagrange_nodal_soln(elem, order, elem_soln, nodal_soln); }
| void libMesh::FE< 2, SUBDIVISION >::nodal_soln | ( | const Elem * | elem, |
| const Order | , | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 846 of file fe_subdivision_2D.C.
References libMesh::libmesh_assert(), libMesh::Tri3Subdivision::local_node_number(), libMesh::TRI3SUBDIVISION, and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert_equal_to(elem->type(), TRI3SUBDIVISION);
const Tri3Subdivision* sd_elem = static_cast<const Tri3Subdivision*>(elem);
nodal_soln.resize(3); // three nodes per element
// Ghost nodes are auxiliary.
if (sd_elem->is_ghost())
{
nodal_soln[0] = 0;
nodal_soln[1] = 0;
nodal_soln[2] = 0;
return;
}
// First node (node 0 in the element patch):
unsigned int j = sd_elem->local_node_number(sd_elem->get_ordered_node(0)->id());
nodal_soln[j] = elem_soln[0];
// Second node (node 1 in the element patch):
j = sd_elem->local_node_number(sd_elem->get_ordered_node(1)->id());
nodal_soln[j] = elem_soln[1];
// Third node (node 'valence' in the element patch):
j = sd_elem->local_node_number(sd_elem->get_ordered_node(2)->id());
nodal_soln[j] = elem_soln[sd_elem->get_ordered_valence(0)];
}
| void libMesh::FE< 0, XYZ >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 852 of file fe_xyz.C.
{ xyz_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, XYZ >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 859 of file fe_xyz.C.
{ xyz_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, XYZ >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 866 of file fe_xyz.C.
{ xyz_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, XYZ >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 873 of file fe_xyz.C.
{ xyz_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| void libMesh::FE< 0, SZABAB >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 1234 of file fe_szabab.C.
{ szabab_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/0); }
| void libMesh::FE< 1, SZABAB >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 1241 of file fe_szabab.C.
{ szabab_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/1); }
| void libMesh::FE< 2, SZABAB >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 1248 of file fe_szabab.C.
{ szabab_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/2); }
| void libMesh::FE< 3, SZABAB >::nodal_soln | ( | const Elem * | elem, |
| const Order | order, | ||
| const std::vector< Number > & | elem_soln, | ||
| std::vector< Number > & | nodal_soln | ||
| ) |
Definition at line 1255 of file fe_szabab.C.
{ szabab_nodal_soln(elem, order, elem_soln, nodal_soln, /*Dim=*/3); }
| bool libMesh::FEAbstract::on_reference_element | ( | const Point & | p, |
| const ElemType | t, | ||
| const Real | eps = TOLERANCE |
||
| ) | [static, inherited] |
eps can be specified to indicate a tolerance. For example,
becomes
. Definition at line 554 of file fe_abstract.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::EDGE4, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::INFHEX8, libMesh::INFPRISM6, libMesh::NODEELEM, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::TET10, libMesh::TET4, libMesh::TRI3, and libMesh::TRI6.
Referenced by libMesh::FE< Dim, T >::inverse_map().
{
libmesh_assert_greater_equal (eps, 0.);
const Real xi = p(0);
#if LIBMESH_DIM > 1
const Real eta = p(1);
#else
const Real eta = 0.;
#endif
#if LIBMESH_DIM > 2
const Real zeta = p(2);
#else
const Real zeta = 0.;
#endif
switch (t)
{
case NODEELEM:
{
return (!xi && !eta && !zeta);
}
case EDGE2:
case EDGE3:
case EDGE4:
{
// The reference 1D element is [-1,1].
if ((xi >= -1.-eps) &&
(xi <= 1.+eps))
return true;
return false;
}
case TRI3:
case TRI6:
{
// The reference triangle is isocoles
// and is bound by xi=0, eta=0, and xi+eta=1.
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
((xi + eta) <= 1.+eps))
return true;
return false;
}
case QUAD4:
case QUAD8:
case QUAD9:
{
// The reference quadrilateral element is [-1,1]^2.
if ((xi >= -1.-eps) &&
(xi <= 1.+eps) &&
(eta >= -1.-eps) &&
(eta <= 1.+eps))
return true;
return false;
}
case TET4:
case TET10:
{
// The reference tetrahedral is isocoles
// and is bound by xi=0, eta=0, zeta=0,
// and xi+eta+zeta=1.
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
(zeta >= 0.-eps) &&
((xi + eta + zeta) <= 1.+eps))
return true;
return false;
}
case HEX8:
case HEX20:
case HEX27:
{
/*
if ((xi >= -1.) &&
(xi <= 1.) &&
(eta >= -1.) &&
(eta <= 1.) &&
(zeta >= -1.) &&
(zeta <= 1.))
return true;
*/
// The reference hexahedral element is [-1,1]^3.
if ((xi >= -1.-eps) &&
(xi <= 1.+eps) &&
(eta >= -1.-eps) &&
(eta <= 1.+eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps))
{
// libMesh::out << "Strange Point:\n";
// p.print();
return true;
}
return false;
}
case PRISM6:
case PRISM15:
case PRISM18:
{
// Figure this one out...
// inside the reference triange with zeta in [-1,1]
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps) &&
((xi + eta) <= 1.+eps))
return true;
return false;
}
case PYRAMID5:
case PYRAMID13:
case PYRAMID14:
{
// Check that the point is on the same side of all the faces
// by testing whether:
//
// n_i.(x - x_i) <= 0
//
// for each i, where:
// n_i is the outward normal of face i,
// x_i is a point on face i.
if ((-eta - 1. + zeta <= 0.+eps) &&
( xi - 1. + zeta <= 0.+eps) &&
( eta - 1. + zeta <= 0.+eps) &&
( -xi - 1. + zeta <= 0.+eps) &&
( zeta >= 0.-eps))
return true;
return false;
}
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
case INFHEX8:
{
// The reference infhex8 is a [-1,1]^3.
if ((xi >= -1.-eps) &&
(xi <= 1.+eps) &&
(eta >= -1.-eps) &&
(eta <= 1.+eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps))
{
return true;
}
return false;
}
case INFPRISM6:
{
// inside the reference triange with zeta in [-1,1]
if ((xi >= 0.-eps) &&
(eta >= 0.-eps) &&
(zeta >= -1.-eps) &&
(zeta <= 1.+eps) &&
((xi + eta) <= 1.+eps))
{
return true;
}
return false;
}
#endif
default:
libmesh_error_msg("ERROR: Unknown element type " << t);
}
// If we get here then the point is _not_ in the
// reference element. Better return false.
return false;
}
| void libMesh::FEGenericBase< FEOutputType< T >::type >::print_d2phi | ( | std::ostream & | os | ) | const [virtual, inherited] |
Prints the value of each shape function's second derivatives at each quadrature point.
Implements libMesh::FEAbstract.
| void libMesh::FEGenericBase< FEOutputType< T >::type >::print_dphi | ( | std::ostream & | os | ) | const [virtual, inherited] |
Prints the value of each shape function's derivative at each quadrature point.
Implements libMesh::FEAbstract.
| void libMesh::ReferenceCounter::print_info | ( | std::ostream & | out = libMesh::out | ) | [static, inherited] |
Prints the reference information, by default to libMesh::out.
Definition at line 88 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
Referenced by libMesh::LibMeshInit::~LibMeshInit().
{
if( _enable_print_counter ) out_stream << ReferenceCounter::get_info();
}
| void libMesh::FEAbstract::print_info | ( | std::ostream & | os | ) | const [inherited] |
Prints all the relevant information about the current element.
Definition at line 761 of file fe_abstract.C.
References libMesh::FEAbstract::print_dphi(), libMesh::FEAbstract::print_JxW(), libMesh::FEAbstract::print_phi(), and libMesh::FEAbstract::print_xyz().
Referenced by libMesh::operator<<().
{
os << "phi[i][j]: Shape function i at quadrature pt. j" << std::endl;
this->print_phi(os);
os << "dphi[i][j]: Shape function i's gradient at quadrature pt. j" << std::endl;
this->print_dphi(os);
os << "XYZ locations of the quadrature pts." << std::endl;
this->print_xyz(os);
os << "Values of JxW at the quadrature pts." << std::endl;
this->print_JxW(os);
}
| void libMesh::FEAbstract::print_JxW | ( | std::ostream & | os | ) | const [inherited] |
Prints the Jacobian times the weight for each quadrature point.
Definition at line 748 of file fe_abstract.C.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::FEAbstract::print_info().
{
this->_fe_map->print_JxW(os);
}
| void libMesh::FEGenericBase< FEOutputType< T >::type >::print_phi | ( | std::ostream & | os | ) | const [virtual, inherited] |
Prints the value of each shape function at each quadrature point.
Implements libMesh::FEAbstract.
| void libMesh::FEAbstract::print_xyz | ( | std::ostream & | os | ) | const [inherited] |
Prints the spatial location of each quadrature point (on the physical element).
Definition at line 755 of file fe_abstract.C.
References libMesh::FEAbstract::_fe_map.
Referenced by libMesh::FEAbstract::print_info().
{
this->_fe_map->print_xyz(os);
}
| void libMesh::FE< Dim, T >::reinit | ( | const Elem * | elem, |
| const std::vector< Point > *const | pts = NULL, |
||
| const std::vector< Real > *const | weights = NULL |
||
| ) | [virtual] |
This is at the core of this class. Use this for each new element in the mesh. Reinitializes all the physical element-dependent data based on the current element elem. By default the shape functions and associated data are computed at the quadrature points specified by the quadrature rule qrule, but may be any points specified on the reference element specified in the optional argument pts.
Implements libMesh::FEAbstract.
Reimplemented in libMesh::FEXYZ< Dim >, and libMesh::FESubdivision.
Definition at line 115 of file fe.C.
References libMesh::INVALID_ELEM, libMesh::libmesh_assert(), libMesh::Elem::n_nodes(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::SCALAR, and libMesh::Elem::type().
{
// We can be called with no element. If we're evaluating SCALAR
// dofs we'll still have work to do.
// libmesh_assert(elem);
// Try to avoid calling init_shape_functions
// even when shapes_need_reinit
bool cached_nodes_still_fit = false;
// Most of the hard work happens when we have an actual element
if (elem)
{
// Initialize the shape functions at the user-specified
// points
if (pts != NULL)
{
// Set the type and p level for this element
this->elem_type = elem->type();
this->_p_level = elem->p_level();
// Initialize the shape functions
this->_fe_map->template init_reference_to_physical_map<Dim>
(*pts, elem);
this->init_shape_functions (*pts, elem);
// The shape functions do not correspond to the qrule
this->shapes_on_quadrature = false;
}
// If there are no user specified points, we use the
// quadrature rule
// update the type in accordance to the current cell
// and reinit if the cell type has changed or (as in
// the case of the hierarchics) the shape functions need
// reinit, since they depend on the particular element shape
else
{
libmesh_assert(this->qrule);
this->qrule->init(elem->type(), elem->p_level());
if(this->qrule->shapes_need_reinit())
this->shapes_on_quadrature = false;
if (this->elem_type != elem->type() ||
this->_p_level != elem->p_level() ||
!this->shapes_on_quadrature)
{
// Set the type and p level for this element
this->elem_type = elem->type();
this->_p_level = elem->p_level();
// Initialize the shape functions
this->_fe_map->template init_reference_to_physical_map<Dim>
(this->qrule->get_points(), elem);
this->init_shape_functions (this->qrule->get_points(), elem);
if (this->shapes_need_reinit())
{
cached_nodes.resize(elem->n_nodes());
for (unsigned int n = 0; n != elem->n_nodes(); ++n)
{
cached_nodes[n] = elem->point(n);
}
}
}
else
{
// libmesh_assert_greater (elem->n_nodes(), 1);
cached_nodes_still_fit = true;
if (cached_nodes.size() != elem->n_nodes())
cached_nodes_still_fit = false;
else
for (unsigned int n = 1; n < elem->n_nodes(); ++n)
{
if (!(elem->point(n) - elem->point(0)).relative_fuzzy_equals
((cached_nodes[n] - cached_nodes[0]), 1e-13))
{
cached_nodes_still_fit = false;
break;
}
}
if (this->shapes_need_reinit() && !cached_nodes_still_fit)
{
this->_fe_map->template init_reference_to_physical_map<Dim>
(this->qrule->get_points(), elem);
this->init_shape_functions (this->qrule->get_points(), elem);
cached_nodes.resize(elem->n_nodes());
for (unsigned int n = 0; n != elem->n_nodes(); ++n)
cached_nodes[n] = elem->point(n);
}
}
// The shape functions correspond to the qrule
this->shapes_on_quadrature = true;
}
}
else // With no defined elem, so mapping or caching to
// be done, and our "quadrature rule" is one point for nonlocal
// (SCALAR) variables and zero points for local variables.
{
this->elem_type = INVALID_ELEM;
this->_p_level = 0;
if (!pts)
{
if (T == SCALAR)
{
this->qrule->get_points() =
std::vector<Point>(1,Point(0));
this->qrule->get_weights() =
std::vector<Real>(1,1);
}
else
{
this->qrule->get_points().clear();
this->qrule->get_weights().clear();
}
this->init_shape_functions (this->qrule->get_points(), elem);
}
else
this->init_shape_functions (*pts, elem);
}
// Compute the map for this element.
if (pts != NULL)
{
if (weights != NULL)
{
this->_fe_map->compute_map (this->dim,*weights, elem);
}
else
{
std::vector<Real> dummy_weights (pts->size(), 1.);
this->_fe_map->compute_map (this->dim,dummy_weights, elem);
}
}
else
{
this->_fe_map->compute_map (this->dim,this->qrule->get_weights(), elem);
}
// Compute the shape functions and the derivatives at all of the
// quadrature points.
if (!cached_nodes_still_fit)
{
if (pts != NULL)
this->compute_shape_functions (elem,*pts);
else
this->compute_shape_functions(elem,this->qrule->get_points());
}
}
| virtual void libMesh::FE< Dim, T >::reinit | ( | const Elem * | elem, |
| const unsigned int | side, | ||
| const Real | tolerance = TOLERANCE, |
||
| const std::vector< Point > *const | pts = NULL, |
||
| const std::vector< Real > *const | weights = NULL |
||
| ) | [virtual] |
Reinitializes all the physical element-dependent data based on the side of face. The tolerance paremeter is passed to the involved call to inverse_map(). By default the shape functions and associated data are computed at the quadrature points specified by the quadrature rule qrule, but may be any points specified on the reference side element specified in the optional argument pts.
Implements libMesh::FEAbstract.
Reimplemented in libMesh::FEXYZ< Dim >, libMesh::FESubdivision, libMesh::FEXYZ< Dim >, and libMesh::FEXYZ< Dim >.
| RealGradient libMesh::FE< 2, NEDELEC_ONE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 29 of file fe_nedelec_one_shape_2D.C.
{
libmesh_error_msg("Nedelec elements require the element type \nbecause edge orientation is needed.");
return RealGradient();
}
| RealGradient libMesh::FE< 3, NEDELEC_ONE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 29 of file fe_nedelec_one_shape_3D.C.
{
libmesh_error_msg("Nedelec elements require the element type \nbecause edge orientation is needed.");
return RealGradient();
}
| Real libMesh::FE< 3, SCALAR >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 29 of file fe_scalar_shape_3D.C.
{
return 1.;
}
| Real libMesh::FE< 0, SCALAR >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 29 of file fe_scalar_shape_0D.C.
{
return 1.;
}
| Real libMesh::FE< 1, SCALAR >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 29 of file fe_scalar_shape_1D.C.
{
return 1.;
}
| Real libMesh::FE< 2, SCALAR >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 29 of file fe_scalar_shape_2D.C.
{
return 1.;
}
| Real libMesh::FE< 1, MONOMIAL >::shape | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_monomial_shape_1D.C.
References libMesh::Real.
{
const Real xi = p(0);
libmesh_assert_less_equal (i, static_cast<unsigned int>(order));
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
case 0:
return 1.;
case 1:
return xi;
case 2:
return xi*xi;
case 3:
return xi*xi*xi;
case 4:
return xi*xi*xi*xi;
default:
Real val = 1.;
for (unsigned int index = 0; index != i; ++index)
val *= xi;
return val;
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 0, L2_HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_l2_hierarchic_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 2, L2_HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_l2_hierarchic_shape_2D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 1, L2_LAGRANGE >::shape | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_l2_lagrange_shape_1D.C.
References libMesh::FIRST, libMesh::Real, libMesh::SECOND, and libMesh::THIRD.
{
const Real xi = p(0);
switch (order)
{
// Lagrange linears
case FIRST:
{
libmesh_assert_less (i, 2);
switch (i)
{
case 0:
return .5*(1. - xi);
case 1:
return .5*(1. + xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange quadratics
case SECOND:
{
libmesh_assert_less (i, 3);
switch (i)
{
case 0:
return .5*xi*(xi - 1.);
case 1:
return .5*xi*(xi + 1);
case 2:
return (1. - xi*xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange cubics
case THIRD:
{
libmesh_assert_less (i, 4);
switch (i)
{
case 0:
return 9./16.*(1./9.-xi*xi)*(xi-1.);
case 1:
return -9./16.*(1./9.-xi*xi)*(xi+1.);
case 2:
return 27./16.*(1.-xi*xi)*(1./3.-xi);
case 3:
return 27./16.*(1.-xi*xi)*(1./3.+xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 0, HERMITE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_hermite_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, SZABAB >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_szabab_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 2, L2_LAGRANGE >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_l2_lagrange_shape_2D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::TRI3, and libMesh::TRI6.
{
#if LIBMESH_DIM > 1
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
case QUAD4:
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 4);
// 0 1 2 3
static const unsigned int i0[] = {0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1};
return (FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i1[i], eta));
}
case TRI3:
case TRI6:
{
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
libmesh_assert_less (i, 3);
switch(i)
{
case 0:
return zeta0;
case 1:
return zeta1;
case 2:
return zeta2;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
case QUAD8:
{
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 8);
switch (i)
{
case 0:
return .25*(1. - xi)*(1. - eta)*(-1. - xi - eta);
case 1:
return .25*(1. + xi)*(1. - eta)*(-1. + xi - eta);
case 2:
return .25*(1. + xi)*(1. + eta)*(-1. + xi + eta);
case 3:
return .25*(1. - xi)*(1. + eta)*(-1. - xi + eta);
case 4:
return .5*(1. - xi*xi)*(1. - eta);
case 5:
return .5*(1. + xi)*(1. - eta*eta);
case 6:
return .5*(1. - xi*xi)*(1. + eta);
case 7:
return .5*(1. - xi)*(1. - eta*eta);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
return (FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i1[i], eta));
}
case TRI6:
{
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
libmesh_assert_less (i, 6);
switch(i)
{
case 0:
return 2.*zeta0*(zeta0-0.5);
case 1:
return 2.*zeta1*(zeta1-0.5);
case 2:
return 2.*zeta2*(zeta2-0.5);
case 3:
return 4.*zeta0*zeta1;
case 4:
return 4.*zeta1*zeta2;
case 5:
return 4.*zeta2*zeta0;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order: " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| Real libMesh::FE< 3, L2_LAGRANGE >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_l2_lagrange_shape_3D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID5, libMesh::Real, libMesh::SECOND, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, and libMesh::x.
{
#if LIBMESH_DIM == 3
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
// trilinear hexahedral shape functions
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 8);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// 0 1 2 3 4 5 6 7
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1};
return (FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i2[i], zeta));
}
// linear tetrahedral shape functions
case TET4:
case TET10:
{
libmesh_assert_less (i, 4);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
switch(i)
{
case 0:
return zeta0;
case 1:
return zeta1;
case 2:
return zeta2;
case 3:
return zeta3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// linear prism shape functions
case PRISM6:
case PRISM15:
case PRISM18:
{
libmesh_assert_less (i, 6);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2};
return (FE<2,L2_LAGRANGE>::shape(TRI3, FIRST, i1[i], p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i0[i], p1d));
}
// linear pyramid shape functions
case PYRAMID5:
{
libmesh_assert_less (i, 5);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
switch(i)
{
case 0:
return .25*(zeta + xi - 1.)*(zeta + eta - 1.)/((1. - zeta) + eps);
case 1:
return .25*(zeta - xi - 1.)*(zeta + eta - 1.)/((1. - zeta) + eps);
case 2:
return .25*(zeta - xi - 1.)*(zeta - eta - 1.)/((1. - zeta) + eps);
case 3:
return .25*(zeta + xi - 1.)*(zeta - eta - 1.)/((1. - zeta) + eps);
case 4:
return zeta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
// serendipity hexahedral quadratic shape functions
case HEX20:
{
libmesh_assert_less (i, 20);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// these functions are defined for (x,y,z) in [0,1]^3
// so transform the locations
const Real x = .5*(xi + 1.);
const Real y = .5*(eta + 1.);
const Real z = .5*(zeta + 1.);
switch (i)
{
case 0:
return (1. - x)*(1. - y)*(1. - z)*(1. - 2.*x - 2.*y - 2.*z);
case 1:
return x*(1. - y)*(1. - z)*(2.*x - 2.*y - 2.*z - 1.);
case 2:
return x*y*(1. - z)*(2.*x + 2.*y - 2.*z - 3.);
case 3:
return (1. - x)*y*(1. - z)*(2.*y - 2.*x - 2.*z - 1.);
case 4:
return (1. - x)*(1. - y)*z*(2.*z - 2.*x - 2.*y - 1.);
case 5:
return x*(1. - y)*z*(2.*x - 2.*y + 2.*z - 3.);
case 6:
return x*y*z*(2.*x + 2.*y + 2.*z - 5.);
case 7:
return (1. - x)*y*z*(2.*y - 2.*x + 2.*z - 3.);
case 8:
return 4.*x*(1. - x)*(1. - y)*(1. - z);
case 9:
return 4.*x*y*(1. - y)*(1. - z);
case 10:
return 4.*x*(1. - x)*y*(1. - z);
case 11:
return 4.*(1. - x)*y*(1. - y)*(1. - z);
case 12:
return 4.*(1. - x)*(1. - y)*z*(1. - z);
case 13:
return 4.*x*(1. - y)*z*(1. - z);
case 14:
return 4.*x*y*z*(1. - z);
case 15:
return 4.*(1. - x)*y*z*(1. - z);
case 16:
return 4.*x*(1. - x)*(1. - y)*z;
case 17:
return 4.*x*y*(1. - y)*z;
case 18:
return 4.*x*(1. - x)*y*z;
case 19:
return 4.*(1. - x)*y*(1. - y)*z;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// triquadraic hexahedral shape funcions
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
return (FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i2[i], zeta));
}
// quadratic tetrahedral shape functions
case TET10:
{
libmesh_assert_less (i, 10);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
switch(i)
{
case 0:
return zeta0*(2.*zeta0 - 1.);
case 1:
return zeta1*(2.*zeta1 - 1.);
case 2:
return zeta2*(2.*zeta2 - 1.);
case 3:
return zeta3*(2.*zeta3 - 1.);
case 4:
return 4.*zeta0*zeta1;
case 5:
return 4.*zeta1*zeta2;
case 6:
return 4.*zeta2*zeta0;
case 7:
return 4.*zeta0*zeta3;
case 8:
return 4.*zeta1*zeta3;
case 9:
return 4.*zeta2*zeta3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// quadradic prism shape functions
case PRISM18:
{
libmesh_assert_less (i, 18);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 3, 4, 5};
return (FE<2,L2_LAGRANGE>::shape(TRI6, SECOND, i1[i], p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << order);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, SZABAB >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_szabab_shape_3D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials are not defined in 3D");
return 0.;
}
| Real libMesh::FE< 0, XYZ >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_xyz_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 1, LAGRANGE >::shape | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_lagrange_shape_1D.C.
References libMesh::FIRST, libMesh::Real, libMesh::SECOND, and libMesh::THIRD.
{
const Real xi = p(0);
switch (order)
{
// Lagrange linears
case FIRST:
{
libmesh_assert_less (i, 2);
switch (i)
{
case 0:
return .5*(1. - xi);
case 1:
return .5*(1. + xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange quadratics
case SECOND:
{
libmesh_assert_less (i, 3);
switch (i)
{
case 0:
return .5*xi*(xi - 1.);
case 1:
return .5*xi*(xi + 1);
case 2:
return (1. - xi*xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange cubics
case THIRD:
{
libmesh_assert_less (i, 4);
switch (i)
{
case 0:
return 9./16.*(1./9.-xi*xi)*(xi-1.);
case 1:
return -9./16.*(1./9.-xi*xi)*(xi+1.);
case 2:
return 27./16.*(1.-xi*xi)*(1./3.-xi);
case 3:
return 27./16.*(1.-xi*xi)*(1./3.+xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, LAGRANGE >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_lagrange_shape_3D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::Real, libMesh::SECOND, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, and libMesh::x.
{
#if LIBMESH_DIM == 3
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
// trilinear hexahedral shape functions
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 8);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// 0 1 2 3 4 5 6 7
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1};
return (FE<1,LAGRANGE>::shape(EDGE2, FIRST, i0[i], xi)*
FE<1,LAGRANGE>::shape(EDGE2, FIRST, i1[i], eta)*
FE<1,LAGRANGE>::shape(EDGE2, FIRST, i2[i], zeta));
}
// linear tetrahedral shape functions
case TET4:
case TET10:
{
libmesh_assert_less (i, 4);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
switch(i)
{
case 0:
return zeta0;
case 1:
return zeta1;
case 2:
return zeta2;
case 3:
return zeta3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// linear prism shape functions
case PRISM6:
case PRISM15:
case PRISM18:
{
libmesh_assert_less (i, 6);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2};
return (FE<2,LAGRANGE>::shape(TRI3, FIRST, i1[i], p2d)*
FE<1,LAGRANGE>::shape(EDGE2, FIRST, i0[i], p1d));
}
// linear pyramid shape functions
case PYRAMID5:
case PYRAMID13:
case PYRAMID14:
{
libmesh_assert_less (i, 5);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
switch(i)
{
case 0:
return .25*(zeta + xi - 1.)*(zeta + eta - 1.)/((1. - zeta) + eps);
case 1:
return .25*(zeta - xi - 1.)*(zeta + eta - 1.)/((1. - zeta) + eps);
case 2:
return .25*(zeta - xi - 1.)*(zeta - eta - 1.)/((1. - zeta) + eps);
case 3:
return .25*(zeta + xi - 1.)*(zeta - eta - 1.)/((1. - zeta) + eps);
case 4:
return zeta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
// serendipity hexahedral quadratic shape functions
case HEX20:
{
libmesh_assert_less (i, 20);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// these functions are defined for (x,y,z) in [0,1]^3
// so transform the locations
const Real x = .5*(xi + 1.);
const Real y = .5*(eta + 1.);
const Real z = .5*(zeta + 1.);
switch (i)
{
case 0:
return (1. - x)*(1. - y)*(1. - z)*(1. - 2.*x - 2.*y - 2.*z);
case 1:
return x*(1. - y)*(1. - z)*(2.*x - 2.*y - 2.*z - 1.);
case 2:
return x*y*(1. - z)*(2.*x + 2.*y - 2.*z - 3.);
case 3:
return (1. - x)*y*(1. - z)*(2.*y - 2.*x - 2.*z - 1.);
case 4:
return (1. - x)*(1. - y)*z*(2.*z - 2.*x - 2.*y - 1.);
case 5:
return x*(1. - y)*z*(2.*x - 2.*y + 2.*z - 3.);
case 6:
return x*y*z*(2.*x + 2.*y + 2.*z - 5.);
case 7:
return (1. - x)*y*z*(2.*y - 2.*x + 2.*z - 3.);
case 8:
return 4.*x*(1. - x)*(1. - y)*(1. - z);
case 9:
return 4.*x*y*(1. - y)*(1. - z);
case 10:
return 4.*x*(1. - x)*y*(1. - z);
case 11:
return 4.*(1. - x)*y*(1. - y)*(1. - z);
case 12:
return 4.*(1. - x)*(1. - y)*z*(1. - z);
case 13:
return 4.*x*(1. - y)*z*(1. - z);
case 14:
return 4.*x*y*z*(1. - z);
case 15:
return 4.*(1. - x)*y*z*(1. - z);
case 16:
return 4.*x*(1. - x)*(1. - y)*z;
case 17:
return 4.*x*y*(1. - y)*z;
case 18:
return 4.*x*(1. - x)*y*z;
case 19:
return 4.*(1. - x)*y*(1. - y)*z;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// triquadraic hexahedral shape funcions
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
return (FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i1[i], eta)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i2[i], zeta));
}
// quadratic tetrahedral shape functions
case TET10:
{
libmesh_assert_less (i, 10);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
switch(i)
{
case 0:
return zeta0*(2.*zeta0 - 1.);
case 1:
return zeta1*(2.*zeta1 - 1.);
case 2:
return zeta2*(2.*zeta2 - 1.);
case 3:
return zeta3*(2.*zeta3 - 1.);
case 4:
return 4.*zeta0*zeta1;
case 5:
return 4.*zeta1*zeta2;
case 6:
return 4.*zeta2*zeta0;
case 7:
return 4.*zeta0*zeta3;
case 8:
return 4.*zeta1*zeta3;
case 9:
return 4.*zeta2*zeta3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// "serendipity" prism
case PRISM15:
{
libmesh_assert_less (i, 15);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
switch(i)
{
case 0:
return (1. - zeta)*(xi + eta - 1.)*(xi + eta + 0.5*zeta);
case 1:
return (1. - zeta)*xi*(xi - 1. - 0.5*zeta);
case 2: // phi1 with xi <- eta
return (1. - zeta)*eta*(eta - 1. - 0.5*zeta);
case 3: // phi0 with zeta <- (-zeta)
return (1. + zeta)*(xi + eta - 1.)*(xi + eta - 0.5*zeta);
case 4: // phi1 with zeta <- (-zeta)
return (1. + zeta)*xi*(xi - 1. + 0.5*zeta);
case 5: // phi4 with xi <- eta
return (1. + zeta)*eta*(eta - 1. + 0.5*zeta);
case 6:
return 2.*(1. - zeta)*xi*(1. - xi - eta);
case 7:
return 2.*(1. - zeta)*xi*eta;
case 8:
return 2.*(1. - zeta)*eta*(1. - xi - eta);
case 9:
return (1. - zeta)*(1. + zeta)*(1. - xi - eta);
case 10:
return (1. - zeta)*(1. + zeta)*xi;
case 11: // phi10 with xi <-> eta
return (1. - zeta)*(1. + zeta)*eta;
case 12: // phi6 with zeta <- (-zeta)
return 2.*(1. + zeta)*xi*(1. - xi - eta);
case 13: // phi7 with zeta <- (-zeta)
return 2.*(1. + zeta)*xi*eta;
case 14: // phi8 with zeta <- (-zeta)
return 2.*(1. + zeta)*eta*(1. - xi - eta);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// quadradic prism shape functions
case PRISM18:
{
libmesh_assert_less (i, 18);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 3, 4, 5};
return (FE<2,LAGRANGE>::shape(TRI6, SECOND, i1[i], p2d)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
}
// G. Bedrosian, "Shape functions and integration formulas for
// three-dimensional finite element analysis", Int. J. Numerical
// Methods Engineering, vol 35, p. 95-108, 1992.
case PYRAMID13:
{
libmesh_assert_less (i, 13);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
// Denominators are perturbed by epsilon to avoid
// divide-by-zero issues.
Real den = (1. - zeta + eps);
switch(i)
{
case 0:
return 0.25*(-xi - eta - 1.)*((1. - xi)*(1. - eta) - zeta + xi*eta*zeta/den);
case 1:
return 0.25*(-eta + xi - 1.)*((1. + xi)*(1. - eta) - zeta - xi*eta*zeta/den);
case 2:
return 0.25*(xi + eta - 1.)*((1. + xi)*(1. + eta) - zeta + xi*eta*zeta/den);
case 3:
return 0.25*(eta - xi - 1.)*((1. - xi)*(1. + eta) - zeta - xi*eta*zeta/den);
case 4:
return zeta*(2.*zeta - 1.);
case 5:
return 0.5*(1. + xi - zeta)*(1. - xi - zeta)*(1. - eta - zeta)/den;
case 6:
return 0.5*(1. + eta - zeta)*(1. - eta - zeta)*(1. + xi - zeta)/den;
case 7:
return 0.5*(1. + xi - zeta)*(1. - xi - zeta)*(1. + eta - zeta)/den;
case 8:
return 0.5*(1. + eta - zeta)*(1. - eta - zeta)*(1. - xi - zeta)/den;
case 9:
return zeta*(1. - xi - zeta)*(1. - eta - zeta)/den;
case 10:
return zeta*(1. + xi - zeta)*(1. - eta - zeta)/den;
case 11:
return zeta*(1. + eta - zeta)*(1. + xi - zeta)/den;
case 12:
return zeta*(1. - xi - zeta)*(1. + eta - zeta)/den;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// Quadratic shape functions, as defined in R. Graglia, "Higher order
// bases on pyramidal elements", IEEE Trans Antennas and Propagation,
// vol 47, no 5, May 1999.
case PYRAMID14:
{
libmesh_assert_less (i, 14);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
// The "normalized coordinates" defined by Graglia. These are
// the planes which define the faces of the pyramid.
Real
p1 = 0.5*(1. - eta - zeta), // back
p2 = 0.5*(1. + xi - zeta), // left
p3 = 0.5*(1. + eta - zeta), // front
p4 = 0.5*(1. - xi - zeta); // right
// Denominators are perturbed by epsilon to avoid
// divide-by-zero issues.
Real
den = (-1. + zeta + eps),
den2 = den*den;
switch(i)
{
case 0:
return p4*p1*(xi*eta - zeta + zeta*zeta)/den2;
case 1:
return -p1*p2*(xi*eta + zeta - zeta*zeta)/den2;
case 2:
return p2*p3*(xi*eta - zeta + zeta*zeta)/den2;
case 3:
return -p3*p4*(xi*eta + zeta - zeta*zeta)/den2;
case 4:
return zeta*(2.*zeta - 1.);
case 5:
return -4.*p2*p1*p4*eta/den2;
case 6:
return 4.*p1*p2*p3*xi/den2;
case 7:
return 4.*p2*p3*p4*eta/den2;
case 8:
return -4.*p3*p4*p1*xi/den2;
case 9:
return -4.*p1*p4*zeta/den;
case 10:
return -4.*p2*p1*zeta/den;
case 11:
return -4.*p3*p2*zeta/den;
case 12:
return -4.*p4*p3*zeta/den;
case 13:
return 16.*p1*p2*p3*p4/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << order);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, LAGRANGE >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_lagrange_shape_2D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::TRI3, and libMesh::TRI6.
{
#if LIBMESH_DIM > 1
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
case QUAD4:
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 4);
// 0 1 2 3
static const unsigned int i0[] = {0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1};
return (FE<1,LAGRANGE>::shape(EDGE2, FIRST, i0[i], xi)*
FE<1,LAGRANGE>::shape(EDGE2, FIRST, i1[i], eta));
}
case TRI3:
case TRI6:
{
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
libmesh_assert_less (i, 3);
switch(i)
{
case 0:
return zeta0;
case 1:
return zeta1;
case 2:
return zeta2;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
case QUAD8:
{
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 8);
switch (i)
{
case 0:
return .25*(1. - xi)*(1. - eta)*(-1. - xi - eta);
case 1:
return .25*(1. + xi)*(1. - eta)*(-1. + xi - eta);
case 2:
return .25*(1. + xi)*(1. + eta)*(-1. + xi + eta);
case 3:
return .25*(1. - xi)*(1. + eta)*(-1. - xi + eta);
case 4:
return .5*(1. - xi*xi)*(1. - eta);
case 5:
return .5*(1. + xi)*(1. - eta*eta);
case 6:
return .5*(1. - xi*xi)*(1. + eta);
case 7:
return .5*(1. - xi)*(1. - eta*eta);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
return (FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i1[i], eta));
}
case TRI6:
{
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
libmesh_assert_less (i, 6);
switch(i)
{
case 0:
return 2.*zeta0*(zeta0-0.5);
case 1:
return 2.*zeta1*(zeta1-0.5);
case 2:
return 2.*zeta2*(zeta2-0.5);
case 3:
return 4.*zeta0*zeta1;
case 4:
return 4.*zeta1*zeta2;
case 5:
return 4.*zeta2*zeta0;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order: " << order);
}
libmesh_error_msg("We'll never get here!");
#endif // LIBMESH_DIM > 1
return 0.;
}
| Real libMesh::FE< 0, L2_LAGRANGE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_l2_lagrange_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_hierarchic_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, LAGRANGE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_lagrange_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 2, HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_hierarchic_shape_2D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 0, CLOUGH >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_clough_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, MONOMIAL >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_monomial_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 2, MONOMIAL >::shape | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_monomial_shape_2D.C.
References libMesh::Real.
{
#if LIBMESH_DIM > 1
libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
(static_cast<unsigned int>(order)+2)/2);
const Real xi = p(0);
const Real eta = p(1);
switch (i)
{
// constant
case 0:
return 1.;
// linear
case 1:
return xi;
case 2:
return eta;
// quadratics
case 3:
return xi*xi;
case 4:
return xi*eta;
case 5:
return eta*eta;
// cubics
case 6:
return xi*xi*xi;
case 7:
return xi*xi*eta;
case 8:
return xi*eta*eta;
case 9:
return eta*eta*eta;
// quartics
case 10:
return xi*xi*xi*xi;
case 11:
return xi*xi*xi*eta;
case 12:
return xi*xi*eta*eta;
case 13:
return xi*eta*eta*eta;
case 14:
return eta*eta*eta*eta;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int ny = i - (o*(o+1)/2);
unsigned int nx = o - ny;
Real val = 1.;
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
return val;
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| Real libMesh::FE< 0, BERNSTEIN >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 32 of file fe_bernstein_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 3, MONOMIAL >::shape | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 32 of file fe_monomial_shape_3D.C.
References libMesh::Real.
{
#if LIBMESH_DIM == 3
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
(static_cast<unsigned int>(order)+2)*
(static_cast<unsigned int>(order)+3)/6);
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
// constant
case 0:
return 1.;
// linears
case 1:
return xi;
case 2:
return eta;
case 3:
return zeta;
// quadratics
case 4:
return xi*xi;
case 5:
return xi*eta;
case 6:
return eta*eta;
case 7:
return xi*zeta;
case 8:
return zeta*eta;
case 9:
return zeta*zeta;
// cubics
case 10:
return xi*xi*xi;
case 11:
return xi*xi*eta;
case 12:
return xi*eta*eta;
case 13:
return eta*eta*eta;
case 14:
return xi*xi*zeta;
case 15:
return xi*eta*zeta;
case 16:
return eta*eta*zeta;
case 17:
return xi*zeta*zeta;
case 18:
return eta*zeta*zeta;
case 19:
return zeta*zeta*zeta;
// quartics
case 20:
return xi*xi*xi*xi;
case 21:
return xi*xi*xi*eta;
case 22:
return xi*xi*eta*eta;
case 23:
return xi*eta*eta*eta;
case 24:
return eta*eta*eta*eta;
case 25:
return xi*xi*xi*zeta;
case 26:
return xi*xi*eta*zeta;
case 27:
return xi*eta*eta*zeta;
case 28:
return eta*eta*eta*zeta;
case 29:
return xi*xi*zeta*zeta;
case 30:
return xi*eta*zeta*zeta;
case 31:
return eta*eta*zeta*zeta;
case 32:
return xi*zeta*zeta*zeta;
case 33:
return eta*zeta*zeta*zeta;
case 34:
return zeta*zeta*zeta*zeta;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = 1.;
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
for (unsigned int index=0; index != nz; index++)
val *= zeta;
return val;
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, CLOUGH >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 33 of file fe_clough_shape_3D.C.
{
libmesh_error_msg("Clough-Tocher elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 1, L2_HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 33 of file fe_l2_hierarchic_shape_1D.C.
References libMesh::Utility::pow(), and libMesh::Real.
{
libmesh_assert_less (i, order+1u);
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
const Real xi = p(0);
Real returnval = 1.;
switch (i)
{
case 0:
returnval = .5*(1. - xi);
break;
case 1:
returnval = .5*(1. + xi);
break;
// All even-terms have the same form.
// (xi^p - 1.)/p!
case 2:
returnval = (xi*xi - 1.)/2.;
break;
case 4:
returnval = (pow<4>(xi) - 1.)/24.;
break;
case 6:
returnval = (pow<6>(xi) - 1.)/720.;
break;
// All odd-terms have the same form.
// (xi^p - xi)/p!
case 3:
returnval = (xi*xi*xi - xi)/6.;
break;
case 5:
returnval = (pow<5>(xi) - xi)/120.;
break;
case 7:
returnval = (pow<7>(xi) - xi)/5040.;
break;
default:
Real denominator = 1.;
for (unsigned int n=1; n <= i; ++n)
{
returnval *= xi;
denominator *= n;
}
// Odd:
if (i % 2)
returnval = (returnval - xi)/denominator;
// Even:
else
returnval = (returnval - 1.)/denominator;
break;
}
return returnval;
}
| Real libMesh::FE< 1, HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 33 of file fe_hierarchic_shape_1D.C.
References libMesh::Utility::pow(), and libMesh::Real.
{
libmesh_assert_less (i, order+1u);
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
const Real xi = p(0);
Real returnval = 1.;
switch (i)
{
case 0:
returnval = .5*(1. - xi);
break;
case 1:
returnval = .5*(1. + xi);
break;
// All even-terms have the same form.
// (xi^p - 1.)/p!
case 2:
returnval = (xi*xi - 1.)/2.;
break;
case 4:
returnval = (pow<4>(xi) - 1.)/24.;
break;
case 6:
returnval = (pow<6>(xi) - 1.)/720.;
break;
// All odd-terms have the same form.
// (xi^p - xi)/p!
case 3:
returnval = (xi*xi*xi - xi)/6.;
break;
case 5:
returnval = (pow<5>(xi) - xi)/120.;
break;
case 7:
returnval = (pow<7>(xi) - xi)/5040.;
break;
default:
Real denominator = 1.;
for (unsigned int n=1; n <= i; ++n)
{
returnval *= xi;
denominator *= n;
}
// Odd:
if (i % 2)
returnval = (returnval - xi)/denominator;
// Even:
else
returnval = (returnval - 1.)/denominator;
break;
}
return returnval;
}
| Real libMesh::FE< 2, BERNSTEIN >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 34 of file fe_bernstein_shape_2D.C.
{
libmesh_error_msg("Bernstein polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 1, SZABAB >::shape | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 35 of file fe_szabab_shape_1D.C.
References libMesh::Real, and libMesh::SEVENTH.
{
const Real xi = p(0);
const Real xi2 = xi*xi;
// Use this libmesh_assert rather than a switch with a single entry...
// It will go away in optimized mode, essentially has the same effect.
libmesh_assert_less_equal (order, SEVENTH);
// switch (order)
// {
// case FIRST:
// case SECOND:
// case THIRD:
// case FOURTH:
// case FIFTH:
// case SIXTH:
// case SEVENTH:
switch(i)
{
//nodal shape functions
case 0: return 1./2.-1./2.*xi;
case 1: return 1./2.+1./2.*xi;
case 2: return 1./4. *2.4494897427831780982*(xi2-1.);
case 3: return 1./4. *3.1622776601683793320*(xi2-1.)*xi;
case 4: return 1./16. *3.7416573867739413856*((5.*xi2-6.)*xi2+1.);
case 5: return 3./16. *1.4142135623730950488*(3.+(-10.+7.*xi2)*xi2)*xi;
case 6: return 1./32. *4.6904157598234295546*(-1.+(15.+(-35.+21.*xi2)*xi2)*xi2);
case 7: return 1./32. *5.0990195135927848300*(-5.+(35.+(-63.+33.*xi2)*xi2)*xi2)*xi;
case 8: return 1./256.*5.4772255750516611346*(5.+(-140.+(630.+(-924.+429.*xi2)*xi2)*xi2)*xi2);
default:
libmesh_error_msg("Invalid shape function index!");
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, BERNSTEIN >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 36 of file fe_bernstein_shape_3D.C.
{
libmesh_error_msg("Bernstein polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| Real libMesh::FE< 1, BERNSTEIN >::shape | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 38 of file fe_bernstein_shape_1D.C.
References libMesh::Utility::factorial(), libMesh::FIFTH, libMesh::FIRST, libMesh::FOURTH, libMesh::libmesh_assert(), std::pow(), libMesh::Utility::pow(), libMesh::Real, libMesh::SECOND, libMesh::SIXTH, and libMesh::THIRD.
{
const Real xi = p(0);
using Utility::pow;
switch (order)
{
case FIRST:
switch(i)
{
case 0:
return (1.-xi)/2.;
case 1:
return (1.+xi)/2.;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case SECOND:
switch(i)
{
case 0:
return (1./4.)*pow<2>(1.-xi);
case 1:
return (1./4.)*pow<2>(1.+xi);
case 2:
return (1./2.)*(1.-xi)*(1.+xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case THIRD:
switch(i)
{
case 0:
return (1./8.)*pow<3>(1.-xi);
case 1:
return (1./8.)*pow<3>(1.+xi);
case 2:
return (3./8.)*(1.+xi)*pow<2>(1.-xi);
case 3:
return (3./8.)*pow<2>(1.+xi)*(1.-xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case FOURTH:
switch(i)
{
case 0:
return (1./16.)*pow<4>(1.-xi);
case 1:
return (1./16.)*pow<4>(1.+xi);
case 2:
return (1./ 4.)*(1.+xi)*pow<3>(1.-xi);
case 3:
return (3./ 8.)*pow<2>(1.+xi)*pow<2>(1.-xi);
case 4:
return (1./ 4.)*pow<3>(1.+xi)*(1.-xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case FIFTH:
switch(i)
{
case 0:
return (1./32.)*pow<5>(1.-xi);
case 1:
return (1./32.)*pow<5>(1.+xi);
case 2:
return (5./32.)*(1.+xi)*pow<4>(1.-xi);
case 3:
return (5./16.)*pow<2>(1.+xi)*pow<3>(1.-xi);
case 4:
return (5./16.)*pow<3>(1.+xi)*pow<2>(1.-xi);
case 5:
return (5./32.)*pow<4>(1.+xi)*(1.-xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case SIXTH:
switch (i)
{
case 0:
return ( 1./64.)*pow<6>(1.-xi);
case 1:
return ( 1./64.)*pow<6>(1.+xi);
case 2:
return ( 3./32.)*(1.+xi)*pow<5>(1.-xi);
case 3:
return (15./64.)*pow<2>(1.+xi)*pow<4>(1.-xi);
case 4:
return ( 5./16.)*pow<3>(1.+xi)*pow<3>(1.-xi);
case 5:
return (15./64.)*pow<4>(1.+xi)*pow<2>(1.-xi);
case 6:
return ( 3./32.)*pow<5>(1.+xi)*(1.-xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
default:
{
libmesh_assert (order>6);
// Use this for arbitrary orders.
// Note that this implementation is less efficient.
const int p_order = static_cast<unsigned int>(order);
const int m = p_order-i+1;
const int n = (i-1);
unsigned int binomial_p_i = 1;
// the binomial coefficient (p choose n)
if (i>1)
binomial_p_i = Utility::factorial(p_order)
/ (Utility::factorial(n)*Utility::factorial(p_order-n));
switch(i)
{
case 0:
return binomial_p_i * std::pow((1-xi)/2,static_cast<int>(p_order));
case 1:
return binomial_p_i * std::pow((1+xi)/2,static_cast<int>(p_order));
default:
{
return binomial_p_i * std::pow((1+xi)/2,n)
* std::pow((1-xi)/2,m);
}
}
}
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, SCALAR >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 38 of file fe_scalar_shape_1D.C.
{
return 1.;
}
| Real libMesh::FE< 3, SCALAR >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 38 of file fe_scalar_shape_3D.C.
{
return 1.;
}
| Real libMesh::FE< 2, SCALAR >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 38 of file fe_scalar_shape_2D.C.
{
return 1.;
}
| Real libMesh::FE< 0, SCALAR >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 38 of file fe_scalar_shape_0D.C.
{
return 1.;
}
| RealGradient libMesh::FE< 3, NEDELEC_ONE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 41 of file fe_nedelec_one_shape_3D.C.
References libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, libMesh::TET10, libMesh::TOLERANCE, and libMesh::Elem::type().
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// linear Lagrange shape functions
case FIRST:
{
switch (elem->type())
{
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 12);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// Even with a loose inverse_map tolerance we ought to
// be nearly on the element interior in master
// coordinates
libmesh_assert_less_equal ( std::fabs(xi), 1.0+10*TOLERANCE );
libmesh_assert_less_equal ( std::fabs(eta), 1.0+10*TOLERANCE );
libmesh_assert_less_equal ( std::fabs(zeta), 1.0+10*TOLERANCE );
switch(i)
{
case 0:
{
if( elem->point(0) > elem->point(1) )
return RealGradient( -0.125*(1.0-eta-zeta+eta*zeta), 0.0, 0.0 );
else
return RealGradient( 0.125*(1.0-eta-zeta+eta*zeta), 0.0, 0.0 );
}
case 1:
{
if( elem->point(1) > elem->point(2) )
return RealGradient( 0.0, -0.125*(1.0+xi-zeta-xi*zeta), 0.0 );
else
return RealGradient( 0.0, 0.125*(1.0+xi-zeta-xi*zeta), 0.0 );
}
case 2:
{
if( elem->point(2) > elem->point(3) )
return RealGradient( 0.125*(1.0+eta-zeta-eta*zeta), 0.0, 0.0 );
else
return RealGradient( -0.125*(1.0+eta-zeta-eta*zeta), 0.0, 0.0 );
}
case 3:
{
if( elem->point(3) > elem->point(0) )
return RealGradient( 0.0, 0.125*(1.0-xi-zeta+xi*zeta), 0.0 );
else
return RealGradient( 0.0, -0.125*(1.0-xi-zeta+xi*zeta), 0.0 );
}
case 4:
{
if( elem->point(0) > elem->point(4) )
return RealGradient( 0.0, 0.0, -0.125*(1.0-xi-eta+xi*eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0-xi-eta+xi*eta) );
}
case 5:
{
if( elem->point(1) > elem->point(5) )
return RealGradient( 0.0, 0.0, -0.125*(1.0+xi-eta-xi*eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0+xi-eta-xi*eta) );
}
case 6:
{
if( elem->point(2) > elem->point(6) )
return RealGradient( 0.0, 0.0, -0.125*(1.0+xi+eta+xi*eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0+xi+eta+xi*eta) );
}
case 7:
{
if( elem->point(3) > elem->point(7) )
return RealGradient( 0.0, 0.0, -0.125*(1.0-xi+eta-xi*eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0-xi+eta-xi*eta) );
}
case 8:
{
if( elem->point(4) > elem->point(5) )
return RealGradient( -0.125*(1.0-eta+zeta-eta*zeta), 0.0, 0.0 );
else
return RealGradient( 0.125*(1.0-eta+zeta-eta*zeta), 0.0, 0.0 );
}
case 9:
{
if( elem->point(5) > elem->point(6) )
return RealGradient( 0.0, -0.125*(1.0+xi+zeta+xi*zeta), 0.0 );
else
return RealGradient( 0.0, 0.125*(1.0+xi+zeta+xi*zeta), 0.0 );
}
case 10:
{
if( elem->point(7) > elem->point(6) )
return RealGradient( -0.125*(1.0+eta+zeta+eta*zeta), 0.0, 0.0 );
else
return RealGradient( 0.125*(1.0+eta+zeta+eta*zeta), 0.0, 0.0 );
}
case 11:
{
if( elem->point(4) > elem->point(7) )
return RealGradient( 0.0, -0.125*(1.0-xi+zeta-xi*zeta), 0.0 );
else
return RealGradient( 0.0, 0.125*(1.0-xi+zeta-xi*zeta), 0.0 );
}
default:
libmesh_error_msg("Invalid i = " << i);
}
return RealGradient();
}
case TET10:
{
libmesh_assert_less (i, 6);
libmesh_not_implemented();
return RealGradient();
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << elem->type());
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << totalorder);
}
#endif
libmesh_error_msg("We'll never get here!");
return RealGradient();
}
| RealGradient libMesh::FE< 2, NEDELEC_ONE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 42 of file fe_nedelec_one_shape_2D.C.
References libMesh::FIRST, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::TOLERANCE, libMesh::TRI6, and libMesh::Elem::type().
{
#if LIBMESH_DIM > 1
libmesh_assert(elem);
const Order total_order = static_cast<Order>(order + elem->p_level());
switch (total_order)
{
case FIRST:
{
switch (elem->type())
{
case QUAD8:
case QUAD9:
{
libmesh_assert_less (i, 4);
const Real xi = p(0);
const Real eta = p(1);
// Even with a loose inverse_map tolerance we ought to
// be nearly on the element interior in master
// coordinates
libmesh_assert_less_equal ( std::fabs(xi), 1.0+10*TOLERANCE );
libmesh_assert_less_equal ( std::fabs(eta), 1.0+10*TOLERANCE );
switch(i)
{
case 0:
{
if( elem->point(0) > elem->point(1) )
return RealGradient( -0.25*(1.0-eta), 0.0 );
else
return RealGradient( 0.25*(1.0-eta), 0.0 );
}
case 1:
{
if( elem->point(1) > elem->point(2) )
return RealGradient( 0.0, -0.25*(1.0+xi) );
else
return RealGradient( 0.0, 0.25*(1.0+xi) );
}
case 2:
{
if( elem->point(2) > elem->point(3) )
return RealGradient( 0.25*(1.0+eta), 0.0 );
else
return RealGradient( -0.25*(1.0+eta), 0.0 );
}
case 3:
{
if( elem->point(3) > elem->point(0) )
return RealGradient( 0.0, -0.25*(xi-1.0) );
else
return RealGradient( 0.0, 0.25*(xi-1.0) );
}
default:
libmesh_error_msg("Invalid i = " << i);
}
return RealGradient();
}
case TRI6:
{
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 3);
switch(i)
{
case 0:
{
if( elem->point(0) > elem->point(1) )
return RealGradient( -1.0+eta, -xi );
else
return RealGradient( 1.0-eta, xi );
}
case 1:
{
if( elem->point(1) > elem->point(2) )
return RealGradient( eta, -xi );
else
return RealGradient( -eta, xi );
}
case 2:
{
if( elem->point(2) > elem->point(0) )
return RealGradient( eta, -xi+1.0 );
else
return RealGradient( -eta, xi-1.0 );
}
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type!: " << elem->type());
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order!: " << total_order);
}
#endif // LIBMESH_DIM > 1
libmesh_error_msg("We'll never get here!");
return RealGradient();
}
| Real libMesh::FE< 0, BERNSTEIN >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_bernstein_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, L2_HIERARCHIC >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_l2_hierarchic_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, L2_LAGRANGE >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_l2_lagrange_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, SZABAB >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_szabab_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 3, SZABAB >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_szabab_shape_3D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials are not defined in 3D");
return 0.;
}
| Real libMesh::FE< 2, L2_HIERARCHIC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 44 of file fe_l2_hierarchic_shape_2D.C.
References libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::square_number_column, libMesh::square_number_row, libMesh::TRI3, libMesh::TRI6, libMesh::triangular_number_column, libMesh::triangular_number_row, and libMesh::Elem::type().
{
libmesh_assert(elem);
const Order totalorder = static_cast<Order>(order+elem->p_level());
libmesh_assert_greater (totalorder, 0);
switch (elem->type())
{
case TRI3:
case TRI6:
{
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
libmesh_assert_less (i, (totalorder+1u)*(totalorder+2u)/2);
libmesh_assert (elem->type() == TRI6 || totalorder < 2);
// Vertex DoFs
if (i == 0)
return zeta0;
else if (i == 1)
return zeta1;
else if (i == 2)
return zeta2;
// Edge DoFs
else if (i < totalorder + 2u)
{
// Avoid returning NaN on vertices!
if (zeta0 + zeta1 == 0.)
return 0.;
const unsigned int basisorder = i - 1;
// Get factors to account for edge-flipping
Real f0 = 1;
if (basisorder%2 && (elem->point(0) > elem->point(1)))
f0 = -1.;
Real edgeval = (zeta1 - zeta0) / (zeta1 + zeta0);
Real crossfunc = zeta0 + zeta1;
for (unsigned int n=1; n != basisorder; ++n)
crossfunc *= (zeta0 + zeta1);
return f0 * crossfunc *
FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder,
basisorder, edgeval);
}
else if (i < 2u*totalorder + 1)
{
// Avoid returning NaN on vertices!
if (zeta1 + zeta2 == 0.)
return 0.;
const unsigned int basisorder = i - totalorder;
// Get factors to account for edge-flipping
Real f1 = 1;
if (basisorder%2 && (elem->point(1) > elem->point(2)))
f1 = -1.;
Real edgeval = (zeta2 - zeta1) / (zeta2 + zeta1);
Real crossfunc = zeta2 + zeta1;
for (unsigned int n=1; n != basisorder; ++n)
crossfunc *= (zeta2 + zeta1);
return f1 * crossfunc *
FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder,
basisorder, edgeval);
}
else if (i < 3u*totalorder)
{
// Avoid returning NaN on vertices!
if (zeta0 + zeta2 == 0.)
return 0.;
const unsigned int basisorder = i - (2u*totalorder) + 1;
// Get factors to account for edge-flipping
Real f2 = 1;
if (basisorder%2 && (elem->point(2) > elem->point(0)))
f2 = -1.;
Real edgeval = (zeta0 - zeta2) / (zeta0 + zeta2);
Real crossfunc = zeta0 + zeta2;
for (unsigned int n=1; n != basisorder; ++n)
crossfunc *= (zeta0 + zeta2);
return f2 * crossfunc *
FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder,
basisorder, edgeval);
}
// Interior DoFs
else
{
const unsigned int basisnum = i - (3u*totalorder);
unsigned int exp0 = triangular_number_column[basisnum] + 1;
unsigned int exp1 = triangular_number_row[basisnum] + 1 -
triangular_number_column[basisnum];
Real returnval = 1;
for (unsigned int n = 0; n != exp0; ++n)
returnval *= zeta0;
for (unsigned int n = 0; n != exp1; ++n)
returnval *= zeta1;
returnval *= zeta2;
return returnval;
}
}
// Hierarchic shape functions on the quadrilateral.
case QUAD4:
libmesh_assert_less (totalorder, 2);
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
// Example i, i0, i1 values for totalorder = 5:
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
// static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 2, 3, 3, 2, 4, 4, 4, 3, 2, 5, 5, 5, 5, 4, 3, 2};
// static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 2, 2, 3, 3, 2, 3, 4, 4, 4, 2, 3, 4, 5, 5, 5, 5};
unsigned int i0, i1;
// Vertex DoFs
if (i == 0)
{ i0 = 0; i1 = 0; }
else if (i == 1)
{ i0 = 1; i1 = 0; }
else if (i == 2)
{ i0 = 1; i1 = 1; }
else if (i == 3)
{ i0 = 0; i1 = 1; }
// Edge DoFs
else if (i < totalorder + 3u)
{ i0 = i - 2; i1 = 0; }
else if (i < 2u*totalorder + 2)
{ i0 = 1; i1 = i - totalorder - 1; }
else if (i < 3u*totalorder + 1)
{ i0 = i - 2u*totalorder; i1 = 1; }
else if (i < 4u*totalorder)
{ i0 = 0; i1 = i - 3u*totalorder + 1; }
// Interior DoFs
else
{
unsigned int basisnum = i - 4*totalorder;
i0 = square_number_column[basisnum] + 2;
i1 = square_number_row[basisnum] + 2;
}
// Flip odd degree of freedom values if necessary
// to keep continuity on sides
Real f = 1.;
if ((i0%2) && (i0 > 2) && (i1 == 0))
f = (elem->point(0) > elem->point(1))?-1.:1.;
else if ((i0%2) && (i0>2) && (i1 == 1))
f = (elem->point(3) > elem->point(2))?-1.:1.;
else if ((i0 == 0) && (i1%2) && (i1>2))
f = (elem->point(0) > elem->point(3))?-1.:1.;
else if ((i0 == 1) && (i1%2) && (i1>2))
f = (elem->point(1) > elem->point(2))?-1.:1.;
return f*(FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder, i0, xi)*
FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder, i1, eta));
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << elem->type());
}
return 0.;
}
| Real libMesh::FE< 0, HERMITE >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_hermite_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, XYZ >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_xyz_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, HIERARCHIC >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_hierarchic_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 2, HIERARCHIC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 44 of file fe_hierarchic_shape_2D.C.
References libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::square_number_column, libMesh::square_number_row, libMesh::TRI3, libMesh::TRI6, libMesh::triangular_number_column, libMesh::triangular_number_row, and libMesh::Elem::type().
{
libmesh_assert(elem);
const Order totalorder = static_cast<Order>(order+elem->p_level());
libmesh_assert_greater (totalorder, 0);
switch (elem->type())
{
case TRI3:
case TRI6:
{
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
libmesh_assert_less (i, (totalorder+1u)*(totalorder+2u)/2);
libmesh_assert (elem->type() == TRI6 || totalorder < 2);
// Vertex DoFs
if (i == 0)
return zeta0;
else if (i == 1)
return zeta1;
else if (i == 2)
return zeta2;
// Edge DoFs
else if (i < totalorder + 2u)
{
// Avoid returning NaN on vertices!
if (zeta0 + zeta1 == 0.)
return 0.;
const unsigned int basisorder = i - 1;
// Get factors to account for edge-flipping
Real f0 = 1;
if (basisorder%2 && (elem->point(0) > elem->point(1)))
f0 = -1.;
Real edgeval = (zeta1 - zeta0) / (zeta1 + zeta0);
Real crossfunc = zeta0 + zeta1;
for (unsigned int n=1; n != basisorder; ++n)
crossfunc *= (zeta0 + zeta1);
return f0 * crossfunc *
FE<1,HIERARCHIC>::shape(EDGE3, totalorder,
basisorder, edgeval);
}
else if (i < 2u*totalorder + 1)
{
// Avoid returning NaN on vertices!
if (zeta1 + zeta2 == 0.)
return 0.;
const unsigned int basisorder = i - totalorder;
// Get factors to account for edge-flipping
Real f1 = 1;
if (basisorder%2 && (elem->point(1) > elem->point(2)))
f1 = -1.;
Real edgeval = (zeta2 - zeta1) / (zeta2 + zeta1);
Real crossfunc = zeta2 + zeta1;
for (unsigned int n=1; n != basisorder; ++n)
crossfunc *= (zeta2 + zeta1);
return f1 * crossfunc *
FE<1,HIERARCHIC>::shape(EDGE3, totalorder,
basisorder, edgeval);
}
else if (i < 3u*totalorder)
{
// Avoid returning NaN on vertices!
if (zeta0 + zeta2 == 0.)
return 0.;
const unsigned int basisorder = i - (2u*totalorder) + 1;
// Get factors to account for edge-flipping
Real f2 = 1;
if (basisorder%2 && (elem->point(2) > elem->point(0)))
f2 = -1.;
Real edgeval = (zeta0 - zeta2) / (zeta0 + zeta2);
Real crossfunc = zeta0 + zeta2;
for (unsigned int n=1; n != basisorder; ++n)
crossfunc *= (zeta0 + zeta2);
return f2 * crossfunc *
FE<1,HIERARCHIC>::shape(EDGE3, totalorder,
basisorder, edgeval);
}
// Interior DoFs
else
{
const unsigned int basisnum = i - (3u*totalorder);
unsigned int exp0 = triangular_number_column[basisnum] + 1;
unsigned int exp1 = triangular_number_row[basisnum] + 1 -
triangular_number_column[basisnum];
Real returnval = 1;
for (unsigned int n = 0; n != exp0; ++n)
returnval *= zeta0;
for (unsigned int n = 0; n != exp1; ++n)
returnval *= zeta1;
returnval *= zeta2;
return returnval;
}
}
// Hierarchic shape functions on the quadrilateral.
case QUAD4:
libmesh_assert_less (totalorder, 2);
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
// Example i, i0, i1 values for totalorder = 5:
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
// static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 2, 3, 3, 2, 4, 4, 4, 3, 2, 5, 5, 5, 5, 4, 3, 2};
// static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 2, 2, 3, 3, 2, 3, 4, 4, 4, 2, 3, 4, 5, 5, 5, 5};
unsigned int i0, i1;
// Vertex DoFs
if (i == 0)
{ i0 = 0; i1 = 0; }
else if (i == 1)
{ i0 = 1; i1 = 0; }
else if (i == 2)
{ i0 = 1; i1 = 1; }
else if (i == 3)
{ i0 = 0; i1 = 1; }
// Edge DoFs
else if (i < totalorder + 3u)
{ i0 = i - 2; i1 = 0; }
else if (i < 2u*totalorder + 2)
{ i0 = 1; i1 = i - totalorder - 1; }
else if (i < 3u*totalorder + 1)
{ i0 = i - 2u*totalorder; i1 = 1; }
else if (i < 4u*totalorder)
{ i0 = 0; i1 = i - 3u*totalorder + 1; }
// Interior DoFs
else
{
unsigned int basisnum = i - 4*totalorder;
i0 = square_number_column[basisnum] + 2;
i1 = square_number_row[basisnum] + 2;
}
// Flip odd degree of freedom values if necessary
// to keep continuity on sides
Real f = 1.;
if ((i0%2) && (i0 > 2) && (i1 == 0))
f = (elem->point(0) > elem->point(1))?-1.:1.;
else if ((i0%2) && (i0>2) && (i1 == 1))
f = (elem->point(3) > elem->point(2))?-1.:1.;
else if ((i0 == 0) && (i1%2) && (i1>2))
f = (elem->point(0) > elem->point(3))?-1.:1.;
else if ((i0 == 1) && (i1%2) && (i1>2))
f = (elem->point(1) > elem->point(2))?-1.:1.;
return f*(FE<1,HIERARCHIC>::shape(EDGE3, totalorder, i0, xi)*
FE<1,HIERARCHIC>::shape(EDGE3, totalorder, i1, eta));
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << elem->type());
}
return 0.;
}
| Real libMesh::FE< 0, CLOUGH >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_clough_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, LAGRANGE >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_lagrange_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 0, MONOMIAL >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const Point & | |||
| ) |
Definition at line 44 of file fe_monomial_shape_0D.C.
{
libmesh_assert_less (i, 1);
return 1.;
}
| Real libMesh::FE< 3, CLOUGH >::shape | ( | const Elem * | libmesh_dbg_varelem, |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 45 of file fe_clough_shape_3D.C.
References libMesh::libmesh_assert().
{
libmesh_assert(elem);
libmesh_not_implemented();
return 0.;
}
| Real libMesh::FE< 2, BERNSTEIN >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 46 of file fe_bernstein_shape_2D.C.
References libMesh::EDGE3, libMesh::FIFTH, libMesh::FIRST, libMesh::FOURTH, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Utility::pow(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::FE< Dim, T >::shape(), libMesh::SIXTH, libMesh::square_number_column, libMesh::square_number_row, libMesh::THIRD, libMesh::TRI3, libMesh::TRI6, libMesh::Elem::type(), and libMesh::x.
{
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
switch (type)
{
// Hierarchic shape functions on the quadrilateral.
case QUAD4:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
// Example i, i0, i1 values for totalorder = 5:
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
// static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 2, 3, 3, 2, 4, 4, 4, 3, 2, 5, 5, 5, 5, 4, 3, 2};
// static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 2, 2, 3, 3, 2, 3, 4, 4, 4, 2, 3, 4, 5, 5, 5, 5};
unsigned int i0, i1;
// Vertex DoFs
if (i == 0)
{ i0 = 0; i1 = 0; }
else if (i == 1)
{ i0 = 1; i1 = 0; }
else if (i == 2)
{ i0 = 1; i1 = 1; }
else if (i == 3)
{ i0 = 0; i1 = 1; }
// Edge DoFs
else if (i < totalorder + 3u)
{ i0 = i - 2; i1 = 0; }
else if (i < 2u*totalorder + 2)
{ i0 = 1; i1 = i - totalorder - 1; }
else if (i < 3u*totalorder + 1)
{ i0 = i - 2u*totalorder; i1 = 1; }
else if (i < 4u*totalorder)
{ i0 = 0; i1 = i - 3u*totalorder + 1; }
// Interior DoFs. Use Roy's number look up
else
{
unsigned int basisnum = i - 4*totalorder;
i0 = square_number_column[basisnum] + 2;
i1 = square_number_row[basisnum] + 2;
}
// Flip odd degree of freedom values if necessary
// to keep continuity on sides.
if ((i>= 4 && i<= 4+ totalorder-2u) && elem->point(0) > elem->point(1)) i0=totalorder+2-i0;//
else if((i>= 4+ totalorder-1u && i<= 4+2*totalorder-3u) && elem->point(1) > elem->point(2)) i1=totalorder+2-i1;
else if((i>= 4+2*totalorder-2u && i<= 4+3*totalorder-4u) && elem->point(3) > elem->point(2)) i0=totalorder+2-i0;
else if((i>= 4+3*totalorder-3u && i<= 4+4*totalorder-5u) && elem->point(0) > elem->point(3)) i1=totalorder+2-i1;
return (FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0, xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1, eta));
}
// handle serendipity QUAD8 element separately
case QUAD8:
{
libmesh_assert_less (totalorder, 3);
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 8);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
static const Real scal[] = {-0.25, -0.25, -0.25, -0.25, 0.5, 0.5, 0.5, 0.5};
//B_t,i0(i)|xi * B_s,i1(i)|eta + scal(i) * B_t,2|xi * B_t,2|eta
return (FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[i], eta)
+scal[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[8], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[8], eta));
}
case TRI3:
libmesh_assert_less (totalorder, 2);
case TRI6:
switch (totalorder)
{
case FIRST:
{
const Real x=p(0);
const Real y=p(1);
const Real r=1.-x-y;
libmesh_assert_less (i, 3);
switch(i)
{
case 0: return r; //f0,0,1
case 1: return x; //f0,1,1
case 2: return y; //f1,0,1
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
case SECOND:
{
const Real x=p(0);
const Real y=p(1);
const Real r=1.-x-y;
libmesh_assert_less (i, 6);
switch(i)
{
case 0: return r*r;
case 1: return x*x;
case 2: return y*y;
case 3: return 2.*x*r;
case 4: return 2.*x*y;
case 5: return 2.*r*y;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
case THIRD:
{
const Real x=p(0);
const Real y=p(1);
const Real r=1.-x-y;
libmesh_assert_less (i, 10);
unsigned int shape=i;
if((i==3||i==4) && elem->point(0) > elem->point(1)) shape=7-i;
if((i==5||i==6) && elem->point(1) > elem->point(2)) shape=11-i;
if((i==7||i==8) && elem->point(0) > elem->point(2)) shape=15-i;
switch(shape)
{
case 0: return r*r*r;
case 1: return x*x*x;
case 2: return y*y*y;
case 3: return 3.*x*r*r;
case 4: return 3.*x*x*r;
case 5: return 3.*y*x*x;
case 6: return 3.*y*y*x;
case 7: return 3.*y*r*r;
case 8: return 3.*y*y*r;
case 9: return 6.*x*y*r;
default:
libmesh_error_msg("Invalid shape function index shape = " << shape);
}
}
case FOURTH:
{
const Real x=p(0);
const Real y=p(1);
const Real r=1-x-y;
unsigned int shape=i;
libmesh_assert_less (i, 15);
if((i==3||i== 5) && elem->point(0) > elem->point(1))shape=8-i;
if((i==6||i== 8) && elem->point(1) > elem->point(2))shape=14-i;
if((i==9||i==11) && elem->point(0) > elem->point(2))shape=20-i;
switch(shape)
{
// point functions
case 0: return r*r*r*r;
case 1: return x*x*x*x;
case 2: return y*y*y*y;
// edge functions
case 3: return 4.*x*r*r*r;
case 4: return 6.*x*x*r*r;
case 5: return 4.*x*x*x*r;
case 6: return 4.*y*x*x*x;
case 7: return 6.*y*y*x*x;
case 8: return 4.*y*y*y*x;
case 9: return 4.*y*r*r*r;
case 10: return 6.*y*y*r*r;
case 11: return 4.*y*y*y*r;
// inner functions
case 12: return 12.*x*y*r*r;
case 13: return 12.*x*x*y*r;
case 14: return 12.*x*y*y*r;
default:
libmesh_error_msg("Invalid shape function index shape = " << shape);
}
}
case FIFTH:
{
const Real x=p(0);
const Real y=p(1);
const Real r=1-x-y;
unsigned int shape=i;
libmesh_assert_less (i, 21);
if((i>= 3&&i<= 6) && elem->point(0) > elem->point(1))shape=9-i;
if((i>= 7&&i<=10) && elem->point(1) > elem->point(2))shape=17-i;
if((i>=11&&i<=14) && elem->point(0) > elem->point(2))shape=25-i;
switch(shape)
{
//point functions
case 0: return pow<5>(r);
case 1: return pow<5>(x);
case 2: return pow<5>(y);
//edge functions
case 3: return 5.*x *pow<4>(r);
case 4: return 10.*pow<2>(x)*pow<3>(r);
case 5: return 10.*pow<3>(x)*pow<2>(r);
case 6: return 5.*pow<4>(x)*r;
case 7: return 5.*y *pow<4>(x);
case 8: return 10.*pow<2>(y)*pow<3>(x);
case 9: return 10.*pow<3>(y)*pow<2>(x);
case 10: return 5.*pow<4>(y)*x;
case 11: return 5.*y *pow<4>(r);
case 12: return 10.*pow<2>(y)*pow<3>(r);
case 13: return 10.*pow<3>(y)*pow<2>(r);
case 14: return 5.*pow<4>(y)*r;
//inner functions
case 15: return 20.*x*y*pow<3>(r);
case 16: return 30.*x*pow<2>(y)*pow<2>(r);
case 17: return 30.*pow<2>(x)*y*pow<2>(r);
case 18: return 20.*x*pow<3>(y)*r;
case 19: return 20.*pow<3>(x)*y*r;
case 20: return 30.*pow<2>(x)*pow<2>(y)*r;
default:
libmesh_error_msg("Invalid shape function index shape = " << shape);
}
}
case SIXTH:
{
const Real x=p(0);
const Real y=p(1);
const Real r=1-x-y;
unsigned int shape=i;
libmesh_assert_less (i, 28);
if((i>= 3&&i<= 7) && elem->point(0) > elem->point(1))shape=10-i;
if((i>= 8&&i<=12) && elem->point(1) > elem->point(2))shape=20-i;
if((i>=13&&i<=17) && elem->point(0) > elem->point(2))shape=30-i;
switch(shape)
{
//point functions
case 0: return pow<6>(r);
case 1: return pow<6>(x);
case 2: return pow<6>(y);
//edge functions
case 3: return 6.*x *pow<5>(r);
case 4: return 15.*pow<2>(x)*pow<4>(r);
case 5: return 20.*pow<3>(x)*pow<3>(r);
case 6: return 15.*pow<4>(x)*pow<2>(r);
case 7: return 6.*pow<5>(x)*r;
case 8: return 6.*y *pow<5>(x);
case 9: return 15.*pow<2>(y)*pow<4>(x);
case 10: return 20.*pow<3>(y)*pow<3>(x);
case 11: return 15.*pow<4>(y)*pow<2>(x);
case 12: return 6.*pow<5>(y)*x;
case 13: return 6.*y *pow<5>(r);
case 14: return 15.*pow<2>(y)*pow<4>(r);
case 15: return 20.*pow<3>(y)*pow<3>(r);
case 16: return 15.*pow<4>(y)*pow<2>(r);
case 17: return 6.*pow<5>(y)*r;
//inner functions
case 18: return 30.*x*y*pow<4>(r);
case 19: return 60.*x*pow<2>(y)*pow<3>(r);
case 20: return 60.* pow<2>(x)*y*pow<3>(r);
case 21: return 60.*x*pow<3>(y)*pow<2>(r);
case 22: return 60.*pow<3>(x)*y*pow<2>(r);
case 23: return 90.*pow<2>(x)*pow<2>(y)*pow<2>(r);
case 24: return 30.*x*pow<4>(y)*r;
case 25: return 60.*pow<2>(x)*pow<3>(y)*r;
case 26: return 60.*pow<3>(x)*pow<2>(y)*r;
case 27: return 30.*pow<4>(x)*y*r;
default:
libmesh_error_msg("Invalid shape function index shape = " << shape);
} // switch shape
} // case TRI6
default:
libmesh_error_msg("Invalid totalorder = " << totalorder);
} // switch order
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
} // switch type
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, XYZ >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 46 of file fe_xyz_shape_1D.C.
{
libmesh_error_msg("XYZ polynomials require the element \n because the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 3, XYZ >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 46 of file fe_xyz_shape_3D.C.
{
libmesh_error_msg("XYZ polynomials require the element because the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 2, XYZ >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 46 of file fe_xyz_shape_2D.C.
{
libmesh_error_msg("XYZ polynomials require the element \nbecause the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 3, BERNSTEIN >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 48 of file fe_bernstein_shape_3D.C.
References libMesh::EDGE3, libMesh::FIRST, libMesh::FOURTH, libMesh::HEX20, libMesh::HEX27, libMesh::libmesh_assert(), std::min(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, libMesh::SECOND, libMesh::FE< Dim, T >::shape(), libMesh::TET10, libMesh::TET4, libMesh::THIRD, and libMesh::Elem::type().
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 1st order Bernstein.
case FIRST:
{
switch (type)
{
// Bernstein shape functions on the tetrahedron.
case TET4:
case TET10:
{
libmesh_assert_less (i, 4);
// Area coordinates
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
switch(i)
{
case 0: return zeta0;
case 1: return zeta1;
case 2: return zeta2;
case 3: return zeta3;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Bernstein shape functions on the hexahedral.
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 8);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1};
return (FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[i], zeta));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
case SECOND:
{
switch (type)
{
// Bernstein shape functions on the tetrahedron.
case TET10:
{
libmesh_assert_less (i, 10);
// Area coordinates
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
switch(i)
{
case 0: return zeta0*zeta0;
case 1: return zeta1*zeta1;
case 2: return zeta2*zeta2;
case 3: return zeta3*zeta3;
case 4: return 2.*zeta0*zeta1;
case 5: return 2.*zeta1*zeta2;
case 6: return 2.*zeta0*zeta2;
case 7: return 2.*zeta3*zeta0;
case 8: return 2.*zeta1*zeta3;
case 9: return 2.*zeta2*zeta3;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Bernstein shape functions on the 20-noded hexahedral.
case HEX20:
{
libmesh_assert_less (i, 20);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
//To compute the hex20 shape functions the original shape functions for hex27 are used.
//scalx[i] tells how often the original x-th shape function has to be added to the original i-th shape function
//to compute the new i-th shape function for hex20
//example: B_0^HEX20 = B_0^HEX27 - 0.25*B_20^HEX27 - 0.25*B_21^HEX27 + 0*B_22^HEX27 + 0*B_23^HEX27 - 0.25*B_24^HEX27 + 0*B_25^HEX27 - 0.25*B_26^HEX27
// B_0^HEX20 = B_0^HEX27 + scal20[0]*B_20^HEX27 + scal21[0]*B_21^HEX27 + ...
static const Real scal20[] = {-0.25, -0.25, -0.25, -0.25, 0, 0, 0, 0, 0.5, 0.5, 0.5, 0.5, 0, 0, 0, 0, 0, 0, 0, 0};
static const Real scal21[] = {-0.25, -0.25, 0, 0, -0.25, -0.25, 0, 0, 0.5, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0, 0, 0};
static const Real scal22[] = {0, -0.25, -0.25, 0, 0, -0.25, -0.25, 0, 0, 0.5, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0, 0};
static const Real scal23[] = {0, 0, -0.25, -0.25, 0, 0, -0.25, -0.25, 0, 0, 0.5, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0};
static const Real scal24[] = {-0.25, 0, 0, -0.25, -0.25, 0, 0, -0.25, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0, 0, 0, 0.5};
static const Real scal25[] = {0, 0, 0, 0, -0.25, -0.25, -0.25, -0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 0.5, 0.5};
static const Real scal26[] = {-0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25};
return (FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[i], zeta)
+scal20[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[20], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[20], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[20], zeta)
+scal21[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[21], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[21], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[21], zeta)
+scal22[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[22], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[22], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[22], zeta)
+scal23[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[23], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[23], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[23], zeta)
+scal24[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[24], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[24], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[24], zeta)
+scal25[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[25], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[25], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[25], zeta)
+scal26[i]*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[26], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[26], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[26], zeta));
}
// Bernstein shape functions on the hexahedral.
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
return (FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[i], zeta));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 3rd-order Bernstein.
case THIRD:
{
switch (type)
{
// // Bernstein shape functions on the tetrahedron.
// case TET10:
// {
// libmesh_assert_less (i, 20);
// // Area coordinates
// const Real zeta1 = p(0);
// const Real zeta2 = p(1);
// const Real zeta3 = p(2);
// const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
// unsigned int shape=i;
// // handle the edge orientation
// if ((i== 4||i== 5) && elem->node(0) > elem->node(1))shape= 9-i; //Edge 0
// if ((i== 6||i== 7) && elem->node(1) > elem->node(2))shape=13-i; //Edge 1
// if ((i== 8||i== 9) && elem->node(0) > elem->node(2))shape=17-i; //Edge 2
// if ((i==10||i==11) && elem->node(0) > elem->node(3))shape=21-i; //Edge 3
// if ((i==12||i==13) && elem->node(1) > elem->node(3))shape=25-i; //Edge 4
// if ((i==14||i==15) && elem->node(2) > elem->node(3))shape=29-i; //Edge 5
// // No need to handle face orientation in 3rd order.
// switch(shape)
// {
// //point function
// case 0: return zeta0*zeta0*zeta0;
// case 1: return zeta1*zeta1*zeta1;
// case 2: return zeta2*zeta2*zeta2;
// case 3: return zeta3*zeta3*zeta3;
// //edge functions
// case 4: return 3.*zeta0*zeta0*zeta1;
// case 5: return 3.*zeta1*zeta1*zeta0;
// case 6: return 3.*zeta1*zeta1*zeta2;
// case 7: return 3.*zeta2*zeta2*zeta1;
// case 8: return 3.*zeta0*zeta0*zeta2;
// case 9: return 3.*zeta2*zeta2*zeta0;
// case 10: return 3.*zeta0*zeta0*zeta3;
// case 11: return 3.*zeta3*zeta3*zeta0;
// case 12: return 3.*zeta1*zeta1*zeta3;
// case 13: return 3.*zeta3*zeta3*zeta1;
// case 14: return 3.*zeta2*zeta2*zeta3;
// case 15: return 3.*zeta3*zeta3*zeta2;
// //face functions
// case 16: return 6.*zeta0*zeta1*zeta2;
// case 17: return 6.*zeta0*zeta1*zeta3;
// case 18: return 6.*zeta1*zeta2*zeta3;
// case 19: return 6.*zeta2*zeta0*zeta3;
// default:
// libmesh_error_msg("Invalid shape function index i = " << i);
// }
// }
// Bernstein shape functions on the hexahedral.
case HEX27:
{
libmesh_assert_less (i, 64);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
Real xi_mapped = p(0);
Real eta_mapped = p(1);
Real zeta_mapped = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// Nodes 0 1 2 3 4 5 6 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 26 26 26 26
// DOFS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 18 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 60 62 63
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 3, 1, 1, 2, 3, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 0, 0, 2, 3, 2, 3, 2, 3, 2, 3, 1, 1, 1, 1, 2, 3, 2, 3, 0, 0, 0, 0, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 2, 2, 3, 3, 0, 0, 0, 0, 2, 3, 2, 3, 1, 1, 1, 1, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 2, 3, 2, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3};
// handle the edge orientation
{
// Edge 0
if ( (i0[i] >= 2) && (i1[i] == 0) && (i2[i] == 0))
{
if (elem->point(0) != std::min(elem->point(0), elem->point(1)))
xi_mapped = -xi;
}
// Edge 1
else if ((i0[i] == 1) && (i1[i] >= 2) && (i2[i] == 0))
{
if (elem->point(1) != std::min(elem->point(1), elem->point(2)))
eta_mapped = -eta;
}
// Edge 2
else if ((i0[i] >= 2) && (i1[i] == 1) && (i2[i] == 0))
{
if (elem->point(3) != std::min(elem->point(3), elem->point(2)))
xi_mapped = -xi;
}
// Edge 3
else if ((i0[i] == 0) && (i1[i] >= 2) && (i2[i] == 0))
{
if (elem->point(0) != std::min(elem->point(0), elem->point(3)))
eta_mapped = -eta;
}
// Edge 4
else if ((i0[i] == 0) && (i1[i] == 0) && (i2[i] >=2 ))
{
if (elem->point(0) != std::min(elem->point(0), elem->point(4)))
zeta_mapped = -zeta;
}
// Edge 5
else if ((i0[i] == 1) && (i1[i] == 0) && (i2[i] >=2 ))
{
if (elem->point(1) != std::min(elem->point(1), elem->point(5)))
zeta_mapped = -zeta;
}
// Edge 6
else if ((i0[i] == 1) && (i1[i] == 1) && (i2[i] >=2 ))
{
if (elem->point(2) != std::min(elem->point(2), elem->point(6)))
zeta_mapped = -zeta;
}
// Edge 7
else if ((i0[i] == 0) && (i1[i] == 1) && (i2[i] >=2 ))
{
if (elem->point(3) != std::min(elem->point(3), elem->point(7)))
zeta_mapped = -zeta;
}
// Edge 8
else if ((i0[i] >=2 ) && (i1[i] == 0) && (i2[i] == 1))
{
if (elem->point(4) != std::min(elem->point(4), elem->point(5)))
xi_mapped = -xi;
}
// Edge 9
else if ((i0[i] == 1) && (i1[i] >=2 ) && (i2[i] == 1))
{
if (elem->point(5) != std::min(elem->point(5), elem->point(6)))
eta_mapped = -eta;
}
// Edge 10
else if ((i0[i] >=2 ) && (i1[i] == 1) && (i2[i] == 1))
{
if (elem->point(7) != std::min(elem->point(7), elem->point(6)))
xi_mapped = -xi;
}
// Edge 11
else if ((i0[i] == 0) && (i1[i] >=2 ) && (i2[i] == 1))
{
if (elem->point(4) != std::min(elem->point(4), elem->point(7)))
eta_mapped = -eta;
}
}
// handle the face orientation
{
// Face 0
if ( (i2[i] == 0) && (i0[i] >= 2) && (i1[i] >= 2))
{
const Point min_point = std::min(elem->point(1),
std::min(elem->point(2),
std::min(elem->point(0),
elem->point(3))));
if (elem->point(0) == min_point)
if (elem->point(1) == std::min(elem->point(1), elem->point(3)))
{
// Case 1
xi_mapped = xi;
eta_mapped = eta;
}
else
{
// Case 2
xi_mapped = eta;
eta_mapped = xi;
}
else if (elem->point(3) == min_point)
if (elem->point(0) == std::min(elem->point(0), elem->point(2)))
{
// Case 3
xi_mapped = -eta;
eta_mapped = xi;
}
else
{
// Case 4
xi_mapped = xi;
eta_mapped = -eta;
}
else if (elem->point(2) == min_point)
if (elem->point(3) == std::min(elem->point(3), elem->point(1)))
{
// Case 5
xi_mapped = -xi;
eta_mapped = -eta;
}
else
{
// Case 6
xi_mapped = -eta;
eta_mapped = -xi;
}
else if (elem->point(1) == min_point)
{
if (elem->point(2) == std::min(elem->point(2), elem->point(0)))
{
// Case 7
xi_mapped = eta;
eta_mapped = -xi;
}
else
{
// Case 8
xi_mapped = -xi;
eta_mapped = eta;
}
}
}
// Face 1
else if ((i1[i] == 0) && (i0[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(0),
std::min(elem->point(1),
std::min(elem->point(5),
elem->point(4))));
if (elem->point(0) == min_point)
if (elem->point(1) == std::min(elem->point(1), elem->point(4)))
{
// Case 1
xi_mapped = xi;
zeta_mapped = zeta;
}
else
{
// Case 2
xi_mapped = zeta;
zeta_mapped = xi;
}
else if (elem->point(1) == min_point)
if (elem->point(5) == std::min(elem->point(5), elem->point(0)))
{
// Case 3
xi_mapped = zeta;
zeta_mapped = -xi;
}
else
{
// Case 4
xi_mapped = -xi;
zeta_mapped = zeta;
}
else if (elem->point(5) == min_point)
if (elem->point(4) == std::min(elem->point(4), elem->point(1)))
{
// Case 5
xi_mapped = -xi;
zeta_mapped = -zeta;
}
else
{
// Case 6
xi_mapped = -zeta;
zeta_mapped = -xi;
}
else if (elem->point(4) == min_point)
{
if (elem->point(0) == std::min(elem->point(0), elem->point(5)))
{
// Case 7
xi_mapped = -xi;
zeta_mapped = zeta;
}
else
{
// Case 8
xi_mapped = xi;
zeta_mapped = -zeta;
}
}
}
// Face 2
else if ((i0[i] == 1) && (i1[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(1),
std::min(elem->point(2),
std::min(elem->point(6),
elem->point(5))));
if (elem->point(1) == min_point)
if (elem->point(2) == std::min(elem->point(2), elem->point(5)))
{
// Case 1
eta_mapped = eta;
zeta_mapped = zeta;
}
else
{
// Case 2
eta_mapped = zeta;
zeta_mapped = eta;
}
else if (elem->point(2) == min_point)
if (elem->point(6) == std::min(elem->point(6), elem->point(1)))
{
// Case 3
eta_mapped = zeta;
zeta_mapped = -eta;
}
else
{
// Case 4
eta_mapped = -eta;
zeta_mapped = zeta;
}
else if (elem->point(6) == min_point)
if (elem->point(5) == std::min(elem->point(5), elem->point(2)))
{
// Case 5
eta_mapped = -eta;
zeta_mapped = -zeta;
}
else
{
// Case 6
eta_mapped = -zeta;
zeta_mapped = -eta;
}
else if (elem->point(5) == min_point)
{
if (elem->point(1) == std::min(elem->point(1), elem->point(6)))
{
// Case 7
eta_mapped = -zeta;
zeta_mapped = eta;
}
else
{
// Case 8
eta_mapped = eta;
zeta_mapped = -zeta;
}
}
}
// Face 3
else if ((i1[i] == 1) && (i0[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(2),
std::min(elem->point(3),
std::min(elem->point(7),
elem->point(6))));
if (elem->point(3) == min_point)
if (elem->point(2) == std::min(elem->point(2), elem->point(7)))
{
// Case 1
xi_mapped = xi;
zeta_mapped = zeta;
}
else
{
// Case 2
xi_mapped = zeta;
zeta_mapped = xi;
}
else if (elem->point(7) == min_point)
if (elem->point(3) == std::min(elem->point(3), elem->point(6)))
{
// Case 3
xi_mapped = -zeta;
zeta_mapped = xi;
}
else
{
// Case 4
xi_mapped = xi;
zeta_mapped = -zeta;
}
else if (elem->point(6) == min_point)
if (elem->point(7) == std::min(elem->point(7), elem->point(2)))
{
// Case 5
xi_mapped = -xi;
zeta_mapped = -zeta;
}
else
{
// Case 6
xi_mapped = -zeta;
zeta_mapped = -xi;
}
else if (elem->point(2) == min_point)
{
if (elem->point(6) == std::min(elem->point(3), elem->point(6)))
{
// Case 7
xi_mapped = zeta;
zeta_mapped = -xi;
}
else
{
// Case 8
xi_mapped = -xi;
zeta_mapped = zeta;
}
}
}
// Face 4
else if ((i0[i] == 0) && (i1[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(3),
std::min(elem->point(0),
std::min(elem->point(4),
elem->point(7))));
if (elem->point(0) == min_point)
if (elem->point(3) == std::min(elem->point(3), elem->point(4)))
{
// Case 1
eta_mapped = eta;
zeta_mapped = zeta;
}
else
{
// Case 2
eta_mapped = zeta;
zeta_mapped = eta;
}
else if (elem->point(4) == min_point)
if (elem->point(0) == std::min(elem->point(0), elem->point(7)))
{
// Case 3
eta_mapped = -zeta;
zeta_mapped = eta;
}
else
{
// Case 4
eta_mapped = eta;
zeta_mapped = -zeta;
}
else if (elem->point(7) == min_point)
if (elem->point(4) == std::min(elem->point(4), elem->point(3)))
{
// Case 5
eta_mapped = -eta;
zeta_mapped = -zeta;
}
else
{
// Case 6
eta_mapped = -zeta;
zeta_mapped = -eta;
}
else if (elem->point(3) == min_point)
{
if (elem->point(7) == std::min(elem->point(7), elem->point(0)))
{
// Case 7
eta_mapped = zeta;
zeta_mapped = -eta;
}
else
{
// Case 8
eta_mapped = -eta;
zeta_mapped = zeta;
}
}
}
// Face 5
else if ((i2[i] == 1) && (i0[i] >= 2) && (i1[i] >= 2))
{
const Point min_point = std::min(elem->point(4),
std::min(elem->point(5),
std::min(elem->point(6),
elem->point(7))));
if (elem->point(4) == min_point)
if (elem->point(5) == std::min(elem->point(5), elem->point(7)))
{
// Case 1
xi_mapped = xi;
eta_mapped = eta;
}
else
{
// Case 2
xi_mapped = eta;
eta_mapped = xi;
}
else if (elem->point(5) == min_point)
if (elem->point(6) == std::min(elem->point(6), elem->point(4)))
{
// Case 3
xi_mapped = eta;
eta_mapped = -xi;
}
else
{
// Case 4
xi_mapped = -xi;
eta_mapped = eta;
}
else if (elem->point(6) == min_point)
if (elem->point(7) == std::min(elem->point(7), elem->point(5)))
{
// Case 5
xi_mapped = -xi;
eta_mapped = -eta;
}
else
{
// Case 6
xi_mapped = -eta;
eta_mapped = -xi;
}
else if (elem->point(7) == min_point)
{
if (elem->point(4) == std::min(elem->point(4), elem->point(6)))
{
// Case 7
xi_mapped = -eta;
eta_mapped = xi;
}
else
{
// Case 8
xi_mapped = xi;
eta_mapped = eta;
}
}
}
}
return (FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[i], xi_mapped)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[i], eta_mapped)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[i], zeta_mapped));
}
default:
libmesh_error_msg("Invalid element type = " << type);
} //case HEX27
}//case THIRD
// 4th-order Bernstein.
case FOURTH:
{
switch (type)
{
// Bernstein shape functions on the hexahedral.
case HEX27:
{
libmesh_assert_less (i, 125);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
Real xi_mapped = p(0);
Real eta_mapped = p(1);
Real zeta_mapped = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// Nodes 0 1 2 3 4 5 6 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 26 26 26 26
// DOFS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 18 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4};
// handle the edge orientation
{
// Edge 0
if ( (i0[i] >= 2) && (i1[i] == 0) && (i2[i] == 0))
{
if (elem->point(0) != std::min(elem->point(0), elem->point(1)))
xi_mapped = -xi;
}
// Edge 1
else if ((i0[i] == 1) && (i1[i] >= 2) && (i2[i] == 0))
{
if (elem->point(1) != std::min(elem->point(1), elem->point(2)))
eta_mapped = -eta;
}
// Edge 2
else if ((i0[i] >= 2) && (i1[i] == 1) && (i2[i] == 0))
{
if (elem->point(3) != std::min(elem->point(3), elem->point(2)))
xi_mapped = -xi;
}
// Edge 3
else if ((i0[i] == 0) && (i1[i] >= 2) && (i2[i] == 0))
{
if (elem->point(0) != std::min(elem->point(0), elem->point(3)))
eta_mapped = -eta;
}
// Edge 4
else if ((i0[i] == 0) && (i1[i] == 0) && (i2[i] >=2 ))
{
if (elem->point(0) != std::min(elem->point(0), elem->point(4)))
zeta_mapped = -zeta;
}
// Edge 5
else if ((i0[i] == 1) && (i1[i] == 0) && (i2[i] >=2 ))
{
if (elem->point(1) != std::min(elem->point(1), elem->point(5)))
zeta_mapped = -zeta;
}
// Edge 6
else if ((i0[i] == 1) && (i1[i] == 1) && (i2[i] >=2 ))
{
if (elem->point(2) != std::min(elem->point(2), elem->point(6)))
zeta_mapped = -zeta;
}
// Edge 7
else if ((i0[i] == 0) && (i1[i] == 1) && (i2[i] >=2 ))
{
if (elem->point(3) != std::min(elem->point(3), elem->point(7)))
zeta_mapped = -zeta;
}
// Edge 8
else if ((i0[i] >=2 ) && (i1[i] == 0) && (i2[i] == 1))
{
if (elem->point(4) != std::min(elem->point(4), elem->point(5)))
xi_mapped = -xi;
}
// Edge 9
else if ((i0[i] == 1) && (i1[i] >=2 ) && (i2[i] == 1))
{
if (elem->point(5) != std::min(elem->point(5), elem->point(6)))
eta_mapped = -eta;
}
// Edge 10
else if ((i0[i] >=2 ) && (i1[i] == 1) && (i2[i] == 1))
{
if (elem->point(7) != std::min(elem->point(7), elem->point(6)))
xi_mapped = -xi;
}
// Edge 11
else if ((i0[i] == 0) && (i1[i] >=2 ) && (i2[i] == 1))
{
if (elem->point(4) != std::min(elem->point(4), elem->point(7)))
eta_mapped = -eta;
}
}
// handle the face orientation
{
// Face 0
if ( (i2[i] == 0) && (i0[i] >= 2) && (i1[i] >= 2))
{
const Point min_point = std::min(elem->point(1),
std::min(elem->point(2),
std::min(elem->point(0),
elem->point(3))));
if (elem->point(0) == min_point)
if (elem->point(1) == std::min(elem->point(1), elem->point(3)))
{
// Case 1
xi_mapped = xi;
eta_mapped = eta;
}
else
{
// Case 2
xi_mapped = eta;
eta_mapped = xi;
}
else if (elem->point(3) == min_point)
if (elem->point(0) == std::min(elem->point(0), elem->point(2)))
{
// Case 3
xi_mapped = -eta;
eta_mapped = xi;
}
else
{
// Case 4
xi_mapped = xi;
eta_mapped = -eta;
}
else if (elem->point(2) == min_point)
if (elem->point(3) == std::min(elem->point(3), elem->point(1)))
{
// Case 5
xi_mapped = -xi;
eta_mapped = -eta;
}
else
{
// Case 6
xi_mapped = -eta;
eta_mapped = -xi;
}
else if (elem->point(1) == min_point)
{
if (elem->point(2) == std::min(elem->point(2), elem->point(0)))
{
// Case 7
xi_mapped = eta;
eta_mapped = -xi;
}
else
{
// Case 8
xi_mapped = -xi;
eta_mapped = eta;
}
}
}
// Face 1
else if ((i1[i] == 0) && (i0[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(0),
std::min(elem->point(1),
std::min(elem->point(5),
elem->point(4))));
if (elem->point(0) == min_point)
if (elem->point(1) == std::min(elem->point(1), elem->point(4)))
{
// Case 1
xi_mapped = xi;
zeta_mapped = zeta;
}
else
{
// Case 2
xi_mapped = zeta;
zeta_mapped = xi;
}
else if (elem->point(1) == min_point)
if (elem->point(5) == std::min(elem->point(5), elem->point(0)))
{
// Case 3
xi_mapped = zeta;
zeta_mapped = -xi;
}
else
{
// Case 4
xi_mapped = -xi;
zeta_mapped = zeta;
}
else if (elem->point(5) == min_point)
if (elem->point(4) == std::min(elem->point(4), elem->point(1)))
{
// Case 5
xi_mapped = -xi;
zeta_mapped = -zeta;
}
else
{
// Case 6
xi_mapped = -zeta;
zeta_mapped = -xi;
}
else if (elem->point(4) == min_point)
{
if (elem->point(0) == std::min(elem->point(0), elem->point(5)))
{
// Case 7
xi_mapped = -xi;
zeta_mapped = zeta;
}
else
{
// Case 8
xi_mapped = xi;
zeta_mapped = -zeta;
}
}
}
// Face 2
else if ((i0[i] == 1) && (i1[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(1),
std::min(elem->point(2),
std::min(elem->point(6),
elem->point(5))));
if (elem->point(1) == min_point)
if (elem->point(2) == std::min(elem->point(2), elem->point(5)))
{
// Case 1
eta_mapped = eta;
zeta_mapped = zeta;
}
else
{
// Case 2
eta_mapped = zeta;
zeta_mapped = eta;
}
else if (elem->point(2) == min_point)
if (elem->point(6) == std::min(elem->point(6), elem->point(1)))
{
// Case 3
eta_mapped = zeta;
zeta_mapped = -eta;
}
else
{
// Case 4
eta_mapped = -eta;
zeta_mapped = zeta;
}
else if (elem->point(6) == min_point)
if (elem->point(5) == std::min(elem->point(5), elem->point(2)))
{
// Case 5
eta_mapped = -eta;
zeta_mapped = -zeta;
}
else
{
// Case 6
eta_mapped = -zeta;
zeta_mapped = -eta;
}
else if (elem->point(5) == min_point)
{
if (elem->point(1) == std::min(elem->point(1), elem->point(6)))
{
// Case 7
eta_mapped = -zeta;
zeta_mapped = eta;
}
else
{
// Case 8
eta_mapped = eta;
zeta_mapped = -zeta;
}
}
}
// Face 3
else if ((i1[i] == 1) && (i0[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(2),
std::min(elem->point(3),
std::min(elem->point(7),
elem->point(6))));
if (elem->point(3) == min_point)
if (elem->point(2) == std::min(elem->point(2), elem->point(7)))
{
// Case 1
xi_mapped = xi;
zeta_mapped = zeta;
}
else
{
// Case 2
xi_mapped = zeta;
zeta_mapped = xi;
}
else if (elem->point(7) == min_point)
if (elem->point(3) == std::min(elem->point(3), elem->point(6)))
{
// Case 3
xi_mapped = -zeta;
zeta_mapped = xi;
}
else
{
// Case 4
xi_mapped = xi;
zeta_mapped = -zeta;
}
else if (elem->point(6) == min_point)
if (elem->point(7) == std::min(elem->point(7), elem->point(2)))
{
// Case 5
xi_mapped = -xi;
zeta_mapped = -zeta;
}
else
{
// Case 6
xi_mapped = -zeta;
zeta_mapped = -xi;
}
else if (elem->point(2) == min_point)
{
if (elem->point(6) == std::min(elem->point(3), elem->point(6)))
{
// Case 7
xi_mapped = zeta;
zeta_mapped = -xi;
}
else
{
// Case 8
xi_mapped = -xi;
zeta_mapped = zeta;
}
}
}
// Face 4
else if ((i0[i] == 0) && (i1[i] >= 2) && (i2[i] >= 2))
{
const Point min_point = std::min(elem->point(3),
std::min(elem->point(0),
std::min(elem->point(4),
elem->point(7))));
if (elem->point(0) == min_point)
if (elem->point(3) == std::min(elem->point(3), elem->point(4)))
{
// Case 1
eta_mapped = eta;
zeta_mapped = zeta;
}
else
{
// Case 2
eta_mapped = zeta;
zeta_mapped = eta;
}
else if (elem->point(4) == min_point)
if (elem->point(0) == std::min(elem->point(0), elem->point(7)))
{
// Case 3
eta_mapped = -zeta;
zeta_mapped = eta;
}
else
{
// Case 4
eta_mapped = eta;
zeta_mapped = -zeta;
}
else if (elem->point(7) == min_point)
if (elem->point(4) == std::min(elem->point(4), elem->point(3)))
{
// Case 5
eta_mapped = -eta;
zeta_mapped = -zeta;
}
else
{
// Case 6
eta_mapped = -zeta;
zeta_mapped = -eta;
}
else if (elem->point(3) == min_point)
{
if (elem->point(7) == std::min(elem->point(7), elem->point(0)))
{
// Case 7
eta_mapped = zeta;
zeta_mapped = -eta;
}
else
{
// Case 8
eta_mapped = -eta;
zeta_mapped = zeta;
}
}
}
// Face 5
else if ((i2[i] == 1) && (i0[i] >= 2) && (i1[i] >= 2))
{
const Point min_point = std::min(elem->point(4),
std::min(elem->point(5),
std::min(elem->point(6),
elem->point(7))));
if (elem->point(4) == min_point)
if (elem->point(5) == std::min(elem->point(5), elem->point(7)))
{
// Case 1
xi_mapped = xi;
eta_mapped = eta;
}
else
{
// Case 2
xi_mapped = eta;
eta_mapped = xi;
}
else if (elem->point(5) == min_point)
if (elem->point(6) == std::min(elem->point(6), elem->point(4)))
{
// Case 3
xi_mapped = eta;
eta_mapped = -xi;
}
else
{
// Case 4
xi_mapped = -xi;
eta_mapped = eta;
}
else if (elem->point(6) == min_point)
if (elem->point(7) == std::min(elem->point(7), elem->point(5)))
{
// Case 5
xi_mapped = -xi;
eta_mapped = -eta;
}
else
{
// Case 6
xi_mapped = -eta;
eta_mapped = -xi;
}
else if (elem->point(7) == min_point)
{
if (elem->point(4) == std::min(elem->point(4), elem->point(6)))
{
// Case 7
xi_mapped = -eta;
eta_mapped = xi;
}
else
{
// Case 8
xi_mapped = xi;
eta_mapped = eta;
}
}
}
}
return (FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i0[i], xi_mapped)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i1[i], eta_mapped)*
FE<1,BERNSTEIN>::shape(EDGE3, totalorder, i2[i], zeta_mapped));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
default:
libmesh_error_msg("Invalid totalorder = " << totalorder);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, SZABAB >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 53 of file fe_szabab_shape_2D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 1, XYZ >::shape | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | point_in | ||
| ) |
Definition at line 58 of file fe_xyz_shape_1D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, and libMesh::x.
{
libmesh_assert(elem);
libmesh_assert_less_equal (i, order + elem->p_level());
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = 0.;
for (unsigned int p = 0; p < elem->n_nodes(); p++)
{
const Real distance = std::abs(centroid(0) - elem->point(p)(0));
max_distance = std::max(distance, max_distance);
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real xc = centroid(0);
const Real dx = (x - xc)/max_distance;
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
case 0:
return 1.;
case 1:
return dx;
case 2:
return dx*dx;
case 3:
return dx*dx*dx;
case 4:
return dx*dx*dx*dx;
default:
Real val = 1.;
for (unsigned int index = 0; index != i; ++index)
val *= dx;
return val;
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, XYZ >::shape | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | point_in | ||
| ) |
Definition at line 58 of file fe_xyz_shape_2D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, and libMesh::x.
{
#if LIBMESH_DIM > 1
libmesh_assert(elem);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = Point(0.,0.,0.);
for (unsigned int p = 0; p < elem->n_nodes(); p++)
for (unsigned int d = 0; d < 2; d++)
{
const Real distance = std::abs(centroid(d) - elem->point(p)(d));
max_distance(d) = std::max(distance, max_distance(d));
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real y = point_in(1);
const Real xc = centroid(0);
const Real yc = centroid(1);
const Real distx = max_distance(0);
const Real disty = max_distance(1);
const Real dx = (x - xc)/distx;
const Real dy = (y - yc)/disty;
#ifndef NDEBUG
// totalorder is only used in the assertion below, so
// we avoid declaring it when asserts are not active.
const unsigned int totalorder = order + elem->p_level();
#endif
libmesh_assert_less (i, (totalorder+1)*(totalorder+2)/2);
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
// constant
case 0:
return 1.;
// linear
case 1:
return dx;
case 2:
return dy;
// quadratics
case 3:
return dx*dx;
case 4:
return dx*dy;
case 5:
return dy*dy;
// cubics
case 6:
return dx*dx*dx;
case 7:
return dx*dx*dy;
case 8:
return dx*dy*dy;
case 9:
return dy*dy*dy;
// quartics
case 10:
return dx*dx*dx*dx;
case 11:
return dx*dx*dx*dy;
case 12:
return dx*dx*dy*dy;
case 13:
return dx*dy*dy*dy;
case 14:
return dy*dy*dy*dy;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int i2 = i - (o*(o+1)/2);
Real val = 1.;
for (unsigned int index=i2; index != o; index++)
val *= dx;
for (unsigned int index=0; index != i2; index++)
val *= dy;
return val;
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| Real libMesh::FE< 3, XYZ >::shape | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const Point & | point_in | ||
| ) |
Definition at line 58 of file fe_xyz_shape_3D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, and libMesh::x.
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = Point(0.,0.,0.);
for (unsigned int p = 0; p < elem->n_nodes(); p++)
for (unsigned int d = 0; d < 3; d++)
{
const Real distance = std::abs(centroid(d) - elem->point(p)(d));
max_distance(d) = std::max(distance, max_distance(d));
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real y = point_in(1);
const Real z = point_in(2);
const Real xc = centroid(0);
const Real yc = centroid(1);
const Real zc = centroid(2);
const Real distx = max_distance(0);
const Real disty = max_distance(1);
const Real distz = max_distance(2);
const Real dx = (x - xc)/distx;
const Real dy = (y - yc)/disty;
const Real dz = (z - zc)/distz;
#ifndef NDEBUG
// totalorder is only used in the assertion below, so
// we avoid declaring it when asserts are not active.
const unsigned int totalorder = order + elem->p_level();
#endif
libmesh_assert_less (i, (static_cast<unsigned int>(totalorder)+1)*
(static_cast<unsigned int>(totalorder)+2)*
(static_cast<unsigned int>(totalorder)+3)/6);
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
// constant
case 0:
return 1.;
// linears
case 1:
return dx;
case 2:
return dy;
case 3:
return dz;
// quadratics
case 4:
return dx*dx;
case 5:
return dx*dy;
case 6:
return dy*dy;
case 7:
return dx*dz;
case 8:
return dz*dy;
case 9:
return dz*dz;
// cubics
case 10:
return dx*dx*dx;
case 11:
return dx*dx*dy;
case 12:
return dx*dy*dy;
case 13:
return dy*dy*dy;
case 14:
return dx*dx*dz;
case 15:
return dx*dy*dz;
case 16:
return dy*dy*dz;
case 17:
return dx*dz*dz;
case 18:
return dy*dz*dz;
case 19:
return dz*dz*dz;
// quartics
case 20:
return dx*dx*dx*dx;
case 21:
return dx*dx*dx*dy;
case 22:
return dx*dx*dy*dy;
case 23:
return dx*dy*dy*dy;
case 24:
return dy*dy*dy*dy;
case 25:
return dx*dx*dx*dz;
case 26:
return dx*dx*dy*dz;
case 27:
return dx*dy*dy*dz;
case 28:
return dy*dy*dy*dz;
case 29:
return dx*dx*dz*dz;
case 30:
return dx*dy*dz*dz;
case 31:
return dy*dy*dz*dz;
case 32:
return dx*dz*dz*dz;
case 33:
return dy*dz*dz*dz;
case 34:
return dz*dz*dz*dz;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = 1.;
for (unsigned int index=0; index != nx; index++)
val *= dx;
for (unsigned int index=0; index != ny; index++)
val *= dy;
for (unsigned int index=0; index != nz; index++)
val *= dz;
return val;
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, SZABAB >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 65 of file fe_szabab_shape_2D.C.
References libMesh::EDGE3, libMesh::FIFTH, libMesh::FIRST, libMesh::FOURTH, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Utility::pow(), libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::SEVENTH, libMesh::FE< Dim, T >::shape(), libMesh::SIXTH, libMesh::THIRD, libMesh::TRI6, libMesh::Elem::type(), and libMesh::x.
{
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
switch (totalorder)
{
// 1st & 2nd-order Szabo-Babuska.
case FIRST:
case SECOND:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
const Real l1 = 1-p(0)-p(1);
const Real l2 = p(0);
const Real l3 = p(1);
libmesh_assert_less (i, 6);
switch (i)
{
case 0: return l1;
case 1: return l2;
case 2: return l3;
case 3: return l1*l2*(-4.*sqrt6);
case 4: return l2*l3*(-4.*sqrt6);
case 5: return l3*l1*(-4.*sqrt6);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
return (FE<1,SZABAB>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape(EDGE3, totalorder, i1[i], eta));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 3rd-order Szabo-Babuska.
case THIRD:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
Real l1 = 1-p(0)-p(1);
Real l2 = p(0);
Real l3 = p(1);
Real f=1;
libmesh_assert_less (i, 10);
if (i==4 && (elem->point(0) > elem->point(1)))f=-1;
if (i==6 && (elem->point(1) > elem->point(2)))f=-1;
if (i==8 && (elem->point(2) > elem->point(0)))f=-1;
switch (i)
{
//nodal modes
case 0: return l1;
case 1: return l2;
case 2: return l3;
//side modes
case 3: return l1*l2*(-4.*sqrt6);
case 4: return f*l1*l2*(-4.*sqrt10)*(l2-l1);
case 5: return l2*l3*(-4.*sqrt6);
case 6: return f*l2*l3*(-4.*sqrt10)*(l3-l2);
case 7: return l3*l1*(-4.*sqrt6);
case 8: return f*l3*l1*(-4.*sqrt10)*(l1-l3);
//internal modes
case 9: return l1*l2*l3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 16);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 1, 1, 2, 3, 0, 0, 2, 3, 2, 3};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 2, 2, 3, 3};
Real f=1.;
// take care of edge orientation, this is needed at
// edge shapes with (y=0)-asymmetric 1D shapes, these have
// one 1D shape index being 0 or 1, the other one being odd and >=3
switch(i)
{
case 5: // edge 0 points
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 7: // edge 1 points
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 9: // edge 2 points
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 11: // edge 3 points
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
return f*(FE<1,SZABAB>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape(EDGE3, totalorder, i1[i], eta));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 4th-order Szabo-Babuska.
case FOURTH:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
Real l1 = 1-p(0)-p(1);
Real l2 = p(0);
Real l3 = p(1);
Real f=1;
libmesh_assert_less (i, 15);
if (i== 4 && (elem->point(0) > elem->point(1)))f=-1;
if (i== 7 && (elem->point(1) > elem->point(2)))f=-1;
if (i==10 && (elem->point(2) > elem->point(0)))f=-1;
switch (i)
{
//nodal modes
case 0: return l1;
case 1: return l2;
case 2: return l3;
//side modes
case 3: return l1*l2*(-4.*sqrt6);
case 4: return f*l1*l2*(-4.*sqrt10)*(l2-l1);
case 5: return l1*l2*(-sqrt14)*(5.*pow<2>(l2-l1)-1);
case 6: return l2*l3*(-4.*sqrt6);
case 7: return f*l2*l3*(-4.*sqrt10)*(l3-l2);
case 8: return l2*l3*(-sqrt14)*(5.*pow<2>(l3-l2)-1);
case 9: return l3*l1*(-4.*sqrt6);
case 10: return f*l3*l1*(-4.*sqrt10)*(l1-l3);
case 11: return l3*l1*(-sqrt14)*(5.*pow<2>(l1-l3)-1);
//internal modes
case 12: return l1*l2*l3;
case 13: return l1*l2*l3*(l2-l1);
case 14: return l1*l2*l3*(2*l3-1);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 25);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 8: // edge 1 points
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 11: // edge 2 points
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 14: // edge 3 points
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
return f*(FE<1,SZABAB>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape(EDGE3, totalorder, i1[i], eta));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 5th-order Szabo-Babuska.
case FIFTH:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
Real l1 = 1-p(0)-p(1);
Real l2 = p(0);
Real l3 = p(1);
const Real x=l2-l1;
const Real y=2.*l3-1;
Real f=1;
libmesh_assert_less (i, 21);
if ((i== 4||i== 6) && (elem->point(0) > elem->point(1)))f=-1;
if ((i== 8||i==10) && (elem->point(1) > elem->point(2)))f=-1;
if ((i==12||i==14) && (elem->point(2) > elem->point(0)))f=-1;
switch (i)
{
//nodal modes
case 0: return l1;
case 1: return l2;
case 2: return l3;
//side modes
case 3: return l1*l2*(-4.*sqrt6);
case 4: return f*l1*l2*(-4.*sqrt10)*(l2-l1);
case 5: return -sqrt14*l1*l2*(5.0*l1*l1-1.0+(-10.0*l1+5.0*l2)*l2);
case 6: return f*(-sqrt2)*l1*l2*((9.-21.*l1*l1)*l1+(-9.+63.*l1*l1+(-63.*l1+21.*l2)*l2)*l2);
case 7: return l2*l3*(-4.*sqrt6);
case 8: return f*l2*l3*(-4.*sqrt10)*(l3-l2);
case 9: return -sqrt14*l2*l3*(5.0*l3*l3-1.0+(-10.0*l3+5.0*l2)*l2);
case 10: return -f*sqrt2*l2*l3*((-9.0+21.0*l3*l3)*l3+(-63.0*l3*l3+9.0+(63.0*l3-21.0*l2)*l2)*l2);
case 11: return l3*l1*(-4.*sqrt6);
case 12: return f*l3*l1*(-4.*sqrt10)*(l1-l3);
case 13: return -sqrt14*l3*l1*(5.0*l3*l3-1.0+(-10.0*l3+5.0*l1)*l1);
case 14: return f*(-sqrt2)*l3*l1*((9.0-21.0*l3*l3)*l3+(-9.0+63.0*l3*l3+(-63.0*l3+21.0*l1)*l1)*l1);
//internal modes
case 15: return l1*l2*l3;
case 16: return l1*l2*l3*x;
case 17: return l1*l2*l3*y;
case 18: return l1*l2*l3*(1.5*l1*l1-.5+(-3.0*l1+1.5*l2)*l2);
case 19: return l1*l2*l3*x*y;
case 20: return l1*l2*l3*(1.0+(-6.0+6.0*l3)*l3);
default:
libmesh_error_msg("Invalid i = " << i);
}
} // case TRI6
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 36);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
case 7:
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 9: // edge 1 points
case 11:
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 13: // edge 2 points
case 15:
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 14: // edge 3 points
case 19:
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
return f*(FE<1,SZABAB>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape(EDGE3, totalorder, i1[i], eta));
} // case QUAD8/QUAD9
default:
libmesh_error_msg("Invalid element type = " << type);
} // switch type
} // case FIFTH
// 6th-order Szabo-Babuska.
case SIXTH:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
Real l1 = 1-p(0)-p(1);
Real l2 = p(0);
Real l3 = p(1);
const Real x=l2-l1;
const Real y=2.*l3-1;
Real f=1;
libmesh_assert_less (i, 28);
if ((i== 4||i== 6) && (elem->point(0) > elem->point(1)))f=-1;
if ((i== 9||i==11) && (elem->point(1) > elem->point(2)))f=-1;
if ((i==14||i==16) && (elem->point(2) > elem->point(0)))f=-1;
switch (i)
{
//nodal modes
case 0: return l1;
case 1: return l2;
case 2: return l3;
//side modes
case 3: return l1*l2*(-4.*sqrt6);
case 4: return f*l1*l2*(-4.*sqrt10)*(l2-l1);
case 5: return -sqrt14*l1*l2*(5.0*l1*l1-1.0+(-10.0*l1+5.0*l2)*l2);
case 6: return f*(-sqrt2)*l1*l2*((9.0-21.0*l1*l1)*l1+(-9.0+63.0*l1*l1+(-63.0*l1+21.0*l2)*l2)*l2);
case 7: return -sqrt22*l1*l2*(0.5+(-7.0+0.105E2*l1*l1)*l1*l1+((14.0-0.42E2*l1*l1)*l1+(-7.0+0.63E2*l1*l1+(-0.42E2*l1+0.105E2*l2)*l2)*l2)*l2);
case 8: return l2*l3*(-4.*sqrt6);
case 9: return f*l2*l3*(-4.*sqrt10)*(l3-l2);
case 10: return -sqrt14*l2*l3*(5.0*l3*l3-1.0+(-10.0*l3+5.0*l2)*l2);
case 11: return f*(-sqrt2)*l2*l3*((-9.0+21.0*l3*l3)*l3+(-63.0*l3*l3+9.0+(63.0*l3-21.0*l2)*l2)*l2);
case 12: return -sqrt22*l2*l3*(0.5+(-7.0+0.105E2*l3*l3)*l3*l3+((14.0-0.42E2*l3*l3)*l3+(-7.0+0.63E2*l3*l3+(-0.42E2*l3+0.105E2*l2)*l2)*l2)*l2);
case 13: return l3*l1*(-4.*sqrt6);
case 14: return f*l3*l1*(-4.*sqrt10)*(l1-l3);
case 15: return -sqrt14*l3*l1*(5.0*l3*l3-1.0+(-10.0*l3+5.0*l1)*l1);
case 16: return f*(-sqrt2)*l3*l1*((9.0-21.0*l3*l3)*l3+(-9.0+63.0*l3*l3+(-63.0*l3+21.0*l1)*l1)*l1);
case 17: return -sqrt22*l3*l1*(0.5+(-7.0+0.105E2*l3*l3)*l3*l3+((14.0-0.42E2*l3*l3)*l3+(-7.0+0.63E2*l3*l3+(-0.42E2*l3+0.105E2*l1)*l1)*l1)*l1);
//internal modes
case 18: return l1*l2*l3;
case 19: return l1*l2*l3*x;
case 20: return l1*l2*l3*y;
case 21: return 0.5*l1*l2*l3*(3.0*l1*l1-1.0+(-6.0*l1+3.0*l2)*l2);
case 22: return l1*l2*l3*(l2-l1)*(2.0*l3-1.0);
case 23: return 0.5*l1*l2*l3*(2.0+(-12.0+12.0*l3)*l3);
case 24: return 0.5*l1*l2*l3*((3.0-5.0*l1*l1)*l1+(-3.0+15.0*l1*l1+(-15.0*l1+5.0*l2)*l2)*l2);
case 25: return 0.5*l1*l2*l3*(3.0*l1*l1-1.0+(-6.0*l1+3.0*l2)*l2)*(2.0*l3-1.0);
case 26: return 0.5*l1*l2*l3*(2.0+(-12.0+12.0*l3)*l3)*(l2-l1);
case 27: return 0.5*l1*l2*l3*(-2.0+(24.0+(-60.0+40.0*l3)*l3)*l3);
default:
libmesh_error_msg("Invalid i = " << i);
}
} // case TRI6
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 49);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
case 7:
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 10: // edge 1 points
case 12:
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 15: // edge 2 points
case 17:
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 20: // edge 3 points
case 22:
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
return f*(FE<1,SZABAB>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape(EDGE3, totalorder, i1[i], eta));
} // case QUAD8/QUAD9
default:
libmesh_error_msg("Invalid element type = " << type);
} // switch type
} // case SIXTH
// 7th-order Szabo-Babuska.
case SEVENTH:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
Real l1 = 1-p(0)-p(1);
Real l2 = p(0);
Real l3 = p(1);
const Real x=l2-l1;
const Real y=2.*l3-1.;
Real f=1;
libmesh_assert_less (i, 36);
if ((i>= 4&&i<= 8) && (elem->point(0) > elem->point(1)))f=-1;
if ((i>=10&&i<=14) && (elem->point(1) > elem->point(2)))f=-1;
if ((i>=16&&i<=20) && (elem->point(2) > elem->point(0)))f=-1;
switch (i)
{
//nodal modes
case 0: return l1;
case 1: return l2;
case 2: return l3;
//side modes
case 3: return l1*l2*(-4.*sqrt6);
case 4: return f*l1*l2*(-4.*sqrt10)*(l2-l1);
case 5: return -sqrt14*l1*l2*(5.0*l1*l1-1.0+(-10.0*l1+5.0*l2)*l2);
case 6: return f*-sqrt2*l1*l2*((9.0-21.0*l1*l1)*l1+(-9.0+63.0*l1*l1+(-63.0*l1+21.0*l2)*l2)*l2);
case 7: return -sqrt22*l1*l2*(0.5+(-7.0+0.105E2*l1*l1)*l1*l1+((14.0-0.42E2*l1*l1)*l1+(-7.0+0.63E2*l1*l1+(-0.42E2*l1+0.105E2*l2)*l2)*l2)*l2);
case 8: return f*-sqrt26*l1*l2*((-0.25E1+(15.0-0.165E2*l1*l1)*l1*l1)*l1+(0.25E1+(-45.0+0.825E2*l1*l1)*l1*l1+((45.0-0.165E3*l1*l1)*l1+(-15.0+0.165E3*l1*l1+(-0.825E2*l1+0.165E2*l2)*l2)*l2)*l2)*l2);
case 9: return l2*l3*(-4.*sqrt6);
case 10: return f*l2*l3*(-4.*sqrt10)*(l3-l2);
case 11: return -sqrt14*l2*l3*(5.0*l3*l3-1.0+(-10.0*l3+5.0*l2)*l2);
case 12: return f*-sqrt2*l2*l3*((-9.0+21.0*l3*l3)*l3+(-63.0*l3*l3+9.0+(63.0*l3-21.0*l2)*l2)*l2);
case 13: return -sqrt22*l2*l3*(0.5+(-7.0+0.105E2*l3*l3)*l3*l3+((14.0-0.42E2*l3*l3)*l3+(-7.0+0.63E2*l3*l3+(-0.42E2*l3+0.105E2*l2)*l2)*l2)*l2);
case 14: return f*-sqrt26*l2*l3*((0.25E1+(-15.0+0.165E2*l3*l3)*l3*l3)*l3+(-0.25E1+(45.0-0.825E2*l3*l3)*l3*l3+((-45.0+0.165E3*l3*l3)*l3+(15.0-0.165E3*l3*l3+(0.825E2*l3-0.165E2*l2)*l2)*l2)*l2)*l2);
case 15: return l3*l1*(-4.*sqrt6);
case 16: return f*l3*l1*(-4.*sqrt10)*(l1-l3);
case 17: return -sqrt14*l3*l1*(5.0*l3*l3-1.0+(-10.0*l3+5.0*l1)*l1);
case 18: return -f*sqrt2*l3*l1*((9.-21.*l3*l3)*l3+(-9.+63.*l3*l3+(-63.*l3+21.*l1)*l1)*l1);
case 19: return -sqrt22*l3*l1*(0.5+(-7.0+0.105E2*l3*l3)*l3*l3+((14.0-0.42E2*l3*l3)*l3+(-7.0+0.63E2*l3*l3+(-0.42E2*l3+0.105E2*l1)*l1)*l1)*l1);
case 20: return f*-sqrt26*l3*l1*((-0.25E1+(15.0-0.165E2*l3*l3)*l3*l3)*l3+(0.25E1+(-45.0+0.825E2*l3*l3)*l3*l3+((45.0-0.165E3*l3*l3)*l3+(-15.0+0.165E3*l3*l3+(-0.825E2*l3+0.165E2*l1)*l1)*l1)*l1)*l1);
//internal modes
case 21: return l1*l2*l3;
case 22: return l1*l2*l3*x;
case 23: return l1*l2*l3*y;
case 24: return l1*l2*l3*0.5*(3.*pow<2>(x)-1.);
case 25: return l1*l2*l3*x*y;
case 26: return l1*l2*l3*0.5*(3.*pow<2>(y)-1.);
case 27: return 0.5*l1*l2*l3*((3.0-5.0*l1*l1)*l1+(-3.0+15.0*l1*l1+(-15.0*l1+5.0*l2)*l2)*l2);
case 28: return 0.5*l1*l2*l3*(3.0*l1*l1-1.0+(-6.0*l1+3.0*l2)*l2)*(2.0*l3-1.0);
case 29: return 0.5*l1*l2*l3*(2.0+(-12.0+12.0*l3)*l3)*(l2-l1);
case 30: return 0.5*l1*l2*l3*(-2.0+(24.0+(-60.0+40.0*l3)*l3)*l3);
case 31: return 0.125*l1*l2*l3*((-15.0+(70.0-63.0*l1*l1)*l1*l1)*l1+(15.0+(-210.0+315.0*l1*l1)*l1*l1+((210.0-630.0*l1*l1)*l1+(-70.0+630.0*l1*l1+(-315.0*l1+63.0*l2)*l2)*l2)*l2)*l2);
case 32: return 0.5*l1*l2*l3*((3.0-5.0*l1*l1)*l1+(-3.0+15.0*l1*l1+(-15.0*l1+5.0*l2)*l2)*l2)*(2.0*l3-1.0);
case 33: return 0.25*l1*l2*l3*(3.0*l1*l1-1.0+(-6.0*l1+3.0*l2)*l2)*(2.0+(-12.0+12.0*l3)*l3);
case 34: return 0.5*l1*l2*l3*(-2.0+(24.0+(-60.0+40.0*l3)*l3)*l3)*(l2-l1);
case 35: return 0.125*l1*l2*l3*(-8.0+(240.0+(-1680.0+(4480.0+(-5040.0+2016.0*l3)*l3)*l3)*l3)*l3);
default:
libmesh_error_msg("Invalid i = " << i);
}
} // case TRI6
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 64);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
case 7:
case 9:
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 11: // edge 1 points
case 13:
case 15:
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 17: // edge 2 points
case 19:
case 21:
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 23: // edge 3 points
case 25:
case 27:
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
return f*(FE<1,SZABAB>::shape(EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape(EDGE3, totalorder, i1[i], eta));
} // case QUAD8/QUAD9
default:
libmesh_error_msg("Invalid element type = " << type);
} // switch type
} // case SEVENTH
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order!");
} // switch order
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, MONOMIAL >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 73 of file fe_monomial_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,MONOMIAL>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 1, SZABAB >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 82 of file fe_szabab_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,SZABAB>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 1, L2_HIERARCHIC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 101 of file fe_l2_hierarchic_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,L2_HIERARCHIC>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 1, HIERARCHIC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 101 of file fe_hierarchic_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,HIERARCHIC>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| static OutputShape libMesh::FE< Dim, T >::shape | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) | [static] |
shape function at point p. This method allows you to specify the imension, element type, and order directly. This allows the method to be static.On a p-refined element, o should be the total order of the element.
Referenced by libMesh::InfFE< Dim, T_radial, T_map >::compute_data(), libMesh::FEXYZ< Dim >::compute_face_values(), libMesh::InfFE< Dim, T_radial, T_map >::inverse_map(), libMesh::FE< Dim, T >::map(), libMesh::FE< Dim, T >::shape(), and libMesh::FE< Dim, T >::shape_deriv().
| Real libMesh::FE< 2, MONOMIAL >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 119 of file fe_monomial_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// by default call the orientation-independent shape functions
return FE<2,MONOMIAL>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 1, L2_LAGRANGE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 120 of file fe_l2_lagrange_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,L2_LAGRANGE>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 1, LAGRANGE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 120 of file fe_lagrange_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,LAGRANGE>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| static OutputShape libMesh::FE< Dim, T >::shape | ( | const Elem * | elem, |
| const Order | o, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) | [static] |
shape function at point p. This method allows you to specify the imension, element type, and order directly. This allows the method to be static.On a p-refined element, o should be the base order of the element.
| Real libMesh::FE< 1, HERMITE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 187 of file fe_hermite_shape_1D.C.
{
libmesh_error_msg("Hermite elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 3, MONOMIAL >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 187 of file fe_monomial_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<3,MONOMIAL>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 2, HERMITE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 190 of file fe_hermite_shape_2D.C.
{
libmesh_error_msg("Hermite elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 1, BERNSTEIN >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 192 of file fe_bernstein_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,BERNSTEIN>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 1, HERMITE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 199 of file fe_hermite_shape_1D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FEHermite< Dim >::hermite_raw_shape(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
// Coefficient naming: d(1)d(2n) is the coefficient of the
// global shape function corresponding to value 1 in terms of the
// local shape function corresponding to normal derivative 2
Real d1xd1x, d2xd2x;
hermite_compute_coefs(elem, d1xd1x, d2xd2x);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// Hermite cubic shape functions
case THIRD:
{
switch (type)
{
// C1 functions on the C1 cubic edge
case EDGE2:
case EDGE3:
{
libmesh_assert_less (i, 4);
switch (i)
{
case 0:
return FEHermite<1>::hermite_raw_shape(0, p(0));
case 1:
return d1xd1x * FEHermite<1>::hermite_raw_shape(2, p(0));
case 2:
return FEHermite<1>::hermite_raw_shape(1, p(0));
case 3:
return d2xd2x * FEHermite<1>::hermite_raw_shape(3, p(0));
default:
return FEHermite<1>::hermite_raw_shape(i, p(0));
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, CLOUGH >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 201 of file fe_clough_shape_1D.C.
{
libmesh_error_msg("Clough-Tocher elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 2, HERMITE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 202 of file fe_hermite_shape_2D.C.
References libMesh::FEHermite< Dim >::hermite_raw_shape(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, and libMesh::Elem::type().
{
libmesh_assert(elem);
std::vector<std::vector<Real> > dxdxi(2, std::vector<Real>(2, 0));
#ifdef DEBUG
std::vector<Real> dxdeta(2), dydxi(2);
#endif
hermite_compute_coefs(elem,dxdxi
#ifdef DEBUG
,dxdeta,dydxi
#endif
);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (type)
{
case QUAD4:
libmesh_assert_less (totalorder, 4);
case QUAD8:
case QUAD9:
{
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
std::vector<unsigned int> bases1D;
Real coef = hermite_bases_2D(bases1D, dxdxi, totalorder, i);
return coef * FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1));
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, LAGRANGE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 207 of file fe_lagrange_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<2,LAGRANGE>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 2, L2_LAGRANGE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 208 of file fe_l2_lagrange_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<2,L2_LAGRANGE>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 1, CLOUGH >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 213 of file fe_clough_shape_1D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
clough_compute_coefs(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 3rd-order C1 cubic element
case THIRD:
{
switch (type)
{
// C1 functions on the C1 cubic edge
case EDGE2:
case EDGE3:
{
libmesh_assert_less (i, 4);
switch (i)
{
case 0:
return clough_raw_shape(0, p);
case 1:
return clough_raw_shape(1, p);
case 2:
return d1xd1x * clough_raw_shape(2, p);
case 3:
return d2xd2x * clough_raw_shape(3, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, L2_LAGRANGE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 359 of file fe_l2_lagrange_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<3,L2_LAGRANGE>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| Real libMesh::FE< 3, HERMITE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 377 of file fe_hermite_shape_3D.C.
{
libmesh_error_msg("Hermite elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 3, HERMITE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 389 of file fe_hermite_shape_3D.C.
References libMesh::FEHermite< Dim >::hermite_raw_shape(), libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
std::vector<std::vector<Real> > dxdxi(3, std::vector<Real>(2, 0));
#ifdef DEBUG
std::vector<Real> dydxi(2), dzdeta(2), dxdzeta(2);
std::vector<Real> dzdxi(2), dxdeta(2), dydzeta(2);
#endif //DEBUG
hermite_compute_coefs(elem, dxdxi
#ifdef DEBUG
, dydxi, dzdeta, dxdzeta, dzdxi, dxdeta, dydzeta
#endif
);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 3rd-order tricubic Hermite functions
case THIRD:
{
switch (type)
{
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 64);
std::vector<unsigned int> bases1D;
Real coef = hermite_bases_3D(bases1D, dxdxi, totalorder, i);
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape(bases1D[2],p(2));
}
default:
libmesh_error_msg("ERROR: Unsupported element type " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 0, LAGRANGE_VEC >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 538 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape().
{
Real value = FE<0,LAGRANGE>::shape( type, order, i, p );
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 2, SUBDIVISION >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Subdivision finite elements.
| RealGradient libMesh::FE< 1, LAGRANGE_VEC >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 560 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape().
{
Real value = FE<1,LAGRANGE>::shape( type, order, i, p );
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 3, LAGRANGE >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 559 of file fe_lagrange_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<3,LAGRANGE>::shape(elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
}
| RealGradient libMesh::FE< 2, LAGRANGE_VEC >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 582 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape().
{
Real value = FE<2,LAGRANGE>::shape( type, order, i/2, p );
switch( i%2 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
default:
libmesh_error_msg("i%2 must be either 0 or 1!");
}
//dummy
return libMesh::RealGradient();
}
| RealGradient libMesh::FE< 0, NEDELEC_ONE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 599 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 0, NEDELEC_ONE >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 602 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 1, NEDELEC_ONE >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 622 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 1, NEDELEC_ONE >::shape | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 625 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| Real libMesh::FE< 3, L2_HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 645 of file fe_l2_hierarchic_shape_3D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| RealGradient libMesh::FE< 3, LAGRANGE_VEC >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 647 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape().
{
Real value = FE<3,LAGRANGE>::shape( type, order, i/3, p );
switch( i%3 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
case 2:
return libMesh::RealGradient( Real(0), Real(0), value );
default:
libmesh_error_msg("i%3 must be 0, 1, or 2!");
}
//dummy
return libMesh::RealGradient();
}
| Real libMesh::FE< 3, HIERARCHIC >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 645 of file fe_hierarchic_shape_3D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| Real libMesh::FE< 3, L2_HIERARCHIC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 657 of file fe_l2_hierarchic_shape_3D.C.
References libMesh::EDGE3, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, and libMesh::Elem::type().
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order+elem->p_level());
switch (type)
{
case HEX8:
case HEX20:
libmesh_assert_less (totalorder, 2);
case HEX27:
{
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u)*(totalorder+1u));
// Compute hex shape functions as a tensor-product
Real xi = p(0);
Real eta = p(1);
Real zeta = p(2);
unsigned int i0, i1, i2;
cube_indices(elem, totalorder, i, xi, eta, zeta, i0, i1, i2);
return (FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder, i0, xi)*
FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder, i1, eta)*
FE<1,L2_HIERARCHIC>::shape(EDGE3, totalorder, i2, zeta));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, HIERARCHIC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 657 of file fe_hierarchic_shape_3D.C.
References libMesh::EDGE3, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, and libMesh::Elem::type().
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order+elem->p_level());
switch (type)
{
case HEX8:
case HEX20:
libmesh_assert_less (totalorder, 2);
case HEX27:
{
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u)*(totalorder+1u));
// Compute hex shape functions as a tensor-product
Real xi = p(0);
Real eta = p(1);
Real zeta = p(2);
unsigned int i0, i1, i2;
cube_indices(elem, totalorder, i, xi, eta, zeta, i0, i1, i2);
return (FE<1,HIERARCHIC>::shape(EDGE3, totalorder, i0, xi)*
FE<1,HIERARCHIC>::shape(EDGE3, totalorder, i1, eta)*
FE<1,HIERARCHIC>::shape(EDGE3, totalorder, i2, zeta));
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, SUBDIVISION >::shape | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 719 of file fe_subdivision_2D.C.
References libMesh::FOURTH, and libMesh::TRI3SUBDIVISION.
{
switch (order)
{
case FOURTH:
{
switch (type)
{
case TRI3SUBDIVISION:
libmesh_assert_less(i, 12);
return FESubdivision::regular_shape(i,p(0),p(1));
default:
libmesh_error_msg("ERROR: Unsupported element type!");
}
}
default:
libmesh_error_msg("ERROR: Unsupported polynomial order!");
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 0, LAGRANGE_VEC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 722 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
Real value = FE<0,LAGRANGE>::shape( elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
return libMesh::RealGradient( value );
}
| RealGradient libMesh::FE< 1, LAGRANGE_VEC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 744 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
Real value = FE<1,LAGRANGE>::shape( elem->type(), static_cast<Order>(order + elem->p_level()), i, p);
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 2, SUBDIVISION >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 748 of file fe_subdivision_2D.C.
References libMesh::libmesh_assert(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<2,SUBDIVISION>::shape(elem->type(), order, i, p);
}
| RealGradient libMesh::FE< 2, LAGRANGE_VEC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 766 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
Real value = FE<2,LAGRANGE>::shape( elem->type(), static_cast<Order>(order + elem->p_level()), i/2, p );
switch( i%2 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
default:
libmesh_error_msg("i%2 must be either 0 or 1!");
}
//dummy
return libMesh::RealGradient();
}
| RealGradient libMesh::FE< 3, LAGRANGE_VEC >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 830 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape(), and libMesh::Elem::type().
{
Real value = FE<3,LAGRANGE>::shape( elem->type(), static_cast<Order>(order + elem->p_level()), i/3, p );
switch( i%3 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
case 2:
return libMesh::RealGradient( Real(0), Real(0), value );
default:
libmesh_error_msg("i%3 must be 0, 1, or 2!");
}
//dummy
return libMesh::RealGradient();
}
| Real libMesh::FE< 2, CLOUGH >::shape | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const Point & | |||
| ) | [static] |
Definition at line 1763 of file fe_clough_shape_2D.C.
{
libmesh_error_msg("Clough-Tocher elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 2, CLOUGH >::shape | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const Point & | p | ||
| ) |
Definition at line 1775 of file fe_clough_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::SECOND, libMesh::THIRD, libMesh::TRI6, and libMesh::Elem::type().
{
libmesh_assert(elem);
clough_compute_coefs(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 2nd-order restricted Clough-Tocher element
case SECOND:
{
// There may be a bug in the 2nd order case; the 3rd order
// Clough-Tocher elements are pretty uniformly better anyways
// so use those instead.
libmesh_experimental();
switch (type)
{
// C1 functions on the Clough-Tocher triangle.
case TRI6:
{
libmesh_assert_less (i, 9);
// FIXME: it would be nice to calculate (and cache)
// clough_raw_shape(j,p) only once per triangle, not 1-7
// times
switch (i)
{
// Note: these DoF numbers are "scrambled" because my
// initial numbering conventions didn't match libMesh
case 0:
return clough_raw_shape(0, p)
+ d1d2n * clough_raw_shape(10, p)
+ d1d3n * clough_raw_shape(11, p);
case 3:
return clough_raw_shape(1, p)
+ d2d3n * clough_raw_shape(11, p)
+ d2d1n * clough_raw_shape(9, p);
case 6:
return clough_raw_shape(2, p)
+ d3d1n * clough_raw_shape(9, p)
+ d3d2n * clough_raw_shape(10, p);
case 1:
return d1xd1x * clough_raw_shape(3, p)
+ d1xd1y * clough_raw_shape(4, p)
+ d1xd2n * clough_raw_shape(10, p)
+ d1xd3n * clough_raw_shape(11, p)
+ 0.5 * N01x * d3nd3n * clough_raw_shape(11, p)
+ 0.5 * N02x * d2nd2n * clough_raw_shape(10, p);
case 2:
return d1yd1y * clough_raw_shape(4, p)
+ d1yd1x * clough_raw_shape(3, p)
+ d1yd2n * clough_raw_shape(10, p)
+ d1yd3n * clough_raw_shape(11, p)
+ 0.5 * N01y * d3nd3n * clough_raw_shape(11, p)
+ 0.5 * N02y * d2nd2n * clough_raw_shape(10, p);
case 4:
return d2xd2x * clough_raw_shape(5, p)
+ d2xd2y * clough_raw_shape(6, p)
+ d2xd3n * clough_raw_shape(11, p)
+ d2xd1n * clough_raw_shape(9, p)
+ 0.5 * N10x * d3nd3n * clough_raw_shape(11, p)
+ 0.5 * N12x * d1nd1n * clough_raw_shape(9, p);
case 5:
return d2yd2y * clough_raw_shape(6, p)
+ d2yd2x * clough_raw_shape(5, p)
+ d2yd3n * clough_raw_shape(11, p)
+ d2yd1n * clough_raw_shape(9, p)
+ 0.5 * N10y * d3nd3n * clough_raw_shape(11, p)
+ 0.5 * N12y * d1nd1n * clough_raw_shape(9, p);
case 7:
return d3xd3x * clough_raw_shape(7, p)
+ d3xd3y * clough_raw_shape(8, p)
+ d3xd1n * clough_raw_shape(9, p)
+ d3xd2n * clough_raw_shape(10, p)
+ 0.5 * N20x * d2nd2n * clough_raw_shape(10, p)
+ 0.5 * N21x * d1nd1n * clough_raw_shape(9, p);
case 8:
return d3yd3y * clough_raw_shape(8, p)
+ d3yd3x * clough_raw_shape(7, p)
+ d3yd1n * clough_raw_shape(9, p)
+ d3yd2n * clough_raw_shape(10, p)
+ 0.5 * N20y * d2nd2n * clough_raw_shape(10, p)
+ 0.5 * N21y * d1nd1n * clough_raw_shape(9, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// 3rd-order Clough-Tocher element
case THIRD:
{
switch (type)
{
// C1 functions on the Clough-Tocher triangle.
case TRI6:
{
libmesh_assert_less (i, 12);
// FIXME: it would be nice to calculate (and cache)
// clough_raw_shape(j,p) only once per triangle, not 1-7
// times
switch (i)
{
// Note: these DoF numbers are "scrambled" because my
// initial numbering conventions didn't match libMesh
case 0:
return clough_raw_shape(0, p)
+ d1d2n * clough_raw_shape(10, p)
+ d1d3n * clough_raw_shape(11, p);
case 3:
return clough_raw_shape(1, p)
+ d2d3n * clough_raw_shape(11, p)
+ d2d1n * clough_raw_shape(9, p);
case 6:
return clough_raw_shape(2, p)
+ d3d1n * clough_raw_shape(9, p)
+ d3d2n * clough_raw_shape(10, p);
case 1:
return d1xd1x * clough_raw_shape(3, p)
+ d1xd1y * clough_raw_shape(4, p)
+ d1xd2n * clough_raw_shape(10, p)
+ d1xd3n * clough_raw_shape(11, p);
case 2:
return d1yd1y * clough_raw_shape(4, p)
+ d1yd1x * clough_raw_shape(3, p)
+ d1yd2n * clough_raw_shape(10, p)
+ d1yd3n * clough_raw_shape(11, p);
case 4:
return d2xd2x * clough_raw_shape(5, p)
+ d2xd2y * clough_raw_shape(6, p)
+ d2xd3n * clough_raw_shape(11, p)
+ d2xd1n * clough_raw_shape(9, p);
case 5:
return d2yd2y * clough_raw_shape(6, p)
+ d2yd2x * clough_raw_shape(5, p)
+ d2yd3n * clough_raw_shape(11, p)
+ d2yd1n * clough_raw_shape(9, p);
case 7:
return d3xd3x * clough_raw_shape(7, p)
+ d3xd3y * clough_raw_shape(8, p)
+ d3xd1n * clough_raw_shape(9, p)
+ d3xd2n * clough_raw_shape(10, p);
case 8:
return d3yd3y * clough_raw_shape(8, p)
+ d3yd3x * clough_raw_shape(7, p)
+ d3yd1n * clough_raw_shape(9, p)
+ d3yd2n * clough_raw_shape(10, p);
case 10:
return d1nd1n * clough_raw_shape(9, p);
case 11:
return d2nd2n * clough_raw_shape(10, p);
case 9:
return d3nd3n * clough_raw_shape(11, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, SCALAR >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 47 of file fe_scalar_shape_1D.C.
{
return 0.;
}
| Real libMesh::FE< 0, SCALAR >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 47 of file fe_scalar_shape_0D.C.
{
return 0.;
}
| Real libMesh::FE< 3, SCALAR >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 47 of file fe_scalar_shape_3D.C.
{
return 0.;
}
| Real libMesh::FE< 2, SCALAR >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 48 of file fe_scalar_shape_2D.C.
{
return 0.;
}
| Real libMesh::FE< 3, SZABAB >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 55 of file fe_szabab_shape_3D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials are not defined in 3D");
return 0.;
}
| Real libMesh::FE< 0, BERNSTEIN >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_bernstein_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, L2_HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_l2_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, SZABAB >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_szabab_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HERMITE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_hermite_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, XYZ >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_xyz_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, CLOUGH >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_clough_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, MONOMIAL >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_monomial_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, LAGRANGE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, L2_LAGRANGE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_l2_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 56 of file fe_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 3, SCALAR >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 57 of file fe_scalar_shape_3D.C.
{
return 0.;
}
| Real libMesh::FE< 1, SCALAR >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 57 of file fe_scalar_shape_1D.C.
{
return 0.;
}
| Real libMesh::FE< 0, SCALAR >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 57 of file fe_scalar_shape_0D.C.
{
return 0.;
}
| Real libMesh::FE< 2, SCALAR >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 58 of file fe_scalar_shape_2D.C.
{
return 0.;
}
| Real libMesh::FE< 3, CLOUGH >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 59 of file fe_clough_shape_3D.C.
{
libmesh_error_msg("Clough-Tocher elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 3, SZABAB >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 68 of file fe_szabab_shape_3D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials are not defined in 3D");
return 0.;
}
| Real libMesh::FE< 0, L2_HIERARCHIC >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_l2_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, BERNSTEIN >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_bernstein_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, LAGRANGE >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, L2_LAGRANGE >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_l2_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, XYZ >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_xyz_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HERMITE >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_hermite_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, SZABAB >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_szabab_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HIERARCHIC >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, CLOUGH >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_clough_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, MONOMIAL >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_monomial_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 3, CLOUGH >::shape_deriv | ( | const Elem * | libmesh_dbg_varelem, |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 72 of file fe_clough_shape_3D.C.
References libMesh::libmesh_assert().
{
libmesh_assert(elem);
libmesh_not_implemented();
return 0.;
}
| Real libMesh::FE< 1, MONOMIAL >::shape_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 86 of file fe_monomial_shape_1D.C.
References libMesh::Real.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
const Real xi = p(0);
libmesh_assert_less_equal (i, static_cast<unsigned int>(order));
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
case 0:
return 0.;
case 1:
return 1.;
case 2:
return 2.*xi;
case 3:
return 3.*xi*xi;
case 4:
return 4.*xi*xi*xi;
default:
Real val = i;
for (unsigned int index = 1; index != i; ++index)
val *= xi;
return val;
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, SZABAB >::shape_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 95 of file fe_szabab_shape_1D.C.
References libMesh::Real, and libMesh::SEVENTH.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
const Real xi = p(0);
const Real xi2 = xi*xi;
// Use this libmesh_assert rather than a switch with a single entry...
// It will go away in optimized mode, essentially has the same effect.
libmesh_assert_less_equal (order, SEVENTH);
// switch (order)
// {
// case FIRST:
// case SECOND:
// case THIRD:
// case FOURTH:
// case FIFTH:
// case SIXTH:
// case SEVENTH:
switch(i)
{
case 0:return -1./2.;
case 1:return 1./2.;
case 2:return 1./2.*2.4494897427831780982*xi;
case 3:return -1./4.*3.1622776601683793320+3./4.*3.1622776601683793320*xi2;
case 4:return 1./16.*3.7416573867739413856*(-12.+20*xi2)*xi;
case 5:return 9./16.*1.4142135623730950488+(-45./8.*1.4142135623730950488+105./16.*1.4142135623730950488*xi2)*xi2;
case 6:return 1./32.*4.6904157598234295546*(30.+(-140.+126.*xi2)*xi2)*xi;
case 7:return -5./32.*5.0990195135927848300+(105./32.*5.0990195135927848300+(-315./32.*5.0990195135927848300+231./32.*5.0990195135927848300*xi2)*xi2)*xi2;
case 8:return 1./256.*5.4772255750516611346*(-280.+(2520.+(-5544.+3432.*xi2)*xi2)*xi2)*xi;
default:
libmesh_error_msg("Invalid shape function index!");
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, L2_HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 114 of file fe_l2_hierarchic_shape_1D.C.
References libMesh::Utility::pow(), and libMesh::Real.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
libmesh_assert_less (i, order+1u);
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
const Real xi = p(0);
Real returnval = 1.;
switch (i)
{
case 0:
returnval = -.5;
break;
case 1:
returnval = .5;
break;
// All even-terms have the same form.
// xi^(p-1)/(p-1)!
case 2:
returnval = xi;
break;
case 4:
returnval = pow<3>(xi)/6.;
break;
case 6:
returnval = pow<5>(xi)/120.;
break;
// All odd-terms have the same form.
// (p*xi^(p-1) - 1.)/p!
case 3:
returnval = (3*xi*xi - 1.)/6.;
break;
case 5:
returnval = (5.*pow<4>(xi) - 1.)/120.;
break;
case 7:
returnval = (7.*pow<6>(xi) - 1.)/5040.;
break;
default:
Real denominator = 1.;
for (unsigned int n=1; n != i; ++n)
{
returnval *= xi;
denominator *= n;
}
// Odd:
if (i % 2)
returnval = (i * returnval - 1.)/denominator/i;
// Even:
else
returnval = returnval/denominator;
break;
}
return returnval;
}
| Real libMesh::FE< 1, HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 114 of file fe_hierarchic_shape_1D.C.
References libMesh::Utility::pow(), and libMesh::Real.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
libmesh_assert_less (i, order+1u);
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
const Real xi = p(0);
Real returnval = 1.;
switch (i)
{
case 0:
returnval = -.5;
break;
case 1:
returnval = .5;
break;
// All even-terms have the same form.
// xi^(p-1)/(p-1)!
case 2:
returnval = xi;
break;
case 4:
returnval = pow<3>(xi)/6.;
break;
case 6:
returnval = pow<5>(xi)/120.;
break;
// All odd-terms have the same form.
// (p*xi^(p-1) - 1.)/p!
case 3:
returnval = (3*xi*xi - 1.)/6.;
break;
case 5:
returnval = (5.*pow<4>(xi) - 1.)/120.;
break;
case 7:
returnval = (7.*pow<6>(xi) - 1.)/5040.;
break;
default:
Real denominator = 1.;
for (unsigned int n=1; n != i; ++n)
{
returnval *= xi;
denominator *= n;
}
// Odd:
if (i % 2)
returnval = (i * returnval - 1.)/denominator/i;
// Even:
else
returnval = returnval/denominator;
break;
}
return returnval;
}
| Real libMesh::FE< 1, XYZ >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 123 of file fe_xyz_shape_1D.C.
{
libmesh_error_msg("XYZ polynomials require the element \nbecause the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 1, MONOMIAL >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 132 of file fe_monomial_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,MONOMIAL>::shape_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 1, LAGRANGE >::shape_deriv | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 133 of file fe_lagrange_shape_1D.C.
References libMesh::FIRST, libMesh::Real, libMesh::SECOND, and libMesh::THIRD.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
const Real xi = p(0);
switch (order)
{
// Lagrange linear shape function derivatives
case FIRST:
{
libmesh_assert_less (i, 2);
switch (i)
{
case 0:
return -.5;
case 1:
return .5;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange quadratic shape function derivatives
case SECOND:
{
libmesh_assert_less (i, 3);
switch (i)
{
case 0:
return xi-.5;
case 1:
return xi+.5;
case 2:
return -2.*xi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange cubic shape function derivatives
case THIRD:
{
libmesh_assert_less (i, 4);
switch (i)
{
case 0:
return -9./16.*(3.*xi*xi-2.*xi-1./9.);
case 1:
return -9./16.*(-3.*xi*xi-2.*xi+1./9.);
case 2:
return 27./16.*(3.*xi*xi-2./3.*xi-1.);
case 3:
return 27./16.*(-3.*xi*xi-2./3.*xi+1.);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, L2_LAGRANGE >::shape_deriv | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 133 of file fe_l2_lagrange_shape_1D.C.
References libMesh::FIRST, libMesh::Real, libMesh::SECOND, and libMesh::THIRD.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
const Real xi = p(0);
switch (order)
{
// Lagrange linear shape function derivatives
case FIRST:
{
libmesh_assert_less (i, 2);
switch (i)
{
case 0:
return -.5;
case 1:
return .5;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange quadratic shape function derivatives
case SECOND:
{
libmesh_assert_less (i, 3);
switch (i)
{
case 0:
return xi-.5;
case 1:
return xi+.5;
case 2:
return -2.*xi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// Lagrange cubic shape function derivatives
case THIRD:
{
libmesh_assert_less (i, 4);
switch (i)
{
case 0:
return -9./16.*(3.*xi*xi-2.*xi-1./9.);
case 1:
return -9./16.*(-3.*xi*xi-2.*xi+1./9.);
case 2:
return 27./16.*(3.*xi*xi-2./3.*xi-1.);
case 3:
return 27./16.*(-3.*xi*xi-2./3.*xi+1.);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, MONOMIAL >::shape_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 133 of file fe_monomial_shape_2D.C.
References libMesh::Real.
{
#if LIBMESH_DIM > 1
libmesh_assert_less (j, 2);
libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
(static_cast<unsigned int>(order)+2)/2);
const Real xi = p(0);
const Real eta = p(1);
// monomials. since they are hierarchic we only need one case block.
switch (j)
{
// d()/dxi
case 0:
{
switch (i)
{
// constants
case 0:
return 0.;
// linears
case 1:
return 1.;
case 2:
return 0.;
// quadratics
case 3:
return 2.*xi;
case 4:
return eta;
case 5:
return 0.;
// cubics
case 6:
return 3.*xi*xi;
case 7:
return 2.*xi*eta;
case 8:
return eta*eta;
case 9:
return 0.;
// quartics
case 10:
return 4.*xi*xi*xi;
case 11:
return 3.*xi*xi*eta;
case 12:
return 2.*xi*eta*eta;
case 13:
return eta*eta*eta;
case 14:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int ny = i - (o*(o+1)/2);
unsigned int nx = o - ny;
Real val = nx;
for (unsigned int index=1; index < nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
return val;
}
}
// d()/deta
case 1:
{
switch (i)
{
// constants
case 0:
return 0.;
// linears
case 1:
return 0.;
case 2:
return 1.;
// quadratics
case 3:
return 0.;
case 4:
return xi;
case 5:
return 2.*eta;
// cubics
case 6:
return 0.;
case 7:
return xi*xi;
case 8:
return 2.*xi*eta;
case 9:
return 3.*eta*eta;
// quartics
case 10:
return 0.;
case 11:
return xi*xi*xi;
case 12:
return 2.*xi*xi*eta;
case 13:
return 3.*xi*eta*eta;
case 14:
return 4.*eta*eta*eta;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int ny = i - (o*(o+1)/2);
unsigned int nx = o - ny;
Real val = ny;
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=1; index < ny; index++)
val *= eta;
return val;
}
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| Real libMesh::FE< 1, XYZ >::shape_deriv | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | point_in | ||
| ) |
Definition at line 136 of file fe_xyz_shape_1D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, and libMesh::x.
{
libmesh_assert(elem);
libmesh_assert_less_equal (i, order + elem->p_level());
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = 0.;
for (unsigned int p = 0; p < elem->n_nodes(); p++)
{
const Real distance = std::abs(centroid(0) - elem->point(p)(0));
max_distance = std::max(distance, max_distance);
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real xc = centroid(0);
const Real dx = (x - xc)/max_distance;
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
case 0:
return 0.;
case 1:
return 1.;
case 2:
return 2.*dx/max_distance;
case 3:
return 3.*dx*dx/max_distance;
case 4:
return 4.*dx*dx*dx/max_distance;
default:
Real val = i;
for (unsigned int index = 1; index != i; ++index)
val *= dx;
return val/max_distance;
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| static OutputShape libMesh::FE< Dim, T >::shape_deriv | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) | [static] |
derivative of the
shape function at point p. This method allows you to specify the dimension, element type, and order directly.On a p-refined element, o should be the total order of the element.
Referenced by libMesh::FE< Dim, T >::init_shape_functions(), libMesh::FE< Dim, T >::map_eta(), libMesh::FE< Dim, T >::map_xi(), libMesh::FE< Dim, T >::map_zeta(), and libMesh::FE< Dim, T >::shape_deriv().
| Real libMesh::FE< 1, SZABAB >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 144 of file fe_szabab_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,SZABAB>::shape_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| static OutputShape libMesh::FE< Dim, T >::shape_deriv | ( | const Elem * | elem, |
| const Order | o, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) | [static] |
derivative of the
shape function. You must specify element type, and order directly.On a p-refined element, o should be the base order of the element.
| RealGradient libMesh::FE< 2, NEDELEC_ONE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 166 of file fe_nedelec_one_shape_2D.C.
{
libmesh_error_msg("Nedelec elements require the element type \nbecause edge orientation is needed.");
return RealGradient();
}
| Real libMesh::FE< 2, XYZ >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 179 of file fe_xyz_shape_2D.C.
{
libmesh_error_msg("XYZ polynomials require the element \nbecause the centroid is needed.");
return 0.;
}
| RealGradient libMesh::FE< 2, NEDELEC_ONE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | |||
| ) |
Definition at line 179 of file fe_nedelec_one_shape_2D.C.
References libMesh::FIRST, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::TRI6, and libMesh::Elem::type().
{
#if LIBMESH_DIM > 1
libmesh_assert(elem);
libmesh_assert_less (j, 2);
const Order total_order = static_cast<Order>(order + elem->p_level());
switch (total_order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (elem->type())
{
case QUAD8:
case QUAD9:
{
libmesh_assert_less (i, 4);
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
case 2:
return RealGradient();
case 1:
{
if( elem->point(1) > elem->point(2) )
return RealGradient( 0.0, -0.25 );
else
return RealGradient( 0.0, 0.25 );
}
case 3:
{
if( elem->point(3) > elem->point(0) )
return RealGradient( 0.0, -0.25 );
else
return RealGradient( 0.0, 0.25 );
}
default:
libmesh_error_msg("Invalid i = " << i);
}
} // j=0
// d()/deta
case 1:
{
switch(i)
{
case 1:
case 3:
return RealGradient();
case 0:
{
if( elem->point(0) > elem->point(1) )
return RealGradient( 0.25 );
else
return RealGradient( -0.25 );
}
case 2:
{
if( elem->point(2) > elem->point(3) )
return RealGradient( 0.25 );
else
return RealGradient( -0.25 );
}
default:
libmesh_error_msg("Invalid i = " << i);
}
} // j=1
default:
libmesh_error_msg("Invalid j = " << j);
}
return RealGradient();
}
case TRI6:
{
libmesh_assert_less (i, 3);
// Account for edge flipping
Real f = 1.0;
switch(i)
{
case 0:
{
if( elem->point(0) > elem->point(1) )
f = -1.0;
break;
}
case 1:
{
if( elem->point(1) > elem->point(2) )
f = -1.0;
break;
}
case 2:
{
if( elem->point(2) > elem->point(0) )
f = -1.0;
break;
}
default:
libmesh_error_msg("Invalid i = " << i);
}
switch (j)
{
// d()/dxi
case 0:
{
return RealGradient( 0.0, f*1.0);
}
// d()/deta
case 1:
{
return RealGradient( f*(-1.0) );
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type!: " << elem->type());
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order!: " << total_order);
}
#endif // LIBMESH_DIM > 1
libmesh_error_msg("We'll never get here!");
return RealGradient();
}
| Real libMesh::FE< 1, L2_HIERARCHIC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 185 of file fe_l2_hierarchic_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,L2_HIERARCHIC>::shape_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 1, HIERARCHIC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 185 of file fe_hierarchic_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,HIERARCHIC>::shape_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, XYZ >::shape_deriv | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | point_in | ||
| ) |
Definition at line 192 of file fe_xyz_shape_2D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, and libMesh::x.
{
#if LIBMESH_DIM > 1
libmesh_assert_less (j, 2);
libmesh_assert(elem);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = Point(0.,0.,0.);
for (unsigned int p = 0; p < elem->n_nodes(); p++)
for (unsigned int d = 0; d < 2; d++)
{
const Real distance = std::abs(centroid(d) - elem->point(p)(d));
max_distance(d) = std::max(distance, max_distance(d));
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real y = point_in(1);
const Real xc = centroid(0);
const Real yc = centroid(1);
const Real distx = max_distance(0);
const Real disty = max_distance(1);
const Real dx = (x - xc)/distx;
const Real dy = (y - yc)/disty;
#ifndef NDEBUG
// totalorder is only used in the assertion below, so
// we avoid declaring it when asserts are not active.
const unsigned int totalorder = order + elem->p_level();
#endif
libmesh_assert_less (i, (totalorder+1)*(totalorder+2)/2);
// monomials. since they are hierarchic we only need one case block.
switch (j)
{
// d()/dx
case 0:
{
switch (i)
{
// constants
case 0:
return 0.;
// linears
case 1:
return 1./distx;
case 2:
return 0.;
// quadratics
case 3:
return 2.*dx/distx;
case 4:
return dy/distx;
case 5:
return 0.;
// cubics
case 6:
return 3.*dx*dx/distx;
case 7:
return 2.*dx*dy/distx;
case 8:
return dy*dy/distx;
case 9:
return 0.;
// quartics
case 10:
return 4.*dx*dx*dx/distx;
case 11:
return 3.*dx*dx*dy/distx;
case 12:
return 2.*dx*dy*dy/distx;
case 13:
return dy*dy*dy/distx;
case 14:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int i2 = i - (o*(o+1)/2);
Real val = o - i2;
for (unsigned int index=i2+1; index < o; index++)
val *= dx;
for (unsigned int index=0; index != i2; index++)
val *= dy;
return val/distx;
}
}
// d()/dy
case 1:
{
switch (i)
{
// constants
case 0:
return 0.;
// linears
case 1:
return 0.;
case 2:
return 1./disty;
// quadratics
case 3:
return 0.;
case 4:
return dx/disty;
case 5:
return 2.*dy/disty;
// cubics
case 6:
return 0.;
case 7:
return dx*dx/disty;
case 8:
return 2.*dx*dy/disty;
case 9:
return 3.*dy*dy/disty;
// quartics
case 10:
return 0.;
case 11:
return dx*dx*dx/disty;
case 12:
return 2.*dx*dx*dy/disty;
case 13:
return 3.*dx*dy*dy/disty;
case 14:
return 4.*dy*dy*dy/disty;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int i2 = i - (o*(o+1)/2);
Real val = i2;
for (unsigned int index=i2; index != o; index++)
val *= dx;
for (unsigned int index=1; index <= i2; index++)
val *= dy;
return val/disty;
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| RealGradient libMesh::FE< 3, NEDELEC_ONE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 195 of file fe_nedelec_one_shape_3D.C.
{
libmesh_error_msg("Nedelec elements require the element type \nbecause edge orientation is needed.");
return RealGradient();
}
| Real libMesh::FE< 3, MONOMIAL >::shape_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 201 of file fe_monomial_shape_3D.C.
References libMesh::Real.
{
#if LIBMESH_DIM == 3
libmesh_assert_less (j, 3);
libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
(static_cast<unsigned int>(order)+2)*
(static_cast<unsigned int>(order)+3)/6);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// monomials. since they are hierarchic we only need one case block.
switch (j)
{
// d()/dxi
case 0:
{
switch (i)
{
// constant
case 0:
return 0.;
// linear
case 1:
return 1.;
case 2:
return 0.;
case 3:
return 0.;
// quadratic
case 4:
return 2.*xi;
case 5:
return eta;
case 6:
return 0.;
case 7:
return zeta;
case 8:
return 0.;
case 9:
return 0.;
// cubic
case 10:
return 3.*xi*xi;
case 11:
return 2.*xi*eta;
case 12:
return eta*eta;
case 13:
return 0.;
case 14:
return 2.*xi*zeta;
case 15:
return eta*zeta;
case 16:
return 0.;
case 17:
return zeta*zeta;
case 18:
return 0.;
case 19:
return 0.;
// quartics
case 20:
return 4.*xi*xi*xi;
case 21:
return 3.*xi*xi*eta;
case 22:
return 2.*xi*eta*eta;
case 23:
return eta*eta*eta;
case 24:
return 0.;
case 25:
return 3.*xi*xi*zeta;
case 26:
return 2.*xi*eta*zeta;
case 27:
return eta*eta*zeta;
case 28:
return 0.;
case 29:
return 2.*xi*zeta*zeta;
case 30:
return eta*zeta*zeta;
case 31:
return 0.;
case 32:
return zeta*zeta*zeta;
case 33:
return 0.;
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx;
for (unsigned int index=1; index < nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
for (unsigned int index=0; index != nz; index++)
val *= zeta;
return val;
}
}
// d()/deta
case 1:
{
switch (i)
{
// constant
case 0:
return 0.;
// linear
case 1:
return 0.;
case 2:
return 1.;
case 3:
return 0.;
// quadratic
case 4:
return 0.;
case 5:
return xi;
case 6:
return 2.*eta;
case 7:
return 0.;
case 8:
return zeta;
case 9:
return 0.;
// cubic
case 10:
return 0.;
case 11:
return xi*xi;
case 12:
return 2.*xi*eta;
case 13:
return 3.*eta*eta;
case 14:
return 0.;
case 15:
return xi*zeta;
case 16:
return 2.*eta*zeta;
case 17:
return 0.;
case 18:
return zeta*zeta;
case 19:
return 0.;
// quartics
case 20:
return 0.;
case 21:
return xi*xi*xi;
case 22:
return 2.*xi*xi*eta;
case 23:
return 3.*xi*eta*eta;
case 24:
return 4.*eta*eta*eta;
case 25:
return 0.;
case 26:
return xi*xi*zeta;
case 27:
return 2.*xi*eta*zeta;
case 28:
return 3.*eta*eta*zeta;
case 29:
return 0.;
case 30:
return xi*zeta*zeta;
case 31:
return 2.*eta*zeta*zeta;
case 32:
return 0.;
case 33:
return zeta*zeta*zeta;
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = ny;
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=1; index < ny; index++)
val *= eta;
for (unsigned int index=0; index != nz; index++)
val *= zeta;
return val;
}
}
// d()/dzeta
case 2:
{
switch (i)
{
// constant
case 0:
return 0.;
// linear
case 1:
return 0.;
case 2:
return 0.;
case 3:
return 1.;
// quadratic
case 4:
return 0.;
case 5:
return 0.;
case 6:
return 0.;
case 7:
return xi;
case 8:
return eta;
case 9:
return 2.*zeta;
// cubic
case 10:
return 0.;
case 11:
return 0.;
case 12:
return 0.;
case 13:
return 0.;
case 14:
return xi*xi;
case 15:
return xi*eta;
case 16:
return eta*eta;
case 17:
return 2.*xi*zeta;
case 18:
return 2.*eta*zeta;
case 19:
return 3.*zeta*zeta;
// quartics
case 20:
return 0.;
case 21:
return 0.;
case 22:
return 0.;
case 23:
return 0.;
case 24:
return 0.;
case 25:
return xi*xi*xi;
case 26:
return xi*xi*eta;
case 27:
return xi*eta*eta;
case 28:
return eta*eta*eta;
case 29:
return 2.*xi*xi*zeta;
case 30:
return 2.*xi*eta*zeta;
case 31:
return 2.*eta*eta*zeta;
case 32:
return 3.*xi*zeta*zeta;
case 33:
return 3.*eta*zeta*zeta;
case 34:
return 4.*zeta*zeta*zeta;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nz;
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
for (unsigned int index=1; index < nz; index++)
val *= zeta;
return val;
}
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, BERNSTEIN >::shape_deriv | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 205 of file fe_bernstein_shape_1D.C.
References libMesh::Utility::factorial(), libMesh::FIFTH, libMesh::FIRST, libMesh::FOURTH, libMesh::libmesh_assert(), std::pow(), libMesh::Utility::pow(), libMesh::Real, libMesh::SECOND, libMesh::SIXTH, and libMesh::THIRD.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
const Real xi = p(0);
using Utility::pow;
switch (order)
{
case FIRST:
switch(i)
{
case 0:
return -.5;
case 1:
return .5;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case SECOND:
switch(i)
{
case 0:
return (xi-1.)*.5;
case 1:
return (xi+1.)*.5;
case 2:
return -xi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case THIRD:
switch(i)
{
case 0:
return -0.375*pow<2>(1.-xi);
case 1:
return 0.375*pow<2>(1.+xi);
case 2:
return -0.375 -.75*xi +1.125*pow<2>(xi);
case 3:
return 0.375 -.75*xi -1.125*pow<2>(xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case FOURTH:
switch(i)
{
case 0:
return -0.25*pow<3>(1.-xi);
case 1:
return 0.25*pow<3>(1.+xi);
case 2:
return -0.5 +1.5*pow<2>(xi)-pow<3>(xi);
case 3:
return 1.5*(pow<3>(xi)-xi);
case 4:
return 0.5 -1.5*pow<2>(xi)-pow<3>(xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case FIFTH:
switch(i)
{
case 0:
return -(5./32.)*pow<4>(xi-1.);
case 1:
return (5./32.)*pow<4>(xi+1.);
case 2:
return (5./32.)*pow<4>(1.-xi) -(5./8.)*(1.+xi)*pow<3>(1.-xi);
case 3:
return (5./ 8.)*(1.+xi)*pow<3>(1.-xi) -(15./16.)*pow<2>(1.+xi)*pow<2>(1.-xi);
case 4:
return -(5./ 8.)*pow<3>(1.+xi)*(1.-xi) +(15./16.)*pow<2>(1.+xi)*pow<2>(1.-xi);
case 5:
return (5./ 8.)*pow<3>(1.+xi)*(1.-xi) -(5./32.)*pow<4>(1.+xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
case SIXTH:
switch(i)
{
case 0:
return -( 3./32.)*pow<5>(1.-xi);
case 1:
return ( 3./32.)*pow<5>(1.+xi);
case 2:
return ( 3./32.)*pow<5>(1.-xi)-(15./32.)*(1.+xi)*pow<4>(1.-xi);
case 3:
return (15./32.)*(1.+xi)*pow<4>(1.-xi)-(15./16.)*pow<2>(1.+xi)*pow<3>(1.-xi);
case 4:
return -(15./ 8.)*xi +(15./4.)*pow<3>(xi)-(15./8.)*pow<5>(xi);
case 5:
return -(15./32.)*(1.-xi)*pow<4>(1.+xi)+(15./16.)*pow<2>(1.-xi)*pow<3>(1.+xi);
case 6:
return (15./32.)*pow<4>(1.+xi)*(1.-xi)-(3./32.)*pow<5>(1.+xi);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
default:
{
libmesh_assert (order>6);
// Use this for arbitrary orders
const int p_order = static_cast<unsigned int>(order);
const int m = p_order-(i-1);
const int n = (i-1);
unsigned int binomial_p_i = 1;
// the binomial coefficient (p choose n)
if (i>1)
binomial_p_i = Utility::factorial(p_order)
/ (Utility::factorial(n)*Utility::factorial(p_order-n));
switch(i)
{
case 0:
return binomial_p_i * (-1./2.) * p_order * std::pow((1-xi)/2,static_cast<int>(p_order-1));
case 1:
return binomial_p_i * ( 1./2.) * p_order * std::pow((1+xi)/2,static_cast<int>(p_order-1));
default:
{
return binomial_p_i * (1./2. * n * std::pow((1+xi)/2,n-1) * std::pow((1-xi)/2,m)
- 1./2. * m * std::pow((1+xi)/2,n) * std::pow((1-xi)/2,m-1));
}
}
}
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 3, NEDELEC_ONE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 206 of file fe_nedelec_one_shape_3D.C.
References libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, libMesh::TET10, libMesh::TOLERANCE, and libMesh::Elem::type().
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
libmesh_assert_less (j, 3);
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
case FIRST:
{
switch (elem->type())
{
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 12);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// Even with a loose inverse_map tolerance we ought to
// be nearly on the element interior in master
// coordinates
libmesh_assert_less_equal ( std::fabs(xi), 1.0+TOLERANCE );
libmesh_assert_less_equal ( std::fabs(eta), 1.0+TOLERANCE );
libmesh_assert_less_equal ( std::fabs(zeta), 1.0+TOLERANCE );
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
case 2:
case 8:
case 10:
return RealGradient();
case 1:
{
if( elem->point(1) > elem->point(2) )
return RealGradient( 0.0, -0.125*(1.0-zeta) );
else
return RealGradient( 0.0, 0.125*(1.0-zeta) );
}
case 3:
{
if( elem->point(3) > elem->point(0) )
return RealGradient( 0.0, 0.125*(-1.0+zeta) );
else
return RealGradient( 0.0, -0.125*(-1.0+zeta) );
}
case 4:
{
if( elem->point(0) > elem->point(4) )
return RealGradient( 0.0, 0.0, -0.125*(-1.0+eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(-1.0+eta) );
}
case 5:
{
if( elem->point(1) > elem->point(5) )
return RealGradient( 0.0, 0.0, -0.125*(1.0-eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0-eta) );
}
case 6:
{
if( elem->point(2) > elem->point(6) )
return RealGradient( 0.0, 0.0, -0.125*(1.0+eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0+eta) );
}
case 7:
{
if( elem->point(3) > elem->point(7) )
return RealGradient( 0.0, 0.0, -0.125*(-1.0-eta) );
else
return RealGradient( 0.0, 0.0, 0.125*(-1.0-eta) );
}
case 9:
{
if( elem->point(5) > elem->point(6) )
return RealGradient( 0.0, -0.125*(1.0+zeta), 0.0 );
else
return RealGradient( 0.0, 0.125*(1.0+zeta), 0.0 );
}
case 11:
{
if( elem->point(4) > elem->point(7) )
return RealGradient( 0.0, -0.125*(-1.0-zeta), 0.0 );
else
return RealGradient( 0.0, 0.125*(-1.0-zeta), 0.0 );
}
default:
libmesh_error_msg("Invalid i = " << i);
} // switch(i)
} // j=0
// d()/deta
case 1:
{
switch(i)
{
case 1:
case 3:
case 9:
case 11:
return RealGradient();
case 0:
{
if( elem->point(0) > elem->point(1) )
return RealGradient( -0.125*(-1.0+zeta), 0.0, 0.0 );
else
return RealGradient( 0.125*(-1.0+zeta), 0.0, 0.0 );
}
case 2:
{
if( elem->point(2) > elem->point(3) )
return RealGradient( 0.125*(1.0-zeta), 0.0, 0.0 );
else
return RealGradient( -0.125*(1.0-zeta), 0.0, 0.0 );
}
case 4:
{
if( elem->point(0) > elem->point(4) )
return RealGradient( 0.0, 0.0, -0.125*(-1.0+xi) );
else
return RealGradient( 0.0, 0.0, 0.125*(-1.0+xi) );
}
case 5:
{
if( elem->point(1) > elem->point(5) )
return RealGradient( 0.0, 0.0, -0.125*(-1.0-xi) );
else
return RealGradient( 0.0, 0.0, 0.125*(-1.0-xi) );
}
case 6:
{
if( elem->point(2) > elem->point(6) )
return RealGradient( 0.0, 0.0, -0.125*(1.0+xi) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0+xi) );
}
case 7:
{
if( elem->point(3) > elem->point(7) )
return RealGradient( 0.0, 0.0, -0.125*(1.0-xi) );
else
return RealGradient( 0.0, 0.0, 0.125*(1.0-xi) );
}
case 8:
{
if( elem->point(4) > elem->point(5) )
return RealGradient( -0.125*(-1.0-zeta), 0.0, 0.0 );
else
return RealGradient( 0.125*(-1.0-zeta), 0.0, 0.0 );
}
case 10:
{
if( elem->point(7) > elem->point(6) )
return RealGradient( -0.125*(1.0+zeta), 0.0, 0.0 );
else
return RealGradient( 0.125*(1.0+zeta), 0.0, 0.0 );
}
default:
libmesh_error_msg("Invalid i = " << i);
} // switch(i)
} // j=1
// d()/dzeta
case 2:
{
switch(i)
{
case 4:
case 5:
case 6:
case 7:
return RealGradient();
case 0:
{
if( elem->point(0) > elem->point(1) )
return RealGradient( -0.125*(-1.0+eta), 0.0, 0.0 );
else
return RealGradient( 0.125*(-1.0+eta), 0.0, 0.0 );
}
case 1:
{
if( elem->point(1) > elem->point(2) )
return RealGradient( 0.0, -0.125*(-1.0-xi), 0.0 );
else
return RealGradient( 0.0, 0.125*(-1.0-xi), 0.0 );
}
case 2:
{
if( elem->point(2) > elem->point(3) )
return RealGradient( 0.125*(-1.0-eta), 0.0, 0.0 );
else
return RealGradient( -0.125*(-1.0-eta), 0.0, 0.0 );
}
case 3:
{
if( elem->point(3) > elem->point(0) )
return RealGradient( 0.0, 0.125*(-1.0+xi), 0.0 );
else
return RealGradient( 0.0, -0.125*(-1.0+xi), 0.0 );
}
case 8:
{
if( elem->point(4) > elem->point(5) )
return RealGradient( -0.125*(1.0-eta), 0.0, 0.0 );
else
return RealGradient( 0.125*(1.0-eta), 0.0, 0.0 );
}
case 9:
{
if( elem->point(5) > elem->point(6) )
return RealGradient( 0.0, -0.125*(1.0+xi), 0.0 );
else
return RealGradient( 0.0, 0.125*(1.0+xi), 0.0 );
}
case 10:
{
if( elem->point(7) > elem->point(6) )
return RealGradient( -0.125*(1.0+eta), 0.0, 0.0 );
else
return RealGradient( 0.125*(1.0+eta), 0.0, 0.0 );
}
case 11:
{
if( elem->point(4) > elem->point(7) )
return RealGradient( 0.0, -0.125*(1.0-xi), 0.0 );
else
return RealGradient( 0.0, 0.125*(1.0-xi), 0.0 );
}
default:
libmesh_error_msg("Invalid i = " << i);
} // switch(i)
} // j = 2
default:
libmesh_error_msg("Invalid j = " << j);
}
return RealGradient();
}
case TET10:
{
libmesh_assert_less (i, 6);
libmesh_not_implemented();
return RealGradient();
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << elem->type());
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << totalorder);
}
#endif
libmesh_error_msg("We'll never get here!");
return RealGradient();
}
| Real libMesh::FE< 2, LAGRANGE >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 221 of file fe_lagrange_shape_2D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::TRI3, and libMesh::TRI6.
{
#if LIBMESH_DIM > 1
libmesh_assert_less (j, 2);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
case QUAD4:
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 4);
// 0 1 2 3
static const unsigned int i0[] = {0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE2, FIRST, i1[i], eta));
// d()/deta
case 1:
return (FE<1,LAGRANGE>::shape (EDGE2, FIRST, i0[i], xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta));
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case TRI3:
case TRI6:
{
libmesh_assert_less (i, 3);
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
return dzeta0dxi;
case 1:
return dzeta1dxi;
case 2:
return dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d()/deta
case 1:
{
switch(i)
{
case 0:
return dzeta0deta;
case 1:
return dzeta1deta;
case 2:
return dzeta2deta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
case QUAD8:
{
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 8);
switch (j)
{
// d/dxi
case 0:
switch (i)
{
case 0:
return .25*(1. - eta)*((1. - xi)*(-1.) +
(-1.)*(-1. - xi - eta));
case 1:
return .25*(1. - eta)*((1. + xi)*(1.) +
(1.)*(-1. + xi - eta));
case 2:
return .25*(1. + eta)*((1. + xi)*(1.) +
(1.)*(-1. + xi + eta));
case 3:
return .25*(1. + eta)*((1. - xi)*(-1.) +
(-1.)*(-1. - xi + eta));
case 4:
return .5*(-2.*xi)*(1. - eta);
case 5:
return .5*(1.)*(1. - eta*eta);
case 6:
return .5*(-2.*xi)*(1. + eta);
case 7:
return .5*(-1.)*(1. - eta*eta);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
// d/deta
case 1:
switch (i)
{
case 0:
return .25*(1. - xi)*((1. - eta)*(-1.) +
(-1.)*(-1. - xi - eta));
case 1:
return .25*(1. + xi)*((1. - eta)*(-1.) +
(-1.)*(-1. + xi - eta));
case 2:
return .25*(1. + xi)*((1. + eta)*(1.) +
(1.)*(-1. + xi + eta));
case 3:
return .25*(1. - xi)*((1. + eta)*(1.) +
(1.)*(-1. - xi + eta));
case 4:
return .5*(1. - xi*xi)*(-1.);
case 5:
return .5*(1. + xi)*(-2.*eta);
case 6:
return .5*(1. - xi*xi)*(1.);
case 7:
return .5*(1. - xi)*(-2.*eta);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta));
// d()/deta
case 1:
return (FE<1,LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta));
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case TRI6:
{
libmesh_assert_less (i, 6);
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
switch(j)
{
case 0:
{
switch(i)
{
case 0:
return (4.*zeta0-1.)*dzeta0dxi;
case 1:
return (4.*zeta1-1.)*dzeta1dxi;
case 2:
return (4.*zeta2-1.)*dzeta2dxi;
case 3:
return 4.*zeta1*dzeta0dxi + 4.*zeta0*dzeta1dxi;
case 4:
return 4.*zeta2*dzeta1dxi + 4.*zeta1*dzeta2dxi;
case 5:
return 4.*zeta2*dzeta0dxi + 4*zeta0*dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
case 1:
{
switch(i)
{
case 0:
return (4.*zeta0-1.)*dzeta0deta;
case 1:
return (4.*zeta1-1.)*dzeta1deta;
case 2:
return (4.*zeta2-1.)*dzeta2deta;
case 3:
return 4.*zeta1*dzeta0deta + 4.*zeta0*dzeta1deta;
case 4:
return 4.*zeta2*dzeta1deta + 4.*zeta1*dzeta2deta;
case 5:
return 4.*zeta2*dzeta0deta + 4*zeta0*dzeta2deta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order: " << order);
}
libmesh_error_msg("We'll never get here!");
#endif // LIBMESH_DIM > 1
return 0.;
}
| Real libMesh::FE< 2, L2_LAGRANGE >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 222 of file fe_l2_lagrange_shape_2D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::TRI3, and libMesh::TRI6.
{
#if LIBMESH_DIM > 1
libmesh_assert_less (j, 2);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
case QUAD4:
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 4);
// 0 1 2 3
static const unsigned int i0[] = {0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i1[i], eta));
// d()/deta
case 1:
return (FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta));
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case TRI3:
case TRI6:
{
libmesh_assert_less (i, 3);
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
return dzeta0dxi;
case 1:
return dzeta1dxi;
case 2:
return dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d()/deta
case 1:
{
switch(i)
{
case 0:
return dzeta0deta;
case 1:
return dzeta1deta;
case 2:
return dzeta2deta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
case QUAD8:
{
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 8);
switch (j)
{
// d/dxi
case 0:
switch (i)
{
case 0:
return .25*(1. - eta)*((1. - xi)*(-1.) +
(-1.)*(-1. - xi - eta));
case 1:
return .25*(1. - eta)*((1. + xi)*(1.) +
(1.)*(-1. + xi - eta));
case 2:
return .25*(1. + eta)*((1. + xi)*(1.) +
(1.)*(-1. + xi + eta));
case 3:
return .25*(1. + eta)*((1. - xi)*(-1.) +
(-1.)*(-1. - xi + eta));
case 4:
return .5*(-2.*xi)*(1. - eta);
case 5:
return .5*(1.)*(1. - eta*eta);
case 6:
return .5*(-2.*xi)*(1. + eta);
case 7:
return .5*(-1.)*(1. - eta*eta);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
// d/deta
case 1:
switch (i)
{
case 0:
return .25*(1. - xi)*((1. - eta)*(-1.) +
(-1.)*(-1. - xi - eta));
case 1:
return .25*(1. + xi)*((1. - eta)*(-1.) +
(-1.)*(-1. + xi - eta));
case 2:
return .25*(1. + xi)*((1. + eta)*(1.) +
(1.)*(-1. + xi + eta));
case 3:
return .25*(1. - xi)*((1. + eta)*(1.) +
(1.)*(-1. - xi + eta));
case 4:
return .5*(1. - xi*xi)*(-1.);
case 5:
return .5*(1. + xi)*(-2.*eta);
case 6:
return .5*(1. - xi*xi)*(1.);
case 7:
return .5*(1. - xi)*(-2.*eta);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta));
// d()/deta
case 1:
return (FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta));
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case TRI6:
{
libmesh_assert_less (i, 6);
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta0 = 1. - zeta1 - zeta2;
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
switch(j)
{
case 0:
{
switch(i)
{
case 0:
return (4.*zeta0-1.)*dzeta0dxi;
case 1:
return (4.*zeta1-1.)*dzeta1dxi;
case 2:
return (4.*zeta2-1.)*dzeta2dxi;
case 3:
return 4.*zeta1*dzeta0dxi + 4.*zeta0*dzeta1dxi;
case 4:
return 4.*zeta2*dzeta1dxi + 4.*zeta1*dzeta2dxi;
case 5:
return 4.*zeta2*dzeta0dxi + 4*zeta0*dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
case 1:
{
switch(i)
{
case 0:
return (4.*zeta0-1.)*dzeta0deta;
case 1:
return (4.*zeta1-1.)*dzeta1deta;
case 2:
return (4.*zeta2-1.)*dzeta2deta;
case 3:
return 4.*zeta1*dzeta0deta + 4.*zeta0*dzeta1deta;
case 4:
return 4.*zeta2*dzeta1deta + 4.*zeta1*dzeta2deta;
case 5:
return 4.*zeta2*dzeta0deta + 4*zeta0*dzeta2deta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order: " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| Real libMesh::FE< 1, L2_LAGRANGE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 225 of file fe_l2_lagrange_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,L2_LAGRANGE>::shape_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 1, LAGRANGE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 225 of file fe_lagrange_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,LAGRANGE>::shape_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, L2_HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 227 of file fe_l2_hierarchic_shape_2D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 2, HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 227 of file fe_hierarchic_shape_2D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 2, L2_HIERARCHIC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 240 of file fe_l2_hierarchic_shape_2D.C.
References libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::square_number_column, libMesh::square_number_row, libMesh::TRI3, libMesh::TRI6, and libMesh::Elem::type().
{
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order+elem->p_level());
libmesh_assert_greater (totalorder, 0);
switch (type)
{
// 1st & 2nd-order Hierarchics.
case TRI3:
case TRI6:
{
const Real eps = 1.e-6;
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,L2_HIERARCHIC>::shape(elem, order, i, pp) -
FE<2,L2_HIERARCHIC>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,L2_HIERARCHIC>::shape(elem, order, i, pp) -
FE<2,L2_HIERARCHIC>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
case QUAD4:
libmesh_assert_less (totalorder, 2);
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
// Example i, i0, i1 values for totalorder = 5:
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
// static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5};
// static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5};
unsigned int i0, i1;
// Vertex DoFs
if (i == 0)
{ i0 = 0; i1 = 0; }
else if (i == 1)
{ i0 = 1; i1 = 0; }
else if (i == 2)
{ i0 = 1; i1 = 1; }
else if (i == 3)
{ i0 = 0; i1 = 1; }
// Edge DoFs
else if (i < totalorder + 3u)
{ i0 = i - 2; i1 = 0; }
else if (i < 2u*totalorder + 2)
{ i0 = 1; i1 = i - totalorder - 1; }
else if (i < 3u*totalorder + 1u)
{ i0 = i - 2u*totalorder; i1 = 1; }
else if (i < 4u*totalorder)
{ i0 = 0; i1 = i - 3u*totalorder + 1; }
// Interior DoFs
else
{
unsigned int basisnum = i - 4*totalorder;
i0 = square_number_column[basisnum] + 2;
i1 = square_number_row[basisnum] + 2;
}
// Flip odd degree of freedom values if necessary
// to keep continuity on sides
Real f = 1.;
if ((i0%2) && (i0 > 2) && (i1 == 0))
f = (elem->point(0) > elem->point(1))?-1.:1.;
else if ((i0%2) && (i0>2) && (i1 == 1))
f = (elem->point(3) > elem->point(2))?-1.:1.;
else if ((i0 == 0) && (i1%2) && (i1>2))
f = (elem->point(0) > elem->point(3))?-1.:1.;
else if ((i0 == 1) && (i1%2) && (i1>2))
f = (elem->point(1) > elem->point(2))?-1.:1.;
switch (j)
{
// d()/dxi
case 0:
return f*(FE<1,L2_HIERARCHIC>::shape_deriv(EDGE3, totalorder, i0, 0, xi)*
FE<1,L2_HIERARCHIC>::shape (EDGE3, totalorder, i1, eta));
// d()/deta
case 1:
return f*(FE<1,L2_HIERARCHIC>::shape (EDGE3, totalorder, i0, xi)*
FE<1,L2_HIERARCHIC>::shape_deriv(EDGE3, totalorder, i1, 0, eta));
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
return 0.;
}
| Real libMesh::FE< 2, HIERARCHIC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 240 of file fe_hierarchic_shape_2D.C.
References libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::square_number_column, libMesh::square_number_row, libMesh::TRI3, libMesh::TRI6, and libMesh::Elem::type().
{
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order+elem->p_level());
libmesh_assert_greater (totalorder, 0);
switch (type)
{
// 1st & 2nd-order Hierarchics.
case TRI3:
case TRI6:
{
const Real eps = 1.e-6;
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,HIERARCHIC>::shape(elem, order, i, pp) -
FE<2,HIERARCHIC>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,HIERARCHIC>::shape(elem, order, i, pp) -
FE<2,HIERARCHIC>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
case QUAD4:
libmesh_assert_less (totalorder, 2);
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
// Example i, i0, i1 values for totalorder = 5:
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
// static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5};
// static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5};
unsigned int i0, i1;
// Vertex DoFs
if (i == 0)
{ i0 = 0; i1 = 0; }
else if (i == 1)
{ i0 = 1; i1 = 0; }
else if (i == 2)
{ i0 = 1; i1 = 1; }
else if (i == 3)
{ i0 = 0; i1 = 1; }
// Edge DoFs
else if (i < totalorder + 3u)
{ i0 = i - 2; i1 = 0; }
else if (i < 2u*totalorder + 2)
{ i0 = 1; i1 = i - totalorder - 1; }
else if (i < 3u*totalorder + 1u)
{ i0 = i - 2u*totalorder; i1 = 1; }
else if (i < 4u*totalorder)
{ i0 = 0; i1 = i - 3u*totalorder + 1; }
// Interior DoFs
else
{
unsigned int basisnum = i - 4*totalorder;
i0 = square_number_column[basisnum] + 2;
i1 = square_number_row[basisnum] + 2;
}
// Flip odd degree of freedom values if necessary
// to keep continuity on sides
Real f = 1.;
if ((i0%2) && (i0 > 2) && (i1 == 0))
f = (elem->point(0) > elem->point(1))?-1.:1.;
else if ((i0%2) && (i0>2) && (i1 == 1))
f = (elem->point(3) > elem->point(2))?-1.:1.;
else if ((i0 == 0) && (i1%2) && (i1>2))
f = (elem->point(0) > elem->point(3))?-1.:1.;
else if ((i0 == 1) && (i1%2) && (i1>2))
f = (elem->point(1) > elem->point(2))?-1.:1.;
switch (j)
{
// d()/dxi
case 0:
return f*(FE<1,HIERARCHIC>::shape_deriv(EDGE3, totalorder, i0, 0, xi)*
FE<1,HIERARCHIC>::shape (EDGE3, totalorder, i1, eta));
// d()/deta
case 1:
return f*(FE<1,HIERARCHIC>::shape (EDGE3, totalorder, i0, xi)*
FE<1,HIERARCHIC>::shape_deriv(EDGE3, totalorder, i1, 0, eta));
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
return 0.;
}
| Real libMesh::FE< 3, XYZ >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 249 of file fe_xyz_shape_3D.C.
{
libmesh_error_msg("XYZ polynomials require the element \nbecause the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 2, HERMITE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 252 of file fe_hermite_shape_2D.C.
{
libmesh_error_msg("Hermite elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 1, HERMITE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 260 of file fe_hermite_shape_1D.C.
{
libmesh_error_msg("Hermite elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 3, XYZ >::shape_deriv | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | point_in | ||
| ) |
Definition at line 262 of file fe_xyz_shape_3D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, and libMesh::x.
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
libmesh_assert_less (j, 3);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = Point(0.,0.,0.);
for (unsigned int p = 0; p < elem->n_nodes(); p++)
for (unsigned int d = 0; d < 3; d++)
{
const Real distance = std::abs(centroid(d) - elem->point(p)(d));
max_distance(d) = std::max(distance, max_distance(d));
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real y = point_in(1);
const Real z = point_in(2);
const Real xc = centroid(0);
const Real yc = centroid(1);
const Real zc = centroid(2);
const Real distx = max_distance(0);
const Real disty = max_distance(1);
const Real distz = max_distance(2);
const Real dx = (x - xc)/distx;
const Real dy = (y - yc)/disty;
const Real dz = (z - zc)/distz;
#ifndef NDEBUG
// totalorder is only used in the assertion below, so
// we avoid declaring it when asserts are not active.
const unsigned int totalorder = static_cast<Order>(order + elem->p_level());
#endif
libmesh_assert_less (i, (static_cast<unsigned int>(totalorder)+1)*
(static_cast<unsigned int>(totalorder)+2)*
(static_cast<unsigned int>(totalorder)+3)/6);
switch (j)
{
// d()/dx
case 0:
{
switch (i)
{
// constant
case 0:
return 0.;
// linear
case 1:
return 1./distx;
case 2:
return 0.;
case 3:
return 0.;
// quadratic
case 4:
return 2.*dx/distx;
case 5:
return dy/distx;
case 6:
return 0.;
case 7:
return dz/distx;
case 8:
return 0.;
case 9:
return 0.;
// cubic
case 10:
return 3.*dx*dx/distx;
case 11:
return 2.*dx*dy/distx;
case 12:
return dy*dy/distx;
case 13:
return 0.;
case 14:
return 2.*dx*dz/distx;
case 15:
return dy*dz/distx;
case 16:
return 0.;
case 17:
return dz*dz/distx;
case 18:
return 0.;
case 19:
return 0.;
// quartics
case 20:
return 4.*dx*dx*dx/distx;
case 21:
return 3.*dx*dx*dy/distx;
case 22:
return 2.*dx*dy*dy/distx;
case 23:
return dy*dy*dy/distx;
case 24:
return 0.;
case 25:
return 3.*dx*dx*dz/distx;
case 26:
return 2.*dx*dy*dz/distx;
case 27:
return dy*dy*dz/distx;
case 28:
return 0.;
case 29:
return 2.*dx*dz*dz/distx;
case 30:
return dy*dz*dz/distx;
case 31:
return 0.;
case 32:
return dz*dz*dz/distx;
case 33:
return 0.;
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx;
for (unsigned int index=1; index < nx; index++)
val *= dx;
for (unsigned int index=0; index != ny; index++)
val *= dy;
for (unsigned int index=0; index != nz; index++)
val *= dz;
return val/distx;
}
}
// d()/dy
case 1:
{
switch (i)
{
// constant
case 0:
return 0.;
// linear
case 1:
return 0.;
case 2:
return 1./disty;
case 3:
return 0.;
// quadratic
case 4:
return 0.;
case 5:
return dx/disty;
case 6:
return 2.*dy/disty;
case 7:
return 0.;
case 8:
return dz/disty;
case 9:
return 0.;
// cubic
case 10:
return 0.;
case 11:
return dx*dx/disty;
case 12:
return 2.*dx*dy/disty;
case 13:
return 3.*dy*dy/disty;
case 14:
return 0.;
case 15:
return dx*dz/disty;
case 16:
return 2.*dy*dz/disty;
case 17:
return 0.;
case 18:
return dz*dz/disty;
case 19:
return 0.;
// quartics
case 20:
return 0.;
case 21:
return dx*dx*dx/disty;
case 22:
return 2.*dx*dx*dy/disty;
case 23:
return 3.*dx*dy*dy/disty;
case 24:
return 4.*dy*dy*dy/disty;
case 25:
return 0.;
case 26:
return dx*dx*dz/disty;
case 27:
return 2.*dx*dy*dz/disty;
case 28:
return 3.*dy*dy*dz/disty;
case 29:
return 0.;
case 30:
return dx*dz*dz/disty;
case 31:
return 2.*dy*dz*dz/disty;
case 32:
return 0.;
case 33:
return dz*dz*dz/disty;
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = ny;
for (unsigned int index=0; index != nx; index++)
val *= dx;
for (unsigned int index=1; index < ny; index++)
val *= dy;
for (unsigned int index=0; index != nz; index++)
val *= dz;
return val/disty;
}
}
// d()/dz
case 2:
{
switch (i)
{
// constant
case 0:
return 0.;
// linear
case 1:
return 0.;
case 2:
return 0.;
case 3:
return 1./distz;
// quadratic
case 4:
return 0.;
case 5:
return 0.;
case 6:
return 0.;
case 7:
return dx/distz;
case 8:
return dy/distz;
case 9:
return 2.*dz/distz;
// cubic
case 10:
return 0.;
case 11:
return 0.;
case 12:
return 0.;
case 13:
return 0.;
case 14:
return dx*dx/distz;
case 15:
return dx*dy/distz;
case 16:
return dy*dy/distz;
case 17:
return 2.*dx*dz/distz;
case 18:
return 2.*dy*dz/distz;
case 19:
return 3.*dz*dz/distz;
// quartics
case 20:
return 0.;
case 21:
return 0.;
case 22:
return 0.;
case 23:
return 0.;
case 24:
return 0.;
case 25:
return dx*dx*dx/distz;
case 26:
return dx*dx*dy/distz;
case 27:
return dx*dy*dy/distz;
case 28:
return dy*dy*dy/distz;
case 29:
return 2.*dx*dx*dz/distz;
case 30:
return 2.*dx*dy*dz/distz;
case 31:
return 2.*dy*dy*dz/distz;
case 32:
return 3.*dx*dz*dz/distz;
case 33:
return 3.*dy*dz*dz/distz;
case 34:
return 4.*dz*dz*dz/distz;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nz;
for (unsigned int index=0; index != nx; index++)
val *= dx;
for (unsigned int index=0; index != ny; index++)
val *= dy;
for (unsigned int index=1; index < nz; index++)
val *= dz;
return val/distz;
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, HERMITE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 265 of file fe_hermite_shape_2D.C.
References libMesh::FEHermite< Dim >::hermite_raw_shape(), libMesh::FEHermite< Dim >::hermite_raw_shape_deriv(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert (j == 0 || j == 1);
std::vector<std::vector<Real> > dxdxi(2, std::vector<Real>(2, 0));
#ifdef DEBUG
std::vector<Real> dxdeta(2), dydxi(2);
#endif
hermite_compute_coefs(elem,dxdxi
#ifdef DEBUG
,dxdeta,dydxi
#endif
);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (type)
{
case QUAD4:
libmesh_assert_less (totalorder, 4);
case QUAD8:
case QUAD9:
{
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
std::vector<unsigned int> bases1D;
Real coef = hermite_bases_2D(bases1D, dxdxi, totalorder, i);
switch (j)
{
case 0:
return coef *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1));
case 1:
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[1],p(1));
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, CLOUGH >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 269 of file fe_clough_shape_1D.C.
{
libmesh_error_msg("Clough-Tocher elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 1, HERMITE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned | int, | ||
| const Point & | p | ||
| ) |
Definition at line 273 of file fe_hermite_shape_1D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FEHermite< Dim >::hermite_raw_shape_deriv(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
// Coefficient naming: d(1)d(2n) is the coefficient of the
// global shape function corresponding to value 1 in terms of the
// local shape function corresponding to normal derivative 2
Real d1xd1x, d2xd2x;
hermite_compute_coefs(elem, d1xd1x, d2xd2x);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// Hermite cubic shape functions
case THIRD:
{
switch (type)
{
// C1 functions on the C1 cubic edge
case EDGE2:
case EDGE3:
{
switch (i)
{
case 0:
return FEHermite<1>::hermite_raw_shape_deriv(0, p(0));
case 1:
return d1xd1x * FEHermite<1>::hermite_raw_shape_deriv(2, p(0));
case 2:
return FEHermite<1>::hermite_raw_shape_deriv(1, p(0));
case 3:
return d2xd2x * FEHermite<1>::hermite_raw_shape_deriv(3, p(0));
default:
return FEHermite<1>::hermite_raw_shape_deriv(i, p(0));
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, CLOUGH >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 282 of file fe_clough_shape_1D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
clough_compute_coefs(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 3rd-order C1 cubic element
case THIRD:
{
switch (type)
{
// C1 functions on the C1 cubic edge
case EDGE2:
case EDGE3:
{
switch (i)
{
case 0:
return clough_raw_shape_deriv(0, j, p);
case 1:
return clough_raw_shape_deriv(1, j, p);
case 2:
return d1xd1x * clough_raw_shape_deriv(2, j, p);
case 3:
return d2xd2x * clough_raw_shape_deriv(3, j, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, MONOMIAL >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 306 of file fe_monomial_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// by default call the orientation-independent shape functions
return FE<2,MONOMIAL>::shape_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 1, BERNSTEIN >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 366 of file fe_bernstein_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,BERNSTEIN>::shape_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 3, L2_LAGRANGE >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 374 of file fe_l2_lagrange_shape_3D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID5, libMesh::Real, libMesh::SECOND, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, and libMesh::x.
{
#if LIBMESH_DIM == 3
libmesh_assert_less (j, 3);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
// trilinear hexahedral shape functions
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 8);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1};
switch(j)
{
case 0:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i2[i], zeta));
case 1:
return (FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta)*
FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i2[i], zeta));
case 2:
return (FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape (EDGE2, FIRST, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// linear tetrahedral shape functions
case TET4:
case TET10:
{
libmesh_assert_less (i, 4);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta3dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
const Real dzeta3deta = 0.;
const Real dzeta0dzeta = -1.;
const Real dzeta1dzeta = 0.;
const Real dzeta2dzeta = 0.;
const Real dzeta3dzeta = 1.;
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
return dzeta0dxi;
case 1:
return dzeta1dxi;
case 2:
return dzeta2dxi;
case 3:
return dzeta3dxi;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/deta
case 1:
{
switch(i)
{
case 0:
return dzeta0deta;
case 1:
return dzeta1deta;
case 2:
return dzeta2deta;
case 3:
return dzeta3deta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/dzeta
case 2:
{
switch(i)
{
case 0:
return dzeta0dzeta;
case 1:
return dzeta1dzeta;
case 2:
return dzeta2dzeta;
case 3:
return dzeta3dzeta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// linear prism shape functions
case PRISM6:
case PRISM15:
case PRISM18:
{
libmesh_assert_less (i, 6);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2};
switch (j)
{
// d()/dxi
case 0:
return (FE<2,L2_LAGRANGE>::shape_deriv(TRI3, FIRST, i1[i], 0, p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i0[i], p1d));
// d()/deta
case 1:
return (FE<2,L2_LAGRANGE>::shape_deriv(TRI3, FIRST, i1[i], 1, p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE2, FIRST, i0[i], p1d));
// d()/dzeta
case 2:
return (FE<2,L2_LAGRANGE>::shape(TRI3, FIRST, i1[i], p2d)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, p1d));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// linear pyramid shape functions
case PYRAMID5:
{
libmesh_assert_less (i, 5);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
switch (j)
{
// d/dxi
case 0:
switch(i)
{
case 0:
return .25*(zeta + eta - 1.)/((1. - zeta) + eps);
case 1:
return -.25*(zeta + eta - 1.)/((1. - zeta) + eps);
case 2:
return -.25*(zeta - eta - 1.)/((1. - zeta) + eps);
case 3:
return .25*(zeta - eta - 1.)/((1. - zeta) + eps);
case 4:
return 0;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/deta
case 1:
switch(i)
{
case 0:
return .25*(zeta + xi - 1.)/((1. - zeta) + eps);
case 1:
return .25*(zeta - xi - 1.)/((1. - zeta) + eps);
case 2:
return -.25*(zeta - xi - 1.)/((1. - zeta) + eps);
case 3:
return -.25*(zeta + xi - 1.)/((1. - zeta) + eps);
case 4:
return 0;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dzeta
case 2:
switch(i)
{
case 0:
{
const Real a=1.;
const Real b=1.;
return .25*(((zeta + a*xi - 1.)*(zeta + b*eta - 1.) +
(1. - zeta)*((zeta + a*xi -1.) + (zeta + b*eta - 1.)))/
((1. - zeta)*(1. - zeta) + eps));
}
case 1:
{
const Real a=-1.;
const Real b=1.;
return .25*(((zeta + a*xi - 1.)*(zeta + b*eta - 1.) +
(1. - zeta)*((zeta + a*xi -1.) + (zeta + b*eta - 1.)))/
((1. - zeta)*(1. - zeta) + eps));
}
case 2:
{
const Real a=-1.;
const Real b=-1.;
return .25*(((zeta + a*xi - 1.)*(zeta + b*eta - 1.) +
(1. - zeta)*((zeta + a*xi -1.) + (zeta + b*eta - 1.)))/
((1. - zeta)*(1. - zeta) + eps));
}
case 3:
{
const Real a=1.;
const Real b=-1.;
return .25*(((zeta + a*xi - 1.)*(zeta + b*eta - 1.) +
(1. - zeta)*((zeta + a*xi -1.) + (zeta + b*eta - 1.)))/
((1. - zeta)*(1. - zeta) + eps));
}
case 4:
return 1.;
default:
libmesh_error_msg("Invalid i = " << i);
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
// serendipity hexahedral quadratic shape functions
case HEX20:
{
libmesh_assert_less (i, 20);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// these functions are defined for (x,y,z) in [0,1]^3
// so transform the locations
const Real x = .5*(xi + 1.);
const Real y = .5*(eta + 1.);
const Real z = .5*(zeta + 1.);
// and don't forget the chain rule!
switch (j)
{
// d/dx*dx/dxi
case 0:
switch (i)
{
case 0:
return .5*(1. - y)*(1. - z)*((1. - x)*(-2.) +
(-1.)*(1. - 2.*x - 2.*y - 2.*z));
case 1:
return .5*(1. - y)*(1. - z)*(x*(2.) +
(1.)*(2.*x - 2.*y - 2.*z - 1.));
case 2:
return .5*y*(1. - z)*(x*(2.) +
(1.)*(2.*x + 2.*y - 2.*z - 3.));
case 3:
return .5*y*(1. - z)*((1. - x)*(-2.) +
(-1.)*(2.*y - 2.*x - 2.*z - 1.));
case 4:
return .5*(1. - y)*z*((1. - x)*(-2.) +
(-1.)*(2.*z - 2.*x - 2.*y - 1.));
case 5:
return .5*(1. - y)*z*(x*(2.) +
(1.)*(2.*x - 2.*y + 2.*z - 3.));
case 6:
return .5*y*z*(x*(2.) +
(1.)*(2.*x + 2.*y + 2.*z - 5.));
case 7:
return .5*y*z*((1. - x)*(-2.) +
(-1.)*(2.*y - 2.*x + 2.*z - 3.));
case 8:
return 2.*(1. - y)*(1. - z)*(1. - 2.*x);
case 9:
return 2.*y*(1. - y)*(1. - z);
case 10:
return 2.*y*(1. - z)*(1. - 2.*x);
case 11:
return 2.*y*(1. - y)*(1. - z)*(-1.);
case 12:
return 2.*(1. - y)*z*(1. - z)*(-1.);
case 13:
return 2.*(1. - y)*z*(1. - z);
case 14:
return 2.*y*z*(1. - z);
case 15:
return 2.*y*z*(1. - z)*(-1.);
case 16:
return 2.*(1. - y)*z*(1. - 2.*x);
case 17:
return 2.*y*(1. - y)*z;
case 18:
return 2.*y*z*(1. - 2.*x);
case 19:
return 2.*y*(1. - y)*z*(-1.);
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dy*dy/deta
case 1:
switch (i)
{
case 0:
return .5*(1. - x)*(1. - z)*((1. - y)*(-2.) +
(-1.)*(1. - 2.*x - 2.*y - 2.*z));
case 1:
return .5*x*(1. - z)*((1. - y)*(-2.) +
(-1.)*(2.*x - 2.*y - 2.*z - 1.));
case 2:
return .5*x*(1. - z)*(y*(2.) +
(1.)*(2.*x + 2.*y - 2.*z - 3.));
case 3:
return .5*(1. - x)*(1. - z)*(y*(2.) +
(1.)*(2.*y - 2.*x - 2.*z - 1.));
case 4:
return .5*(1. - x)*z*((1. - y)*(-2.) +
(-1.)*(2.*z - 2.*x - 2.*y - 1.));
case 5:
return .5*x*z*((1. - y)*(-2.) +
(-1.)*(2.*x - 2.*y + 2.*z - 3.));
case 6:
return .5*x*z*(y*(2.) +
(1.)*(2.*x + 2.*y + 2.*z - 5.));
case 7:
return .5*(1. - x)*z*(y*(2.) +
(1.)*(2.*y - 2.*x + 2.*z - 3.));
case 8:
return 2.*x*(1. - x)*(1. - z)*(-1.);
case 9:
return 2.*x*(1. - z)*(1. - 2.*y);
case 10:
return 2.*x*(1. - x)*(1. - z);
case 11:
return 2.*(1. - x)*(1. - z)*(1. - 2.*y);
case 12:
return 2.*(1. - x)*z*(1. - z)*(-1.);
case 13:
return 2.*x*z*(1. - z)*(-1.);
case 14:
return 2.*x*z*(1. - z);
case 15:
return 2.*(1. - x)*z*(1. - z);
case 16:
return 2.*x*(1. - x)*z*(-1.);
case 17:
return 2.*x*z*(1. - 2.*y);
case 18:
return 2.*x*(1. - x)*z;
case 19:
return 2.*(1. - x)*z*(1. - 2.*y);
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dz*dz/dzeta
case 2:
switch (i)
{
case 0:
return .5*(1. - x)*(1. - y)*((1. - z)*(-2.) +
(-1.)*(1. - 2.*x - 2.*y - 2.*z));
case 1:
return .5*x*(1. - y)*((1. - z)*(-2.) +
(-1.)*(2.*x - 2.*y - 2.*z - 1.));
case 2:
return .5*x*y*((1. - z)*(-2.) +
(-1.)*(2.*x + 2.*y - 2.*z - 3.));
case 3:
return .5*(1. - x)*y*((1. - z)*(-2.) +
(-1.)*(2.*y - 2.*x - 2.*z - 1.));
case 4:
return .5*(1. - x)*(1. - y)*(z*(2.) +
(1.)*(2.*z - 2.*x - 2.*y - 1.));
case 5:
return .5*x*(1. - y)*(z*(2.) +
(1.)*(2.*x - 2.*y + 2.*z - 3.));
case 6:
return .5*x*y*(z*(2.) +
(1.)*(2.*x + 2.*y + 2.*z - 5.));
case 7:
return .5*(1. - x)*y*(z*(2.) +
(1.)*(2.*y - 2.*x + 2.*z - 3.));
case 8:
return 2.*x*(1. - x)*(1. - y)*(-1.);
case 9:
return 2.*x*y*(1. - y)*(-1.);
case 10:
return 2.*x*(1. - x)*y*(-1.);
case 11:
return 2.*(1. - x)*y*(1. - y)*(-1.);
case 12:
return 2.*(1. - x)*(1. - y)*(1. - 2.*z);
case 13:
return 2.*x*(1. - y)*(1. - 2.*z);
case 14:
return 2.*x*y*(1. - 2.*z);
case 15:
return 2.*(1. - x)*y*(1. - 2.*z);
case 16:
return 2.*x*(1. - x)*(1. - y);
case 17:
return 2.*x*y*(1. - y);
case 18:
return 2.*x*(1. - x)*y;
case 19:
return 2.*(1. - x)*y*(1. - y);
default:
libmesh_error_msg("Invalid i = " << i);
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// triquadraic hexahedral shape funcions
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
switch(j)
{
case 0:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
case 1:
return (FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
case 2:
return (FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// quadratic tetrahedral shape functions
case TET10:
{
libmesh_assert_less (i, 10);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta3dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
const Real dzeta3deta = 0.;
const Real dzeta0dzeta = -1.;
const Real dzeta1dzeta = 0.;
const Real dzeta2dzeta = 0.;
const Real dzeta3dzeta = 1.;
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
return (4.*zeta0 - 1.)*dzeta0dxi;
case 1:
return (4.*zeta1 - 1.)*dzeta1dxi;
case 2:
return (4.*zeta2 - 1.)*dzeta2dxi;
case 3:
return (4.*zeta3 - 1.)*dzeta3dxi;
case 4:
return 4.*(zeta0*dzeta1dxi + dzeta0dxi*zeta1);
case 5:
return 4.*(zeta1*dzeta2dxi + dzeta1dxi*zeta2);
case 6:
return 4.*(zeta0*dzeta2dxi + dzeta0dxi*zeta2);
case 7:
return 4.*(zeta0*dzeta3dxi + dzeta0dxi*zeta3);
case 8:
return 4.*(zeta1*dzeta3dxi + dzeta1dxi*zeta3);
case 9:
return 4.*(zeta2*dzeta3dxi + dzeta2dxi*zeta3);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/deta
case 1:
{
switch(i)
{
case 0:
return (4.*zeta0 - 1.)*dzeta0deta;
case 1:
return (4.*zeta1 - 1.)*dzeta1deta;
case 2:
return (4.*zeta2 - 1.)*dzeta2deta;
case 3:
return (4.*zeta3 - 1.)*dzeta3deta;
case 4:
return 4.*(zeta0*dzeta1deta + dzeta0deta*zeta1);
case 5:
return 4.*(zeta1*dzeta2deta + dzeta1deta*zeta2);
case 6:
return 4.*(zeta0*dzeta2deta + dzeta0deta*zeta2);
case 7:
return 4.*(zeta0*dzeta3deta + dzeta0deta*zeta3);
case 8:
return 4.*(zeta1*dzeta3deta + dzeta1deta*zeta3);
case 9:
return 4.*(zeta2*dzeta3deta + dzeta2deta*zeta3);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/dzeta
case 2:
{
switch(i)
{
case 0:
return (4.*zeta0 - 1.)*dzeta0dzeta;
case 1:
return (4.*zeta1 - 1.)*dzeta1dzeta;
case 2:
return (4.*zeta2 - 1.)*dzeta2dzeta;
case 3:
return (4.*zeta3 - 1.)*dzeta3dzeta;
case 4:
return 4.*(zeta0*dzeta1dzeta + dzeta0dzeta*zeta1);
case 5:
return 4.*(zeta1*dzeta2dzeta + dzeta1dzeta*zeta2);
case 6:
return 4.*(zeta0*dzeta2dzeta + dzeta0dzeta*zeta2);
case 7:
return 4.*(zeta0*dzeta3dzeta + dzeta0dzeta*zeta3);
case 8:
return 4.*(zeta1*dzeta3dzeta + dzeta1dzeta*zeta3);
case 9:
return 4.*(zeta2*dzeta3dzeta + dzeta2dzeta*zeta3);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// quadradic prism shape functions
case PRISM18:
{
libmesh_assert_less (i, 18);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 3, 4, 5};
switch (j)
{
// d()/dxi
case 0:
return (FE<2,L2_LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 0, p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d()/deta
case 1:
return (FE<2,L2_LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 1, p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d()/dzeta
case 2:
return (FE<2,L2_LAGRANGE>::shape(TRI6, SECOND, i1[i], p2d)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, p1d));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << order);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, BERNSTEIN >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 385 of file fe_bernstein_shape_2D.C.
{
libmesh_error_msg("Bernstein polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 2, BERNSTEIN >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 398 of file fe_bernstein_shape_2D.C.
References libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::square_number_column, libMesh::square_number_row, libMesh::TRI3, libMesh::TRI6, and libMesh::Elem::type().
{
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (type)
{
// Hierarchic shape functions on the quadrilateral.
case QUAD4:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
unsigned int i0, i1;
// Vertex DoFs
if (i == 0)
{ i0 = 0; i1 = 0; }
else if (i == 1)
{ i0 = 1; i1 = 0; }
else if (i == 2)
{ i0 = 1; i1 = 1; }
else if (i == 3)
{ i0 = 0; i1 = 1; }
// Edge DoFs
else if (i < totalorder + 3u)
{ i0 = i - 2; i1 = 0; }
else if (i < 2u*totalorder + 2)
{ i0 = 1; i1 = i - totalorder - 1; }
else if (i < 3u*totalorder + 1)
{ i0 = i - 2u*totalorder; i1 = 1; }
else if (i < 4u*totalorder)
{ i0 = 0; i1 = i - 3u*totalorder + 1; }
// Interior DoFs
else
{
unsigned int basisnum = i - 4*totalorder;
i0 = square_number_column[basisnum] + 2;
i1 = square_number_row[basisnum] + 2;
}
// Flip odd degree of freedom values if necessary
// to keep continuity on sides
if ((i>= 4 && i<= 4+ totalorder-2u) && elem->point(0) > elem->point(1)) i0=totalorder+2-i0;//
else if((i>= 4+ totalorder-1u && i<= 4+2*totalorder-3u) && elem->point(1) > elem->point(2)) i1=totalorder+2-i1;
else if((i>= 4+2*totalorder-2u && i<= 4+3*totalorder-4u) && elem->point(3) > elem->point(2)) i0=totalorder+2-i0;
else if((i>= 4+3*totalorder-3u && i<= 4+4*totalorder-5u) && elem->point(0) > elem->point(3)) i1=totalorder+2-i1;
switch (j)
{
// d()/dxi
case 0:
return (FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0, 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1, eta));
// d()/deta
case 1:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0, xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1, 0, eta));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// Bernstein shape functions on the 8-noded quadrilateral
// is handled separately.
case QUAD8:
{
libmesh_assert_less (totalorder, 3);
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 8);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
static const Real scal[] = {-0.25, -0.25, -0.25, -0.25, 0.5, 0.5, 0.5, 0.5};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta)
+scal[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[8], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[8], eta));
// d()/deta
case 1:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta)
+scal[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[8], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[8], 0, eta));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
case TRI3:
libmesh_assert_less (totalorder, 2);
case TRI6:
{
// I have been lazy here and am using finite differences
// to compute the derivatives!
const Real eps = 1.e-6;
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,BERNSTEIN>::shape(elem, totalorder, i, pp) -
FE<2,BERNSTEIN>::shape(elem, totalorder, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,BERNSTEIN>::shape(elem, totalorder, i, pp) -
FE<2,BERNSTEIN>::shape(elem, totalorder, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, HERMITE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 451 of file fe_hermite_shape_3D.C.
{
libmesh_error_msg("Hermite elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 3, HERMITE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 464 of file fe_hermite_shape_3D.C.
References libMesh::FEHermite< Dim >::hermite_raw_shape(), libMesh::FEHermite< Dim >::hermite_raw_shape_deriv(), libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert (j == 0 || j == 1 || j == 2);
std::vector<std::vector<Real> > dxdxi(3, std::vector<Real>(2, 0));
#ifdef DEBUG
std::vector<Real> dydxi(2), dzdeta(2), dxdzeta(2);
std::vector<Real> dzdxi(2), dxdeta(2), dydzeta(2);
#endif //DEBUG
hermite_compute_coefs(elem, dxdxi
#ifdef DEBUG
, dydxi, dzdeta, dxdzeta, dzdxi, dxdeta, dydzeta
#endif
);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 3rd-order tricubic Hermite functions
case THIRD:
{
switch (type)
{
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 64);
std::vector<unsigned int> bases1D;
Real coef = hermite_bases_3D(bases1D, dxdxi, totalorder, i);
switch (j) // Derivative type
{
case 0:
return coef *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape(bases1D[2],p(2));
break;
case 1:
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape(bases1D[2],p(2));
break;
case 2:
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[2],p(2));
break;
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 0, LAGRANGE_VEC >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 544 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_deriv().
{
Real value = FE<0,LAGRANGE>::shape_deriv( type, order, i, j, p );
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 2, LAGRANGE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 547 of file fe_lagrange_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<2,LAGRANGE>::shape_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, L2_LAGRANGE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 551 of file fe_l2_lagrange_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<2,L2_LAGRANGE>::shape_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, SUBDIVISION >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
| RealGradient libMesh::FE< 1, LAGRANGE_VEC >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 566 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_deriv().
{
Real value = FE<1,LAGRANGE>::shape_deriv( type, order, i, j, p );
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 3, LAGRANGE >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 574 of file fe_lagrange_shape_3D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::Real, libMesh::SECOND, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, and libMesh::x.
{
#if LIBMESH_DIM == 3
libmesh_assert_less (j, 3);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
// trilinear hexahedral shape functions
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 8);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1};
switch(j)
{
case 0:
return (FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE2, FIRST, i1[i], eta)*
FE<1,LAGRANGE>::shape (EDGE2, FIRST, i2[i], zeta));
case 1:
return (FE<1,LAGRANGE>::shape (EDGE2, FIRST, i0[i], xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta)*
FE<1,LAGRANGE>::shape (EDGE2, FIRST, i2[i], zeta));
case 2:
return (FE<1,LAGRANGE>::shape (EDGE2, FIRST, i0[i], xi)*
FE<1,LAGRANGE>::shape (EDGE2, FIRST, i1[i], eta)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// linear tetrahedral shape functions
case TET4:
case TET10:
{
libmesh_assert_less (i, 4);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta3dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
const Real dzeta3deta = 0.;
const Real dzeta0dzeta = -1.;
const Real dzeta1dzeta = 0.;
const Real dzeta2dzeta = 0.;
const Real dzeta3dzeta = 1.;
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
return dzeta0dxi;
case 1:
return dzeta1dxi;
case 2:
return dzeta2dxi;
case 3:
return dzeta3dxi;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/deta
case 1:
{
switch(i)
{
case 0:
return dzeta0deta;
case 1:
return dzeta1deta;
case 2:
return dzeta2deta;
case 3:
return dzeta3deta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/dzeta
case 2:
{
switch(i)
{
case 0:
return dzeta0dzeta;
case 1:
return dzeta1dzeta;
case 2:
return dzeta2dzeta;
case 3:
return dzeta3dzeta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// linear prism shape functions
case PRISM6:
case PRISM15:
case PRISM18:
{
libmesh_assert_less (i, 6);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2};
switch (j)
{
// d()/dxi
case 0:
return (FE<2,LAGRANGE>::shape_deriv(TRI3, FIRST, i1[i], 0, p2d)*
FE<1,LAGRANGE>::shape(EDGE2, FIRST, i0[i], p1d));
// d()/deta
case 1:
return (FE<2,LAGRANGE>::shape_deriv(TRI3, FIRST, i1[i], 1, p2d)*
FE<1,LAGRANGE>::shape(EDGE2, FIRST, i0[i], p1d));
// d()/dzeta
case 2:
return (FE<2,LAGRANGE>::shape(TRI3, FIRST, i1[i], p2d)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, p1d));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// linear pyramid shape functions
case PYRAMID5:
case PYRAMID13:
case PYRAMID14:
{
libmesh_assert_less (i, 5);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
switch (j)
{
// d/dxi
case 0:
switch(i)
{
case 0:
return .25*(zeta + eta - 1.)/((1. - zeta) + eps);
case 1:
return -.25*(zeta + eta - 1.)/((1. - zeta) + eps);
case 2:
return -.25*(zeta - eta - 1.)/((1. - zeta) + eps);
case 3:
return .25*(zeta - eta - 1.)/((1. - zeta) + eps);
case 4:
return 0;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/deta
case 1:
switch(i)
{
case 0:
return .25*(zeta + xi - 1.)/((1. - zeta) + eps);
case 1:
return .25*(zeta - xi - 1.)/((1. - zeta) + eps);
case 2:
return -.25*(zeta - xi - 1.)/((1. - zeta) + eps);
case 3:
return -.25*(zeta + xi - 1.)/((1. - zeta) + eps);
case 4:
return 0;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dzeta
case 2:
{
// We computed the derivatives with general eps and
// then let eps tend to zero in the numerators...
Real
num = zeta*(2. - zeta) - 1.,
den = (1. - zeta + eps)*(1. - zeta + eps);
switch(i)
{
case 0:
case 2:
return .25*(num + xi*eta)/den;
case 1:
case 3:
return .25*(num - xi*eta)/den;
case 4:
return 1.;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
// serendipity hexahedral quadratic shape functions
case HEX20:
{
libmesh_assert_less (i, 20);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// these functions are defined for (x,y,z) in [0,1]^3
// so transform the locations
const Real x = .5*(xi + 1.);
const Real y = .5*(eta + 1.);
const Real z = .5*(zeta + 1.);
// and don't forget the chain rule!
switch (j)
{
// d/dx*dx/dxi
case 0:
switch (i)
{
case 0:
return .5*(1. - y)*(1. - z)*((1. - x)*(-2.) +
(-1.)*(1. - 2.*x - 2.*y - 2.*z));
case 1:
return .5*(1. - y)*(1. - z)*(x*(2.) +
(1.)*(2.*x - 2.*y - 2.*z - 1.));
case 2:
return .5*y*(1. - z)*(x*(2.) +
(1.)*(2.*x + 2.*y - 2.*z - 3.));
case 3:
return .5*y*(1. - z)*((1. - x)*(-2.) +
(-1.)*(2.*y - 2.*x - 2.*z - 1.));
case 4:
return .5*(1. - y)*z*((1. - x)*(-2.) +
(-1.)*(2.*z - 2.*x - 2.*y - 1.));
case 5:
return .5*(1. - y)*z*(x*(2.) +
(1.)*(2.*x - 2.*y + 2.*z - 3.));
case 6:
return .5*y*z*(x*(2.) +
(1.)*(2.*x + 2.*y + 2.*z - 5.));
case 7:
return .5*y*z*((1. - x)*(-2.) +
(-1.)*(2.*y - 2.*x + 2.*z - 3.));
case 8:
return 2.*(1. - y)*(1. - z)*(1. - 2.*x);
case 9:
return 2.*y*(1. - y)*(1. - z);
case 10:
return 2.*y*(1. - z)*(1. - 2.*x);
case 11:
return 2.*y*(1. - y)*(1. - z)*(-1.);
case 12:
return 2.*(1. - y)*z*(1. - z)*(-1.);
case 13:
return 2.*(1. - y)*z*(1. - z);
case 14:
return 2.*y*z*(1. - z);
case 15:
return 2.*y*z*(1. - z)*(-1.);
case 16:
return 2.*(1. - y)*z*(1. - 2.*x);
case 17:
return 2.*y*(1. - y)*z;
case 18:
return 2.*y*z*(1. - 2.*x);
case 19:
return 2.*y*(1. - y)*z*(-1.);
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dy*dy/deta
case 1:
switch (i)
{
case 0:
return .5*(1. - x)*(1. - z)*((1. - y)*(-2.) +
(-1.)*(1. - 2.*x - 2.*y - 2.*z));
case 1:
return .5*x*(1. - z)*((1. - y)*(-2.) +
(-1.)*(2.*x - 2.*y - 2.*z - 1.));
case 2:
return .5*x*(1. - z)*(y*(2.) +
(1.)*(2.*x + 2.*y - 2.*z - 3.));
case 3:
return .5*(1. - x)*(1. - z)*(y*(2.) +
(1.)*(2.*y - 2.*x - 2.*z - 1.));
case 4:
return .5*(1. - x)*z*((1. - y)*(-2.) +
(-1.)*(2.*z - 2.*x - 2.*y - 1.));
case 5:
return .5*x*z*((1. - y)*(-2.) +
(-1.)*(2.*x - 2.*y + 2.*z - 3.));
case 6:
return .5*x*z*(y*(2.) +
(1.)*(2.*x + 2.*y + 2.*z - 5.));
case 7:
return .5*(1. - x)*z*(y*(2.) +
(1.)*(2.*y - 2.*x + 2.*z - 3.));
case 8:
return 2.*x*(1. - x)*(1. - z)*(-1.);
case 9:
return 2.*x*(1. - z)*(1. - 2.*y);
case 10:
return 2.*x*(1. - x)*(1. - z);
case 11:
return 2.*(1. - x)*(1. - z)*(1. - 2.*y);
case 12:
return 2.*(1. - x)*z*(1. - z)*(-1.);
case 13:
return 2.*x*z*(1. - z)*(-1.);
case 14:
return 2.*x*z*(1. - z);
case 15:
return 2.*(1. - x)*z*(1. - z);
case 16:
return 2.*x*(1. - x)*z*(-1.);
case 17:
return 2.*x*z*(1. - 2.*y);
case 18:
return 2.*x*(1. - x)*z;
case 19:
return 2.*(1. - x)*z*(1. - 2.*y);
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dz*dz/dzeta
case 2:
switch (i)
{
case 0:
return .5*(1. - x)*(1. - y)*((1. - z)*(-2.) +
(-1.)*(1. - 2.*x - 2.*y - 2.*z));
case 1:
return .5*x*(1. - y)*((1. - z)*(-2.) +
(-1.)*(2.*x - 2.*y - 2.*z - 1.));
case 2:
return .5*x*y*((1. - z)*(-2.) +
(-1.)*(2.*x + 2.*y - 2.*z - 3.));
case 3:
return .5*(1. - x)*y*((1. - z)*(-2.) +
(-1.)*(2.*y - 2.*x - 2.*z - 1.));
case 4:
return .5*(1. - x)*(1. - y)*(z*(2.) +
(1.)*(2.*z - 2.*x - 2.*y - 1.));
case 5:
return .5*x*(1. - y)*(z*(2.) +
(1.)*(2.*x - 2.*y + 2.*z - 3.));
case 6:
return .5*x*y*(z*(2.) +
(1.)*(2.*x + 2.*y + 2.*z - 5.));
case 7:
return .5*(1. - x)*y*(z*(2.) +
(1.)*(2.*y - 2.*x + 2.*z - 3.));
case 8:
return 2.*x*(1. - x)*(1. - y)*(-1.);
case 9:
return 2.*x*y*(1. - y)*(-1.);
case 10:
return 2.*x*(1. - x)*y*(-1.);
case 11:
return 2.*(1. - x)*y*(1. - y)*(-1.);
case 12:
return 2.*(1. - x)*(1. - y)*(1. - 2.*z);
case 13:
return 2.*x*(1. - y)*(1. - 2.*z);
case 14:
return 2.*x*y*(1. - 2.*z);
case 15:
return 2.*(1. - x)*y*(1. - 2.*z);
case 16:
return 2.*x*(1. - x)*(1. - y);
case 17:
return 2.*x*y*(1. - y);
case 18:
return 2.*x*(1. - x)*y;
case 19:
return 2.*(1. - x)*y*(1. - y);
default:
libmesh_error_msg("Invalid i = " << i);
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// triquadraic hexahedral shape funcions
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
switch(j)
{
case 0:
return (FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
case 1:
return (FE<1,LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
case 2:
return (FE<1,LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// quadratic tetrahedral shape functions
case TET10:
{
libmesh_assert_less (i, 10);
// Area coordinates, pg. 205, Vol. I, Carey, Oden, Becker FEM
const Real zeta1 = p(0);
const Real zeta2 = p(1);
const Real zeta3 = p(2);
const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta3dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
const Real dzeta3deta = 0.;
const Real dzeta0dzeta = -1.;
const Real dzeta1dzeta = 0.;
const Real dzeta2dzeta = 0.;
const Real dzeta3dzeta = 1.;
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
return (4.*zeta0 - 1.)*dzeta0dxi;
case 1:
return (4.*zeta1 - 1.)*dzeta1dxi;
case 2:
return (4.*zeta2 - 1.)*dzeta2dxi;
case 3:
return (4.*zeta3 - 1.)*dzeta3dxi;
case 4:
return 4.*(zeta0*dzeta1dxi + dzeta0dxi*zeta1);
case 5:
return 4.*(zeta1*dzeta2dxi + dzeta1dxi*zeta2);
case 6:
return 4.*(zeta0*dzeta2dxi + dzeta0dxi*zeta2);
case 7:
return 4.*(zeta0*dzeta3dxi + dzeta0dxi*zeta3);
case 8:
return 4.*(zeta1*dzeta3dxi + dzeta1dxi*zeta3);
case 9:
return 4.*(zeta2*dzeta3dxi + dzeta2dxi*zeta3);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/deta
case 1:
{
switch(i)
{
case 0:
return (4.*zeta0 - 1.)*dzeta0deta;
case 1:
return (4.*zeta1 - 1.)*dzeta1deta;
case 2:
return (4.*zeta2 - 1.)*dzeta2deta;
case 3:
return (4.*zeta3 - 1.)*dzeta3deta;
case 4:
return 4.*(zeta0*dzeta1deta + dzeta0deta*zeta1);
case 5:
return 4.*(zeta1*dzeta2deta + dzeta1deta*zeta2);
case 6:
return 4.*(zeta0*dzeta2deta + dzeta0deta*zeta2);
case 7:
return 4.*(zeta0*dzeta3deta + dzeta0deta*zeta3);
case 8:
return 4.*(zeta1*dzeta3deta + dzeta1deta*zeta3);
case 9:
return 4.*(zeta2*dzeta3deta + dzeta2deta*zeta3);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/dzeta
case 2:
{
switch(i)
{
case 0:
return (4.*zeta0 - 1.)*dzeta0dzeta;
case 1:
return (4.*zeta1 - 1.)*dzeta1dzeta;
case 2:
return (4.*zeta2 - 1.)*dzeta2dzeta;
case 3:
return (4.*zeta3 - 1.)*dzeta3dzeta;
case 4:
return 4.*(zeta0*dzeta1dzeta + dzeta0dzeta*zeta1);
case 5:
return 4.*(zeta1*dzeta2dzeta + dzeta1dzeta*zeta2);
case 6:
return 4.*(zeta0*dzeta2dzeta + dzeta0dzeta*zeta2);
case 7:
return 4.*(zeta0*dzeta3dzeta + dzeta0dzeta*zeta3);
case 8:
return 4.*(zeta1*dzeta3dzeta + dzeta1dzeta*zeta3);
case 9:
return 4.*(zeta2*dzeta3dzeta + dzeta2dzeta*zeta3);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// "serendipity" prism
case PRISM15:
{
libmesh_assert_less (i, 15);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
switch (j)
{
// d()/dxi
case 0:
{
switch(i)
{
case 0:
return (2.*xi + 2.*eta + 0.5*zeta - 1.)*(1. - zeta);
case 1:
return (2.*xi - 1. - 0.5*zeta)*(1. - zeta);
case 2:
return 0.;
case 3:
return (2.*xi + 2.*eta - 0.5*zeta - 1.)*(1. + zeta);
case 4:
return (2.*xi - 1. + 0.5*zeta)*(1. + zeta);
case 5:
return 0.;
case 6:
return (4.*xi + 2.*eta - 2.)*(zeta - 1.);
case 7:
return -2.*(zeta - 1.)*eta;
case 8:
return 2.*(zeta - 1.)*eta;
case 9:
return (zeta - 1.)*(1. + zeta);
case 10:
return (1. - zeta)*(1. + zeta);
case 11:
return 0.;
case 12:
return (-4.*xi - 2.*eta + 2.)*(1. + zeta);
case 13:
return 2.*(1. + zeta)*eta;
case 14:
return -2.*(1. + zeta)*eta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/deta
case 1:
{
switch(i)
{
case 0:
return (2.*xi + 2.*eta + 0.5*zeta - 1.)*(1. - zeta);
case 1:
return 0.;
case 2:
return (2.*eta - 1. - 0.5*zeta)*(1. - zeta);
case 3:
return (2.*xi + 2.*eta - 0.5*zeta - 1.)*(1. + zeta);
case 4:
return 0.;
case 5:
return (2.*eta - 1. + 0.5*zeta)*(1. + zeta);
case 6:
return 2.*(zeta - 1.)*xi;
case 7:
return 2.*(1. - zeta)*xi;
case 8:
return (2.*xi + 4.*eta - 2.)*(zeta - 1.);
case 9:
return (zeta - 1.)*(1. + zeta);
case 10:
return 0.;
case 11:
return (1. - zeta)*(1. + zeta);
case 12:
return -2.*(1. + zeta)*xi;
case 13:
return 2.*(1. + zeta)*xi;
case 14:
return (-2.*xi - 4.*eta + 2.)*(1. + zeta);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d()/dzeta
case 2:
{
switch(i)
{
case 0:
return (-xi - eta - zeta + 0.5)*(xi + eta - 1.);
case 1:
return -0.5*xi*(2.*xi - 1. - 2.*zeta);
case 2:
return -0.5*eta*(2.*eta - 1. - 2.*zeta);
case 3:
return (xi + eta - zeta - 0.5)*(xi + eta - 1.);
case 4:
return 0.5*xi*(2.*xi - 1. + 2.*zeta);
case 5:
return 0.5*eta*(2.*eta - 1. + 2.*zeta);
case 6:
return 2.*xi*(xi + eta - 1.);
case 7:
return -2.*xi*eta;
case 8:
return 2.*eta*(xi + eta - 1.);
case 9:
return 2.*zeta*(xi + eta - 1.);
case 10:
return -2.*xi*zeta;
case 11:
return -2.*eta*zeta;
case 12:
return 2.*xi*(1. - xi - eta);
case 13:
return 2.*xi*eta;
case 14:
return 2.*eta*(1. - xi - eta);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// quadradic prism shape functions
case PRISM18:
{
libmesh_assert_less (i, 18);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 3, 4, 5};
switch (j)
{
// d()/dxi
case 0:
return (FE<2,LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 0, p2d)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d()/deta
case 1:
return (FE<2,LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 1, p2d)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d()/dzeta
case 2:
return (FE<2,LAGRANGE>::shape(TRI6, SECOND, i1[i], p2d)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, p1d));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// G. Bedrosian, "Shape functions and integration formulas for
// three-dimensional finite element analysis", Int. J. Numerical
// Methods Engineering, vol 35, p. 95-108, 1992.
case PYRAMID13:
{
libmesh_assert_less (i, 13);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
// Denominators are perturbed by epsilon to avoid
// divide-by-zero issues.
Real
den = (-1. + zeta + eps),
den2 = den*den,
xi2 = xi*xi,
eta2 = eta*eta,
zeta2 = zeta*zeta,
zeta3 = zeta2*zeta;
switch (j)
{
// d/dxi
case 0:
switch(i)
{
case 0:
return 0.25*(-zeta - eta + 2.*eta*zeta - 2.*xi + 2.*zeta*xi + 2.*eta*xi + zeta2 + eta2)/den;
case 1:
return -0.25*(-zeta - eta + 2.*eta*zeta + 2.*xi - 2.*zeta*xi - 2.*eta*xi + zeta2 + eta2)/den;
case 2:
return -0.25*(-zeta + eta - 2.*eta*zeta + 2.*xi - 2.*zeta*xi + 2.*eta*xi + zeta2 + eta2)/den;
case 3:
return 0.25*(-zeta + eta - 2.*eta*zeta - 2.*xi + 2.*zeta*xi - 2.*eta*xi + zeta2 + eta2)/den;
case 4:
return 0.;
case 5:
return -(-1. + eta + zeta)*xi/den;
case 6:
return 0.5*(-1. + eta + zeta)*(1. + eta - zeta)/den;
case 7:
return (1. + eta - zeta)*xi/den;
case 8:
return -0.5*(-1. + eta + zeta)*(1. + eta - zeta)/den;
case 9:
return -(-1. + eta + zeta)*zeta/den;
case 10:
return (-1. + eta + zeta)*zeta/den;
case 11:
return -(1. + eta - zeta)*zeta/den;
case 12:
return (1. + eta - zeta)*zeta/den;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/deta
case 1:
switch(i)
{
case 0:
return 0.25*(-zeta - 2.*eta + 2.*eta*zeta - xi + 2.*zeta*xi + 2.*eta*xi + zeta2 + xi2)/den;
case 1:
return -0.25*(zeta + 2.*eta - 2.*eta*zeta - xi + 2.*zeta*xi + 2.*eta*xi - zeta2 - xi2)/den;
case 2:
return -0.25*(-zeta + 2.*eta - 2.*eta*zeta + xi - 2.*zeta*xi + 2.*eta*xi + zeta2 + xi2)/den;
case 3:
return 0.25*(zeta - 2.*eta + 2.*eta*zeta + xi - 2.*zeta*xi + 2.*eta*xi - zeta2 - xi2)/den;
case 4:
return 0.;
case 5:
return -0.5*(-1. + xi + zeta)*(1. + xi - zeta)/den;
case 6:
return (1. + xi - zeta)*eta/den;
case 7:
return 0.5*(-1. + xi + zeta)*(1. + xi - zeta)/den;
case 8:
return -(-1. + xi + zeta)*eta/den;
case 9:
return -(-1. + xi + zeta)*zeta/den;
case 10:
return (1. + xi - zeta)*zeta/den;
case 11:
return -(1. + xi - zeta)*zeta/den;
case 12:
return (-1. + xi + zeta)*zeta/den;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dzeta
case 2:
{
switch(i)
{
case 0:
return -0.25*(xi + eta + 1.)*(-1. + 2.*zeta - zeta2 + eta*xi)/den2;
case 1:
return 0.25*(eta - xi + 1.)*(1. - 2.*zeta + zeta2 + eta*xi)/den2;
case 2:
return 0.25*(xi + eta - 1.)*(-1. + 2.*zeta - zeta2 + eta*xi)/den2;
case 3:
return -0.25*(eta - xi - 1.)*(1. - 2.*zeta + zeta2 + eta*xi)/den2;
case 4:
return 4.*zeta - 1.;
case 5:
return 0.5*(-2 + eta + 6.*zeta + eta*xi2 + eta*zeta2 - 6.*zeta2 + 2.*zeta3 - 2.*eta*zeta)/den2;
case 6:
return -0.5*(2 - 6.*zeta + xi + xi*zeta2 + eta2*xi + 6.*zeta2 - 2.*zeta3 - 2.*zeta*xi)/den2;
case 7:
return -0.5*(2 + eta - 6.*zeta + eta*xi2 + eta*zeta2 + 6.*zeta2 - 2.*zeta3 - 2.*eta*zeta)/den2;
case 8:
return 0.5*(-2 + 6.*zeta + xi + xi*zeta2 + eta2*xi - 6.*zeta2 + 2.*zeta3 - 2.*zeta*xi)/den2;
case 9:
return (1. - eta - 4.*zeta - xi - xi*zeta2 - eta*zeta2 + eta*xi + 5.*zeta2 - 2.*zeta3 + 2.*eta*zeta + 2.*zeta*xi)/den2;
case 10:
return -(-1. + eta + 4.*zeta - xi - xi*zeta2 + eta*zeta2 + eta*xi - 5.*zeta2 + 2.*zeta3 - 2.*eta*zeta + 2.*zeta*xi)/den2;
case 11:
return (1. + eta - 4.*zeta + xi + xi*zeta2 + eta*zeta2 + eta*xi + 5.*zeta2 - 2.*zeta3 - 2.*eta*zeta - 2.*zeta*xi)/den2;
case 12:
return -(-1. - eta + 4.*zeta + xi + xi*zeta2 - eta*zeta2 + eta*xi - 5.*zeta2 + 2.*zeta3 + 2.*eta*zeta - 2.*zeta*xi)/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// Quadratic shape functions, as defined in R. Graglia, "Higher order
// bases on pyramidal elements", IEEE Trans Antennas and Propagation,
// vol 47, no 5, May 1999.
case PYRAMID14:
{
libmesh_assert_less (i, 14);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
// The "normalized coordinates" defined by Graglia. These are
// the planes which define the faces of the pyramid.
Real
p1 = 0.5*(1. - eta - zeta), // back
p2 = 0.5*(1. + xi - zeta), // left
p3 = 0.5*(1. + eta - zeta), // front
p4 = 0.5*(1. - xi - zeta); // right
// Denominators are perturbed by epsilon to avoid
// divide-by-zero issues.
Real
den = (-1. + zeta + eps),
den2 = den*den,
den3 = den2*den;
switch (j)
{
// d/dxi
case 0:
switch(i)
{
case 0:
return 0.5*p1*(-xi*eta + zeta - zeta*zeta + 2.*p4*eta)/den2;
case 1:
return -0.5*p1*(xi*eta + zeta - zeta*zeta + 2.*p2*eta)/den2;
case 2:
return 0.5*p3*(xi*eta - zeta + zeta*zeta + 2.*p2*eta)/den2;
case 3:
return -0.5*p3*(-xi*eta - zeta + zeta*zeta + 2.*p4*eta)/den2;
case 4:
return 0.;
case 5:
return 2.*p1*eta*xi/den2;
case 6:
return 2.*p1*p3*(xi + 2.*p2)/den2;
case 7:
return -2.*p3*eta*xi/den2;
case 8:
return -2.*p1*p3*(-xi + 2.*p4)/den2;
case 9:
return 2.*p1*zeta/den;
case 10:
return -2.*p1*zeta/den;
case 11:
return -2.*p3*zeta/den;
case 12:
return 2.*p3*zeta/den;
case 13:
return -8.*p1*p3*xi/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/deta
case 1:
switch(i)
{
case 0:
return -0.5*p4*(xi*eta - zeta + zeta*zeta - 2.*p1*xi)/den2;
case 1:
return 0.5*p2*(xi*eta + zeta - zeta*zeta - 2.*p1*xi)/den2;
case 2:
return 0.5*p2*(xi*eta - zeta + zeta*zeta + 2.*p3*xi)/den2;
case 3:
return -0.5*p4*(xi*eta + zeta - zeta*zeta + 2.*p3*xi)/den2;
case 4:
return 0.;
case 5:
return 2.*p2*p4*(eta - 2.*p1)/den2;
case 6:
return -2.*p2*xi*eta/den2;
case 7:
return 2.*p2*p4*(eta + 2.*p3)/den2;
case 8:
return 2.*p4*xi*eta/den2;
case 9:
return 2.*p4*zeta/den;
case 10:
return 2.*p2*zeta/den;
case 11:
return -2.*p2*zeta/den;
case 12:
return -2.*p4*zeta/den;
case 13:
return -8.*p2*p4*eta/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
// d/dzeta
case 2:
{
switch(i)
{
case 0:
return -0.5*p1*(xi*eta - zeta + zeta*zeta)/den2
- 0.5*p4*(xi*eta - zeta + zeta*zeta)/den2
+ p4*p1*(2.*zeta - 1)/den2
- 2.*p4*p1*(xi*eta - zeta + zeta*zeta)/den3;
case 1:
return 0.5*p2*(xi*eta + zeta - zeta*zeta)/den2
+ 0.5*p1*(xi*eta + zeta - zeta*zeta)/den2
- p1*p2*(1 - 2.*zeta)/den2
+ 2.*p1*p2*(xi*eta + zeta - zeta*zeta)/den3;
case 2:
return -0.5*p3*(xi*eta - zeta + zeta*zeta)/den2
- 0.5*p2*(xi*eta - zeta + zeta*zeta)/den2
+ p2*p3*(2.*zeta - 1)/den2
- 2.*p2*p3*(xi*eta - zeta + zeta*zeta)/den3;
case 3:
return 0.5*p4*(xi*eta + zeta - zeta*zeta)/den2
+ 0.5*p3*(xi*eta + zeta - zeta*zeta)/den2
- p3*p4*(1 - 2.*zeta)/den2
+ 2.*p3*p4*(xi*eta + zeta - zeta*zeta)/den3;
case 4:
return 4.*zeta - 1.;
case 5:
return 2.*p4*p1*eta/den2
+ 2.*p2*p4*eta/den2
+ 2.*p1*p2*eta/den2
+ 8.*p2*p1*p4*eta/den3;
case 6:
return -2.*p2*p3*xi/den2
- 2.*p1*p3*xi/den2
- 2.*p1*p2*xi/den2
- 8.*p1*p2*p3*xi/den3;
case 7:
return -2.*p3*p4*eta/den2
- 2.*p2*p4*eta/den2
- 2.*p2*p3*eta/den2
- 8.*p2*p3*p4*eta/den3;
case 8:
return 2.*p4*p1*xi/den2
+ 2.*p1*p3*xi/den2
+ 2.*p3*p4*xi/den2
+ 8.*p3*p4*p1*xi/den3;
case 9:
return 2.*p4*zeta/den
+ 2.*p1*zeta/den
- 4.*p1*p4/den
+ 4.*p1*p4*zeta/den2;
case 10:
return 2.*p1*zeta/den
+ 2.*p2*zeta/den
- 4.*p2*p1/den
+ 4.*p2*p1*zeta/den2;
case 11:
return 2.*p2*zeta/den
+ 2.*p3*zeta/den
- 4.*p3*p2/den
+ 4.*p3*p2*zeta/den2;
case 12:
return 2.*p3*zeta/den
+ 2.*p4*zeta/den
- 4.*p4*p3/den
+ 4.*p4*p3*zeta/den2;
case 13:
return -8.*p2*p3*p4/den2
- 8.*p3*p4*p1/den2
- 8.*p2*p1*p4/den2
- 8.*p1*p2*p3/den2
- 32.*p1*p2*p3*p4/den3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << order);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 2, LAGRANGE_VEC >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 602 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_deriv().
{
Real value = FE<2,LAGRANGE>::shape_deriv( type, order, i/2, j, p );
switch( i%2 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
default:
libmesh_error_msg("i%2 must be either 0 or 1!");
}
//dummy
return libMesh::RealGradient();
}
| RealGradient libMesh::FE< 0, NEDELEC_ONE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 605 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 0, NEDELEC_ONE >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 609 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 1, NEDELEC_ONE >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 628 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 1, NEDELEC_ONE >::shape_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 632 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| Real libMesh::FE< 3, MONOMIAL >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 640 of file fe_monomial_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape function derivatives
return FE<3,MONOMIAL>::shape_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| RealGradient libMesh::FE< 3, LAGRANGE_VEC >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 670 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_deriv().
{
Real value = FE<3,LAGRANGE>::shape_deriv( type, order, i/3, j, p );
switch( i%3 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
case 2:
return libMesh::RealGradient( Real(0), Real(0), value );
default:
libmesh_error_msg("i%3 must be 0, 1, or 2!");
}
//dummy
return libMesh::RealGradient();
}
| Real libMesh::FE< 3, L2_HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 706 of file fe_l2_hierarchic_shape_3D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| Real libMesh::FE< 3, HIERARCHIC >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 706 of file fe_hierarchic_shape_3D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| Real libMesh::FE< 3, L2_HIERARCHIC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 719 of file fe_l2_hierarchic_shape_3D.C.
References libMesh::libmesh_assert(), and libMesh::Real.
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
libmesh_assert_less (j, 3);
// cheat by using finite difference approximations:
const Real eps = 1.e-6;
Point pp, pm;
switch (j)
{
// d()/dxi
case 0:
{
pp = Point(p(0)+eps, p(1), p(2));
pm = Point(p(0)-eps, p(1), p(2));
break;
}
// d()/deta
case 1:
{
pp = Point(p(0), p(1)+eps, p(2));
pm = Point(p(0), p(1)-eps, p(2));
break;
}
// d()/dzeta
case 2:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
break;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
return (FE<3,L2_HIERARCHIC>::shape(elem, order, i, pp) -
FE<3,L2_HIERARCHIC>::shape(elem, order, i, pm))/2./eps;
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, HIERARCHIC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 719 of file fe_hierarchic_shape_3D.C.
References libMesh::libmesh_assert(), and libMesh::Real.
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
libmesh_assert_less (j, 3);
// cheat by using finite difference approximations:
const Real eps = 1.e-6;
Point pp, pm;
switch (j)
{
// d()/dxi
case 0:
{
pp = Point(p(0)+eps, p(1), p(2));
pm = Point(p(0)-eps, p(1), p(2));
break;
}
// d()/deta
case 1:
{
pp = Point(p(0), p(1)+eps, p(2));
pm = Point(p(0), p(1)-eps, p(2));
break;
}
// d()/dzeta
case 2:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
break;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
return (FE<3,HIERARCHIC>::shape(elem, order, i, pp) -
FE<3,HIERARCHIC>::shape(elem, order, i, pm))/2./eps;
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 0, LAGRANGE_VEC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 728 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
Real value = FE<0,LAGRANGE>::shape_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 2, SZABAB >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 733 of file fe_szabab_shape_2D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 2, SZABAB >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 746 of file fe_szabab_shape_2D.C.
References libMesh::EDGE3, libMesh::FIFTH, libMesh::FIRST, libMesh::FOURTH, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::SEVENTH, libMesh::FE< Dim, T >::shape(), libMesh::FE< Dim, T >::shape_deriv(), libMesh::SIXTH, libMesh::THIRD, libMesh::TRI6, and libMesh::Elem::type().
{
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 1st & 2nd-order Szabo-Babuska.
case FIRST:
case SECOND:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
// Here we use finite differences to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 6);
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,SZABAB>::shape (EDGE3, totalorder, i1[i], eta));
// d()/deta
case 1:
return (FE<1,SZABAB>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 3rd-order Szabo-Babuska.
case THIRD:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
// Here we use finite differences to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 10);
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 16);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 1, 1, 2, 3, 0, 0, 2, 3, 2, 3};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 2, 2, 3, 3};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 7: // edge 1 points
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 9: // edge 2 points
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 11: // edge 3 points
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
switch (j)
{
// d()/dxi
case 0:
return f*(FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,SZABAB>::shape (EDGE3, totalorder, i1[i], eta));
// d()/deta
case 1:
return f*(FE<1,SZABAB>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 4th-order Szabo-Babuska.
case FOURTH:
{
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
// Here we use finite differences to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 15);
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// Szabo-Babuska shape functions on the quadrilateral.
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 25);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 8: // edge 1 points
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 11: // edge 2 points
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 14: // edge 3 points
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
switch (j)
{
// d()/dxi
case 0:
return f*(FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,SZABAB>::shape (EDGE3, totalorder, i1[i], eta));
// d()/deta
case 1:
return f*(FE<1,SZABAB>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 5th-order Szabo-Babuska.
case FIFTH:
{
// Szabo-Babuska shape functions on the quadrilateral.
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
// Here we use finite differences to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 21);
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 36);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 0, 0, 0, 0, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5, 2, 3, 4, 5};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 2, 3, 4, 5, 1, 1, 1, 1, 2, 3, 4, 5, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
case 7:
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 9: // edge 1 points
case 11:
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 13: // edge 2 points
case 15:
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 14: // edge 3 points
case 19:
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
switch (j)
{
// d()/dxi
case 0:
return f*(FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,SZABAB>::shape (EDGE3, totalorder, i1[i], eta));
// d()/deta
case 1:
return f*(FE<1,SZABAB>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 6th-order Szabo-Babuska.
case SIXTH:
{
// Szabo-Babuska shape functions on the quadrilateral.
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
// Here we use finite differences to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 28);
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 49);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
case 7:
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 10: // edge 1 points
case 12:
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 15: // edge 2 points
case 17:
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 20: // edge 3 points
case 22:
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
switch (j)
{
// d()/dxi
case 0:
return f*(FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,SZABAB>::shape (EDGE3, totalorder, i1[i], eta));
// d()/deta
case 1:
return f*(FE<1,SZABAB>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 7th-order Szabo-Babuska.
case SEVENTH:
{
// Szabo-Babuska shape functions on the quadrilateral.
switch (type)
{
// Szabo-Babuska shape functions on the triangle.
case TRI6:
{
// Here we use finite differences to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 36);
libmesh_assert_less (j, 2);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1));
const Point pm(p(0)-eps, p(1));
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps);
const Point pm(p(0), p(1)-eps);
return (FE<2,SZABAB>::shape(elem, order, i, pp) -
FE<2,SZABAB>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 64);
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
static const unsigned int i0[] = {0, 1, 1, 0, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7, 2, 3, 4, 5, 6, 7};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7};
Real f=1.;
switch(i)
{
case 5: // edge 0 points
case 7:
case 9:
if (elem->point(0) > elem->point(1))f = -1.;
break;
case 11: // edge 1 points
case 13:
case 15:
if (elem->point(1) > elem->point(2))f = -1.;
break;
case 17: // edge 2 points
case 19:
case 21:
if (elem->point(3) > elem->point(2))f = -1.;
break;
case 23: // edge 3 points
case 25:
case 27:
if (elem->point(0) > elem->point(3))f = -1.;
break;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
switch (j)
{
// d()/dxi
case 0:
return f*(FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,SZABAB>::shape (EDGE3, totalorder, i1[i], eta));
// d()/deta
case 1:
return f*(FE<1,SZABAB>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,SZABAB>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// by default throw an error;call the orientation-independent shape functions
default:
libmesh_error_msg("ERROR: Unsupported polynomial order!");
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 1, LAGRANGE_VEC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 750 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
Real value = FE<1,LAGRANGE>::shape_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 2, SUBDIVISION >::shape_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 760 of file fe_subdivision_2D.C.
References libMesh::FOURTH, and libMesh::TRI3SUBDIVISION.
{
switch (order)
{
case FOURTH:
{
switch (type)
{
case TRI3SUBDIVISION:
libmesh_assert_less(i, 12);
return FESubdivision::regular_shape_deriv(i,j,p(0),p(1));
default:
libmesh_error_msg("ERROR: Unsupported element type!");
}
}
default:
libmesh_error_msg("ERROR: Unsupported polynomial order!");
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 2, LAGRANGE_VEC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 786 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
Real value = FE<2,LAGRANGE>::shape_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i/2, j, p );
switch( i%2 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
default:
libmesh_error_msg("i%2 must be either 0 or 1!");
}
//dummy
return libMesh::RealGradient();
}
| Real libMesh::FE< 2, SUBDIVISION >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 790 of file fe_subdivision_2D.C.
References libMesh::libmesh_assert(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<2,SUBDIVISION>::shape_deriv(elem->type(), order, i, j, p);
}
| RealGradient libMesh::FE< 3, LAGRANGE_VEC >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 853 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
Real value = FE<3,LAGRANGE>::shape_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i/3, j, p );
switch( i%3 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
case 2:
return libMesh::RealGradient( Real(0), Real(0), value );
default:
libmesh_error_msg("i%3 must be 0, 1, or 2!");
}
//dummy
return libMesh::RealGradient();
}
| Real libMesh::FE< 3, L2_LAGRANGE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1201 of file fe_l2_lagrange_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape function derivatives
return FE<3,L2_LAGRANGE>::shape_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 3, BERNSTEIN >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 1384 of file fe_bernstein_shape_3D.C.
{
libmesh_error_msg("Bernstein polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| Real libMesh::FE< 3, BERNSTEIN >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1397 of file fe_bernstein_shape_3D.C.
References libMesh::EDGE3, libMesh::FIRST, libMesh::FOURTH, libMesh::HEX20, libMesh::HEX27, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, libMesh::SECOND, libMesh::TET10, libMesh::TET4, libMesh::THIRD, and libMesh::Elem::type().
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
libmesh_assert_less (j, 3);
switch (totalorder)
{
// 1st order Bernstein.
case FIRST:
{
switch (type)
{
// Bernstein shape functions on the tetrahedron.
case TET4:
case TET10:
{
// I have been lazy here and am using finite differences
// to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 4);
libmesh_assert_less (j, 3);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1), p(2));
const Point pm(p(0)-eps, p(1), p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps, p(2));
const Point pm(p(0), p(1)-eps, p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/dzeta
case 2:
{
const Point pp(p(0), p(1), p(2)+eps);
const Point pm(p(0), p(1), p(2)-eps);
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
// Bernstein shape functions on the hexahedral.
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 8);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta));
// d()/deta
case 1:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta));
// d()/dzeta
case 2:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
case SECOND:
{
switch (type)
{
// Bernstein shape functions on the tetrahedron.
case TET10:
{
// I have been lazy here and am using finite differences
// to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 10);
libmesh_assert_less (j, 3);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1), p(2));
const Point pm(p(0)-eps, p(1), p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps, p(2));
const Point pm(p(0), p(1)-eps, p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/dzeta
case 2:
{
const Point pp(p(0), p(1), p(2)+eps);
const Point pm(p(0), p(1), p(2)-eps);
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
// Bernstein shape functions on the hexahedral.
case HEX20:
{
libmesh_assert_less (i, 20);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
static const Real scal20[] = {-0.25, -0.25, -0.25, -0.25, 0, 0, 0, 0, 0.5, 0.5, 0.5, 0.5, 0, 0, 0, 0, 0, 0, 0, 0};
static const Real scal21[] = {-0.25, -0.25, 0, 0, -0.25, -0.25, 0, 0, 0.5, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0, 0, 0};
static const Real scal22[] = {0, -0.25, -0.25, 0, 0, -0.25, -0.25, 0, 0, 0.5, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0, 0};
static const Real scal23[] = {0, 0, -0.25, -0.25, 0, 0, -0.25, -0.25, 0, 0, 0.5, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0};
static const Real scal24[] = {-0.25, 0, 0, -0.25, -0.25, 0, 0, -0.25, 0, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0, 0, 0, 0.5};
static const Real scal25[] = {0, 0, 0, 0, -0.25, -0.25, -0.25, -0.25, 0, 0, 0, 0, 0, 0, 0, 0, 0.5, 0.5, 0.5, 0.5};
static const Real scal26[] = {-0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, -0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25, 0.25};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta)
+scal20[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[20], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[20], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[20], zeta)
+scal21[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[21], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[21], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[21], zeta)
+scal22[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[22], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[22], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[22], zeta)
+scal23[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[23], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[23], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[23], zeta)
+scal24[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[24], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[24], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[24], zeta)
+scal25[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[25], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[25], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[25], zeta)
+scal26[i]*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[26], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[26], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[26], zeta));
// d()/deta
case 1:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta)
+scal20[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[20], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[20], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[20], zeta)
+scal21[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[21], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[21], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[21], zeta)
+scal22[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[22], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[22], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[22], zeta)
+scal23[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[23], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[23], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[23], zeta)
+scal24[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[24], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[24], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[24], zeta)
+scal25[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[25], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[25], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[25], zeta)
+scal26[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[26], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[26], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[26], zeta));
// d()/dzeta
case 2:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[i], 0, zeta)
+scal20[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[20], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[20], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[20], 0, zeta)
+scal21[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[21], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[21], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[21], 0, zeta)
+scal22[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[22], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[22], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[22], 0, zeta)
+scal23[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[23], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[23], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[23], 0, zeta)
+scal24[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[24], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[24], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[24], 0, zeta)
+scal25[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[25], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[25], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[25], 0, zeta)
+scal26[i]*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[26], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[26], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[26], 0, zeta));
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
// Bernstein shape functions on the hexahedral.
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
switch (j)
{
// d()/dxi
case 0:
return (FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta));
// d()/deta
case 1:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta));
// d()/dzeta
case 2:
return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi)*
FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta)*
FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 3rd-order Bernstein.
case THIRD:
{
switch (type)
{
// // Bernstein shape functions derivatives.
// case TET10:
// {
// // I have been lazy here and am using finite differences
// // to compute the derivatives!
// const Real eps = 1.e-6;
// libmesh_assert_less (i, 20);
// libmesh_assert_less (j, 3);
// switch (j)
// {
// // d()/dxi
// case 0:
// {
// const Point pp(p(0)+eps, p(1), p(2));
// const Point pm(p(0)-eps, p(1), p(2));
// return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
// FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
// }
// // d()/deta
// case 1:
// {
// const Point pp(p(0), p(1)+eps, p(2));
// const Point pm(p(0), p(1)-eps, p(2));
// return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
// FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
// }
// // d()/dzeta
// case 2:
// {
// const Point pp(p(0), p(1), p(2)+eps);
// const Point pm(p(0), p(1), p(2)-eps);
// return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
// FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
// }
// default:
// libmesh_error_msg("Invalid derivative index j = " << j);
// }
// }
// Bernstein shape functions on the hexahedral.
case HEX27:
{
// I have been lazy here and am using finite differences
// to compute the derivatives!
const Real eps = 1.e-6;
libmesh_assert_less (i, 64);
libmesh_assert_less (j, 3);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1), p(2));
const Point pm(p(0)-eps, p(1), p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps, p(2));
const Point pm(p(0), p(1)-eps, p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/dzeta
case 2:
{
const Point pp(p(0), p(1), p(2)+eps);
const Point pm(p(0), p(1), p(2)-eps);
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
// // Compute hex shape functions as a tensor-product
// const Real xi = p(0);
// const Real eta = p(1);
// const Real zeta = p(2);
// Real xi_mapped = p(0);
// Real eta_mapped = p(1);
// Real zeta_mapped = p(2);
// // The only way to make any sense of this
// // is to look at the mgflo/mg2/mgf documentation
// // and make the cut-out cube!
// // Nodes 0 1 2 3 4 5 6 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 26 26 26 26
// // DOFS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 18 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 60 62 63
// static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 3, 1, 1, 2, 3, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 0, 0, 2, 3, 2, 3, 2, 3, 2, 3, 1, 1, 1, 1, 2, 3, 2, 3, 0, 0, 0, 0, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3};
// static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 2, 3, 1, 1, 2, 3, 2, 2, 3, 3, 0, 0, 0, 0, 2, 3, 2, 3, 1, 1, 1, 1, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3};
// static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 2, 3, 2, 3, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3};
// // handle the edge orientation
// {
// // Edge 0
// if ((i1[i] == 0) && (i2[i] == 0))
// {
// if (elem->node(0) != std::min(elem->node(0), elem->node(1)))
// xi_mapped = -xi;
// }
// // Edge 1
// else if ((i0[i] == 1) && (i2[i] == 0))
// {
// if (elem->node(1) != std::min(elem->node(1), elem->node(2)))
// eta_mapped = -eta;
// }
// // Edge 2
// else if ((i1[i] == 1) && (i2[i] == 0))
// {
// if (elem->node(3) != std::min(elem->node(3), elem->node(2)))
// xi_mapped = -xi;
// }
// // Edge 3
// else if ((i0[i] == 0) && (i2[i] == 0))
// {
// if (elem->node(0) != std::min(elem->node(0), elem->node(3)))
// eta_mapped = -eta;
// }
// // Edge 4
// else if ((i0[i] == 0) && (i1[i] == 0))
// {
// if (elem->node(0) != std::min(elem->node(0), elem->node(4)))
// zeta_mapped = -zeta;
// }
// // Edge 5
// else if ((i0[i] == 1) && (i1[i] == 0))
// {
// if (elem->node(1) != std::min(elem->node(1), elem->node(5)))
// zeta_mapped = -zeta;
// }
// // Edge 6
// else if ((i0[i] == 1) && (i1[i] == 1))
// {
// if (elem->node(2) != std::min(elem->node(2), elem->node(6)))
// zeta_mapped = -zeta;
// }
// // Edge 7
// else if ((i0[i] == 0) && (i1[i] == 1))
// {
// if (elem->node(3) != std::min(elem->node(3), elem->node(7)))
// zeta_mapped = -zeta;
// }
// // Edge 8
// else if ((i1[i] == 0) && (i2[i] == 1))
// {
// if (elem->node(4) != std::min(elem->node(4), elem->node(5)))
// xi_mapped = -xi;
// }
// // Edge 9
// else if ((i0[i] == 1) && (i2[i] == 1))
// {
// if (elem->node(5) != std::min(elem->node(5), elem->node(6)))
// eta_mapped = -eta;
// }
// // Edge 10
// else if ((i1[i] == 1) && (i2[i] == 1))
// {
// if (elem->node(7) != std::min(elem->node(7), elem->node(6)))
// xi_mapped = -xi;
// }
// // Edge 11
// else if ((i0[i] == 0) && (i2[i] == 1))
// {
// if (elem->node(4) != std::min(elem->node(4), elem->node(7)))
// eta_mapped = -eta;
// }
// }
// // handle the face orientation
// {
// // Face 0
// if ( (i2[i] == 0) && (i0[i] >= 2) && (i1[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(1),
// std::min(elem->node(2),
// std::min(elem->node(0),
// elem->node(3))));
// if (elem->node(0) == min_node)
// if (elem->node(1) == std::min(elem->node(1), elem->node(3)))
// {
// // Case 1
// xi_mapped = xi;
// eta_mapped = eta;
// }
// else
// {
// // Case 2
// xi_mapped = eta;
// eta_mapped = xi;
// }
// else if (elem->node(3) == min_node)
// if (elem->node(0) == std::min(elem->node(0), elem->node(2)))
// {
// // Case 3
// xi_mapped = -eta;
// eta_mapped = xi;
// }
// else
// {
// // Case 4
// xi_mapped = xi;
// eta_mapped = -eta;
// }
// else if (elem->node(2) == min_node)
// if (elem->node(3) == std::min(elem->node(3), elem->node(1)))
// {
// // Case 5
// xi_mapped = -xi;
// eta_mapped = -eta;
// }
// else
// {
// // Case 6
// xi_mapped = -eta;
// eta_mapped = -xi;
// }
// else if (elem->node(1) == min_node)
// if (elem->node(2) == std::min(elem->node(2), elem->node(0)))
// {
// // Case 7
// xi_mapped = eta;
// eta_mapped = -xi;
// }
// else
// {
// // Case 8
// xi_mapped = -xi;
// eta_mapped = eta;
// }
// }
// // Face 1
// else if ((i1[i] == 0) && (i0[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(0),
// std::min(elem->node(1),
// std::min(elem->node(5),
// elem->node(4))));
// if (elem->node(0) == min_node)
// if (elem->node(1) == std::min(elem->node(1), elem->node(4)))
// {
// // Case 1
// xi_mapped = xi;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// xi_mapped = zeta;
// zeta_mapped = xi;
// }
// else if (elem->node(1) == min_node)
// if (elem->node(5) == std::min(elem->node(5), elem->node(0)))
// {
// // Case 3
// xi_mapped = zeta;
// zeta_mapped = -xi;
// }
// else
// {
// // Case 4
// xi_mapped = -xi;
// zeta_mapped = zeta;
// }
// else if (elem->node(5) == min_node)
// if (elem->node(4) == std::min(elem->node(4), elem->node(1)))
// {
// // Case 5
// xi_mapped = -xi;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// xi_mapped = -zeta;
// zeta_mapped = -xi;
// }
// else if (elem->node(4) == min_node)
// if (elem->node(0) == std::min(elem->node(0), elem->node(5)))
// {
// // Case 7
// xi_mapped = -xi;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 8
// xi_mapped = xi;
// zeta_mapped = -zeta;
// }
// }
// // Face 2
// else if ((i0[i] == 1) && (i1[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(1),
// std::min(elem->node(2),
// std::min(elem->node(6),
// elem->node(5))));
// if (elem->node(1) == min_node)
// if (elem->node(2) == std::min(elem->node(2), elem->node(5)))
// {
// // Case 1
// eta_mapped = eta;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// eta_mapped = zeta;
// zeta_mapped = eta;
// }
// else if (elem->node(2) == min_node)
// if (elem->node(6) == std::min(elem->node(6), elem->node(1)))
// {
// // Case 3
// eta_mapped = zeta;
// zeta_mapped = -eta;
// }
// else
// {
// // Case 4
// eta_mapped = -eta;
// zeta_mapped = zeta;
// }
// else if (elem->node(6) == min_node)
// if (elem->node(5) == std::min(elem->node(5), elem->node(2)))
// {
// // Case 5
// eta_mapped = -eta;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// eta_mapped = -zeta;
// zeta_mapped = -eta;
// }
// else if (elem->node(5) == min_node)
// if (elem->node(1) == std::min(elem->node(1), elem->node(6)))
// {
// // Case 7
// eta_mapped = -zeta;
// zeta_mapped = eta;
// }
// else
// {
// // Case 8
// eta_mapped = eta;
// zeta_mapped = -zeta;
// }
// }
// // Face 3
// else if ((i1[i] == 1) && (i0[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(2),
// std::min(elem->node(3),
// std::min(elem->node(7),
// elem->node(6))));
// if (elem->node(3) == min_node)
// if (elem->node(2) == std::min(elem->node(2), elem->node(7)))
// {
// // Case 1
// xi_mapped = xi;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// xi_mapped = zeta;
// zeta_mapped = xi;
// }
// else if (elem->node(7) == min_node)
// if (elem->node(3) == std::min(elem->node(3), elem->node(6)))
// {
// // Case 3
// xi_mapped = -zeta;
// zeta_mapped = xi;
// }
// else
// {
// // Case 4
// xi_mapped = xi;
// zeta_mapped = -zeta;
// }
// else if (elem->node(6) == min_node)
// if (elem->node(7) == std::min(elem->node(7), elem->node(2)))
// {
// // Case 5
// xi_mapped = -xi;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// xi_mapped = -zeta;
// zeta_mapped = -xi;
// }
// else if (elem->node(2) == min_node)
// if (elem->node(6) == std::min(elem->node(3), elem->node(6)))
// {
// // Case 7
// xi_mapped = zeta;
// zeta_mapped = -xi;
// }
// else
// {
// // Case 8
// xi_mapped = -xi;
// zeta_mapped = zeta;
// }
// }
// // Face 4
// else if ((i0[i] == 0) && (i1[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(3),
// std::min(elem->node(0),
// std::min(elem->node(4),
// elem->node(7))));
// if (elem->node(0) == min_node)
// if (elem->node(3) == std::min(elem->node(3), elem->node(4)))
// {
// // Case 1
// eta_mapped = eta;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// eta_mapped = zeta;
// zeta_mapped = eta;
// }
// else if (elem->node(4) == min_node)
// if (elem->node(0) == std::min(elem->node(0), elem->node(7)))
// {
// // Case 3
// eta_mapped = -zeta;
// zeta_mapped = eta;
// }
// else
// {
// // Case 4
// eta_mapped = eta;
// zeta_mapped = -zeta;
// }
// else if (elem->node(7) == min_node)
// if (elem->node(4) == std::min(elem->node(4), elem->node(3)))
// {
// // Case 5
// eta_mapped = -eta;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// eta_mapped = -zeta;
// zeta_mapped = -eta;
// }
// else if (elem->node(3) == min_node)
// if (elem->node(7) == std::min(elem->node(7), elem->node(0)))
// {
// // Case 7
// eta_mapped = zeta;
// zeta_mapped = -eta;
// }
// else
// {
// // Case 8
// eta_mapped = -eta;
// zeta_mapped = zeta;
// }
// }
// // Face 5
// else if ((i2[i] == 1) && (i0[i] >= 2) && (i1[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(4),
// std::min(elem->node(5),
// std::min(elem->node(6),
// elem->node(7))));
// if (elem->node(4) == min_node)
// if (elem->node(5) == std::min(elem->node(5), elem->node(7)))
// {
// // Case 1
// xi_mapped = xi;
// eta_mapped = eta;
// }
// else
// {
// // Case 2
// xi_mapped = eta;
// eta_mapped = xi;
// }
// else if (elem->node(5) == min_node)
// if (elem->node(6) == std::min(elem->node(6), elem->node(4)))
// {
// // Case 3
// xi_mapped = eta;
// eta_mapped = -xi;
// }
// else
// {
// // Case 4
// xi_mapped = -xi;
// eta_mapped = eta;
// }
// else if (elem->node(6) == min_node)
// if (elem->node(7) == std::min(elem->node(7), elem->node(5)))
// {
// // Case 5
// xi_mapped = -xi;
// eta_mapped = -eta;
// }
// else
// {
// // Case 6
// xi_mapped = -eta;
// eta_mapped = -xi;
// }
// else if (elem->node(7) == min_node)
// if (elem->node(4) == std::min(elem->node(4), elem->node(6)))
// {
// // Case 7
// xi_mapped = -eta;
// eta_mapped = xi;
// }
// else
// {
// // Case 8
// xi_mapped = xi;
// eta_mapped = eta;
// }
// }
// }
// libmesh_assert_less (j, 3);
// switch (j)
// {
// // d()/dxi
// case 0:
// return (FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta_mapped));
// // d()/deta
// case 1:
// return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi_mapped)*
// FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta_mapped));
// // d()/dzeta
// case 2:
// return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta_mapped)*
// FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[i], 0, zeta_mapped));
// default:
// libmesh_error_msg("Invalid derivative index j = " << j);
// }
// }
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
// 4th-order Bernstein.
case FOURTH:
{
switch (type)
{
// Bernstein shape functions derivatives on the hexahedral.
case HEX27:
{
const Real eps = 1.e-6;
libmesh_assert_less (i, 125);
libmesh_assert_less (j, 3);
switch (j)
{
// d()/dxi
case 0:
{
const Point pp(p(0)+eps, p(1), p(2));
const Point pm(p(0)-eps, p(1), p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/deta
case 1:
{
const Point pp(p(0), p(1)+eps, p(2));
const Point pm(p(0), p(1)-eps, p(2));
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
// d()/dzeta
case 2:
{
const Point pp(p(0), p(1), p(2)+eps);
const Point pm(p(0), p(1), p(2)-eps);
return (FE<3,BERNSTEIN>::shape(elem, order, i, pp) -
FE<3,BERNSTEIN>::shape(elem, order, i, pm))/2./eps;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
// // Compute hex shape functions as a tensor-product
// const Real xi = p(0);
// const Real eta = p(1);
// const Real zeta = p(2);
// Real xi_mapped = p(0);
// Real eta_mapped = p(1);
// Real zeta_mapped = p(2);
// // The only way to make any sense of this
// // is to look at the mgflo/mg2/mgf documentation
// // and make the cut-out cube!
// // Nodes 0 1 2 3 4 5 6 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 20 20 21 21 21 21 22 22 22 22 23 23 23 23 24 24 24 24 25 25 25 25 26 26 26 26 26 26 26 26
// // DOFS 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 18 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4};
// static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 3, 4, 1, 1, 1, 2, 3, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4};
// static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 2, 2, 2, 3, 3, 3, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4};
// // handle the edge orientation
// {
// // Edge 0
// if ((i1[i] == 0) && (i2[i] == 0))
// {
// if (elem->node(0) != std::min(elem->node(0), elem->node(1)))
// xi_mapped = -xi;
// }
// // Edge 1
// else if ((i0[i] == 1) && (i2[i] == 0))
// {
// if (elem->node(1) != std::min(elem->node(1), elem->node(2)))
// eta_mapped = -eta;
// }
// // Edge 2
// else if ((i1[i] == 1) && (i2[i] == 0))
// {
// if (elem->node(3) != std::min(elem->node(3), elem->node(2)))
// xi_mapped = -xi;
// }
// // Edge 3
// else if ((i0[i] == 0) && (i2[i] == 0))
// {
// if (elem->node(0) != std::min(elem->node(0), elem->node(3)))
// eta_mapped = -eta;
// }
// // Edge 4
// else if ((i0[i] == 0) && (i1[i] == 0))
// {
// if (elem->node(0) != std::min(elem->node(0), elem->node(4)))
// zeta_mapped = -zeta;
// }
// // Edge 5
// else if ((i0[i] == 1) && (i1[i] == 0))
// {
// if (elem->node(1) != std::min(elem->node(1), elem->node(5)))
// zeta_mapped = -zeta;
// }
// // Edge 6
// else if ((i0[i] == 1) && (i1[i] == 1))
// {
// if (elem->node(2) != std::min(elem->node(2), elem->node(6)))
// zeta_mapped = -zeta;
// }
// // Edge 7
// else if ((i0[i] == 0) && (i1[i] == 1))
// {
// if (elem->node(3) != std::min(elem->node(3), elem->node(7)))
// zeta_mapped = -zeta;
// }
// // Edge 8
// else if ((i1[i] == 0) && (i2[i] == 1))
// {
// if (elem->node(4) != std::min(elem->node(4), elem->node(5)))
// xi_mapped = -xi;
// }
// // Edge 9
// else if ((i0[i] == 1) && (i2[i] == 1))
// {
// if (elem->node(5) != std::min(elem->node(5), elem->node(6)))
// eta_mapped = -eta;
// }
// // Edge 10
// else if ((i1[i] == 1) && (i2[i] == 1))
// {
// if (elem->node(7) != std::min(elem->node(7), elem->node(6)))
// xi_mapped = -xi;
// }
// // Edge 11
// else if ((i0[i] == 0) && (i2[i] == 1))
// {
// if (elem->node(4) != std::min(elem->node(4), elem->node(7)))
// eta_mapped = -eta;
// }
// }
// // handle the face orientation
// {
// // Face 0
// if ( (i2[i] == 0) && (i0[i] >= 2) && (i1[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(1),
// std::min(elem->node(2),
// std::min(elem->node(0),
// elem->node(3))));
// if (elem->node(0) == min_node)
// if (elem->node(1) == std::min(elem->node(1), elem->node(3)))
// {
// // Case 1
// xi_mapped = xi;
// eta_mapped = eta;
// }
// else
// {
// // Case 2
// xi_mapped = eta;
// eta_mapped = xi;
// }
// else if (elem->node(3) == min_node)
// if (elem->node(0) == std::min(elem->node(0), elem->node(2)))
// {
// // Case 3
// xi_mapped = -eta;
// eta_mapped = xi;
// }
// else
// {
// // Case 4
// xi_mapped = xi;
// eta_mapped = -eta;
// }
// else if (elem->node(2) == min_node)
// if (elem->node(3) == std::min(elem->node(3), elem->node(1)))
// {
// // Case 5
// xi_mapped = -xi;
// eta_mapped = -eta;
// }
// else
// {
// // Case 6
// xi_mapped = -eta;
// eta_mapped = -xi;
// }
// else if (elem->node(1) == min_node)
// if (elem->node(2) == std::min(elem->node(2), elem->node(0)))
// {
// // Case 7
// xi_mapped = eta;
// eta_mapped = -xi;
// }
// else
// {
// // Case 8
// xi_mapped = -xi;
// eta_mapped = eta;
// }
// }
// // Face 1
// else if ((i1[i] == 0) && (i0[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(0),
// std::min(elem->node(1),
// std::min(elem->node(5),
// elem->node(4))));
// if (elem->node(0) == min_node)
// if (elem->node(1) == std::min(elem->node(1), elem->node(4)))
// {
// // Case 1
// xi_mapped = xi;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// xi_mapped = zeta;
// zeta_mapped = xi;
// }
// else if (elem->node(1) == min_node)
// if (elem->node(5) == std::min(elem->node(5), elem->node(0)))
// {
// // Case 3
// xi_mapped = zeta;
// zeta_mapped = -xi;
// }
// else
// {
// // Case 4
// xi_mapped = -xi;
// zeta_mapped = zeta;
// }
// else if (elem->node(5) == min_node)
// if (elem->node(4) == std::min(elem->node(4), elem->node(1)))
// {
// // Case 5
// xi_mapped = -xi;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// xi_mapped = -zeta;
// zeta_mapped = -xi;
// }
// else if (elem->node(4) == min_node)
// if (elem->node(0) == std::min(elem->node(0), elem->node(5)))
// {
// // Case 7
// xi_mapped = -xi;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 8
// xi_mapped = xi;
// zeta_mapped = -zeta;
// }
// }
// // Face 2
// else if ((i0[i] == 1) && (i1[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(1),
// std::min(elem->node(2),
// std::min(elem->node(6),
// elem->node(5))));
// if (elem->node(1) == min_node)
// if (elem->node(2) == std::min(elem->node(2), elem->node(5)))
// {
// // Case 1
// eta_mapped = eta;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// eta_mapped = zeta;
// zeta_mapped = eta;
// }
// else if (elem->node(2) == min_node)
// if (elem->node(6) == std::min(elem->node(6), elem->node(1)))
// {
// // Case 3
// eta_mapped = zeta;
// zeta_mapped = -eta;
// }
// else
// {
// // Case 4
// eta_mapped = -eta;
// zeta_mapped = zeta;
// }
// else if (elem->node(6) == min_node)
// if (elem->node(5) == std::min(elem->node(5), elem->node(2)))
// {
// // Case 5
// eta_mapped = -eta;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// eta_mapped = -zeta;
// zeta_mapped = -eta;
// }
// else if (elem->node(5) == min_node)
// if (elem->node(1) == std::min(elem->node(1), elem->node(6)))
// {
// // Case 7
// eta_mapped = -zeta;
// zeta_mapped = eta;
// }
// else
// {
// // Case 8
// eta_mapped = eta;
// zeta_mapped = -zeta;
// }
// }
// // Face 3
// else if ((i1[i] == 1) && (i0[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(2),
// std::min(elem->node(3),
// std::min(elem->node(7),
// elem->node(6))));
// if (elem->node(3) == min_node)
// if (elem->node(2) == std::min(elem->node(2), elem->node(7)))
// {
// // Case 1
// xi_mapped = xi;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// xi_mapped = zeta;
// zeta_mapped = xi;
// }
// else if (elem->node(7) == min_node)
// if (elem->node(3) == std::min(elem->node(3), elem->node(6)))
// {
// // Case 3
// xi_mapped = -zeta;
// zeta_mapped = xi;
// }
// else
// {
// // Case 4
// xi_mapped = xi;
// zeta_mapped = -zeta;
// }
// else if (elem->node(6) == min_node)
// if (elem->node(7) == std::min(elem->node(7), elem->node(2)))
// {
// // Case 5
// xi_mapped = -xi;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// xi_mapped = -zeta;
// zeta_mapped = -xi;
// }
// else if (elem->node(2) == min_node)
// if (elem->node(6) == std::min(elem->node(3), elem->node(6)))
// {
// // Case 7
// xi_mapped = zeta;
// zeta_mapped = -xi;
// }
// else
// {
// // Case 8
// xi_mapped = -xi;
// zeta_mapped = zeta;
// }
// }
// // Face 4
// else if ((i0[i] == 0) && (i1[i] >= 2) && (i2[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(3),
// std::min(elem->node(0),
// std::min(elem->node(4),
// elem->node(7))));
// if (elem->node(0) == min_node)
// if (elem->node(3) == std::min(elem->node(3), elem->node(4)))
// {
// // Case 1
// eta_mapped = eta;
// zeta_mapped = zeta;
// }
// else
// {
// // Case 2
// eta_mapped = zeta;
// zeta_mapped = eta;
// }
// else if (elem->node(4) == min_node)
// if (elem->node(0) == std::min(elem->node(0), elem->node(7)))
// {
// // Case 3
// eta_mapped = -zeta;
// zeta_mapped = eta;
// }
// else
// {
// // Case 4
// eta_mapped = eta;
// zeta_mapped = -zeta;
// }
// else if (elem->node(7) == min_node)
// if (elem->node(4) == std::min(elem->node(4), elem->node(3)))
// {
// // Case 5
// eta_mapped = -eta;
// zeta_mapped = -zeta;
// }
// else
// {
// // Case 6
// eta_mapped = -zeta;
// zeta_mapped = -eta;
// }
// else if (elem->node(3) == min_node)
// if (elem->node(7) == std::min(elem->node(7), elem->node(0)))
// {
// // Case 7
// eta_mapped = zeta;
// zeta_mapped = -eta;
// }
// else
// {
// // Case 8
// eta_mapped = -eta;
// zeta_mapped = zeta;
// }
// }
// // Face 5
// else if ((i2[i] == 1) && (i0[i] >= 2) && (i1[i] >= 2))
// {
// const unsigned int min_node = std::min(elem->node(4),
// std::min(elem->node(5),
// std::min(elem->node(6),
// elem->node(7))));
// if (elem->node(4) == min_node)
// if (elem->node(5) == std::min(elem->node(5), elem->node(7)))
// {
// // Case 1
// xi_mapped = xi;
// eta_mapped = eta;
// }
// else
// {
// // Case 2
// xi_mapped = eta;
// eta_mapped = xi;
// }
// else if (elem->node(5) == min_node)
// if (elem->node(6) == std::min(elem->node(6), elem->node(4)))
// {
// // Case 3
// xi_mapped = eta;
// eta_mapped = -xi;
// }
// else
// {
// // Case 4
// xi_mapped = -xi;
// eta_mapped = eta;
// }
// else if (elem->node(6) == min_node)
// if (elem->node(7) == std::min(elem->node(7), elem->node(5)))
// {
// // Case 5
// xi_mapped = -xi;
// eta_mapped = -eta;
// }
// else
// {
// // Case 6
// xi_mapped = -eta;
// eta_mapped = -xi;
// }
// else if (elem->node(7) == min_node)
// if (elem->node(4) == std::min(elem->node(4), elem->node(6)))
// {
// // Case 7
// xi_mapped = -eta;
// eta_mapped = xi;
// }
// else
// {
// // Case 8
// xi_mapped = xi;
// eta_mapped = eta;
// }
// }
// }
// libmesh_assert_less (j, 3);
// switch (j)
// {
// // d()/dxi
// case 0:
// return (FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i0[i], 0, xi_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta_mapped));
// // d()/deta
// case 1:
// return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi_mapped)*
// FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i1[i], 0, eta_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i2[i], zeta_mapped));
// // d()/dzeta
// case 2:
// return (FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i0[i], xi_mapped)*
// FE<1,BERNSTEIN>::shape (EDGE3, totalorder, i1[i], eta_mapped)*
// FE<1,BERNSTEIN>::shape_deriv(EDGE3, totalorder, i2[i], 0, zeta_mapped));
// default:
// libmesh_error_msg("Invalid derivative index j = " << j);
// }
// }
default:
libmesh_error_msg("Invalid element type = " << type);
}
}
default:
libmesh_error_msg("Invalid totalorder = " << totalorder);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, LAGRANGE >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1916 of file fe_lagrange_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape function derivatives
return FE<3,LAGRANGE>::shape_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, CLOUGH >::shape_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 1958 of file fe_clough_shape_2D.C.
{
libmesh_error_msg("Clough-Tocher elements require the real element \nto construct gradient-based degrees of freedom.");
return 0.;
}
| Real libMesh::FE< 2, CLOUGH >::shape_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1971 of file fe_clough_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::SECOND, libMesh::THIRD, libMesh::TRI6, and libMesh::Elem::type().
{
libmesh_assert(elem);
clough_compute_coefs(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 2nd-order restricted Clough-Tocher element
case SECOND:
{
// There may be a bug in the 2nd order case; the 3rd order
// Clough-Tocher elements are pretty uniformly better anyways
// so use those instead.
libmesh_experimental();
switch (type)
{
// C1 functions on the Clough-Tocher triangle.
case TRI6:
{
libmesh_assert_less (i, 9);
// FIXME: it would be nice to calculate (and cache)
// clough_raw_shape(j,p) only once per triangle, not 1-7
// times
switch (i)
{
// Note: these DoF numbers are "scrambled" because my
// initial numbering conventions didn't match libMesh
case 0:
return clough_raw_shape_deriv(0, j, p)
+ d1d2n * clough_raw_shape_deriv(10, j, p)
+ d1d3n * clough_raw_shape_deriv(11, j, p);
case 3:
return clough_raw_shape_deriv(1, j, p)
+ d2d3n * clough_raw_shape_deriv(11, j, p)
+ d2d1n * clough_raw_shape_deriv(9, j, p);
case 6:
return clough_raw_shape_deriv(2, j, p)
+ d3d1n * clough_raw_shape_deriv(9, j, p)
+ d3d2n * clough_raw_shape_deriv(10, j, p);
case 1:
return d1xd1x * clough_raw_shape_deriv(3, j, p)
+ d1xd1y * clough_raw_shape_deriv(4, j, p)
+ d1xd2n * clough_raw_shape_deriv(10, j, p)
+ d1xd3n * clough_raw_shape_deriv(11, j, p)
+ 0.5 * N01x * d3nd3n * clough_raw_shape_deriv(11, j, p)
+ 0.5 * N02x * d2nd2n * clough_raw_shape_deriv(10, j, p);
case 2:
return d1yd1y * clough_raw_shape_deriv(4, j, p)
+ d1yd1x * clough_raw_shape_deriv(3, j, p)
+ d1yd2n * clough_raw_shape_deriv(10, j, p)
+ d1yd3n * clough_raw_shape_deriv(11, j, p)
+ 0.5 * N01y * d3nd3n * clough_raw_shape_deriv(11, j, p)
+ 0.5 * N02y * d2nd2n * clough_raw_shape_deriv(10, j, p);
case 4:
return d2xd2x * clough_raw_shape_deriv(5, j, p)
+ d2xd2y * clough_raw_shape_deriv(6, j, p)
+ d2xd3n * clough_raw_shape_deriv(11, j, p)
+ d2xd1n * clough_raw_shape_deriv(9, j, p)
+ 0.5 * N10x * d3nd3n * clough_raw_shape_deriv(11, j, p)
+ 0.5 * N12x * d1nd1n * clough_raw_shape_deriv(9, j, p);
case 5:
return d2yd2y * clough_raw_shape_deriv(6, j, p)
+ d2yd2x * clough_raw_shape_deriv(5, j, p)
+ d2yd3n * clough_raw_shape_deriv(11, j, p)
+ d2yd1n * clough_raw_shape_deriv(9, j, p)
+ 0.5 * N10y * d3nd3n * clough_raw_shape_deriv(11, j, p)
+ 0.5 * N12y * d1nd1n * clough_raw_shape_deriv(9, j, p);
case 7:
return d3xd3x * clough_raw_shape_deriv(7, j, p)
+ d3xd3y * clough_raw_shape_deriv(8, j, p)
+ d3xd1n * clough_raw_shape_deriv(9, j, p)
+ d3xd2n * clough_raw_shape_deriv(10, j, p)
+ 0.5 * N20x * d2nd2n * clough_raw_shape_deriv(10, j, p)
+ 0.5 * N21x * d1nd1n * clough_raw_shape_deriv(9, j, p);
case 8:
return d3yd3y * clough_raw_shape_deriv(8, j, p)
+ d3yd3x * clough_raw_shape_deriv(7, j, p)
+ d3yd1n * clough_raw_shape_deriv(9, j, p)
+ d3yd2n * clough_raw_shape_deriv(10, j, p)
+ 0.5 * N20y * d2nd2n * clough_raw_shape_deriv(10, j, p)
+ 0.5 * N21y * d1nd1n * clough_raw_shape_deriv(9, j, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// 3rd-order Clough-Tocher element
case THIRD:
{
switch (type)
{
// C1 functions on the Clough-Tocher triangle.
case TRI6:
{
libmesh_assert_less (i, 12);
// FIXME: it would be nice to calculate (and cache)
// clough_raw_shape(j,p) only once per triangle, not 1-7
// times
switch (i)
{
// Note: these DoF numbers are "scrambled" because my
// initial numbering conventions didn't match libMesh
case 0:
return clough_raw_shape_deriv(0, j, p)
+ d1d2n * clough_raw_shape_deriv(10, j, p)
+ d1d3n * clough_raw_shape_deriv(11, j, p);
case 3:
return clough_raw_shape_deriv(1, j, p)
+ d2d3n * clough_raw_shape_deriv(11, j, p)
+ d2d1n * clough_raw_shape_deriv(9, j, p);
case 6:
return clough_raw_shape_deriv(2, j, p)
+ d3d1n * clough_raw_shape_deriv(9, j, p)
+ d3d2n * clough_raw_shape_deriv(10, j, p);
case 1:
return d1xd1x * clough_raw_shape_deriv(3, j, p)
+ d1xd1y * clough_raw_shape_deriv(4, j, p)
+ d1xd2n * clough_raw_shape_deriv(10, j, p)
+ d1xd3n * clough_raw_shape_deriv(11, j, p);
case 2:
return d1yd1y * clough_raw_shape_deriv(4, j, p)
+ d1yd1x * clough_raw_shape_deriv(3, j, p)
+ d1yd2n * clough_raw_shape_deriv(10, j, p)
+ d1yd3n * clough_raw_shape_deriv(11, j, p);
case 4:
return d2xd2x * clough_raw_shape_deriv(5, j, p)
+ d2xd2y * clough_raw_shape_deriv(6, j, p)
+ d2xd3n * clough_raw_shape_deriv(11, j, p)
+ d2xd1n * clough_raw_shape_deriv(9, j, p);
case 5:
return d2yd2y * clough_raw_shape_deriv(6, j, p)
+ d2yd2x * clough_raw_shape_deriv(5, j, p)
+ d2yd3n * clough_raw_shape_deriv(11, j, p)
+ d2yd1n * clough_raw_shape_deriv(9, j, p);
case 7:
return d3xd3x * clough_raw_shape_deriv(7, j, p)
+ d3xd3y * clough_raw_shape_deriv(8, j, p)
+ d3xd1n * clough_raw_shape_deriv(9, j, p)
+ d3xd2n * clough_raw_shape_deriv(10, j, p);
case 8:
return d3yd3y * clough_raw_shape_deriv(8, j, p)
+ d3yd3x * clough_raw_shape_deriv(7, j, p)
+ d3yd1n * clough_raw_shape_deriv(9, j, p)
+ d3yd2n * clough_raw_shape_deriv(10, j, p);
case 10:
return d1nd1n * clough_raw_shape_deriv(9, j, p);
case 11:
return d2nd2n * clough_raw_shape_deriv(10, j, p);
case 9:
return d3nd3n * clough_raw_shape_deriv(11, j, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, SCALAR >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 67 of file fe_scalar_shape_1D.C.
{
return 0.;
}
| Real libMesh::FE< 0, SCALAR >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 67 of file fe_scalar_shape_0D.C.
{
return 0.;
}
| Real libMesh::FE< 3, SCALAR >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 67 of file fe_scalar_shape_3D.C.
{
return 0.;
}
| Real libMesh::FE< 2, SCALAR >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 69 of file fe_scalar_shape_2D.C.
{
return 0.;
}
| Real libMesh::FE< 0, SCALAR >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 77 of file fe_scalar_shape_0D.C.
{
return 0.;
}
| Real libMesh::FE< 3, SCALAR >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 77 of file fe_scalar_shape_3D.C.
{
return 0.;
}
| Real libMesh::FE< 1, SCALAR >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 77 of file fe_scalar_shape_1D.C.
{
return 0.;
}
| Real libMesh::FE< 2, SCALAR >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 79 of file fe_scalar_shape_2D.C.
{
return 0.;
}
| Real libMesh::FE< 3, SZABAB >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 81 of file fe_szabab_shape_3D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials are not defined in 3D");
return 0.;
}
| Real libMesh::FE< 0, SZABAB >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_szabab_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, BERNSTEIN >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_bernstein_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, L2_LAGRANGE >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_l2_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, MONOMIAL >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_monomial_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, L2_HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_l2_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, LAGRANGE >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HERMITE >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_hermite_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, CLOUGH >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_clough_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, XYZ >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_xyz_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 83 of file fe_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 3, CLOUGH >::shape_second_deriv | ( | const Elem * | libmesh_dbg_varelem, |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 86 of file fe_clough_shape_3D.C.
References libMesh::libmesh_assert().
{
libmesh_assert(elem);
libmesh_not_implemented();
return 0.;
}
| Real libMesh::FE< 3, SZABAB >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 94 of file fe_szabab_shape_3D.C.
{
libmesh_error_msg("Szabo-Babuska polynomials are not defined in 3D");
return 0.;
}
| Real libMesh::FE< 0, XYZ >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_xyz_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, CLOUGH >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_clough_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, SZABAB >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_szabab_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, L2_LAGRANGE >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_l2_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, BERNSTEIN >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_bernstein_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HIERARCHIC >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, LAGRANGE >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_lagrange_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, MONOMIAL >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_monomial_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, HERMITE >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_hermite_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 0, L2_HIERARCHIC >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 96 of file fe_l2_hierarchic_shape_0D.C.
{
libmesh_error_msg("No spatial derivatives in 0D!");
return 0.;
}
| Real libMesh::FE< 1, MONOMIAL >::shape_second_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 147 of file fe_monomial_shape_1D.C.
References libMesh::Real.
{
// only d()/dxi in 1D!
libmesh_assert_equal_to (j, 0);
const Real xi = p(0);
libmesh_assert_less_equal (i, static_cast<unsigned int>(order));
switch (i)
{
case 0:
case 1:
return 0.;
case 2:
return 2.;
case 3:
return 6.*xi;
case 4:
return 12.*xi*xi;
default:
Real val = 2.;
for (unsigned int index = 2; index != i; ++index)
val *= (index+1) * xi;
return val;
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, SZABAB >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 159 of file fe_szabab_shape_1D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Szabab elements "
<< " are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| static OutputShape libMesh::FE< Dim, T >::shape_second_deriv | ( | const ElemType | t, |
| const Order | o, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) | [static] |
derivative of the
shape function at the point p. Note that cross-derivatives are also possible, i.e. j = 0 ==> d^2 phi / dxi^2 j = 1 ==> d^2 phi / dxi deta j = 2 ==> d^2 phi / deta^2 j = 3 ==> d^2 phi / dxi dzeta j = 4 ==> d^2 phi / deta dzeta j = 5 ==> d^2 phi / dzeta^2Note: Computing second derivatives is not currently supported for all element types: C1 (Clough, Hermite and Subdivision), Lagrange, Hierarchic, L2_Hierarchic, and Monomial are supported. All other element types return an error when asked for second derivatives.
On a p-refined element, o should be the total order of the element.
Referenced by libMesh::FEXYZ< Dim >::compute_shape_functions(), libMesh::FE< Dim, T >::init_shape_functions(), and libMesh::FE< Dim, T >::shape_second_deriv().
| Real libMesh::FE< 1, SZABAB >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 179 of file fe_szabab_shape_1D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Szabab elements "
<< " are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 1, MONOMIAL >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 190 of file fe_monomial_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,MONOMIAL>::shape_second_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| static OutputShape libMesh::FE< Dim, T >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | o, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) | [static] |
derivative of the
shape function at the point p. Note that cross-derivatives are also possible, i.e. j = 0 ==> d^2 phi / dxi^2 j = 1 ==> d^2 phi / dxi deta j = 2 ==> d^2 phi / deta^2 j = 3 ==> d^2 phi / dxi dzeta j = 4 ==> d^2 phi / deta dzeta j = 5 ==> d^2 phi / dzeta^2Note: Computing second derivatives is not currently supported for all element types: C1 (Clough, Hermite and Subdivision), Lagrange, Hierarchic, L2_Hierarchic, and Monomial are supported. All other element types return an error when asked for second derivatives.
On a p-refined element, o should be the base order of the element.
| Real libMesh::FE< 1, L2_HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 200 of file fe_l2_hierarchic_shape_1D.C.
References libMesh::Utility::pow(), and libMesh::Real.
{
// only d2()/d2xi in 1D!
libmesh_assert_equal_to (j, 0);
libmesh_assert_less (i, order+1u);
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
const Real xi = p(0);
Real returnval = 1.;
switch (i)
{
case 0:
case 1:
returnval = 0;
break;
// All terms have the same form.
// xi^(p-2)/(p-2)!
case 2:
returnval = 1;
break;
case 3:
returnval = xi;
break;
case 4:
returnval = pow<2>(xi)/2.;
break;
case 5:
returnval = pow<3>(xi)/6.;
break;
case 6:
returnval = pow<4>(xi)/24.;
break;
case 7:
returnval = pow<5>(xi)/120.;
break;
default:
Real denominator = 1.;
for (unsigned int n=1; n != i; ++n)
{
returnval *= xi;
denominator *= n;
}
// Odd:
if (i % 2)
returnval = (i * returnval - 1.)/denominator/i;
// Even:
else
returnval = returnval/denominator;
break;
}
return returnval;
}
| Real libMesh::FE< 1, HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 200 of file fe_hierarchic_shape_1D.C.
References libMesh::Utility::pow(), and libMesh::Real.
{
// only d2()/d2xi in 1D!
libmesh_assert_equal_to (j, 0);
libmesh_assert_less (i, order+1u);
// Declare that we are using our own special power function
// from the Utility namespace. This saves typing later.
using Utility::pow;
const Real xi = p(0);
Real returnval = 1.;
switch (i)
{
case 0:
case 1:
returnval = 0;
break;
// All terms have the same form.
// xi^(p-2)/(p-2)!
case 2:
returnval = 1;
break;
case 3:
returnval = xi;
break;
case 4:
returnval = pow<2>(xi)/2.;
break;
case 5:
returnval = pow<3>(xi)/6.;
break;
case 6:
returnval = pow<4>(xi)/24.;
break;
case 7:
returnval = pow<5>(xi)/120.;
break;
default:
Real denominator = 1.;
for (unsigned int n=1; n != i; ++n)
{
returnval *= xi;
denominator *= n;
}
// Odd:
if (i % 2)
returnval = (i * returnval - 1.)/denominator/i;
// Even:
else
returnval = returnval/denominator;
break;
}
return returnval;
}
| Real libMesh::FE< 1, XYZ >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 205 of file fe_xyz_shape_1D.C.
{
libmesh_error_msg("XYZ polynomials require the element \nbecause the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 1, XYZ >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | point_in | ||
| ) |
Definition at line 218 of file fe_xyz_shape_1D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), std::pow(), libMesh::Real, and libMesh::x.
{
libmesh_assert(elem);
libmesh_assert_less_equal (i, order + elem->p_level());
// only d2()/dxi2 in 1D!
libmesh_assert_equal_to (j, 0);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = 0.;
for (unsigned int p = 0; p < elem->n_nodes(); p++)
{
const Real distance = std::abs(centroid(0) - elem->point(p)(0));
max_distance = std::max(distance, max_distance);
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real xc = centroid(0);
const Real dx = (x - xc)/max_distance;
const Real dist2 = pow(max_distance,2.);
// monomials. since they are hierarchic we only need one case block.
switch (i)
{
case 0:
case 1:
return 0.;
case 2:
return 2./dist2;
case 3:
return 6.*dx/dist2;
case 4:
return 12.*dx*dx/dist2;
default:
Real val = 2.;
for (unsigned int index = 2; index != i; ++index)
val *= (index+1) * dx;
return val/dist2;
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, LAGRANGE >::shape_second_deriv | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 241 of file fe_lagrange_shape_1D.C.
References libMesh::FIRST, libMesh::Real, libMesh::SECOND, and libMesh::THIRD.
{
// Don't need to switch on j. 1D shape functions
// depend on xi only!
const Real xi = p(0);
libmesh_assert_equal_to (j, 0);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
// All second derivatives of linears are zero....
return 0.;
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (i)
{
case 0:
return 1.;
case 1:
return 1.;
case 2:
return -2.;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
} // end case SECOND
case THIRD:
{
switch (i)
{
case 0:
return -9./16.*(6.*xi-2);
case 1:
return -9./16.*(-6*xi-2.);
case 2:
return 27./16.*(6*xi-2./3.);
case 3:
return 27./16.*(-6*xi-2./3.);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
} // end case THIRD
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
} // end switch (order)
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, L2_LAGRANGE >::shape_second_deriv | ( | const ElemType | , |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | p | ||
| ) |
Definition at line 241 of file fe_l2_lagrange_shape_1D.C.
References libMesh::FIRST, libMesh::Real, libMesh::SECOND, and libMesh::THIRD.
{
// Don't need to switch on j. 1D shape functions
// depend on xi only!
const Real xi = p(0);
libmesh_assert_equal_to (j, 0);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
// All second derivatives of linears are zero....
return 0.;
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (i)
{
case 0:
return 1.;
case 1:
return 1.;
case 2:
return -2.;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
} // end case SECOND
case THIRD:
{
switch (i)
{
case 0:
return -9./16.*(6.*xi-2);
case 1:
return -9./16.*(-6*xi-2.);
case 2:
return 27./16.*(6*xi-2./3.);
case 3:
return 27./16.*(-6*xi-2./3.);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
} // end case THIRD
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
} // end switch (order)
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, L2_HIERARCHIC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 268 of file fe_l2_hierarchic_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,L2_HIERARCHIC>::shape_second_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 1, HIERARCHIC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 268 of file fe_hierarchic_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,HIERARCHIC>::shape_second_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 1, LAGRANGE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 314 of file fe_lagrange_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,LAGRANGE>::shape_second_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 1, L2_LAGRANGE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 314 of file fe_l2_lagrange_shape_1D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<1,L2_LAGRANGE>::shape_second_deriv(elem->type(),
static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, MONOMIAL >::shape_second_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 321 of file fe_monomial_shape_2D.C.
References libMesh::Real.
{
#if LIBMESH_DIM > 1
libmesh_assert_less_equal (j, 2);
libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
(static_cast<unsigned int>(order)+2)/2);
const Real xi = p(0);
const Real eta = p(1);
// monomials. since they are hierarchic we only need one case block.
switch (j)
{
// d^2()/dxi^2
case 0:
{
switch (i)
{
// constants
case 0:
// linears
case 1:
case 2:
return 0.;
// quadratics
case 3:
return 2.;
case 4:
case 5:
return 0.;
// cubics
case 6:
return 6.*xi;
case 7:
return 2.*eta;
case 8:
case 9:
return 0.;
// quartics
case 10:
return 12.*xi*xi;
case 11:
return 6.*xi*eta;
case 12:
return 2.*eta*eta;
case 13:
case 14:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int ny = i - (o*(o+1)/2);
unsigned int nx = o - ny;
Real val = nx * (nx - 1);
for (unsigned int index=2; index < nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
return val;
}
}
// d^2()/dxideta
case 1:
{
switch (i)
{
// constants
case 0:
// linears
case 1:
case 2:
return 0.;
// quadratics
case 3:
return 0.;
case 4:
return 1.;
case 5:
return 0.;
// cubics
case 6:
return 0.;
case 7:
return 2.*xi;
case 8:
return 2.*eta;
case 9:
return 0.;
// quartics
case 10:
return 0.;
case 11:
return 3.*xi*xi;
case 12:
return 4.*xi*eta;
case 13:
return 3.*eta*eta;
case 14:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int ny = i - (o*(o+1)/2);
unsigned int nx = o - ny;
Real val = nx * ny;
for (unsigned int index=1; index < nx; index++)
val *= xi;
for (unsigned int index=1; index < ny; index++)
val *= eta;
return val;
}
}
// d^2()/deta^2
case 2:
{
switch (i)
{
// constants
case 0:
// linears
case 1:
case 2:
return 0.;
// quadratics
case 3:
case 4:
return 0.;
case 5:
return 2.;
// cubics
case 6:
return 0.;
case 7:
return 0.;
case 8:
return 2.*xi;
case 9:
return 6.*eta;
// quartics
case 10:
case 11:
return 0.;
case 12:
return 2.*xi*xi;
case 13:
return 6.*xi*eta;
case 14:
return 12.*eta*eta;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int ny = i - (o*(o+1)/2);
unsigned int nx = o - ny;
Real val = ny * (ny - 1);
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=2; index < ny; index++)
val *= eta;
return val;
}
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| Real libMesh::FE< 2, HERMITE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 328 of file fe_hermite_shape_2D.C.
References libMesh::FEHermite< Dim >::hermite_raw_shape(), libMesh::FEHermite< Dim >::hermite_raw_shape_deriv(), libMesh::FEHermite< Dim >::hermite_raw_shape_second_deriv(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, and libMesh::Elem::type().
{
libmesh_assert(elem);
libmesh_assert (j == 0 || j == 1 || j == 2);
std::vector<std::vector<Real> > dxdxi(2, std::vector<Real>(2, 0));
#ifdef DEBUG
std::vector<Real> dxdeta(2), dydxi(2);
#endif
hermite_compute_coefs(elem,dxdxi
#ifdef DEBUG
,dxdeta,dydxi
#endif
);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (type)
{
case QUAD4:
libmesh_assert_less (totalorder, 4);
case QUAD8:
case QUAD9:
{
libmesh_assert_less (i, (totalorder+1u)*(totalorder+1u));
std::vector<unsigned int> bases1D;
Real coef = hermite_bases_2D(bases1D, dxdxi, totalorder, i);
switch (j)
{
case 0:
return coef *
FEHermite<1>::hermite_raw_shape_second_deriv(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1));
case 1:
return coef *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[1],p(1));
case 2:
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape_second_deriv(bases1D[1],p(1));
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 2, NEDELEC_ONE >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 332 of file fe_nedelec_one_shape_2D.C.
{
libmesh_error_msg("Nedelec elements require the element type \nbecause edge orientation is needed.");
return RealGradient();
}
| Real libMesh::FE< 1, HERMITE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned | int, | ||
| const Point & | p | ||
| ) |
Definition at line 333 of file fe_hermite_shape_1D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FEHermite< Dim >::hermite_raw_shape_second_deriv(), libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
// Coefficient naming: d(1)d(2n) is the coefficient of the
// global shape function corresponding to value 1 in terms of the
// local shape function corresponding to normal derivative 2
Real d1xd1x, d2xd2x;
hermite_compute_coefs(elem, d1xd1x, d2xd2x);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// Hermite cubic shape functions
case THIRD:
{
switch (type)
{
// C1 functions on the C1 cubic edge
case EDGE2:
case EDGE3:
{
switch (i)
{
case 0:
return FEHermite<1>::hermite_raw_shape_second_deriv(0, p(0));
case 1:
return d1xd1x * FEHermite<1>::hermite_raw_shape_second_deriv(2, p(0));
case 2:
return FEHermite<1>::hermite_raw_shape_second_deriv(1, p(0));
case 3:
return d2xd2x * FEHermite<1>::hermite_raw_shape_second_deriv(3, p(0));
default:
return FEHermite<1>::hermite_raw_shape_second_deriv(i, p(0));
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 1, CLOUGH >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 337 of file fe_clough_shape_1D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
clough_compute_coefs(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 3rd-order C1 cubic element
case THIRD:
{
switch (type)
{
// C1 functions on the C1 cubic edge
case EDGE2:
case EDGE3:
{
switch (i)
{
case 0:
return clough_raw_shape_second_deriv(0, j, p);
case 1:
return clough_raw_shape_second_deriv(1, j, p);
case 2:
return d1xd1x * clough_raw_shape_second_deriv(2, j, p);
case 3:
return d2xd2x * clough_raw_shape_second_deriv(3, j, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 2, NEDELEC_ONE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | libmesh_dbg_vari, | ||
| const unsigned int | libmesh_dbg_varj, | ||
| const Point & | |||
| ) |
Definition at line 345 of file fe_nedelec_one_shape_2D.C.
References libMesh::FIRST, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::QUAD8, libMesh::QUAD9, libMesh::TRI6, and libMesh::Elem::type().
{
#if LIBMESH_DIM > 1
libmesh_assert(elem);
// j = 0 ==> d^2 phi / dxi^2
// j = 1 ==> d^2 phi / dxi deta
// j = 2 ==> d^2 phi / deta^2
libmesh_assert_less (j, 3);
const Order total_order = static_cast<Order>(order + elem->p_level());
switch (total_order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (elem->type())
{
case QUAD8:
case QUAD9:
{
libmesh_assert_less (i, 4);
// All second derivatives for linear quads are zero.
return RealGradient();
}
case TRI6:
{
libmesh_assert_less (i, 3);
// All second derivatives for linear triangles are zero.
return RealGradient();
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type!: " << elem->type());
} // end switch (type)
} // end case FIRST
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order!: " << total_order);
} // end switch (order)
#endif // LIBMESH_DIM > 1
libmesh_error_msg("We'll never get here!");
return RealGradient();
}
| Real libMesh::FE< 2, HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 375 of file fe_hierarchic_shape_2D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 2, L2_HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 376 of file fe_l2_hierarchic_shape_2D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge orientation is needed.");
return 0.;
}
| Real libMesh::FE< 1, BERNSTEIN >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 381 of file fe_bernstein_shape_1D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Bernstein elements "
<< "are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 2, HIERARCHIC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 388 of file fe_hierarchic_shape_2D.C.
References libMesh::invalid_uint, libMesh::libmesh_assert(), and libMesh::Real.
{
libmesh_assert(elem);
// I have been lazy here and am using finite differences
// to compute the derivatives!
const Real eps = 1.e-6;
Point pp, pm;
unsigned int prevj = libMesh::invalid_uint;
switch (j)
{
// d^2()/dxi^2
case 0:
{
pp = Point(p(0)+eps, p(1));
pm = Point(p(0)-eps, p(1));
prevj = 0;
break;
}
// d^2()/dxideta
case 1:
{
pp = Point(p(0), p(1)+eps);
pm = Point(p(0), p(1)-eps);
prevj = 0;
break;
}
// d^2()/deta^2
case 2:
{
pp = Point(p(0), p(1)+eps);
pm = Point(p(0), p(1)-eps);
prevj = 1;
break;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
return (FE<2,HIERARCHIC>::shape_deriv(elem, order, i, prevj, pp) -
FE<2,HIERARCHIC>::shape_deriv(elem, order, i, prevj, pm)
)/2./eps;
}
| Real libMesh::FE< 2, L2_HIERARCHIC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 389 of file fe_l2_hierarchic_shape_2D.C.
References libMesh::invalid_uint, libMesh::libmesh_assert(), and libMesh::Real.
{
libmesh_assert(elem);
// I have been lazy here and am using finite differences
// to compute the derivatives!
const Real eps = 1.e-6;
Point pp, pm;
unsigned int prevj = libMesh::invalid_uint;
switch (j)
{
// d^2()/dxi^2
case 0:
{
pp = Point(p(0)+eps, p(1));
pm = Point(p(0)-eps, p(1));
prevj = 0;
break;
}
// d^2()/dxideta
case 1:
{
pp = Point(p(0), p(1)+eps);
pm = Point(p(0), p(1)-eps);
prevj = 0;
break;
}
// d^2()/deta^2
case 2:
{
pp = Point(p(0), p(1)+eps);
pm = Point(p(0), p(1)-eps);
prevj = 1;
break;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
return (FE<2,L2_HIERARCHIC>::shape_deriv(elem, order, i, prevj, pp) -
FE<2,L2_HIERARCHIC>::shape_deriv(elem, order, i, prevj, pm)
)/2./eps;
}
| Real libMesh::FE< 2, XYZ >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 396 of file fe_xyz_shape_2D.C.
{
libmesh_error_msg("XYZ polynomials require the element \nbecause the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 1, BERNSTEIN >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 402 of file fe_bernstein_shape_1D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Bernstein elements "
<< "are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 2, XYZ >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | point_in | ||
| ) |
Definition at line 409 of file fe_xyz_shape_2D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), std::pow(), libMesh::Real, and libMesh::x.
{
#if LIBMESH_DIM > 1
libmesh_assert_less_equal (j, 2);
libmesh_assert(elem);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = Point(0.,0.,0.);
for (unsigned int p = 0; p < elem->n_nodes(); p++)
for (unsigned int d = 0; d < 2; d++)
{
const Real distance = std::abs(centroid(d) - elem->point(p)(d));
max_distance(d) = std::max(distance, max_distance(d));
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real y = point_in(1);
const Real xc = centroid(0);
const Real yc = centroid(1);
const Real distx = max_distance(0);
const Real disty = max_distance(1);
const Real dx = (x - xc)/distx;
const Real dy = (y - yc)/disty;
const Real dist2x = pow(distx,2.);
const Real dist2y = pow(disty,2.);
const Real distxy = distx * disty;
#ifndef NDEBUG
// totalorder is only used in the assertion below, so
// we avoid declaring it when asserts are not active.
const unsigned int totalorder = order + elem->p_level();
#endif
libmesh_assert_less (i, (totalorder+1)*(totalorder+2)/2);
// monomials. since they are hierarchic we only need one case block.
switch (j)
{
// d^2()/dx^2
case 0:
{
switch (i)
{
// constants
case 0:
// linears
case 1:
case 2:
return 0.;
// quadratics
case 3:
return 2./dist2x;
case 4:
case 5:
return 0.;
// cubics
case 6:
return 6.*dx/dist2x;
case 7:
return 2.*dy/dist2x;
case 8:
case 9:
return 0.;
// quartics
case 10:
return 12.*dx*dx/dist2x;
case 11:
return 6.*dx*dy/dist2x;
case 12:
return 2.*dy*dy/dist2x;
case 13:
case 14:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int i2 = i - (o*(o+1)/2);
Real val = (o - i2) * (o - i2 - 1);
for (unsigned int index=i2+2; index < o; index++)
val *= dx;
for (unsigned int index=0; index != i2; index++)
val *= dy;
return val/dist2x;
}
}
// d^2()/dxdy
case 1:
{
switch (i)
{
// constants
case 0:
// linears
case 1:
case 2:
return 0.;
// quadratics
case 3:
return 0.;
case 4:
return 1./distxy;
case 5:
return 0.;
// cubics
case 6:
return 0.;
case 7:
return 2.*dx/distxy;
case 8:
return 2.*dy/distxy;
case 9:
return 0.;
// quartics
case 10:
return 0.;
case 11:
return 3.*dx*dx/distxy;
case 12:
return 4.*dx*dy/distxy;
case 13:
return 3.*dy*dy/distxy;
case 14:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int i2 = i - (o*(o+1)/2);
Real val = (o - i2) * i2;
for (unsigned int index=i2+1; index < o; index++)
val *= dx;
for (unsigned int index=1; index < i2; index++)
val *= dy;
return val/distxy;
}
}
// d^2()/dy^2
case 2:
{
switch (i)
{
// constants
case 0:
// linears
case 1:
case 2:
return 0.;
// quadratics
case 3:
case 4:
return 0.;
case 5:
return 2./dist2y;
// cubics
case 6:
return 0.;
case 7:
return 0.;
case 8:
return 2.*dx/dist2y;
case 9:
return 6.*dy/dist2y;
// quartics
case 10:
case 11:
return 0.;
case 12:
return 2.*dx*dx/dist2y;
case 13:
return 6.*dx*dy/dist2y;
case 14:
return 12.*dy*dy/dist2y;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)/2; o++) { }
unsigned int i2 = i - (o*(o+1)/2);
Real val = i2 * (i2 - 1);
for (unsigned int index=i2; index != o; index++)
val *= dx;
for (unsigned int index=2; index < i2; index++)
val *= dy;
return val/dist2y;
}
}
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
libmesh_error_msg("We'll never get here!");
return 0.;
#endif
}
| RealGradient libMesh::FE< 3, NEDELEC_ONE >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 493 of file fe_nedelec_one_shape_3D.C.
{
libmesh_error_msg("Nedelec elements require the element type \nbecause edge orientation is needed.");
return RealGradient();
}
| RealGradient libMesh::FE< 3, NEDELEC_ONE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | libmesh_dbg_varp | ||
| ) |
Definition at line 506 of file fe_nedelec_one_shape_3D.C.
References libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Elem::point(), libMesh::Real, libMesh::TET10, libMesh::TOLERANCE, and libMesh::Elem::type().
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
// j = 0 ==> d^2 phi / dxi^2
// j = 1 ==> d^2 phi / dxi deta
// j = 2 ==> d^2 phi / deta^2
// j = 3 ==> d^2 phi / dxi dzeta
// j = 4 ==> d^2 phi / deta dzeta
// j = 5 ==> d^2 phi / dzeta^2
libmesh_assert_less (j, 6);
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// linear Lagrange shape functions
case FIRST:
{
switch (elem->type())
{
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 12);
#ifndef NDEBUG
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
#endif
libmesh_assert_less_equal ( std::fabs(xi), 1.0+TOLERANCE );
libmesh_assert_less_equal ( std::fabs(eta), 1.0+TOLERANCE );
libmesh_assert_less_equal ( std::fabs(zeta), 1.0+TOLERANCE );
switch (j)
{
// d^2()/dxi^2
case 0:
{
// All d^2()/dxi^2 derivatives for linear hexes are zero.
return RealGradient();
} // j=0
// d^2()/dxideta
case 1:
{
switch(i)
{
case 0:
case 1:
case 2:
case 3:
case 8:
case 9:
case 10:
case 11:
return RealGradient();
case 4:
{
if( elem->point(0) > elem->point(4) )
return RealGradient( 0.0, 0.0, -0.125 );
else
return RealGradient( 0.0, 0.0, 0.125 );
}
case 5:
{
if( elem->point(1) > elem->point(5) )
return RealGradient( 0.0, 0.0, 0.125 );
else
return RealGradient( 0.0, 0.0, -0.125 );
}
case 6:
{
if( elem->point(2) > elem->point(6) )
return RealGradient( 0.0, 0.0, -0.125 );
else
return RealGradient( 0.0, 0.0, 0.125 );
}
case 7:
{
if( elem->point(3) > elem->point(7) )
return RealGradient( 0.0, 0.0, 0.125 );
else
return RealGradient( 0.0, 0.0, -0.125 );
}
default:
libmesh_error_msg("Invalid i = " << i);
} // switch(i)
} // j=1
// d^2()/deta^2
case 2:
{
// All d^2()/deta^2 derivatives for linear hexes are zero.
return RealGradient();
} // j = 2
// d^2()/dxidzeta
case 3:
{
switch(i)
{
case 0:
case 2:
case 4:
case 5:
case 6:
case 7:
case 8:
case 10:
return RealGradient();
case 1:
{
if( elem->point(1) > elem->point(2) )
return RealGradient( 0.0, 0.125 );
else
return RealGradient( 0.0, -0.125 );
}
case 3:
{
if( elem->point(3) > elem->point(0) )
return RealGradient( 0.0, -0.125 );
else
return RealGradient( 0.0, 0.125 );
}
case 9:
{
if( elem->point(5) > elem->point(6) )
return RealGradient( 0.0, -0.125, 0.0 );
else
return RealGradient( 0.0, 0.125, 0.0 );
}
case 11:
{
if( elem->point(4) > elem->point(7) )
return RealGradient( 0.0, 0.125, 0.0 );
else
return RealGradient( 0.0, -0.125, 0.0 );
}
default:
libmesh_error_msg("Invalid i = " << i);
} // switch(i)
} // j = 3
// d^2()/detadzeta
case 4:
{
switch(i)
{
case 1:
case 3:
case 4:
case 5:
case 6:
case 7:
case 9:
case 11:
return RealGradient();
case 0:
{
if( elem->point(0) > elem->point(1) )
return RealGradient( -0.125, 0.0, 0.0 );
else
return RealGradient( 0.125, 0.0, 0.0 );
}
case 2:
{
if( elem->point(2) > elem->point(3) )
return RealGradient( 0.125, 0.0, 0.0 );
else
return RealGradient( -0.125, 0.0, 0.0 );
}
case 8:
{
if( elem->point(4) > elem->point(5) )
return RealGradient( 0.125, 0.0, 0.0 );
else
return RealGradient( -0.125, 0.0, 0.0 );
}
case 10:
{
if( elem->point(7) > elem->point(6) )
return RealGradient( -0.125, 0.0, 0.0 );
else
return RealGradient( 0.125, 0.0, 0.0 );
}
default:
libmesh_error_msg("Invalid i = " << i);
} // switch(i)
} // j = 4
// d^2()/dzeta^2
case 5:
{
// All d^2()/dzeta^2 derivatives for linear hexes are zero.
return RealGradient();
} // j = 5
default:
libmesh_error_msg("Invalid j = " << j);
}
return RealGradient();
}
case TET10:
{
libmesh_assert_less (i, 6);
libmesh_not_implemented();
return RealGradient();
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << elem->type());
} //switch(type)
} // case FIRST:
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << totalorder);
}
#endif
libmesh_error_msg("We'll never get here!");
return RealGradient();
}
| Real libMesh::FE< 2, MONOMIAL >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 541 of file fe_monomial_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// by default call the orientation-independent shape functions
return FE<2,MONOMIAL>::shape_second_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 3, HERMITE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 548 of file fe_hermite_shape_3D.C.
References libMesh::FEHermite< Dim >::hermite_raw_shape(), libMesh::FEHermite< Dim >::hermite_raw_shape_deriv(), libMesh::FEHermite< Dim >::hermite_raw_shape_second_deriv(), libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::Real, libMesh::THIRD, and libMesh::Elem::type().
{
libmesh_assert(elem);
std::vector<std::vector<Real> > dxdxi(3, std::vector<Real>(2, 0));
#ifdef DEBUG
std::vector<Real> dydxi(2), dzdeta(2), dxdzeta(2);
std::vector<Real> dzdxi(2), dxdeta(2), dydzeta(2);
#endif //DEBUG
hermite_compute_coefs(elem, dxdxi
#ifdef DEBUG
, dydxi, dzdeta, dxdzeta, dzdxi, dxdeta, dydzeta
#endif
);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 3rd-order tricubic Hermite functions
case THIRD:
{
switch (type)
{
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 64);
std::vector<unsigned int> bases1D;
Real coef = hermite_bases_3D(bases1D, dxdxi, totalorder, i);
switch (j) // Derivative type
{
case 0:
return coef *
FEHermite<1>::hermite_raw_shape_second_deriv(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape(bases1D[2],p(2));
break;
case 1:
return coef *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape(bases1D[2],p(2));
break;
case 2:
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape_second_deriv(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape(bases1D[2],p(2));
break;
case 3:
return coef *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[2],p(2));
break;
case 4:
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape_deriv(bases1D[2],p(2));
break;
case 5:
return coef *
FEHermite<1>::hermite_raw_shape(bases1D[0],p(0)) *
FEHermite<1>::hermite_raw_shape(bases1D[1],p(1)) *
FEHermite<1>::hermite_raw_shape_second_deriv(bases1D[2],p(2));
break;
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order " << totalorder);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 0, LAGRANGE_VEC >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 551 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_second_deriv().
{
Real value = FE<0,LAGRANGE>::shape_second_deriv( type, order, i, j, p );
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 2, BERNSTEIN >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 562 of file fe_bernstein_shape_2D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Bernstein elements "
<< "are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 2, LAGRANGE >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 564 of file fe_lagrange_shape_2D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::TRI3, and libMesh::TRI6.
{
#if LIBMESH_DIM > 1
// j = 0 ==> d^2 phi / dxi^2
// j = 1 ==> d^2 phi / dxi deta
// j = 2 ==> d^2 phi / deta^2
libmesh_assert_less (j, 3);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
case QUAD4:
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 4);
// 0 1 2 3
static const unsigned int i0[] = {0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1};
switch (j)
{
// d^2() / dxi^2
case 0:
return 0.;
// d^2() / dxi deta
case 1:
return (FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta));
// d^2() / deta^2
case 2:
return 0.;
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case TRI3:
case TRI6:
{
// All second derivatives for linear triangles are zero.
return 0.;
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
} // end switch (type)
} // end case FIRST
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
case QUAD8:
{
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (j, 3);
switch (j)
{
// d^2() / dxi^2
case 0:
{
switch (i)
{
case 0:
case 1:
return 0.5*(1.-eta);
case 2:
case 3:
return 0.5*(1.+eta);
case 4:
return eta - 1.;
case 5:
case 7:
return 0.0;
case 6:
return -1. - eta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / dxi deta
case 1:
{
switch (i)
{
case 0:
return 0.25*( 1. - 2.*xi - 2.*eta);
case 1:
return 0.25*(-1. - 2.*xi + 2.*eta);
case 2:
return 0.25*( 1. + 2.*xi + 2.*eta);
case 3:
return 0.25*(-1. + 2.*xi - 2.*eta);
case 4:
return xi;
case 5:
return -eta;
case 6:
return -xi;
case 7:
return eta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / deta^2
case 2:
{
switch (i)
{
case 0:
case 3:
return 0.5*(1.-xi);
case 1:
case 2:
return 0.5*(1.+xi);
case 4:
case 6:
return 0.0;
case 5:
return -1.0 - xi;
case 7:
return xi - 1.0;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
} // end switch (j)
} // end case QUAD8
case QUAD9:
{
// Compute QUAD9 second derivatives as tensor product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
switch (j)
{
// d^2() / dxi^2
case 0:
return (FE<1,LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta));
// d^2() / dxi deta
case 1:
return (FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta));
// d^2() / deta^2
case 2:
return (FE<1,LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i1[i], 0, eta));
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
} // end switch (j)
} // end case QUAD9
case TRI6:
{
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
libmesh_assert_less (j, 3);
switch (j)
{
// d^2() / dxi^2
case 0:
{
switch (i)
{
case 0:
return 4.*dzeta0dxi*dzeta0dxi;
case 1:
return 4.*dzeta1dxi*dzeta1dxi;
case 2:
return 4.*dzeta2dxi*dzeta2dxi;
case 3:
return 8.*dzeta0dxi*dzeta1dxi;
case 4:
return 8.*dzeta1dxi*dzeta2dxi;
case 5:
return 8.*dzeta0dxi*dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / dxi deta
case 1:
{
switch (i)
{
case 0:
return 4.*dzeta0dxi*dzeta0deta;
case 1:
return 4.*dzeta1dxi*dzeta1deta;
case 2:
return 4.*dzeta2dxi*dzeta2deta;
case 3:
return 4.*dzeta1deta*dzeta0dxi + 4.*dzeta0deta*dzeta1dxi;
case 4:
return 4.*dzeta2deta*dzeta1dxi + 4.*dzeta1deta*dzeta2dxi;
case 5:
return 4.*dzeta2deta*dzeta0dxi + 4.*dzeta0deta*dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / deta^2
case 2:
{
switch (i)
{
case 0:
return 4.*dzeta0deta*dzeta0deta;
case 1:
return 4.*dzeta1deta*dzeta1deta;
case 2:
return 4.*dzeta2deta*dzeta2deta;
case 3:
return 8.*dzeta0deta*dzeta1deta;
case 4:
return 8.*dzeta1deta*dzeta2deta;
case 5:
return 8.*dzeta0deta*dzeta2deta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
} // end switch (j)
} // end case TRI6
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
} // end case SECOND
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order: " << order);
} // end switch (order)
libmesh_error_msg("We'll never get here!");
#endif // LIBMESH_DIM > 1
return 0.;
}
| Real libMesh::FE< 2, SUBDIVISION >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
| Real libMesh::FE< 2, L2_LAGRANGE >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 568 of file fe_l2_lagrange_shape_2D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::QUAD4, libMesh::QUAD8, libMesh::QUAD9, libMesh::Real, libMesh::SECOND, libMesh::TRI3, and libMesh::TRI6.
{
#if LIBMESH_DIM > 1
// j = 0 ==> d^2 phi / dxi^2
// j = 1 ==> d^2 phi / dxi deta
// j = 2 ==> d^2 phi / deta^2
libmesh_assert_less (j, 3);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
case QUAD4:
case QUAD8:
case QUAD9:
{
// Compute quad shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 4);
// 0 1 2 3
static const unsigned int i0[] = {0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1};
switch (j)
{
// d^2() / dxi^2
case 0:
return 0.;
// d^2() / dxi deta
case 1:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta));
// d^2() / deta^2
case 2:
return 0.;
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
}
}
case TRI3:
case TRI6:
{
// All second derivatives for linear triangles are zero.
return 0.;
}
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
} // end switch (type)
} // end case FIRST
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
case QUAD8:
{
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (j, 3);
switch (j)
{
// d^2() / dxi^2
case 0:
{
switch (i)
{
case 0:
case 1:
return 0.5*(1.-eta);
case 2:
case 3:
return 0.5*(1.+eta);
case 4:
return eta - 1.;
case 5:
case 7:
return 0.0;
case 6:
return -1. - eta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / dxi deta
case 1:
{
switch (i)
{
case 0:
return 0.25*( 1. - 2.*xi - 2.*eta);
case 1:
return 0.25*(-1. - 2.*xi + 2.*eta);
case 2:
return 0.25*( 1. + 2.*xi + 2.*eta);
case 3:
return 0.25*(-1. + 2.*xi - 2.*eta);
case 4:
return xi;
case 5:
return -eta;
case 6:
return -xi;
case 7:
return eta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / deta^2
case 2:
{
switch (i)
{
case 0:
case 3:
return 0.5*(1.-xi);
case 1:
case 2:
return 0.5*(1.+xi);
case 4:
case 6:
return 0.0;
case 5:
return -1.0 - xi;
case 7:
return xi - 1.0;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
} // end switch (j)
} // end case QUAD8
case QUAD9:
{
// Compute QUAD9 second derivatives as tensor product
const Real xi = p(0);
const Real eta = p(1);
libmesh_assert_less (i, 9);
// 0 1 2 3 4 5 6 7 8
static const unsigned int i0[] = {0, 1, 1, 0, 2, 1, 2, 0, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 2, 1, 2, 2};
switch (j)
{
// d^2() / dxi^2
case 0:
return (FE<1,L2_LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta));
// d^2() / dxi deta
case 1:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta));
// d^2() / deta^2
case 2:
return (FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i1[i], 0, eta));
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
} // end switch (j)
} // end case QUAD9
case TRI6:
{
const Real dzeta0dxi = -1.;
const Real dzeta1dxi = 1.;
const Real dzeta2dxi = 0.;
const Real dzeta0deta = -1.;
const Real dzeta1deta = 0.;
const Real dzeta2deta = 1.;
libmesh_assert_less (j, 3);
switch (j)
{
// d^2() / dxi^2
case 0:
{
switch (i)
{
case 0:
return 4.*dzeta0dxi*dzeta0dxi;
case 1:
return 4.*dzeta1dxi*dzeta1dxi;
case 2:
return 4.*dzeta2dxi*dzeta2dxi;
case 3:
return 8.*dzeta0dxi*dzeta1dxi;
case 4:
return 8.*dzeta1dxi*dzeta2dxi;
case 5:
return 8.*dzeta0dxi*dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / dxi deta
case 1:
{
switch (i)
{
case 0:
return 4.*dzeta0dxi*dzeta0deta;
case 1:
return 4.*dzeta1dxi*dzeta1deta;
case 2:
return 4.*dzeta2dxi*dzeta2deta;
case 3:
return 4.*dzeta1deta*dzeta0dxi + 4.*dzeta0deta*dzeta1dxi;
case 4:
return 4.*dzeta2deta*dzeta1dxi + 4.*dzeta1deta*dzeta2dxi;
case 5:
return 4.*dzeta2deta*dzeta0dxi + 4.*dzeta0deta*dzeta2dxi;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
// d^2() / deta^2
case 2:
{
switch (i)
{
case 0:
return 4.*dzeta0deta*dzeta0deta;
case 1:
return 4.*dzeta1deta*dzeta1deta;
case 2:
return 4.*dzeta2deta*dzeta2deta;
case 3:
return 8.*dzeta0deta*dzeta1deta;
case 4:
return 8.*dzeta1deta*dzeta2deta;
case 5:
return 8.*dzeta0deta*dzeta2deta;
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Invalid derivative index j = " << j);
} // end switch (j)
} // end case TRI6
default:
libmesh_error_msg("ERROR: Unsupported 2D element type: " << type);
}
} // end case SECOND
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 2D FE order: " << order);
} // end switch (order)
libmesh_error_msg("We'll never get here!");
return 0.;
#endif // LIBMESH_DIM > 1
}
| RealGradient libMesh::FE< 1, LAGRANGE_VEC >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 573 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_second_deriv().
{
Real value = FE<1,LAGRANGE>::shape_second_deriv( type, order, i, j, p );
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 2, BERNSTEIN >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 582 of file fe_bernstein_shape_2D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Bernstein elements "
<< "are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| RealGradient libMesh::FE< 0, NEDELEC_ONE >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 613 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 0, NEDELEC_ONE >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 617 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 2, LAGRANGE_VEC >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 623 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_second_deriv().
{
Real value = FE<2,LAGRANGE>::shape_second_deriv( type, order, i/2, j, p );
switch( i%2 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
default:
libmesh_error_msg("i%2 must be either 0 or 1!");
}
//dummy
return libMesh::RealGradient();
}
| RealGradient libMesh::FE< 1, NEDELEC_ONE >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 636 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| RealGradient libMesh::FE< 1, NEDELEC_ONE >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 640 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| Real libMesh::FE< 3, MONOMIAL >::shape_second_deriv | ( | const ElemType | , |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 655 of file fe_monomial_shape_3D.C.
References libMesh::Real.
{
#if LIBMESH_DIM == 3
libmesh_assert_less (j, 6);
libmesh_assert_less (i, (static_cast<unsigned int>(order)+1)*
(static_cast<unsigned int>(order)+2)*
(static_cast<unsigned int>(order)+3)/6);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// monomials. since they are hierarchic we only need one case block.
switch (j)
{
// d^2()/dxi^2
case 0:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
return 2.;
case 5:
case 6:
case 7:
case 8:
case 9:
return 0.;
// cubic
case 10:
return 6.*xi;
case 11:
return 2.*eta;
case 12:
case 13:
return 0.;
case 14:
return 2.*zeta;
case 15:
case 16:
case 17:
case 18:
case 19:
return 0.;
// quartics
case 20:
return 12.*xi*xi;
case 21:
return 6.*xi*eta;
case 22:
return 2.*eta*eta;
case 23:
case 24:
return 0.;
case 25:
return 6.*xi*zeta;
case 26:
return 2.*eta*zeta;
case 27:
case 28:
return 0.;
case 29:
return 2.*zeta*zeta;
case 30:
case 31:
case 32:
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx * (nx - 1);
for (unsigned int index=2; index < nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
for (unsigned int index=0; index != nz; index++)
val *= zeta;
return val;
}
}
// d^2()/dxideta
case 1:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
return 0.;
case 5:
return 1.;
case 6:
case 7:
case 8:
case 9:
return 0.;
// cubic
case 10:
return 0.;
case 11:
return 2.*xi;
case 12:
return 2.*eta;
case 13:
case 14:
return 0.;
case 15:
return zeta;
case 16:
case 17:
case 18:
case 19:
return 0.;
// quartics
case 20:
return 0.;
case 21:
return 3.*xi*xi;
case 22:
return 4.*xi*eta;
case 23:
return 3.*eta*eta;
case 24:
case 25:
return 0.;
case 26:
return 2.*xi*zeta;
case 27:
return 2.*eta*zeta;
case 28:
case 29:
return 0.;
case 30:
return zeta*zeta;
case 31:
case 32:
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx * ny;
for (unsigned int index=1; index < nx; index++)
val *= xi;
for (unsigned int index=1; index < ny; index++)
val *= eta;
for (unsigned int index=0; index != nz; index++)
val *= zeta;
return val;
}
}
// d^2()/deta^2
case 2:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
return 0.;
case 6:
return 2.;
case 7:
case 8:
case 9:
return 0.;
// cubic
case 10:
case 11:
return 0.;
case 12:
return 2.*xi;
case 13:
return 6.*eta;
case 14:
case 15:
return 0.;
case 16:
return 2.*zeta;
case 17:
case 18:
case 19:
return 0.;
// quartics
case 20:
case 21:
return 0.;
case 22:
return 2.*xi*xi;
case 23:
return 6.*xi*eta;
case 24:
return 12.*eta*eta;
case 25:
case 26:
return 0.;
case 27:
return 2.*xi*zeta;
case 28:
return 6.*eta*zeta;
case 29:
case 30:
return 0.;
case 31:
return 2.*zeta*zeta;
case 32:
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = ny * (ny - 1);
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=2; index < ny; index++)
val *= eta;
for (unsigned int index=0; index != nz; index++)
val *= zeta;
return val;
}
}
// d^2()/dxidzeta
case 3:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
case 6:
return 0.;
case 7:
return 1.;
case 8:
case 9:
return 0.;
// cubic
case 10:
case 11:
case 12:
case 13:
return 0.;
case 14:
return 2.*xi;
case 15:
return eta;
case 16:
return 0.;
case 17:
return 2.*zeta;
case 18:
case 19:
return 0.;
// quartics
case 20:
case 21:
case 22:
case 23:
case 24:
return 0.;
case 25:
return 3.*xi*xi;
case 26:
return 2.*xi*eta;
case 27:
return eta*eta;
case 28:
return 0.;
case 29:
return 4.*xi*zeta;
case 30:
return 2.*eta*zeta;
case 31:
return 0.;
case 32:
return 3.*zeta*zeta;
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx * nz;
for (unsigned int index=1; index < nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
for (unsigned int index=1; index < nz; index++)
val *= zeta;
return val;
}
}
// d^2()/detadzeta
case 4:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
case 6:
case 7:
return 0.;
case 8:
return 1.;
case 9:
return 0.;
// cubic
case 10:
case 11:
case 12:
case 13:
case 14:
return 0.;
case 15:
return xi;
case 16:
return 2.*eta;
case 17:
return 0.;
case 18:
return 2.*zeta;
case 19:
return 0.;
// quartics
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
return 0.;
case 26:
return xi*xi;
case 27:
return 2.*xi*eta;
case 28:
return 3.*eta*eta;
case 29:
return 0.;
case 30:
return 2.*xi*zeta;
case 31:
return 4.*eta*zeta;
case 32:
return 0.;
case 33:
return 3.*zeta*zeta;
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = ny * nz;
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=1; index < ny; index++)
val *= eta;
for (unsigned int index=1; index < nz; index++)
val *= zeta;
return val;
}
}
// d^2()/dzeta^2
case 5:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
case 6:
case 7:
case 8:
return 0.;
case 9:
return 2.;
// cubic
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
return 0.;
case 17:
return 2.*xi;
case 18:
return 2.*eta;
case 19:
return 6.*zeta;
// quartics
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
return 0.;
case 29:
return 2.*xi*xi;
case 30:
return 2.*xi*eta;
case 31:
return 2.*eta*eta;
case 32:
return 6.*xi*zeta;
case 33:
return 6.*eta*zeta;
case 34:
return 12.*zeta*zeta;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nz * (nz - 1);
for (unsigned int index=0; index != nx; index++)
val *= xi;
for (unsigned int index=0; index != ny; index++)
val *= eta;
for (unsigned int index=2; index < nz; index++)
val *= zeta;
return val;
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 3, LAGRANGE_VEC >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 694 of file fe_lagrange_vec.C.
References libMesh::Real, and libMesh::FE< Dim, T >::shape_second_deriv().
{
Real value = FE<3,LAGRANGE>::shape_second_deriv( type, order, i/3, j, p );
switch( i%3 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
case 2:
return libMesh::RealGradient( Real(0), Real(0), value );
default:
libmesh_error_msg("i%3 must be 0, 1, or 2!");
}
//dummy
return libMesh::RealGradient();
}
| RealGradient libMesh::FE< 0, LAGRANGE_VEC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 735 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
Real value = FE<0,LAGRANGE>::shape_second_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 3, XYZ >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 736 of file fe_xyz_shape_3D.C.
{
libmesh_error_msg("XYZ polynomials require the element \nbecause the centroid is needed.");
return 0.;
}
| Real libMesh::FE< 3, XYZ >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | libmesh_dbg_varorder, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | point_in | ||
| ) |
Definition at line 749 of file fe_xyz_shape_3D.C.
References std::abs(), libMesh::Elem::centroid(), libMesh::DofObject::id(), libMesh::libmesh_assert(), std::max(), libMesh::Elem::n_nodes(), libMesh::n_threads(), libMesh::Elem::p_level(), libMesh::Elem::point(), std::pow(), libMesh::Real, and libMesh::x.
{
#if LIBMESH_DIM == 3
libmesh_assert(elem);
libmesh_assert_less (j, 6);
// Only recompute the centroid if the element
// has changed from the last one we computed.
// This avoids repeated centroid calculations
// when called in succession with the same element.
if (elem->id() != old_elem_id)
{
centroid = elem->centroid();
old_elem_id = elem->id();
max_distance = Point(0.,0.,0.);
for (unsigned int p = 0; p < elem->n_nodes(); p++)
for (unsigned int d = 0; d < 3; d++)
{
const Real distance = std::abs(centroid(d) - elem->point(p)(d));
max_distance(d) = std::max(distance, max_distance(d));
}
}
// Using static globals for old_elem_id, etc. will fail
// horribly with more than one thread.
libmesh_assert_equal_to (libMesh::n_threads(), 1);
const Real x = point_in(0);
const Real y = point_in(1);
const Real z = point_in(2);
const Real xc = centroid(0);
const Real yc = centroid(1);
const Real zc = centroid(2);
const Real distx = max_distance(0);
const Real disty = max_distance(1);
const Real distz = max_distance(2);
const Real dx = (x - xc)/distx;
const Real dy = (y - yc)/disty;
const Real dz = (z - zc)/distz;
const Real dist2x = pow(distx,2.);
const Real dist2y = pow(disty,2.);
const Real dist2z = pow(distz,2.);
const Real distxy = distx * disty;
const Real distxz = distx * distz;
const Real distyz = disty * distz;
#ifndef NDEBUG
// totalorder is only used in the assertion below, so
// we avoid declaring it when asserts are not active.
const unsigned int totalorder = static_cast<Order>(order + elem->p_level());
#endif
libmesh_assert_less (i, (static_cast<unsigned int>(totalorder)+1)*
(static_cast<unsigned int>(totalorder)+2)*
(static_cast<unsigned int>(totalorder)+3)/6);
// monomials. since they are hierarchic we only need one case block.
switch (j)
{
// d^2()/dx^2
case 0:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
return 2./dist2x;
case 5:
case 6:
case 7:
case 8:
case 9:
return 0.;
// cubic
case 10:
return 6.*dx/dist2x;
case 11:
return 2.*dy/dist2x;
case 12:
case 13:
return 0.;
case 14:
return 2.*dz/dist2x;
case 15:
case 16:
case 17:
case 18:
case 19:
return 0.;
// quartics
case 20:
return 12.*dx*dx/dist2x;
case 21:
return 6.*dx*dy/dist2x;
case 22:
return 2.*dy*dy/dist2x;
case 23:
case 24:
return 0.;
case 25:
return 6.*dx*dz/dist2x;
case 26:
return 2.*dy*dz/dist2x;
case 27:
case 28:
return 0.;
case 29:
return 2.*dz*dz/dist2x;
case 30:
case 31:
case 32:
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx * (nx - 1);
for (unsigned int index=2; index < nx; index++)
val *= dx;
for (unsigned int index=0; index != ny; index++)
val *= dy;
for (unsigned int index=0; index != nz; index++)
val *= dz;
return val/dist2x;
}
}
// d^2()/dxdy
case 1:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
return 0.;
case 5:
return 1./distxy;
case 6:
case 7:
case 8:
case 9:
return 0.;
// cubic
case 10:
return 0.;
case 11:
return 2.*dx/distxy;
case 12:
return 2.*dy/distxy;
case 13:
case 14:
return 0.;
case 15:
return dz/distxy;
case 16:
case 17:
case 18:
case 19:
return 0.;
// quartics
case 20:
return 0.;
case 21:
return 3.*dx*dx/distxy;
case 22:
return 4.*dx*dy/distxy;
case 23:
return 3.*dy*dy/distxy;
case 24:
case 25:
return 0.;
case 26:
return 2.*dx*dz/distxy;
case 27:
return 2.*dy*dz/distxy;
case 28:
case 29:
return 0.;
case 30:
return dz*dz/distxy;
case 31:
case 32:
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx * ny;
for (unsigned int index=1; index < nx; index++)
val *= dx;
for (unsigned int index=1; index < ny; index++)
val *= dy;
for (unsigned int index=0; index != nz; index++)
val *= dz;
return val/distxy;
}
}
// d^2()/dy^2
case 2:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
return 0.;
case 6:
return 2./dist2y;
case 7:
case 8:
case 9:
return 0.;
// cubic
case 10:
case 11:
return 0.;
case 12:
return 2.*dx/dist2y;
case 13:
return 6.*dy/dist2y;
case 14:
case 15:
return 0.;
case 16:
return 2.*dz/dist2y;
case 17:
case 18:
case 19:
return 0.;
// quartics
case 20:
case 21:
return 0.;
case 22:
return 2.*dx*dx/dist2y;
case 23:
return 6.*dx*dy/dist2y;
case 24:
return 12.*dy*dy/dist2y;
case 25:
case 26:
return 0.;
case 27:
return 2.*dx*dz/dist2y;
case 28:
return 6.*dy*dz/dist2y;
case 29:
case 30:
return 0.;
case 31:
return 2.*dz*dz/dist2y;
case 32:
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = ny * (ny - 1);
for (unsigned int index=0; index != nx; index++)
val *= dx;
for (unsigned int index=2; index < ny; index++)
val *= dy;
for (unsigned int index=0; index != nz; index++)
val *= dz;
return val/dist2y;
}
}
// d^2()/dxdz
case 3:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
case 6:
return 0.;
case 7:
return 1./distxz;
case 8:
case 9:
return 0.;
// cubic
case 10:
case 11:
case 12:
case 13:
return 0.;
case 14:
return 2.*dx/distxz;
case 15:
return dy/distxz;
case 16:
return 0.;
case 17:
return 2.*dz/distxz;
case 18:
case 19:
return 0.;
// quartics
case 20:
case 21:
case 22:
case 23:
case 24:
return 0.;
case 25:
return 3.*dx*dx/distxz;
case 26:
return 2.*dx*dy/distxz;
case 27:
return dy*dy/distxz;
case 28:
return 0.;
case 29:
return 4.*dx*dz/distxz;
case 30:
return 2.*dy*dz/distxz;
case 31:
return 0.;
case 32:
return 3.*dz*dz/distxz;
case 33:
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nx * nz;
for (unsigned int index=1; index < nx; index++)
val *= dx;
for (unsigned int index=0; index != ny; index++)
val *= dy;
for (unsigned int index=1; index < nz; index++)
val *= dz;
return val/distxz;
}
}
// d^2()/dydz
case 4:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
case 6:
case 7:
return 0.;
case 8:
return 1./distyz;
case 9:
return 0.;
// cubic
case 10:
case 11:
case 12:
case 13:
case 14:
return 0.;
case 15:
return dx/distyz;
case 16:
return 2.*dy/distyz;
case 17:
return 0.;
case 18:
return 2.*dz/distyz;
case 19:
return 0.;
// quartics
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
return 0.;
case 26:
return dx*dx/distyz;
case 27:
return 2.*dx*dy/distyz;
case 28:
return 3.*dy*dy/distyz;
case 29:
return 0.;
case 30:
return 2.*dx*dz/distyz;
case 31:
return 4.*dy*dz/distyz;
case 32:
return 0.;
case 33:
return 3.*dz*dz/distyz;
case 34:
return 0.;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = ny * nz;
for (unsigned int index=0; index != nx; index++)
val *= dx;
for (unsigned int index=1; index < ny; index++)
val *= dy;
for (unsigned int index=1; index < nz; index++)
val *= dz;
return val/distyz;
}
}
// d^2()/dz^2
case 5:
{
switch (i)
{
// constant
case 0:
// linear
case 1:
case 2:
case 3:
return 0.;
// quadratic
case 4:
case 5:
case 6:
case 7:
case 8:
return 0.;
case 9:
return 2./dist2z;
// cubic
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
return 0.;
case 17:
return 2.*dx/dist2z;
case 18:
return 2.*dy/dist2z;
case 19:
return 6.*dz/dist2z;
// quartics
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
return 0.;
case 29:
return 2.*dx*dx/dist2z;
case 30:
return 2.*dx*dy/dist2z;
case 31:
return 2.*dy*dy/dist2z;
case 32:
return 6.*dx*dz/dist2z;
case 33:
return 6.*dy*dz/dist2z;
case 34:
return 12.*dz*dz/dist2z;
default:
unsigned int o = 0;
for (; i >= (o+1)*(o+2)*(o+3)/6; o++) { }
unsigned int i2 = i - (o*(o+1)*(o+2)/6);
unsigned int block=o, nz = 0;
for (; block < i2; block += (o-nz+1)) { nz++; }
const unsigned int nx = block - i2;
const unsigned int ny = o - nx - nz;
Real val = nz * (nz - 1);
for (unsigned int index=0; index != nx; index++)
val *= dx;
for (unsigned int index=0; index != ny; index++)
val *= dy;
for (unsigned int index=2; index < nz; index++)
val *= dz;
return val/dist2z;
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 1, LAGRANGE_VEC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 757 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
Real value = FE<1,LAGRANGE>::shape_second_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
return libMesh::RealGradient( value );
}
| Real libMesh::FE< 3, L2_HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 775 of file fe_l2_hierarchic_shape_3D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| Real libMesh::FE< 3, HIERARCHIC >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 775 of file fe_hierarchic_shape_3D.C.
{
libmesh_error_msg("Hierarchic polynomials require the element type \nbecause edge and face orientation is needed.");
return 0.;
}
| Real libMesh::FE< 3, L2_HIERARCHIC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 788 of file fe_l2_hierarchic_shape_3D.C.
References libMesh::invalid_uint, libMesh::libmesh_assert(), and libMesh::Real.
{
libmesh_assert(elem);
const Real eps = 1.e-6;
Point pp, pm;
unsigned int prevj = libMesh::invalid_uint;
switch (j)
{
// d^2()/dxi^2
case 0:
{
pp = Point(p(0)+eps, p(1), p(2));
pm = Point(p(0)-eps, p(1), p(2));
prevj = 0;
break;
}
// d^2()/dxideta
case 1:
{
pp = Point(p(0), p(1)+eps, p(2));
pm = Point(p(0), p(1)-eps, p(2));
prevj = 0;
break;
}
// d^2()/deta^2
case 2:
{
pp = Point(p(0), p(1)+eps, p(2));
pm = Point(p(0), p(1)-eps, p(2));
prevj = 1;
break;
}
// d^2()/dxidzeta
case 3:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
prevj = 0;
break;
}
// d^2()/detadzeta
case 4:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
prevj = 1;
break;
}
// d^2()/dzeta^2
case 5:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
prevj = 2;
break;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
return (FE<3,L2_HIERARCHIC>::shape_deriv(elem, order, i, prevj, pp) -
FE<3,L2_HIERARCHIC>::shape_deriv(elem, order, i, prevj, pm))
/ 2. / eps;
}
| Real libMesh::FE< 3, HIERARCHIC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 788 of file fe_hierarchic_shape_3D.C.
References libMesh::invalid_uint, libMesh::libmesh_assert(), and libMesh::Real.
{
libmesh_assert(elem);
const Real eps = 1.e-6;
Point pp, pm;
unsigned int prevj = libMesh::invalid_uint;
switch (j)
{
// d^2()/dxi^2
case 0:
{
pp = Point(p(0)+eps, p(1), p(2));
pm = Point(p(0)-eps, p(1), p(2));
prevj = 0;
break;
}
// d^2()/dxideta
case 1:
{
pp = Point(p(0), p(1)+eps, p(2));
pm = Point(p(0), p(1)-eps, p(2));
prevj = 0;
break;
}
// d^2()/deta^2
case 2:
{
pp = Point(p(0), p(1)+eps, p(2));
pm = Point(p(0), p(1)-eps, p(2));
prevj = 1;
break;
}
// d^2()/dxidzeta
case 3:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
prevj = 0;
break;
}
// d^2()/detadzeta
case 4:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
prevj = 1;
break;
}
// d^2()/dzeta^2
case 5:
{
pp = Point(p(0), p(1), p(2)+eps);
pm = Point(p(0), p(1), p(2)-eps);
prevj = 2;
break;
}
default:
libmesh_error_msg("Invalid derivative index j = " << j);
}
return (FE<3,HIERARCHIC>::shape_deriv(elem, order, i, prevj, pp) -
FE<3,HIERARCHIC>::shape_deriv(elem, order, i, prevj, pm))
/ 2. / eps;
}
| Real libMesh::FE< 2, SUBDIVISION >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 803 of file fe_subdivision_2D.C.
References libMesh::FOURTH, and libMesh::TRI3SUBDIVISION.
{
switch (order)
{
case FOURTH:
{
switch (type)
{
case TRI3SUBDIVISION:
libmesh_assert_less(i, 12);
return FESubdivision::regular_shape_second_deriv(i,j,p(0),p(1));
default:
libmesh_error_msg("ERROR: Unsupported element type!");
}
}
default:
libmesh_error_msg("ERROR: Unsupported polynomial order!");
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| RealGradient libMesh::FE< 2, LAGRANGE_VEC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 807 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
Real value = FE<2,LAGRANGE>::shape_second_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i/2, j, p );
switch( i%2 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
default:
libmesh_error_msg("i%2 must be either 0 or 1!");
}
//dummy
return libMesh::RealGradient();
}
| Real libMesh::FE< 2, SUBDIVISION >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 833 of file fe_subdivision_2D.C.
References libMesh::libmesh_assert(), and libMesh::Elem::type().
{
libmesh_assert(elem);
return FE<2,SUBDIVISION>::shape_second_deriv(elem->type(), order, i, j, p);
}
| RealGradient libMesh::FE< 3, LAGRANGE_VEC >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 877 of file fe_lagrange_vec.C.
References libMesh::Elem::p_level(), libMesh::Real, libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
Real value = FE<3,LAGRANGE>::shape_second_deriv( elem->type(), static_cast<Order>(order + elem->p_level()), i/3, j, p );
switch( i%3 )
{
case 0:
return libMesh::RealGradient( value );
case 1:
return libMesh::RealGradient( Real(0), value );
case 2:
return libMesh::RealGradient( Real(0), Real(0), value );
default:
libmesh_error_msg("i%3 must be 0, 1, or 2!");
}
//dummy
return libMesh::RealGradient();
}
| Real libMesh::FE< 2, LAGRANGE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 899 of file fe_lagrange_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<2,LAGRANGE>::shape_second_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, L2_LAGRANGE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 905 of file fe_l2_lagrange_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape functions
return FE<2,L2_LAGRANGE>::shape_second_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 3, L2_LAGRANGE >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1216 of file fe_l2_lagrange_shape_3D.C.
References libMesh::EDGE3, libMesh::err, libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::PRISM18, libMesh::Real, libMesh::SECOND, libMesh::TET10, and libMesh::TRI6.
{
#if LIBMESH_DIM == 3
libmesh_assert_less (j, 6);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
return 0.;
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
// serendipity hexahedral quadratic shape functions
case HEX20:
{
static bool warning_given_HEX20 = false;
if (!warning_given_HEX20)
libMesh::err << "Second derivatives for 3D Lagrangian HEX20"
<< " elements are not yet implemented!"
<< std::endl;
warning_given_HEX20 = true;
}
// triquadraic hexahedral shape funcions
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
switch(j)
{
// d^2()/dxi^2
case 0:
return (FE<1,L2_LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
// d^2()/dxideta
case 1:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
// d^2()/deta^2
case 2:
return (FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
// d^2()/dxidzeta
case 3:
return (FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i2[i], 0, zeta));
// d^2()/detadzeta
case 4:
return (FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i2[i], 0, zeta));
// d^2()/dzeta^2
case 5:
return (FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,L2_LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,L2_LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// quadratic tetrahedral shape functions
case TET10:
{
// The area coordinates are the same as used for the
// shape() and shape_deriv() functions.
// const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
// const Real zeta1 = p(0);
// const Real zeta2 = p(1);
// const Real zeta3 = p(2);
static const Real dzetadxi[4][3] =
{
{-1., -1., -1.},
{1., 0., 0.},
{0., 1., 0.},
{0., 0., 1.}
};
// Convert from j -> (j,k) indices for independent variable
// (0=xi, 1=eta, 2=zeta)
static const unsigned short int independent_var_indices[6][2] =
{
{0, 0}, // d^2 phi / dxi^2
{0, 1}, // d^2 phi / dxi deta
{1, 1}, // d^2 phi / deta^2
{0, 2}, // d^2 phi / dxi dzeta
{1, 2}, // d^2 phi / deta dzeta
{2, 2} // d^2 phi / dzeta^2
};
// Convert from i -> zeta indices. Each quadratic shape
// function for the Tet10 depends on up to two of the zeta
// area coordinate functions (see the shape() function above).
// This table just tells which two area coords it uses.
static const unsigned short int zeta_indices[10][2] =
{
{0, 0},
{1, 1},
{2, 2},
{3, 3},
{0, 1},
{1, 2},
{2, 0},
{0, 3},
{1, 3},
{2, 3},
};
// Look up the independent variable indices for this value of j.
const unsigned int my_j = independent_var_indices[j][0];
const unsigned int my_k = independent_var_indices[j][1];
if (i<4)
{
return 4.*dzetadxi[i][my_j]*dzetadxi[i][my_k];
}
else if (i<10)
{
const unsigned short int my_m = zeta_indices[i][0];
const unsigned short int my_n = zeta_indices[i][1];
return 4.*(dzetadxi[my_n][my_j]*dzetadxi[my_m][my_k] +
dzetadxi[my_m][my_j]*dzetadxi[my_n][my_k] );
}
else
libmesh_error_msg("Invalid shape function index " << i);
}
// quadradic prism shape functions
case PRISM18:
{
libmesh_assert_less (i, 18);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 3, 4, 5};
switch (j)
{
// d^2()/dxi^2
case 0:
return (FE<2,L2_LAGRANGE>::shape_second_deriv(TRI6, SECOND, i1[i], 0, p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d^2()/dxideta
case 1:
return (FE<2,L2_LAGRANGE>::shape_second_deriv(TRI6, SECOND, i1[i], 1, p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d^2()/deta^2
case 2:
return (FE<2,L2_LAGRANGE>::shape_second_deriv(TRI6, SECOND, i1[i], 2, p2d)*
FE<1,L2_LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d^2()/dxidzeta
case 3:
return (FE<2,L2_LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 0, p2d)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, p1d));
// d^2()/detadzeta
case 4:
return (FE<2,L2_LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 1, p2d)*
FE<1,L2_LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, p1d));
// d^2()/dzeta^2
case 5:
return (FE<2,L2_LAGRANGE>::shape(TRI6, SECOND, i1[i], p2d)*
FE<1,L2_LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i0[i], 0, p1d));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << order);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, MONOMIAL >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1304 of file fe_monomial_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape function derivatives
return FE<3,MONOMIAL>::shape_second_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 2, SZABAB >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 1392 of file fe_szabab_shape_2D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Szabab elements "
<< " are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 2, SZABAB >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 1412 of file fe_szabab_shape_2D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Szabab elements "
<< " are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 3, L2_LAGRANGE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1456 of file fe_l2_lagrange_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape function derivatives
return FE<3,L2_LAGRANGE>::shape_second_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| Real libMesh::FE< 3, LAGRANGE >::shape_second_deriv | ( | const ElemType | type, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 1931 of file fe_lagrange_shape_3D.C.
References libMesh::EDGE2, libMesh::EDGE3, libMesh::FIRST, libMesh::HEX20, libMesh::HEX27, libMesh::HEX8, libMesh::PRISM15, libMesh::PRISM18, libMesh::PRISM6, libMesh::PYRAMID13, libMesh::PYRAMID14, libMesh::PYRAMID5, libMesh::Real, libMesh::SECOND, libMesh::TET10, libMesh::TET4, libMesh::TRI3, libMesh::TRI6, and libMesh::x.
{
#if LIBMESH_DIM == 3
libmesh_assert_less (j, 6);
switch (order)
{
// linear Lagrange shape functions
case FIRST:
{
switch (type)
{
// Linear tets have all second derivatives = 0
case TET4:
case TET10:
{
return 0.;
}
// The following elements use either tensor product or
// rational basis functions, and therefore probably have
// second derivatives, but we have not implemented them
// yet...
case PRISM6:
case PRISM15:
case PRISM18:
{
libmesh_assert_less (i, 6);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2};
switch (j)
{
// All repeated second derivatives and the xi-eta derivative are zero on PRISMs
case 0: // d^2()/dxi^2
case 1: // d^2()/dxideta
case 2: // d^2()/deta^2
case 5: // d^2()/dzeta^2
{
return 0.;
}
case 3: // d^2()/dxidzeta
return (FE<2,LAGRANGE>::shape_deriv(TRI3, FIRST, i1[i], 0, p2d)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, p1d));
case 4: // d^2()/detadzeta
return (FE<2,LAGRANGE>::shape_deriv(TRI3, FIRST, i1[i], 1, p2d)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, p1d));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
case PYRAMID5:
case PYRAMID13:
case PYRAMID14:
{
libmesh_assert_less (i, 5);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
switch (j)
{
// xi-xi and eta-eta derivatives are all zero for PYRAMID5.
case 0: // d^2()/dxi^2
case 2: // d^2()/deta^2
return 0.;
case 1: // d^2()/dxideta
{
switch (i)
{
case 0:
case 2:
return 0.25/(1. - zeta + eps);
case 1:
case 3:
return -0.25/(1. - zeta + eps);
case 4:
return 0.;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 3: // d^2()/dxidzeta
{
Real den = (1. - zeta + eps)*(1. - zeta + eps);
switch (i)
{
case 0:
case 2:
return 0.25*eta/den;
case 1:
case 3:
return -0.25*eta/den;
case 4:
return 0.;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 4: // d^2()/detadzeta
{
Real den = (1. - zeta + eps)*(1. - zeta + eps);
switch (i)
{
case 0:
case 2:
return 0.25*xi/den;
case 1:
case 3:
return -0.25*xi/den;
case 4:
return 0.;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 5: // d^2()/dzeta^2
{
Real den = (1. - zeta + eps)*(1. - zeta + eps)*(1. - zeta + eps);
switch (i)
{
case 0:
case 2:
return 0.5*xi*eta/den;
case 1:
case 3:
return -0.5*xi*eta/den;
case 4:
return 0.;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// Trilinear shape functions on HEX8s have nonzero mixed second derivatives
case HEX8:
case HEX20:
case HEX27:
{
libmesh_assert_less (i, 8);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1};
switch (j)
{
// All repeated second derivatives are zero on HEX8
case 0: // d^2()/dxi^2
case 2: // d^2()/deta^2
case 5: // d^2()/dzeta^2
{
return 0.;
}
case 1: // d^2()/dxideta
return (FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta)*
FE<1,LAGRANGE>::shape (EDGE2, FIRST, i2[i], zeta));
case 3: // d^2()/dxidzeta
return (FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE2, FIRST, i1[i], eta)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i2[i], 0, zeta));
case 4: // d^2()/detadzeta
return (FE<1,LAGRANGE>::shape (EDGE2, FIRST, i0[i], xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i1[i], 0, eta)*
FE<1,LAGRANGE>::shape_deriv(EDGE2, FIRST, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// quadratic Lagrange shape functions
case SECOND:
{
switch (type)
{
// serendipity hexahedral quadratic shape functions
case HEX20:
{
libmesh_assert_less (i, 20);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// these functions are defined for (x,y,z) in [0,1]^3
// so transform the locations
const Real x = .5*(xi + 1.);
const Real y = .5*(eta + 1.);
const Real z = .5*(zeta + 1.);
switch(j)
{
case 0: // d^2()/dxi^2
{
switch(i)
{
case 0:
case 1:
return (1. - y) * (1. - z);
case 2:
case 3:
return y * (1. - z);
case 4:
case 5:
return (1. - y) * z;
case 6:
case 7:
return y * z;
case 8:
return -2. * (1. - y) * (1. - z);
case 10:
return -2. * y * (1. - z);
case 16:
return -2. * (1. - y) * z;
case 18:
return -2. * y * z;
case 9:
case 11:
case 12:
case 13:
case 14:
case 15:
case 17:
case 19:
return 0;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 1: // d^2()/dxideta
{
switch(i)
{
case 0:
return (1.25 - x - y - .5*z) * (1. - z);
case 1:
return (-x + y + .5*z - .25) * (1. - z);
case 2:
return (x + y - .5*z - .75) * (1. - z);
case 3:
return (-y + x + .5*z - .25) * (1. - z);
case 4:
return -.25*z * (4.*x + 4.*y - 2.*z - 3);
case 5:
return -.25*z * (-4.*y + 4.*x + 2.*z - 1.);
case 6:
return .25*z * (-5 + 4.*x + 4.*y + 2.*z);
case 7:
return .25*z * (4.*x - 4.*y - 2.*z + 1.);
case 8:
return (-1. + 2.*x) * (1. - z);
case 9:
return (1. - 2.*y) * (1. - z);
case 10:
return (1. - 2.*x) * (1. - z);
case 11:
return (-1. + 2.*y) * (1. - z);
case 12:
return z * (1. - z);
case 13:
return -z * (1. - z);
case 14:
return z * (1. - z);
case 15:
return -z * (1. - z);
case 16:
return (-1. + 2.*x) * z;
case 17:
return (1. - 2.*y) * z;
case 18:
return (1. - 2.*x) * z;
case 19:
return (-1. + 2.*y) * z;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 2: // d^2()/deta^2
switch(i)
{
case 0:
case 3:
return (1. - x) * (1. - z);
case 1:
case 2:
return x * (1. - z);
case 4:
case 7:
return (1. - x) * z;
case 5:
case 6:
return x * z;
case 9:
return -2. * x * (1. - z);
case 11:
return -2. * (1. - x) * (1. - z);
case 17:
return -2. * x * z;
case 19:
return -2. * (1. - x) * z;
case 8:
case 10:
case 12:
case 13:
case 14:
case 15:
case 16:
case 18:
return 0.;
default:
libmesh_error_msg("Invalid i = " << i);
}
case 3: // d^2()/dxidzeta
switch(i)
{
case 0:
return (1.25 - x - .5*y - z) * (1. - y);
case 1:
return (-x + .5*y + z - .25) * (1. - y);
case 2:
return -.25*y * (2.*y + 4.*x - 4.*z - 1.);
case 3:
return -.25*y * (-2.*y + 4.*x + 4.*z - 3);
case 4:
return (-z + x + .5*y - .25) * (1. - y);
case 5:
return (x - .5*y + z - .75) * (1. - y);
case 6:
return .25*y * (2.*y + 4.*x + 4.*z - 5);
case 7:
return .25*y * (-2.*y + 4.*x - 4.*z + 1.);
case 8:
return (-1. + 2.*x) * (1. - y);
case 9:
return -y * (1. - y);
case 10:
return (-1. + 2.*x) * y;
case 11:
return y * (1. - y);
case 12:
return (-1. + 2.*z) * (1. - y);
case 13:
return (1. - 2.*z) * (1. - y);
case 14:
return (1. - 2.*z) * y;
case 15:
return (-1. + 2.*z) * y;
case 16:
return (1. - 2.*x) * (1. - y);
case 17:
return y * (1. - y);
case 18:
return (1. - 2.*x) * y;
case 19:
return -y * (1. - y);
default:
libmesh_error_msg("Invalid i = " << i);
}
case 4: // d^2()/detadzeta
switch(i)
{
case 0:
return (1.25 - .5*x - y - z) * (1. - x);
case 1:
return .25*x * (2.*x - 4.*y - 4.*z + 3.);
case 2:
return -.25*x * (2.*x + 4.*y - 4.*z - 1.);
case 3:
return (-y + .5*x + z - .25) * (1. - x);
case 4:
return (-z + .5*x + y - .25) * (1. - x);
case 5:
return -.25*x * (2.*x - 4.*y + 4.*z - 1.);
case 6:
return .25*x * (2.*x + 4.*y + 4.*z - 5);
case 7:
return (y - .5*x + z - .75) * (1. - x);
case 8:
return x * (1. - x);
case 9:
return (-1. + 2.*y) * x;
case 10:
return -x * (1. - x);
case 11:
return (-1. + 2.*y) * (1. - x);
case 12:
return (-1. + 2.*z) * (1. - x);
case 13:
return (-1. + 2.*z) * x;
case 14:
return (1. - 2.*z) * x;
case 15:
return (1. - 2.*z) * (1. - x);
case 16:
return -x * (1. - x);
case 17:
return (1. - 2.*y) * x;
case 18:
return x * (1. - x);
case 19:
return (1. - 2.*y) * (1. - x);
default:
libmesh_error_msg("Invalid i = " << i);
}
case 5: // d^2()/dzeta^2
switch(i)
{
case 0:
case 4:
return (1. - x) * (1. - y);
case 1:
case 5:
return x * (1. - y);
case 2:
case 6:
return x * y;
case 3:
case 7:
return (1. - x) * y;
case 12:
return -2. * (1. - x) * (1. - y);
case 13:
return -2. * x * (1. - y);
case 14:
return -2. * x * y;
case 15:
return -2. * (1. - x) * y;
case 8:
case 9:
case 10:
case 11:
case 16:
case 17:
case 18:
case 19:
return 0.;
default:
libmesh_error_msg("Invalid i = " << i);
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// triquadraic hexahedral shape funcions
case HEX27:
{
libmesh_assert_less (i, 27);
// Compute hex shape functions as a tensor-product
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
// The only way to make any sense of this
// is to look at the mgflo/mg2/mgf documentation
// and make the cut-out cube!
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
static const unsigned int i0[] = {0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 0, 2, 2, 1, 2, 0, 2, 2};
static const unsigned int i1[] = {0, 0, 1, 1, 0, 0, 1, 1, 0, 2, 1, 2, 0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 2, 1, 2, 2, 2};
static const unsigned int i2[] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 2, 2, 2, 2, 1, 1, 1, 1, 0, 2, 2, 2, 2, 1, 2};
switch(j)
{
// d^2()/dxi^2
case 0:
return (FE<1,LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
// d^2()/dxideta
case 1:
return (FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
// d^2()/deta^2
case 2:
return (FE<1,LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i2[i], zeta));
// d^2()/dxidzeta
case 3:
return (FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, xi)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i2[i], 0, zeta));
// d^2()/detadzeta
case 4:
return (FE<1,LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i1[i], 0, eta)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i2[i], 0, zeta));
// d^2()/dzeta^2
case 5:
return (FE<1,LAGRANGE>::shape (EDGE3, SECOND, i0[i], xi)*
FE<1,LAGRANGE>::shape (EDGE3, SECOND, i1[i], eta)*
FE<1,LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i2[i], 0, zeta));
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// quadratic tetrahedral shape functions
case TET10:
{
// The area coordinates are the same as used for the
// shape() and shape_deriv() functions.
// const Real zeta0 = 1. - zeta1 - zeta2 - zeta3;
// const Real zeta1 = p(0);
// const Real zeta2 = p(1);
// const Real zeta3 = p(2);
static const Real dzetadxi[4][3] =
{
{-1., -1., -1.},
{1., 0., 0.},
{0., 1., 0.},
{0., 0., 1.}
};
// Convert from j -> (j,k) indices for independent variable
// (0=xi, 1=eta, 2=zeta)
static const unsigned short int independent_var_indices[6][2] =
{
{0, 0}, // d^2 phi / dxi^2
{0, 1}, // d^2 phi / dxi deta
{1, 1}, // d^2 phi / deta^2
{0, 2}, // d^2 phi / dxi dzeta
{1, 2}, // d^2 phi / deta dzeta
{2, 2} // d^2 phi / dzeta^2
};
// Convert from i -> zeta indices. Each quadratic shape
// function for the Tet10 depends on up to two of the zeta
// area coordinate functions (see the shape() function above).
// This table just tells which two area coords it uses.
static const unsigned short int zeta_indices[10][2] =
{
{0, 0},
{1, 1},
{2, 2},
{3, 3},
{0, 1},
{1, 2},
{2, 0},
{0, 3},
{1, 3},
{2, 3},
};
// Look up the independent variable indices for this value of j.
const unsigned int my_j = independent_var_indices[j][0];
const unsigned int my_k = independent_var_indices[j][1];
if (i<4)
{
return 4.*dzetadxi[i][my_j]*dzetadxi[i][my_k];
}
else if (i<10)
{
const unsigned short int my_m = zeta_indices[i][0];
const unsigned short int my_n = zeta_indices[i][1];
return 4.*(dzetadxi[my_n][my_j]*dzetadxi[my_m][my_k] +
dzetadxi[my_m][my_j]*dzetadxi[my_n][my_k] );
}
else
libmesh_error_msg("Invalid shape function index " << i);
}
// "serendipity" prism
case PRISM15:
{
libmesh_assert_less (i, 15);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
switch (j)
{
// d^2()/dxi^2
case 0:
{
switch(i)
{
case 0:
case 1:
return 2.*(1. - zeta);
case 2:
case 5:
case 7:
case 8:
case 9:
case 10:
case 11:
case 13:
case 14:
return 0.;
case 3:
case 4:
return 2.*(1. + zeta);
case 6:
return 4.*(zeta - 1);
case 12:
return -4.*(1. + zeta);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d^2()/dxideta
case 1:
{
switch(i)
{
case 0:
case 7:
return 2.*(1. - zeta);
case 1:
case 2:
case 4:
case 5:
case 9:
case 10:
case 11:
return 0.;
case 3:
case 13:
return 2.*(1. + zeta);
case 6:
case 8:
return 2.*(zeta - 1.);
case 12:
case 14:
return -2.*(1. + zeta);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d^2()/deta^2
case 2:
{
switch(i)
{
case 0:
case 2:
return 2.*(1. - zeta);
case 1:
case 4:
case 6:
case 7:
case 9:
case 10:
case 11:
case 12:
case 13:
return 0.;
case 3:
case 5:
return 2.*(1. + zeta);
case 8:
return 4.*(zeta - 1.);
case 14:
return -4.*(1. + zeta);
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d^2()/dxidzeta
case 3:
{
switch(i)
{
case 0:
return 1.5 - zeta - 2.*xi - 2.*eta;
case 1:
return 0.5 + zeta - 2.*xi;
case 2:
case 5:
case 11:
return 0.;
case 3:
return -1.5 - zeta + 2.*xi + 2.*eta;
case 4:
return -0.5 + zeta + 2.*xi;
case 6:
return 4.*xi + 2.*eta - 2.;
case 7:
return -2.*eta;
case 8:
return 2.*eta;
case 9:
return 2.*zeta;
case 10:
return -2.*zeta;
case 12:
return -4.*xi - 2.*eta + 2.;
case 13:
return 2.*eta;
case 14:
return -2.*eta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d^2()/detadzeta
case 4:
{
switch(i)
{
case 0:
return 1.5 - zeta - 2.*xi - 2.*eta;
case 1:
case 4:
case 10:
return 0.;
case 2:
return .5 + zeta - 2.*eta;
case 3:
return -1.5 - zeta + 2.*xi + 2.*eta;
case 5:
return -.5 + zeta + 2.*eta;
case 6:
return 2.*xi;
case 7:
return -2.*xi;
case 8:
return 2.*xi + 4.*eta - 2.;
case 9:
return 2.*zeta;
case 11:
return -2.*zeta;
case 12:
return -2.*xi;
case 13:
return 2.*xi;
case 14:
return -2.*xi - 4.*eta + 2.;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
// d^2()/dzeta^2
case 5:
{
switch(i)
{
case 0:
case 3:
return 1. - xi - eta;
case 1:
case 4:
return xi;
case 2:
case 5:
return eta;
case 6:
case 7:
case 8:
case 12:
case 13:
case 14:
return 0.;
case 9:
return 2.*xi + 2.*eta - 2.;
case 10:
return -2.*xi;
case 11:
return -2.*eta;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// quadradic prism shape functions
case PRISM18:
{
libmesh_assert_less (i, 18);
// Compute prism shape functions as a tensor-product
// of a triangle and an edge
Point p2d(p(0),p(1));
Point p1d(p(2));
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
static const unsigned int i0[] = {0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 2, 2, 1, 1, 1, 2, 2, 2};
static const unsigned int i1[] = {0, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 3, 4, 5};
switch (j)
{
// d^2()/dxi^2
case 0:
return (FE<2,LAGRANGE>::shape_second_deriv(TRI6, SECOND, i1[i], 0, p2d)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d^2()/dxideta
case 1:
return (FE<2,LAGRANGE>::shape_second_deriv(TRI6, SECOND, i1[i], 1, p2d)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d^2()/deta^2
case 2:
return (FE<2,LAGRANGE>::shape_second_deriv(TRI6, SECOND, i1[i], 2, p2d)*
FE<1,LAGRANGE>::shape(EDGE3, SECOND, i0[i], p1d));
// d^2()/dxidzeta
case 3:
return (FE<2,LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 0, p2d)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, p1d));
// d^2()/detadzeta
case 4:
return (FE<2,LAGRANGE>::shape_deriv(TRI6, SECOND, i1[i], 1, p2d)*
FE<1,LAGRANGE>::shape_deriv(EDGE3, SECOND, i0[i], 0, p1d));
// d^2()/dzeta^2
case 5:
return (FE<2,LAGRANGE>::shape(TRI6, SECOND, i1[i], p2d)*
FE<1,LAGRANGE>::shape_second_deriv(EDGE3, SECOND, i0[i], 0, p1d));
default:
libmesh_error_msg("Invalid shape function derivative j = " << j);
}
}
// Quadratic shape functions, as defined in R. Graglia, "Higher order
// bases on pyramidal elements", IEEE Trans Antennas and Propagation,
// vol 47, no 5, May 1999.
case PYRAMID14:
{
libmesh_assert_less (i, 14);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
// The "normalized coordinates" defined by Graglia. These are
// the planes which define the faces of the pyramid.
Real
p1 = 0.5*(1. - eta - zeta), // back
p2 = 0.5*(1. + xi - zeta), // left
p3 = 0.5*(1. + eta - zeta), // front
p4 = 0.5*(1. - xi - zeta); // right
// Denominators are perturbed by epsilon to avoid
// divide-by-zero issues.
Real
den = (-1. + zeta + eps),
den2 = den*den,
den3 = den2*den,
den4 = den2*den2;
// These terms are used in several of the derivatives
Real
numer_mp = xi*eta - zeta + zeta*zeta,
numer_pm = xi*eta + zeta - zeta*zeta;
switch (j)
{
case 0: // d^2()/dxi^2
{
switch(i)
{
case 0:
case 1:
return -p1*eta/den2;
case 2:
case 3:
return p3*eta/den2;
case 4:
case 9:
case 10:
case 11:
case 12:
return 0.;
case 5:
return 2.*p1*eta/den2;
case 6:
case 8:
return 4.*p1*p3/den2;
case 7:
return -2.*p3*eta/den2;
case 13:
return -8.*p1*p3/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 1: // d^2()/dxideta
{
switch(i)
{
case 0:
return 0.25*numer_mp/den2
- 0.5*p1*xi/den2
- 0.5*p4*eta/den2
+ p4*p1/den2;
case 1:
return 0.25*numer_pm/den2
- 0.5*p1*xi/den2
+ 0.5*p2*eta/den2
- p1*p2/den2;
case 2:
return 0.25*numer_mp/den2
+ 0.5*p3*xi/den2
+ 0.5*p2*eta/den2
+ p2*p3/den2;
case 3:
return 0.25*numer_pm/den2
+ 0.5*p3*xi/den2
- 0.5*p4*eta/den2
- p3*p4/den2;
case 4:
return 0.;
case 5:
return p4*eta/den2
- 2.*p4*p1/den2
- p2*eta/den2
+ 2.*p1*p2/den2;
case 6:
return -p3*xi/den2
+ p1*xi/den2
- 2.*p2*p3/den2
+ 2.*p1*p2/den2;
case 7:
return p4*eta/den2
+ 2.*p3*p4/den2
- p2*eta/den2
- 2.*p2*p3/den2;
case 8:
return -p3*xi/den2
+ p1*xi/den2
- 2.*p4*p1/den2
+ 2.*p3*p4/den2;
case 9:
case 11:
return -zeta/den;
case 10:
case 12:
return zeta/den;
case 13:
return 4.*p4*p1/den2
- 4.*p3*p4/den2
+ 4.*p2*p3/den2
- 4.*p1*p2/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 2: // d^2()/deta^2
{
switch(i)
{
case 0:
case 3:
return -p4*xi/den2;
case 1:
case 2:
return p2*xi/den2;
case 4:
case 9:
case 10:
case 11:
case 12:
return 0.;
case 5:
case 7:
return 4.*p2*p4/den2;
case 6:
return -2.*p2*xi/den2;
case 8:
return 2.*p4*xi/den2;
case 13:
return -8.*p2*p4/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 3: // d^2()/dxidzeta
{
switch(i)
{
case 0:
return 0.25*numer_mp/den2
- 0.5*p1*(2.*zeta - 1.)/den2
+ p1*numer_mp/den3
- 0.5*p1*eta/den2
- 0.5*p4*eta/den2
- 2.*p4*p1*eta/den3;
case 1:
return 0.25*numer_pm/den2
- 0.5*p1*(1 - 2.*zeta)/den2
+ p1*numer_pm/den3
+ 0.5*p2*eta/den2
+ 0.5*p1*eta/den2
+ 2.*p1*p2*eta/den3;
case 2:
return -0.25*numer_mp/den2
+ 0.5*p3*(2.*zeta - 1.)/den2
- p3*numer_mp/den3
- 0.5*p3*eta/den2
- 0.5*p2*eta/den2
- 2.*p2*p3*eta/den3;
case 3:
return -0.25*numer_pm/den2
+ 0.5*p3*(1 - 2.*zeta)/den2
- p3*numer_pm/den3
+ 0.5*p4*eta/den2
+ 0.5*p3*eta/den2
+ 2.*p3*p4*eta/den3;
case 4:
return 0.;
case 5:
return p4*eta/den2
+ 4.*p4*p1*eta/den3
- p2*eta/den2
- 4.*p1*p2*eta/den3;
case 6:
return -p3*xi/den2
- p1*xi/den2
- 4.*p1*p3*xi/den3
- 2.*p2*p3/den2
- 2.*p1*p3/den2
- 2.*p1*p2/den2
- 8.*p1*p2*p3/den3;
case 7:
return -p4*eta/den2
- 4.*p3*p4*eta/den3
+ p2*eta/den2
+ 4.*p2*p3*eta/den3;
case 8:
return -p3*xi/den2
- p1*xi/den2
- 4.*p1*p3*xi/den3
+ 2.*p4*p1/den2
+ 2.*p1*p3/den2
+ 2.*p3*p4/den2
+ 8.*p3*p4*p1/den3;
case 9:
return -zeta/den
+ 2.*p1/den
- 2.*p1*zeta/den2;
case 10:
return zeta/den
- 2.*p1/den
+ 2.*p1*zeta/den2;
case 11:
return zeta/den
- 2.*p3/den
+ 2.*p3*zeta/den2;
case 12:
return -zeta/den
+ 2.*p3/den
- 2.*p3*zeta/den2;
case 13:
return -4.*p4*p1/den2
- 4.*p3*p4/den2
- 16.*p3*p4*p1/den3
+ 4.*p2*p3/den2
+ 4.*p1*p2/den2
+ 16.*p1*p2*p3/den3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 4: // d^2()/detadzeta
{
switch(i)
{
case 0:
return 0.25*numer_mp/den2
- 0.5*p4*(2.*zeta - 1.)/den2
+ p4*numer_mp/den3
- 0.5*p1*xi/den2
- 0.5*p4*xi/den2
- 2.*p4*p1*xi/den3;
case 1:
return -0.25*numer_pm/den2
+ 0.5*p2*(1. - 2.*zeta)/den2
- p2*numer_pm/den3
+ 0.5*p2*xi/den2
+ 0.5*p1*xi/den2
+ 2.*p1*p2*xi/den3;
case 2:
return -0.25*numer_mp/den2
+ 0.5*p2*(2.*zeta - 1.)/den2
- p2*numer_mp/den3
- 0.5*p3*xi/den2
- 0.5*p2*xi/den2
- 2.*p2*p3*xi/den3;
case 3:
return 0.25*numer_pm/den2
- 0.5*p4*(1. - 2.*zeta)/den2
+ p4*numer_pm/den3
+ 0.5*p4*xi/den2
+ 0.5*p3*xi/den2
+ 2.*p3*p4*xi/den3;
case 4:
return 0.;
case 5:
return -p4*eta/den2
- p2*eta/den2
- 4.*p2*p4*eta/den3
+ 2.*p4*p1/den2
+ 2.*p2*p4/den2
+ 2.*p1*p2/den2
+ 8.*p2*p1*p4/den3;
case 6:
return p3*xi/den2
+ 4.*p2*p3*xi/den3
- p1*xi/den2
- 4.*p1*p2*xi/den3;
case 7:
return -p4*eta/den2
- p2*eta/den2
- 4.*p2*p4*eta/den3
- 2.*p3*p4/den2
- 2.*p2*p4/den2
- 2.*p2*p3/den2
- 8.*p2*p3*p4/den3;
case 8:
return p1*xi/den2
+ 4.*p4*p1*xi/den3
- p3*xi/den2
- 4.*p3*p4*xi/den3;
case 9:
return -zeta/den
+ 2.*p4/den
- 2.*p4*zeta/den2;
case 10:
return -zeta/den
+ 2.*p2/den
- 2.*p2*zeta/den2;
case 11:
return zeta/den
- 2.*p2/den
+ 2.*p2*zeta/den2;
case 12:
return zeta/den
- 2.*p4/den
+ 2.*p4*zeta/den2;
case 13:
return 4.*p3*p4/den2
+ 4.*p2*p3/den2
+ 16.*p2*p3*p4/den3
- 4.*p4*p1/den2
- 4.*p1*p2/den2
- 16.*p2*p1*p4/den3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 5: // d^2()/dzeta^2
{
switch(i)
{
case 0:
return 0.5*numer_mp/den2
- p1*(2.*zeta - 1.)/den2
+ 2.*p1*numer_mp/den3
- p4*(2.*zeta - 1.)/den2
+ 2.*p4*numer_mp/den3
+ 2.*p4*p1/den2
- 4.*p4*p1*(2.*zeta - 1.)/den3
+ 6.*p4*p1*numer_mp/den4;
case 1:
return -0.5*numer_pm/den2
+ p2*(1 - 2.*zeta)/den2
- 2.*p2*numer_pm/den3
+ p1*(1 - 2.*zeta)/den2
- 2.*p1*numer_pm/den3
+ 2.*p1*p2/den2
+ 4.*p1*p2*(1 - 2.*zeta)/den3
- 6.*p1*p2*numer_pm/den4;
case 2:
return 0.5*numer_mp/den2
- p3*(2.*zeta - 1.)/den2
+ 2.*p3*numer_mp/den3
- p2*(2.*zeta - 1.)/den2
+ 2.*p2*numer_mp/den3
+ 2.*p2*p3/den2
- 4.*p2*p3*(2.*zeta - 1.)/den3
+ 6.*p2*p3*numer_mp/den4;
case 3:
return -0.5*numer_pm/den2
+ p4*(1 - 2.*zeta)/den2
- 2.*p4*numer_pm/den3
+ p3*(1 - 2.*zeta)/den2
- 2.*p3*numer_pm/den3
+ 2.*p3*p4/den2
+ 4.*p3*p4*(1 - 2.*zeta)/den3
- 6.*p3*p4*numer_pm/den4;
case 4:
return 4.;
case 5:
return -2.*p1*eta/den2
- 2.*p4*eta/den2
- 8.*p4*p1*eta/den3
- 2.*p2*eta/den2
- 8.*p2*p4*eta/den3
- 8.*p1*p2*eta/den3
- 24.*p2*p1*p4*eta/den4;
case 6:
return 2.*p3*xi/den2
+ 2.*p2*xi/den2
+ 8.*p2*p3*xi/den3
+ 2.*p1*xi/den2
+ 8.*p1*p3*xi/den3
+ 8.*p1*p2*xi/den3
+ 24.*p1*p2*p3*xi/den4;
case 7:
return 2.*p4*eta/den2
+ 2.*p3*eta/den2
+ 8.*p3*p4*eta/den3
+ 2.*p2*eta/den2
+ 8.*p2*p4*eta/den3
+ 8.*p2*p3*eta/den3
+ 24.*p2*p3*p4*eta/den4;
case 8:
return -2.*p1*xi/den2
- 2.*p4*xi/den2
- 8.*p4*p1*xi/den3
- 2.*p3*xi/den2
- 8.*p1*p3*xi/den3
- 8.*p3*p4*xi/den3
- 24.*p3*p4*p1*xi/den4;
case 9:
return -2.*zeta/den
+ 4.*p4/den
- 4.*p4*zeta/den2
+ 4.*p1/den
- 4.*p1*zeta/den2
+ 8.*p4*p1/den2
- 8.*p1*p4*zeta/den3;
case 10:
return -2.*zeta/den
+ 4.*p1/den
- 4.*p1*zeta/den2
+ 4.*p2/den
- 4.*p2*zeta/den2
+ 8.*p1*p2/den2
- 8.*p2*p1*zeta/den3;
case 11:
return -2.*zeta/den
+ 4.*p2/den
- 4.*p2*zeta/den2
+ 4.*p3/den
- 4.*p3*zeta/den2
+ 8.*p2*p3/den2
- 8.*p3*p2*zeta/den3;
case 12:
return -2.*zeta/den
+ 4.*p3/den
- 4.*p3*zeta/den2
+ 4.*p4/den
- 4.*p4*zeta/den2
+ 8.*p3*p4/den2
- 8.*p4*p3*zeta/den3;
case 13:
return 8.*p3*p4/den2
+ 8.*p2*p4/den2
+ 8.*p2*p3/den2
+ 32.*p2*p3*p4/den3
+ 8.*p4*p1/den2
+ 8.*p1*p3/den2
+ 32.*p3*p4*p1/den3
+ 8.*p1*p2/den2
+ 32.*p2*p1*p4/den3
+ 32.*p1*p2*p3/den3
+ 96.*p1*p2*p3*p4/den4;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
// G. Bedrosian, "Shape functions and integration formulas for
// three-dimensional finite element analysis", Int. J. Numerical
// Methods Engineering, vol 35, p. 95-108, 1992.
case PYRAMID13:
{
libmesh_assert_less (i, 13);
const Real xi = p(0);
const Real eta = p(1);
const Real zeta = p(2);
const Real eps = 1.e-35;
// Denominators are perturbed by epsilon to avoid
// divide-by-zero issues.
Real
den = (-1. + zeta + eps),
den2 = den*den,
den3 = den2*den,
xi2 = xi*xi,
eta2 = eta*eta,
zeta2 = zeta*zeta,
zeta3 = zeta2*zeta;
switch (j)
{
case 0: // d^2()/dxi^2
{
switch(i)
{
case 0:
case 1:
return 0.5*(-1. + zeta + eta)/den;
case 2:
case 3:
return 0.5*(-1. + zeta - eta)/den;
case 4:
case 6:
case 8:
case 9:
case 10:
case 11:
case 12:
return 0.;
case 5:
return (1. - eta - zeta)/den;
case 7:
return (1. + eta - zeta)/den;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 1: // d^2()/dxideta
{
switch(i)
{
case 0:
return 0.25*(-1. + 2.*zeta + 2.*xi + 2.*eta)/den;
case 1:
return -0.25*(-1. + 2.*zeta - 2.*xi + 2.*eta)/den;
case 2:
return -0.25*(1. - 2.*zeta + 2.*xi + 2.*eta)/den;
case 3:
return 0.25*(1. - 2.*zeta - 2.*xi + 2.*eta)/den;
case 4:
return 0.;
case 5:
return -xi/den;
case 6:
return eta/den;
case 7:
return xi/den;
case 8:
return -eta/den;
case 9:
return -zeta/den;
case 10:
return zeta/den;
case 11:
return -zeta/den;
case 12:
return zeta/den;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 2: // d^2()/deta^2
{
switch(i)
{
case 0:
case 3:
return 0.5*(-1. + zeta + xi)/den;
case 1:
case 2:
return 0.5*(-1. + zeta - xi)/den;
case 4:
case 5:
case 7:
case 9:
case 10:
case 11:
case 12:
return 0.;
case 6:
return (1. + xi - zeta)/den;
case 8:
return (1. - xi - zeta)/den;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 3: // d^2()/dxidzeta
{
switch(i)
{
case 0:
return -0.25*(-1. + 2.*zeta - zeta2 + eta + 2.*eta*xi + eta2)/den2;
case 1:
return 0.25*(-1. + 2.*zeta - zeta2 + eta - 2.*eta*xi + eta2)/den2;
case 2:
return 0.25*(-1. + 2.*zeta - zeta2 - eta + 2.*eta*xi + eta2)/den2;
case 3:
return -0.25*(-1. + 2.*zeta - zeta2 - eta - 2.*eta*xi + eta2)/den2;
case 4:
return 0.;
case 5:
return eta*xi/den2;
case 6:
return -0.5*(1. + zeta2 + eta2 - 2.*zeta)/den2;
case 7:
return -eta*xi/den2;
case 8:
return 0.5*(1. + zeta2 + eta2 - 2.*zeta)/den2;
case 9:
return (-1. - zeta2 + eta + 2.*zeta)/den2;
case 10:
return -(-1. - zeta2 + eta + 2.*zeta)/den2;
case 11:
return (1. + zeta2 + eta - 2.*zeta)/den2;
case 12:
return -(1. + zeta2 + eta - 2.*zeta)/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 4: // d^2()/detadzeta
{
switch(i)
{
case 0:
return -0.25*(-1. + 2.*zeta - zeta2 + xi + 2.*eta*xi + xi2)/den2;
case 1:
return 0.25*(1. - 2.*zeta + zeta2 + xi + 2.*eta*xi - xi2)/den2;
case 2:
return 0.25*(-1. + 2.*zeta - zeta2 - xi + 2.*eta*xi + xi2)/den2;
case 3:
return -0.25*(1. - 2.*zeta + zeta2 - xi + 2.*eta*xi - xi2)/den2;
case 4:
return 0.;
case 5:
return 0.5*(1. + xi2 + zeta2 - 2.*zeta)/den2;
case 6:
return -eta*xi/den2;
case 7:
return -0.5*(1. + xi2 + zeta2 - 2.*zeta)/den2;
case 8:
return eta*xi/den2;
case 9:
return (-1. - zeta2 + xi + 2.*zeta)/den2;
case 10:
return -(1. + zeta2 + xi - 2.*zeta)/den2;
case 11:
return (1. + zeta2 + xi - 2.*zeta)/den2;
case 12:
return -(-1. - zeta2 + xi + 2.*zeta)/den2;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
case 5: // d^2()/dzeta^2
{
switch(i)
{
case 0:
return 0.5*(xi + eta + 1.)*eta*xi/den3;
case 1:
return -0.5*(eta - xi + 1.)*eta*xi/den3;
case 2:
return -0.5*(xi + eta - 1.)*eta*xi/den3;
case 3:
return 0.5*(eta - xi - 1.)*eta*xi/den3;
case 4:
return 4.;
case 5:
return -(1. - 3.*zeta + 3.*zeta2 - zeta3 + eta*xi2)/den3;
case 6:
return (-1. + 3.*zeta - 3.*zeta2 + zeta3 + eta2*xi)/den3;
case 7:
return (-1. + 3.*zeta - 3.*zeta2 + zeta3 + eta*xi2)/den3;
case 8:
return -(1. - 3.*zeta + 3.*zeta2 - zeta3 + eta2*xi)/den3;
case 9:
return -2.*(-1. + 3.*zeta - 3.*zeta2 + zeta3 + eta*xi)/den3;
case 10:
return 2.*(1. - 3.*zeta + 3.*zeta2 - zeta3 + eta*xi)/den3;
case 11:
return -2.*(-1. + 3.*zeta - 3.*zeta2 + zeta3 + eta*xi)/den3;
case 12:
return 2.*(1. - 3.*zeta + 3.*zeta2 - zeta3 + eta*xi)/den3;
default:
libmesh_error_msg("Invalid i = " << i);
}
}
default:
libmesh_error_msg("Invalid j = " << j);
}
}
default:
libmesh_error_msg("ERROR: Unsupported 3D element type!: " << type);
}
}
// unsupported order
default:
libmesh_error_msg("ERROR: Unsupported 3D FE order!: " << order);
}
#endif
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 2, CLOUGH >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 2155 of file fe_clough_shape_2D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::SECOND, libMesh::THIRD, libMesh::TRI6, and libMesh::Elem::type().
{
libmesh_assert(elem);
clough_compute_coefs(elem);
const ElemType type = elem->type();
const Order totalorder = static_cast<Order>(order + elem->p_level());
switch (totalorder)
{
// 2nd-order restricted Clough-Tocher element
case SECOND:
{
switch (type)
{
// C1 functions on the Clough-Tocher triangle.
case TRI6:
{
libmesh_assert_less (i, 9);
// FIXME: it would be nice to calculate (and cache)
// clough_raw_shape(j,p) only once per triangle, not 1-7
// times
switch (i)
{
// Note: these DoF numbers are "scrambled" because my
// initial numbering conventions didn't match libMesh
case 0:
return clough_raw_shape_second_deriv(0, j, p)
+ d1d2n * clough_raw_shape_second_deriv(10, j, p)
+ d1d3n * clough_raw_shape_second_deriv(11, j, p);
case 3:
return clough_raw_shape_second_deriv(1, j, p)
+ d2d3n * clough_raw_shape_second_deriv(11, j, p)
+ d2d1n * clough_raw_shape_second_deriv(9, j, p);
case 6:
return clough_raw_shape_second_deriv(2, j, p)
+ d3d1n * clough_raw_shape_second_deriv(9, j, p)
+ d3d2n * clough_raw_shape_second_deriv(10, j, p);
case 1:
return d1xd1x * clough_raw_shape_second_deriv(3, j, p)
+ d1xd1y * clough_raw_shape_second_deriv(4, j, p)
+ d1xd2n * clough_raw_shape_second_deriv(10, j, p)
+ d1xd3n * clough_raw_shape_second_deriv(11, j, p)
+ 0.5 * N01x * d3nd3n * clough_raw_shape_second_deriv(11, j, p)
+ 0.5 * N02x * d2nd2n * clough_raw_shape_second_deriv(10, j, p);
case 2:
return d1yd1y * clough_raw_shape_second_deriv(4, j, p)
+ d1yd1x * clough_raw_shape_second_deriv(3, j, p)
+ d1yd2n * clough_raw_shape_second_deriv(10, j, p)
+ d1yd3n * clough_raw_shape_second_deriv(11, j, p)
+ 0.5 * N01y * d3nd3n * clough_raw_shape_second_deriv(11, j, p)
+ 0.5 * N02y * d2nd2n * clough_raw_shape_second_deriv(10, j, p);
case 4:
return d2xd2x * clough_raw_shape_second_deriv(5, j, p)
+ d2xd2y * clough_raw_shape_second_deriv(6, j, p)
+ d2xd3n * clough_raw_shape_second_deriv(11, j, p)
+ d2xd1n * clough_raw_shape_second_deriv(9, j, p)
+ 0.5 * N10x * d3nd3n * clough_raw_shape_second_deriv(11, j, p)
+ 0.5 * N12x * d1nd1n * clough_raw_shape_second_deriv(9, j, p);
case 5:
return d2yd2y * clough_raw_shape_second_deriv(6, j, p)
+ d2yd2x * clough_raw_shape_second_deriv(5, j, p)
+ d2yd3n * clough_raw_shape_second_deriv(11, j, p)
+ d2yd1n * clough_raw_shape_second_deriv(9, j, p)
+ 0.5 * N10y * d3nd3n * clough_raw_shape_second_deriv(11, j, p)
+ 0.5 * N12y * d1nd1n * clough_raw_shape_second_deriv(9, j, p);
case 7:
return d3xd3x * clough_raw_shape_second_deriv(7, j, p)
+ d3xd3y * clough_raw_shape_second_deriv(8, j, p)
+ d3xd1n * clough_raw_shape_second_deriv(9, j, p)
+ d3xd2n * clough_raw_shape_second_deriv(10, j, p)
+ 0.5 * N20x * d2nd2n * clough_raw_shape_second_deriv(10, j, p)
+ 0.5 * N21x * d1nd1n * clough_raw_shape_second_deriv(9, j, p);
case 8:
return d3yd3y * clough_raw_shape_second_deriv(8, j, p)
+ d3yd3x * clough_raw_shape_second_deriv(7, j, p)
+ d3yd1n * clough_raw_shape_second_deriv(9, j, p)
+ d3yd2n * clough_raw_shape_second_deriv(10, j, p)
+ 0.5 * N20y * d2nd2n * clough_raw_shape_second_deriv(10, j, p)
+ 0.5 * N21y * d1nd1n * clough_raw_shape_second_deriv(9, j, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// 3rd-order Clough-Tocher element
case THIRD:
{
switch (type)
{
// C1 functions on the Clough-Tocher triangle.
case TRI6:
{
libmesh_assert_less (i, 12);
// FIXME: it would be nice to calculate (and cache)
// clough_raw_shape(j,p) only once per triangle, not 1-7
// times
switch (i)
{
// Note: these DoF numbers are "scrambled" because my
// initial numbering conventions didn't match libMesh
case 0:
return clough_raw_shape_second_deriv(0, j, p)
+ d1d2n * clough_raw_shape_second_deriv(10, j, p)
+ d1d3n * clough_raw_shape_second_deriv(11, j, p);
case 3:
return clough_raw_shape_second_deriv(1, j, p)
+ d2d3n * clough_raw_shape_second_deriv(11, j, p)
+ d2d1n * clough_raw_shape_second_deriv(9, j, p);
case 6:
return clough_raw_shape_second_deriv(2, j, p)
+ d3d1n * clough_raw_shape_second_deriv(9, j, p)
+ d3d2n * clough_raw_shape_second_deriv(10, j, p);
case 1:
return d1xd1x * clough_raw_shape_second_deriv(3, j, p)
+ d1xd1y * clough_raw_shape_second_deriv(4, j, p)
+ d1xd2n * clough_raw_shape_second_deriv(10, j, p)
+ d1xd3n * clough_raw_shape_second_deriv(11, j, p);
case 2:
return d1yd1y * clough_raw_shape_second_deriv(4, j, p)
+ d1yd1x * clough_raw_shape_second_deriv(3, j, p)
+ d1yd2n * clough_raw_shape_second_deriv(10, j, p)
+ d1yd3n * clough_raw_shape_second_deriv(11, j, p);
case 4:
return d2xd2x * clough_raw_shape_second_deriv(5, j, p)
+ d2xd2y * clough_raw_shape_second_deriv(6, j, p)
+ d2xd3n * clough_raw_shape_second_deriv(11, j, p)
+ d2xd1n * clough_raw_shape_second_deriv(9, j, p);
case 5:
return d2yd2y * clough_raw_shape_second_deriv(6, j, p)
+ d2yd2x * clough_raw_shape_second_deriv(5, j, p)
+ d2yd3n * clough_raw_shape_second_deriv(11, j, p)
+ d2yd1n * clough_raw_shape_second_deriv(9, j, p);
case 7:
return d3xd3x * clough_raw_shape_second_deriv(7, j, p)
+ d3xd3y * clough_raw_shape_second_deriv(8, j, p)
+ d3xd1n * clough_raw_shape_second_deriv(9, j, p)
+ d3xd2n * clough_raw_shape_second_deriv(10, j, p);
case 8:
return d3yd3y * clough_raw_shape_second_deriv(8, j, p)
+ d3yd3x * clough_raw_shape_second_deriv(7, j, p)
+ d3yd1n * clough_raw_shape_second_deriv(9, j, p)
+ d3yd2n * clough_raw_shape_second_deriv(10, j, p);
case 10:
return d1nd1n * clough_raw_shape_second_deriv(9, j, p);
case 11:
return d2nd2n * clough_raw_shape_second_deriv(10, j, p);
case 9:
return d3nd3n * clough_raw_shape_second_deriv(11, j, p);
default:
libmesh_error_msg("Invalid shape function index i = " << i);
}
}
default:
libmesh_error_msg("ERROR: Unsupported element type = " << type);
}
}
// by default throw an error
default:
libmesh_error_msg("ERROR: Unsupported polynomial order = " << order);
}
libmesh_error_msg("We'll never get here!");
return 0.;
}
| Real libMesh::FE< 3, BERNSTEIN >::shape_second_deriv | ( | const ElemType | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 2969 of file fe_bernstein_shape_3D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Bernstein elements "
<< "are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 3, BERNSTEIN >::shape_second_deriv | ( | const Elem * | , |
| const Order | , | ||
| const unsigned | int, | ||
| const unsigned | int, | ||
| const Point & | |||
| ) |
Definition at line 2989 of file fe_bernstein_shape_3D.C.
References libMesh::err.
{
static bool warning_given = false;
if (!warning_given)
libMesh::err << "Second derivatives for Bernstein elements "
<< "are not yet implemented!"
<< std::endl;
warning_given = true;
return 0.;
}
| Real libMesh::FE< 3, LAGRANGE >::shape_second_deriv | ( | const Elem * | elem, |
| const Order | order, | ||
| const unsigned int | i, | ||
| const unsigned int | j, | ||
| const Point & | p | ||
| ) |
Definition at line 3648 of file fe_lagrange_shape_3D.C.
References libMesh::libmesh_assert(), libMesh::Elem::p_level(), libMesh::FE< Dim, T >::shape_second_deriv(), and libMesh::Elem::type().
{
libmesh_assert(elem);
// call the orientation-independent shape function derivatives
return FE<3,LAGRANGE>::shape_second_deriv(elem->type(), static_cast<Order>(order + elem->p_level()), i, j, p);
}
| bool libMesh::FE< 0, SCALAR >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 137 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 1, SCALAR >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 138 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 2, SCALAR >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 139 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 3, SCALAR >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 140 of file fe_scalar.C.
{ return false; }
| bool libMesh::FE< 0, L2_HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 220 of file fe_l2_hierarchic.C.
{ return true; }
| bool libMesh::FE< 1, L2_HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 221 of file fe_l2_hierarchic.C.
{ return true; }
| bool libMesh::FE< 2, L2_HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 222 of file fe_l2_hierarchic.C.
{ return true; }
| bool libMesh::FE< 3, L2_HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 223 of file fe_l2_hierarchic.C.
{ return true; }
| bool libMesh::FE< 0, CLOUGH >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 328 of file fe_clough.C.
{ return true; }
| bool libMesh::FE< 1, CLOUGH >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 329 of file fe_clough.C.
{ return true; }
| bool libMesh::FE< 2, CLOUGH >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 330 of file fe_clough.C.
{ return true; }
| bool libMesh::FE< 3, CLOUGH >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 331 of file fe_clough.C.
{ return true; }
| bool libMesh::FE< 0, HERMITE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 366 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 1, HERMITE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 367 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 2, HERMITE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 368 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 3, HERMITE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 369 of file fe_hermite.C.
{ return true; }
| bool libMesh::FE< 0, HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 387 of file fe_hierarchic.C.
{ return true; }
| bool libMesh::FE< 1, HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 388 of file fe_hierarchic.C.
{ return true; }
| bool libMesh::FE< 2, HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 389 of file fe_hierarchic.C.
{ return true; }
| bool libMesh::FE< 3, HIERARCHIC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 390 of file fe_hierarchic.C.
{ return true; }
| virtual bool libMesh::FE< Dim, T >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
| bool libMesh::FE< 0, MONOMIAL >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 413 of file fe_monomial.C.
{ return false; }
| bool libMesh::FE< 1, MONOMIAL >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 414 of file fe_monomial.C.
{ return false; }
| bool libMesh::FE< 2, MONOMIAL >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 415 of file fe_monomial.C.
{ return false; }
| bool libMesh::FE< 3, MONOMIAL >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 416 of file fe_monomial.C.
{ return false; }
| bool libMesh::FE< 0, BERNSTEIN >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 450 of file fe_bernstein.C.
{ return true; }
| bool libMesh::FE< 1, BERNSTEIN >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 451 of file fe_bernstein.C.
{ return true; }
| bool libMesh::FE< 2, BERNSTEIN >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 452 of file fe_bernstein.C.
{ return true; }
| bool libMesh::FE< 3, BERNSTEIN >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 453 of file fe_bernstein.C.
{ return true; }
| bool libMesh::FE< 0, L2_LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 485 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 1, L2_LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 486 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 2, L2_LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 487 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 3, L2_LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 488 of file fe_l2_lagrange.C.
{ return false; }
| bool libMesh::FE< 0, NEDELEC_ONE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 562 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| bool libMesh::FE< 1, NEDELEC_ONE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 563 of file fe_nedelec_one.C.
{ NEDELEC_LOW_D_ERROR_MESSAGE }
| bool libMesh::FE< 2, NEDELEC_ONE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 564 of file fe_nedelec_one.C.
{ return true; }
| bool libMesh::FE< 3, NEDELEC_ONE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 565 of file fe_nedelec_one.C.
{ return true; }
| bool libMesh::FE< 0, LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 884 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 1, LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 885 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 2, LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 886 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 3, LAGRANGE >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 887 of file fe_lagrange.C.
{ return false; }
| bool libMesh::FE< 0, XYZ >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 924 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 1, XYZ >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 925 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 2, XYZ >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 926 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 3, XYZ >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 927 of file fe_xyz.C.
{ return true; }
| bool libMesh::FE< 0, LAGRANGE_VEC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 939 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 1, LAGRANGE_VEC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 940 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 2, LAGRANGE_VEC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 941 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 3, LAGRANGE_VEC >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 942 of file fe_lagrange_vec.C.
{ return false; }
| bool libMesh::FE< 2, SUBDIVISION >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 944 of file fe_subdivision_2D.C.
{ return true; }
| bool libMesh::FE< 0, SZABAB >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 1311 of file fe_szabab.C.
{ return true; }
| bool libMesh::FE< 1, SZABAB >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 1312 of file fe_szabab.C.
{ return true; }
| bool libMesh::FE< 2, SZABAB >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 1313 of file fe_szabab.C.
{ return true; }
| bool libMesh::FE< 3, SZABAB >::shapes_need_reinit | ( | ) | const [virtual] |
true when the shape functions (for this FEFamily) depend on the particular element, and therefore needs to be re-initialized for each new element. false otherwise. Implements libMesh::FEAbstract.
Definition at line 1314 of file fe_szabab.C.
{ return true; }
| void libMesh::FE< Dim, T >::side_map | ( | const Elem * | elem, |
| const Elem * | side, | ||
| const unsigned int | s, | ||
| const std::vector< Point > & | reference_side_points, | ||
| std::vector< Point > & | reference_points | ||
| ) | [virtual] |
Computes the reference space quadrature points on the side of an element based on the side quadrature points.
Implements libMesh::FEAbstract.
Definition at line 329 of file fe_boundary.C.
References std::max(), libMesh::Elem::n_nodes(), libMesh::Elem::neighbor(), libMesh::Elem::node(), libMesh::Elem::p_level(), side, libMesh::Elem::type(), and libMesh::zero.
{
unsigned int side_p_level = elem->p_level();
if (elem->neighbor(s) != NULL)
side_p_level = std::max(side_p_level, elem->neighbor(s)->p_level());
if (side->type() != last_side ||
side_p_level != this->_p_level ||
!this->shapes_on_quadrature)
{
// Set the element type
this->elem_type = elem->type();
this->_p_level = side_p_level;
// Set the last_side
last_side = side->type();
// Initialize the face shape functions
this->_fe_map->template init_face_shape_functions<Dim>(reference_side_points, side);
}
const unsigned int n_points =
cast_int<unsigned int>(reference_side_points.size());
reference_points.resize(n_points);
for (unsigned int i = 0; i < n_points; i++)
reference_points[i].zero();
std::vector<unsigned int> elem_nodes_map;
elem_nodes_map.resize(side->n_nodes());
for (unsigned int j = 0; j < side->n_nodes(); j++)
for (unsigned int i = 0; i < elem->n_nodes(); i++)
if (side->node(j) == elem->node(i))
elem_nodes_map[j] = i;
std::vector<Point> refspace_nodes;
this->get_refspace_nodes(elem->type(), refspace_nodes);
const std::vector<std::vector<Real> >& psi_map = this->_fe_map->get_psi();
for (unsigned int i=0; i<psi_map.size(); i++) // sum over the nodes
{
const Point& side_node = refspace_nodes[elem_nodes_map[i]];
for (unsigned int p=0; p<n_points; p++)
reference_points[p].add_scaled (side_node, psi_map[i][p]);
}
}
| void libMesh::FE< 2, SUBDIVISION >::side_map | ( | const Elem * | elem, |
| const Elem * | side, | ||
| const unsigned | s, | ||
| const std::vector< Point > & | reference_side_points, | ||
| std::vector< Point > & | reference_points | ||
| ) | [virtual] |
Computes the reference space quadrature points on the side of an element based on the side quadrature points.
Implements libMesh::FEAbstract.
Definition at line 884 of file fe_subdivision_2D.C.
{
libmesh_not_implemented();
}
friend class InfFE [friend] |
make InfFE classes friends, so that these may access the private map, map_xyz methods
Reimplemented from libMesh::FEGenericBase< FEOutputType< T >::type >.
| std::ostream& operator<< | ( | std::ostream & | os, |
| const FEAbstract & | fe | ||
| ) | [friend, inherited] |
Same as above, but allows you to print to a stream.
Definition at line 777 of file fe_abstract.C.
{
fe.print_info(os);
return os;
}
ReferenceCounter::Counts libMesh::ReferenceCounter::_counts [static, protected, inherited] |
Actually holds the data.
Definition at line 118 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
bool libMesh::ReferenceCounter::_enable_print_counter = true [static, protected, inherited] |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 137 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
UniquePtr<FEMap> libMesh::FEAbstract::_fe_map [protected, inherited] |
Definition at line 509 of file fe_abstract.h.
Referenced by libMesh::FEAbstract::get_curvatures(), libMesh::FEAbstract::get_d2xyzdeta2(), libMesh::FEAbstract::get_d2xyzdetadzeta(), libMesh::FEAbstract::get_d2xyzdxi2(), libMesh::FEAbstract::get_d2xyzdxideta(), libMesh::FEAbstract::get_d2xyzdxidzeta(), libMesh::FEAbstract::get_d2xyzdzeta2(), libMesh::FEAbstract::get_detadx(), libMesh::FEAbstract::get_detady(), libMesh::FEAbstract::get_detadz(), libMesh::FEAbstract::get_dxidx(), libMesh::FEAbstract::get_dxidy(), libMesh::FEAbstract::get_dxidz(), libMesh::FEAbstract::get_dxyzdeta(), libMesh::FEAbstract::get_dxyzdxi(), libMesh::FEAbstract::get_dxyzdzeta(), libMesh::FEAbstract::get_dzetadx(), libMesh::FEAbstract::get_dzetady(), libMesh::FEAbstract::get_dzetadz(), libMesh::FEAbstract::get_fe_map(), libMesh::FEAbstract::get_JxW(), libMesh::FEAbstract::get_normals(), libMesh::FEAbstract::get_tangents(), libMesh::FEAbstract::get_xyz(), libMesh::FESubdivision::init_shape_functions(), libMesh::FEAbstract::print_JxW(), and libMesh::FEAbstract::print_xyz().
UniquePtr<FETransformationBase<FEOutputType< T >::type > > libMesh::FEGenericBase< FEOutputType< T >::type >::_fe_trans [protected, inherited] |
Threads::spin_mutex libMesh::ReferenceCounter::_mutex [static, protected, inherited] |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 131 of file reference_counter.h.
Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects [static, protected, inherited] |
The number of objects. Print the reference count information when the number returns to 0.
Definition at line 126 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
unsigned int libMesh::FEAbstract::_p_level [protected, inherited] |
The p refinement level the current data structures are set up for.
Definition at line 570 of file fe_abstract.h.
Referenced by libMesh::FEAbstract::get_order(), and libMesh::FEAbstract::get_p_level().
std::vector<Point> libMesh::FE< Dim, T >::cached_nodes [protected] |
bool libMesh::FEAbstract::calculate_curl_phi [mutable, protected, inherited] |
Should we calculate shape function curls?
Definition at line 541 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi().
bool libMesh::FEAbstract::calculate_d2phi [mutable, protected, inherited] |
Should we calculate shape function hessians?
Definition at line 536 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), and libMesh::FESubdivision::init_shape_functions().
bool libMesh::FEAbstract::calculate_div_phi [mutable, protected, inherited] |
Should we calculate shape function divergences?
Definition at line 546 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi().
bool libMesh::FEAbstract::calculate_dphi [mutable, protected, inherited] |
Should we calculate shape function gradients?
Definition at line 531 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), and libMesh::FESubdivision::init_shape_functions().
bool libMesh::FEAbstract::calculate_dphiref [mutable, protected, inherited] |
Should we calculate reference shape function gradients?
Definition at line 551 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), and libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta().
bool libMesh::FEAbstract::calculate_phi [mutable, protected, inherited] |
Should we calculate shape functions?
Definition at line 526 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi(), and libMesh::FESubdivision::init_shape_functions().
bool libMesh::FEAbstract::calculations_started [mutable, protected, inherited] |
Have calculations with this object already been started? Then all get_* functions should already have been called.
Definition at line 521 of file fe_abstract.h.
Referenced by libMesh::FEGenericBase< FEOutputType< T >::type >::get_curl_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phideta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidetadzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidx2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxdz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxi2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidxidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidy2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidydz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidz2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_d2phidzeta2(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_div_phi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphideta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidx(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidxi(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidy(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidz(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_dphidzeta(), libMesh::FEGenericBase< FEOutputType< T >::type >::get_phi(), and libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::curl_phi [protected, inherited] |
std::vector<std::vector<OutputTensor> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phi [protected, inherited] |
Shape function second derivative values.
Definition at line 548 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phideta2 [protected, inherited] |
Shape function second derivatives in the eta direction.
Definition at line 568 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidetadzeta [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidx2 [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidxdy [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidxdz [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidxi2 [protected, inherited] |
Shape function second derivatives in the xi direction.
Definition at line 553 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidxideta [protected, inherited] |
Shape function second derivatives in the xi-eta direction.
Definition at line 558 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidxidzeta [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidy2 [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidydz [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidz2 [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::d2phidzeta2 [protected, inherited] |
const unsigned int libMesh::FEAbstract::dim [protected, inherited] |
The dimensionality of the object
Definition at line 515 of file fe_abstract.h.
std::vector<std::vector<OutputDivergence> > libMesh::FEGenericBase< FEOutputType< T >::type >::div_phi [protected, inherited] |
std::vector<OutputGradient> libMesh::FEGenericBase< FEOutputType< T >::type >::dphase [protected, inherited] |
std::vector<std::vector<OutputGradient> > libMesh::FEGenericBase< FEOutputType< T >::type >::dphi [protected, inherited] |
Shape function derivative values.
Definition at line 500 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::dphideta [protected, inherited] |
Shape function derivatives in the eta direction.
Definition at line 520 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::dphidx [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::dphidxi [protected, inherited] |
Shape function derivatives in the xi direction.
Definition at line 515 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::dphidy [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::dphidz [protected, inherited] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::dphidzeta [protected, inherited] |
std::vector<RealGradient> libMesh::FEGenericBase< FEOutputType< T >::type >::dweight [protected, inherited] |
ElemType libMesh::FEAbstract::elem_type [protected, inherited] |
The element type the current data structures are set up for.
Definition at line 564 of file fe_abstract.h.
Referenced by libMesh::FESubdivision::attach_quadrature_rule(), and libMesh::FEAbstract::get_type().
const FEType libMesh::FEAbstract::fe_type [protected, inherited] |
The finite element type for this object. Note that this should be constant for the object.
Definition at line 558 of file fe_abstract.h.
Referenced by libMesh::FEAbstract::compute_node_constraints(), libMesh::FEAbstract::compute_periodic_node_constraints(), libMesh::FEAbstract::get_family(), libMesh::FEAbstract::get_fe_type(), libMesh::FEAbstract::get_order(), libMesh::InfFE< Dim, T_radial, T_map >::InfFE(), and libMesh::FESubdivision::init_shape_functions().
unsigned int libMesh::FE< Dim, T >::last_edge [protected] |
ElemType libMesh::FE< Dim, T >::last_side [protected] |
std::vector<std::vector<OutputShape> > libMesh::FEGenericBase< FEOutputType< T >::type >::phi [protected, inherited] |
Shape function values.
Definition at line 495 of file fe_base.h.
Referenced by libMesh::FESubdivision::init_shape_functions().
QBase* libMesh::FEAbstract::qrule [protected, inherited] |
A pointer to the quadrature rule employed
Definition at line 575 of file fe_abstract.h.
Referenced by libMesh::FESubdivision::attach_quadrature_rule().
bool libMesh::FEAbstract::shapes_on_quadrature [protected, inherited] |
A flag indicating if current data structures correspond to quadrature rule points
Definition at line 581 of file fe_abstract.h.
std::vector<Real> libMesh::FEGenericBase< FEOutputType< T >::type >::weight [protected, inherited] |