v0.16.0
Loading...
Searching...
No Matches
Public Types | List of all members
MoFEM::EntitiesFieldData::EntData Struct Reference

Data on single entity (This is passed as argument to DataOperator::doWork) More...

#include "src/finite_elements/EntitiesFieldData.hpp"

Inheritance diagram for MoFEM::EntitiesFieldData::EntData:
[legend]
Collaboration diagram for MoFEM::EntitiesFieldData::EntData:
[legend]

Public Types

enum  BaseDerivatives {
  ZeroDerivative = 0 , FirstDerivative , SecondDerivative , ThirdDerivative ,
  ForthDerivative , LastDerivative
}
 

Bernstein-Bezier base only functions

static constexpr size_t MaxBernsteinBezierOrder = BITFEID_SIZE
 
VectorIntgetBBNodeOrder ()
 Get orders at the nodes.
 
MatrixIntgetBBAlphaIndices ()
 Get file BB indices.
 
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesSharedPtr (const std::string &field_name)
 
virtual boost::shared_ptr< MatrixDouble > & getBBNSharedPtr (const std::string &field_name)
 
virtual const boost::shared_ptr< MatrixDouble > & getBBNSharedPtr (const std::string &field_name) const
 
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr (const std::string &field_name)
 
virtual const boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr (const std::string &field_name) const
 
virtual std::map< std::string, boost::shared_ptr< MatrixInt > > & getBBAlphaIndicesMap ()
 
virtual std::map< std::string, boost::shared_ptr< MatrixDouble > > & getBBNMap ()
 get hash map of base function for BB base, key is a field name
 
virtual std::map< std::string, boost::shared_ptr< MatrixDouble > > & getBBDiffNMap ()
 get hash map of derivatives base function for BB base, key is a field name
 
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesByOrderSharedPtr (const size_t o)
 get ALpha indices for BB base by order
 
virtual boost::shared_ptr< MatrixDouble > & getBBNByOrderSharedPtr (const size_t o)
 get BB base by order
 
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNByOrderSharedPtr (const size_t o)
 get BB base derivative by order
 
virtual std::array< boost::shared_ptr< MatrixInt >, MaxBernsteinBezierOrder > & getBBAlphaIndicesByOrderArray ()
 
virtual std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > & getBBNByOrderArray ()
 
virtual std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > & getBBDiffNByOrderArray ()
 
virtual MoFEMErrorCode baseSwap (const std::string &field_name, const FieldApproximationBase base)
 Swap bases functions.
 

Broken spaces functions

int sEnse
 Entity sense (orientation)
 
ApproximationOrder oRder
 Entity order.
 
FieldSpace sPace
 Entity space.
 
FieldApproximationBase bAse
 Field approximation base.
 
VectorInt iNdices
 Global indices on entity.
 
VectorInt localIndices
 Local indices on entity.
 
VectorDofs dOfs
 DoFs on entity.
 
VectorFieldEntities fieldEntities
 Field entities.
 
VectorDouble fieldData
 Field data on entity.
 
std::vector< BitRefLevelentDataBitRefLevel
 Bit ref level in entity.
 
std::vector< int > dofBrokenSideVec
 Map side to dofs number.
 
std::vector< EntityType > dofBrokenTypeVec
 Map type of entity to dof number.
 
std::array< std::array< boost::shared_ptr< MatrixDouble >, LASTBASE >, LastDerivativebaseFunctionsAndBaseDerivatives
 
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & N
 Base functions.
 
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & diffN
 Derivatives of base functions.
 
std::string bbFieldName
 field name
 
VectorInt bbNodeOrder
 order of nodes
 
std::map< std::string, boost::shared_ptr< MatrixDouble > > bbN
 
std::map< std::string, boost::shared_ptr< MatrixDouble > > bbDiffN
 
std::map< std::string, boost::shared_ptr< MatrixInt > > bbAlphaIndices
 Indices for Bernstein-Bezier (BB) base.
 
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrderbbNByOrder
 BB base functions by order.
 
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrderbbDiffNByOrder
 BB base functions derivatives by order.
 
std::array< boost::shared_ptr< MatrixInt >, MaxBernsteinBezierOrderbbAlphaIndicesByOrder
 BB alpha indices by order.
 
boost::shared_ptr< MatrixDoubleswapBaseNPtr
 Used by Bernstein base to keep temporary pointer.
 
boost::shared_ptr< MatrixDoubleswapBaseDiffNPtr
 Used by Bernstein base to keep temporary pointer.
 
struct OpAddParentEntData
 
template<typename OpBase >
struct OpGetBrokenBaseSideData
 

Auxiliary functions

std::ostream & operator<< (std::ostream &os, const EntitiesFieldData::EntData &e)
 
MoFEMErrorCode resetFieldDependentData ()
 

Constructor and destructor

 EntData (const bool allocate_base_matrices=true)
 Construct EntData object.
 
virtual ~EntData ()=default
 

Sense, order and indices

virtual int getSense () const
 Get entity sense for conforming approximation fields.
 
ApproximationOrder getOrder () const
 Get approximation order.
 
const VectorIntgetIndices () const
 Get global indices of degrees of freedom on entity.
 
const VectorIntAdaptor getIndicesUpToOrder (int order)
 Get global indices of DOFs on entity up to given order.
 
const VectorIntgetLocalIndices () const
 Get local indices of degrees of freedom on entity.
 
const VectorIntAdaptor getLocalIndicesUpToOrder (int order)
 Get local indices of DOFs on entity up to given order.
 
int & getSense ()
 Get reference to entity sense for modification.
 
ApproximationOrdergetOrder ()
 Get reference to approximation order for modification.
 
VectorIntgetIndices ()
 Get reference to global indices for modification.
 
VectorIntgetLocalIndices ()
 Get reference to local indices for modification.
 

Data on entity

const VectorDoublegetFieldData () const
 Get DOF values on entity.
 
const VectorAdaptor getFieldDataUpToOrder (int order)
 Get DOF values on entity up to given order.
 
const VectorDofsgetFieldDofs () const
 Get DOF data structures (const version)
 
VectorDoublegetFieldData ()
 Get DOF values on entity for modification.
 
const VectorFieldEntitiesgetFieldEntities () const
 Get field entities (const version)
 
VectorFieldEntitiesgetFieldEntities ()
 Get field entities for modification.
 
virtual std::vector< BitRefLevel > & getEntDataBitRefLevel ()
 Get entity bit reference level.
 
template<int Tensor_Dim>
auto getFTensor1FieldData ()
 Return FTensor of rank 1, i.e. vector from field data coefficients.
 
template<int Tensor_Dim0, int Tensor_Dim1>
auto getFTensor2FieldData ()
 Return FTensor rank 2, i.e. matrix from field data coefficients.
 
template<int Tensor_Dim>
auto getFTensor2SymmetricFieldData ()
 Return symmetric FTensor rank 2, i.e. matrix from field data coefficients.
 
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FieldData ()
 Return scalar files as a FTensor of rank 0.
 
VectorDofsgetFieldDofs ()
 

Base and space

FieldApproximationBasegetBase ()
 Get approximation base.
 
FieldSpacegetSpace ()
 Get field space.
 
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr (const FieldApproximationBase base, const BaseDerivatives derivative)
 Get shared pointer to base functions with derivatives.
 
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr (const FieldApproximationBase base)
 Get shared pointer to base functions (zero derivative)
 
virtual boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr (const FieldApproximationBase base)
 Get shared pointer to derivatives of base functions.
 

Get base functions for H1/L2

MatrixDoublegetN (const FieldApproximationBase base)
 get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb. of columns is equal to number of base functions on this entity.
 
MatrixDoublegetN (const std::string &field_name)
 Get base functions for specific field (Bernstein-Bezier)
 
MatrixDoublegetN ()
 Get base functions using default base.
 
MatrixDoublegetDiffN (const FieldApproximationBase base)
 get derivatives of base functions
 
MatrixDoublegetN (const FieldApproximationBase base, const BaseDerivatives derivative)
 Get base function derivatives with specific derivative order.
 
MatrixDoublegetDiffN (const std::string &field_name)
 Get derivatives of base functions for specific field.
 
MatrixDoublegetDiffN ()
 Get derivatives of base functions using default base.
 
MatrixDoublegetN (const BaseDerivatives derivative)
 Get base function derivatives using default base.
 
const VectorAdaptor getN (const FieldApproximationBase base, const int gg)
 Get base functions at specific Gauss point.
 
const VectorAdaptor getN (const int gg)
 Get base functions at specific Gauss point using default base.
 
const MatrixAdaptor getDiffN (const FieldApproximationBase base, const int gg)
 Get derivative of base functions at specific Gauss point.
 
const MatrixAdaptor getDiffN (const int gg)
 Get derivative of base functions at specific Gauss point using default base.
 
const VectorAdaptor getN (const FieldApproximationBase base, const int gg, const int nb_base_functions)
 Get base functions at Gauss point with limited number of functions.
 
const VectorAdaptor getN (const int gg, const int nb_base_functions)
 Get base functions at Gauss point with limited number (default base)
 
const MatrixAdaptor getDiffN (const FieldApproximationBase base, const int gg, const int nb_base_functions)
 Get derivatives of base functions at Gauss point with limited number.
 
const MatrixAdaptor getDiffN (const int gg, const int nb_base_functions)
 Get derivatives of base functions at Gauss point with limited number (default base)
 

Get base functions for vectorial approximation bases, i.e.

Hdiv/Hcurl

template<int DIM>
const MatrixAdaptor getVectorN (const FieldApproximationBase base, const int gg)
 get Hdiv of base functions at Gauss pts
 
template<int DIM>
const MatrixAdaptor getVectorN (const int gg)
 get Hdiv of base functions at Gauss pts
 
template<int DIM0, int DIM1>
const MatrixAdaptor getVectorDiffN (FieldApproximationBase base, const int gg)
 get DiffHdiv of base functions at Gauss pts
 
template<int DIM0, int DIM1>
const MatrixAdaptor getVectorDiffN (const int gg)
 get DiffHdiv of base functions at Gauss pts
 
template<int DIM0, int DIM1>
const MatrixAdaptor getVectorDiffN (const FieldApproximationBase base, const int dof, const int gg)
 get DiffHdiv of base functions at Gauss pts
 
template<int DIM0, int DIM1>
const MatrixAdaptor getVectorDiffN (const int dof, const int gg)
 get DiffHdiv of base functions at Gauss pts
 

Get base functions with FTensor

FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N (const FieldApproximationBase base)
 Get base function as Tensor0.
 
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N ()
 Get base function as Tensor0.
 
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N (const FieldApproximationBase base, const int gg, const int bb)
 Get base function as Tensor0 (Loop by integration points)
 
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N (const int gg, const int bb)
 Get base function as Tensor0 (Loop by integration points)
 
template<int Tensor_Dim>
auto getFTensor1DiffN (const FieldApproximationBase base)
 Get derivatives of base functions.
 
template<int Tensor_Dim>
auto getFTensor1DiffN ()
 Get derivatives of base functions.
 
template<int Tensor_Dim>
auto getFTensor1DiffN (const FieldApproximationBase base, const int gg, const int bb)
 Get derivatives of base functions (Loop by integration points)
 
template<int Tensor_Dim>
auto getFTensor1DiffN (const int gg, const int bb)
 Get derivatives of base functions (Loop by integration points)
 
template<int Tensor_Dim>
auto getFTensor2DiffN2 (const FieldApproximationBase base)
 Get second derivatives of scalar base functions.
 
template<int Tensor_Dim>
auto getFTensor2DiffN2 (const FieldApproximationBase base, const int gg, const int bb)
 Get second derivatives of scalar base functions at integration pts.
 
template<int Tensor_Dim>
auto getFTensor2DiffN2 ()
 Get second derivatives of scalar base functions.
 
template<int Tensor_Dim>
auto getFTensor2DiffN2 (const int gg, const int bb)
 Get second derivatives of scalar base functions at integration pts.
 
template<int Tensor_Dim>
auto getFTensor1N (FieldApproximationBase base)
 Get base functions for Hdiv/Hcurl spaces.
 
template<int Tensor_Dim>
auto getFTensor1N ()
 Get base functions for Hdiv space.
 
template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN (FieldApproximationBase base)
 Get derivatives of base functions for Hdiv space.
 
template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN (FieldApproximationBase base, const int gg, const int bb)
 Get derivatives of base functions for Hdiv space at integration pts.
 
template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN ()
 Get derivatives of base functions for Hdiv space.
 
template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN (const int gg, const int bb)
 Get derivatives of base functions for Hdiv space at integration pts.
 
template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3Diff2N (FieldApproximationBase base)
 Get second derivatives of base functions for Hvec space.
 
template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3Diff2N ()
 Get second derivatives of base functions for Hvec space.
 
template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3DiffN (FieldApproximationBase base)
 Get derivatives of base functions for tonsorial Hdiv space.
 
template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3DiffN (FieldApproximationBase base, const int gg, const int bb)
 Get derivatives of base functions for tonsorial Hdiv space at integration pts.
 
template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3DiffN ()
 Get derivatives of base functions for tonsorial Hdiv space.
 
template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3DiffN (const int gg, const int bb)
 Get derivatives of base functions for tonsorial Hdiv space at integration pts.
 
template<int Tensor_Dim>
auto getFTensor1N (FieldApproximationBase base, const int gg, const int bb)
 Get Hdiv base functions at integration point.
 
template<int Tensor_Dim>
auto getFTensor1N (const int gg, const int bb)
 Get Hdiv base functions at integration point.
 
template<int Tensor_Dim0, int Tensor_Dim1>
auto getFTensor2N (FieldApproximationBase base)
 Get base functions for Hdiv/Hcurl spaces.
 
template<int Tensor_Dim0, int Tensor_Dim1>
auto getFTensor2N ()
 Get base functions for Hdiv space.
 
template<int Tensor_Dim0, int Tensor_Dim1>
auto getFTensor2N (FieldApproximationBase base, const int gg, const int bb)
 Get base functions for tensor Hdiv/Hcurl spaces.
 
template<int Tensor_Dim0, int Tensor_Dim1>
auto getFTensor2N (const int gg, const int bb)
 Get base functions for Hdiv space.
 

Specializations for derivatives of base functions

template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > getFTensor2DiffN (FieldApproximationBase base)
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > getFTensor2DiffN (FieldApproximationBase base, const int gg, const int bb)
 
template<>
FTensor::Tensor3< FTensor::PackPtr< double *, 12 >, 3, 2, 2 > getFTensor3Diff2N (FieldApproximationBase base)
 
template<>
FTensor::Tensor3< FTensor::PackPtr< double *, 27 >, 3, 3, 3 > getFTensor3DiffN (FieldApproximationBase base)
 
template<>
FTensor::Tensor3< FTensor::PackPtr< double *, 27 >, 3, 3, 3 > getFTensor3DiffN (FieldApproximationBase base, const int gg, const int bb)
 

Detailed Description

Data on single entity (This is passed as argument to DataOperator::doWork)

Todo:
Hdiv and Hcurl functions should be accessed through common interface.
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp, /home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianPlasticity.cpp, ContactOps.hpp, HenckyOps.hpp, PlasticOpsGeneric.hpp, ThermoElasticOps.hpp, mofem/atom_tests/boundary_marker.cpp, mofem/atom_tests/build_large_problem.cpp, mofem/atom_tests/child_and_parent.cpp, mofem/atom_tests/continuity_check_on_contact_prism_side_ele.cpp, mofem/atom_tests/continuity_check_on_skeleton_3d.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, mofem/atom_tests/dg_projection.cpp, mofem/atom_tests/field_evaluator.cpp, mofem/atom_tests/forces_and_sources_testing_edge_element.cpp, mofem/atom_tests/forces_and_sources_testing_flat_prism_element.cpp, mofem/atom_tests/forces_and_sources_testing_users_base.cpp, mofem/atom_tests/hanging_node_approx.cpp, mofem/atom_tests/hcurl_check_approx_in_2d.cpp, mofem/atom_tests/hcurl_curl_operator.cpp, mofem/atom_tests/hcurl_divergence_operator_2d.cpp, mofem/atom_tests/hdiv_check_approx_in_3d.cpp, mofem/atom_tests/hdiv_divergence_operator.cpp, mofem/atom_tests/higher_derivatives.cpp, mofem/atom_tests/operators_tests.cpp, mofem/atom_tests/prism_elements_from_surface.cpp, mofem/atom_tests/prism_polynomial_approximation.cpp, mofem/atom_tests/quad_polynomial_approximation.cpp, mofem/atom_tests/scalar_check_approximation.cpp, mofem/atom_tests/schur_test_diag_mat.cpp, mofem/atom_tests/simple_interface.cpp, mofem/atom_tests/simple_l2_only.cpp, mofem/atom_tests/tensor_divergence_operator.cpp, mofem/atom_tests/test_broken_space.cpp, mofem/atom_tests/test_cache_on_entities.cpp, mofem/tutorials/adv-0_plasticity/plastic.cpp, mofem/tutorials/adv-0_plasticity/src/PlasticOpsGeneric.hpp, mofem/tutorials/adv-1_contact/src/ContactOps.hpp, mofem/tutorials/adv-3_level_set/level_set.cpp, mofem/tutorials/adv-4_dynamic_first_order_con_law/dynamic_first_order_con_law.cpp, mofem/tutorials/adv-5_poroelasticity/seepage.cpp, mofem/tutorials/adv-6_dg_projection/between_meshes_dg_projection.cpp, mofem/tutorials/cor-2to5_analytical_poisson/src/PoissonOperators.hpp, mofem/tutorials/cor-6_simple_elasticity/simple_elasticity.cpp, mofem/tutorials/cor-9_reaction_diffusion/reaction_diffusion.cpp, mofem/tutorials/fun-0_hello_world/hello_world.cpp, mofem/tutorials/fun-1_integration/integration.cpp, mofem/tutorials/fun-2_plot_base/plot_base.cpp, mofem/tutorials/max-1_lorentz_force//lorentz_force.cpp, mofem/tutorials/mix-0_mixed_poisson/mixed_poisson.cpp, mofem/tutorials/mix-1_light_intensity_equation/phase.cpp, mofem/tutorials/scl-0_least_squares/approximaton.cpp, mofem/tutorials/scl-1_poisson_2d_homogeneous/src/poisson_2d_homogeneous.hpp, mofem/tutorials/scl-6_heat_equation/heat_equation.cpp, mofem/tutorials/scl-7_wave_equation/wave_equation.cpp, mofem/tutorials/scl-8_heat_radiation/radiation.cpp, mofem/tutorials/scl-9_heat_method/heat_method.cpp, mofem/tutorials/vec-0_elasticity/elastic.cpp, mofem/tutorials/vec-10_elasticity_schur/schur_elastic.cpp, mofem/tutorials/vec-1_eigen_elasticity/eigen_elastic.cpp, mofem/tutorials/vec-2_nonlinear_elasticity/nonlinear_elastic.cpp, mofem/tutorials/vec-2_nonlinear_elasticity/src/HenckyOps.hpp, mofem/tutorials/vec-3_nonlinear_dynamics/nonlinear_dynamic_elastic.cpp, mofem/tutorials/vec-4_shallow_wave/approx_sphere.cpp, mofem/tutorials/vec-4_shallow_wave/shallow_wave.cpp, mofem/tutorials/vec-5_free_surface/free_surface.cpp, mofem/tutorials/vec-6_dg_kirchhoff_plate/plate.cpp, mofem/tutorials/vec-7_shape_optimisation/adjoint.cpp, mofem/tutorials/vec-9_arc_length/arc_length.cpp, mofem/users_modules/adolc-plasticity/adolc_plasticity.cpp, mofem/users_modules/basic_finite_elements/src/HookeElement.hpp, mofem/users_modules/basic_finite_elements/src/NavierStokesElement.hpp, mofem/users_modules/basic_finite_elements/src/impl/HookeElement.cpp, mofem/users_modules/basic_finite_elements/src/impl/NavierStokesElement.cpp, nonlinear_elastic.cpp, plastic.cpp, thermo_elastic.cpp, and thermoplastic.cpp.

Definition at line 150 of file EntitiesFieldData.hpp.

Member Enumeration Documentation

◆ BaseDerivatives

Constructor & Destructor Documentation

◆ EntData()

MoFEM::EntitiesFieldData::EntData::EntData ( const bool  allocate_base_matrices = true)

Construct EntData object.

Parameters
allocate_base_matricesIf true, allocate base function matrices (default: true)

Definition at line 10 of file EntitiesFieldData.cpp.

14 if (allocate_base_matrices) {
15
16 for (auto d = 0; d != LastDerivative; ++d) {
17 for (int b = 0; b != LASTBASE; ++b) {
19 }
20 }
21 } else {
22
23 // set null to all base function pointers
24 for (auto d = 0; d != LastDerivative; ++d) {
25 std::fill(baseFunctionsAndBaseDerivatives[d].begin(),
26 baseFunctionsAndBaseDerivatives[d].end(), nullptr);
27 }
28 }
29}
@ LASTBASE
Definition definitions.h:69
@ NOBASE
Definition definitions.h:59
UBlasMatrix< double > MatrixDouble
Definition Types.hpp:77
int sEnse
Entity sense (orientation)
std::vector< BitRefLevel > entDataBitRefLevel
Bit ref level in entity.
ApproximationOrder oRder
Entity order.
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & diffN
Derivatives of base functions.
std::array< std::array< boost::shared_ptr< MatrixDouble >, LASTBASE >, LastDerivative > baseFunctionsAndBaseDerivatives
FieldApproximationBase bAse
Field approximation base.
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & N
Base functions.

◆ ~EntData()

virtual MoFEM::EntitiesFieldData::EntData::~EntData ( )
virtualdefault

Member Function Documentation

◆ baseSwap()

MoFEMErrorCode MoFEM::EntitiesFieldData::EntData::baseSwap ( const std::string &  field_name,
const FieldApproximationBase  base 
)
virtual

Swap bases functions.

Some base are not hierarchical and depend on approximation order. Such case demand special handling, that appropriate base order is set depending on field, such that is accessible in operator.

Note
Base is not swap on meshsets
Parameters
field_name
base
Returns
MoFEMErrorCode

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 143 of file EntitiesFieldData.cpp.

144 {
146 auto make_swap = [](boost::shared_ptr<MatrixDouble> &ptr,
147 boost::shared_ptr<MatrixDouble> &ptrBB,
148 boost::shared_ptr<MatrixDouble> &swap_ptr) {
149 if (swap_ptr) {
150 ptr = swap_ptr;
151 swap_ptr.reset();
152 } else {
153 swap_ptr = ptr;
154 ptr = ptrBB;
155 }
156 };
161}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
constexpr auto field_name
boost::shared_ptr< MatrixDouble > swapBaseDiffNPtr
Used by Bernstein base to keep temporary pointer.
boost::shared_ptr< MatrixDouble > swapBaseNPtr
Used by Bernstein base to keep temporary pointer.
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr(const FieldApproximationBase base, const BaseDerivatives derivative)
Get shared pointer to base functions with derivatives.
virtual boost::shared_ptr< MatrixDouble > & getBBNSharedPtr(const std::string &field_name)
virtual boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr(const FieldApproximationBase base)
Get shared pointer to derivatives of base functions.
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr(const std::string &field_name)

◆ getBase()

FieldApproximationBase & MoFEM::EntitiesFieldData::EntData::getBase ( )
inline

Get approximation base.

Returns
Approximation base
Examples
mofem/atom_tests/hanging_node_approx.cpp.

Definition at line 1595 of file EntitiesFieldData.hpp.

1595{ return bAse; }

◆ getBBAlphaIndices()

MatrixInt & MoFEM::EntitiesFieldData::EntData::getBBAlphaIndices ( )
inline

Get file BB indices.

Returns
MatrixInt&

Definition at line 1834 of file EntitiesFieldData.hpp.

1834 {
1836}
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesSharedPtr(const std::string &field_name)

◆ getBBAlphaIndicesByOrderArray()

std::array< boost::shared_ptr< MatrixInt >, EntitiesFieldData::EntData::MaxBernsteinBezierOrder > & MoFEM::EntitiesFieldData::EntData::getBBAlphaIndicesByOrderArray ( )
virtual

Definition at line 491 of file EntitiesFieldData.cpp.

491 {
493}
std::array< boost::shared_ptr< MatrixInt >, MaxBernsteinBezierOrder > bbAlphaIndicesByOrder
BB alpha indices by order.

◆ getBBAlphaIndicesByOrderSharedPtr()

boost::shared_ptr< MatrixInt > & MoFEM::EntitiesFieldData::EntData::getBBAlphaIndicesByOrderSharedPtr ( const size_t  o)
virtual

get ALpha indices for BB base by order

Parameters
oapproximation order
Returns
boost::shared_ptr<MatrixInt>&

Definition at line 475 of file EntitiesFieldData.cpp.

475 {
476 return bbAlphaIndicesByOrder[o];
477}

◆ getBBAlphaIndicesMap()

std::map< std::string, boost::shared_ptr< MatrixInt > > & MoFEM::EntitiesFieldData::EntData::getBBAlphaIndicesMap ( )
virtual

Definition at line 460 of file EntitiesFieldData.cpp.

460 {
461 return bbAlphaIndices;
462}
std::map< std::string, boost::shared_ptr< MatrixInt > > bbAlphaIndices
Indices for Bernstein-Bezier (BB) base.

◆ getBBAlphaIndicesSharedPtr()

boost::shared_ptr< MatrixInt > & MoFEM::EntitiesFieldData::EntData::getBBAlphaIndicesSharedPtr ( const std::string &  field_name)
virtual

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 423 of file EntitiesFieldData.cpp.

424 {
426}

◆ getBBDiffNByOrderArray()

std::array< boost::shared_ptr< MatrixDouble >, EntitiesFieldData::EntData::MaxBernsteinBezierOrder > & MoFEM::EntitiesFieldData::EntData::getBBDiffNByOrderArray ( )
virtual

Definition at line 503 of file EntitiesFieldData.cpp.

503 {
504 return bbDiffNByOrder;
505}
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > bbDiffNByOrder
BB base functions derivatives by order.

◆ getBBDiffNByOrderSharedPtr()

boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getBBDiffNByOrderSharedPtr ( const size_t  o)
virtual

get BB base derivative by order

Parameters
o
Returns
boost::shared_ptr<MatrixDouble>&

Definition at line 485 of file EntitiesFieldData.cpp.

485 {
486 return bbDiffNByOrder[o];
487}

◆ getBBDiffNMap()

std::map< std::string, boost::shared_ptr< MatrixDouble > > & MoFEM::EntitiesFieldData::EntData::getBBDiffNMap ( )
virtual

get hash map of derivatives base function for BB base, key is a field name

Returns
std::map<std::string, boost::shared_ptr<MatrixDouble>>&

Definition at line 470 of file EntitiesFieldData.cpp.

470 {
471 return bbDiffN;
472}
std::map< std::string, boost::shared_ptr< MatrixDouble > > bbDiffN

◆ getBBDiffNSharedPtr() [1/2]

boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getBBDiffNSharedPtr ( const std::string &  field_name)
virtual

Get shared pointer to BB derivatives of base base functions

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 446 of file EntitiesFieldData.cpp.

446 {
447 return bbDiffN[field_name];
448}

◆ getBBDiffNSharedPtr() [2/2]

const boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getBBDiffNSharedPtr ( const std::string &  field_name) const
virtual

Get shared pointer to derivatives of BB base base functions

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 454 of file EntitiesFieldData.cpp.

455 {
456 return bbDiffN.at(field_name);
457}

◆ getBBNByOrderArray()

std::array< boost::shared_ptr< MatrixDouble >, EntitiesFieldData::EntData::MaxBernsteinBezierOrder > & MoFEM::EntitiesFieldData::EntData::getBBNByOrderArray ( )
virtual

Definition at line 497 of file EntitiesFieldData.cpp.

497 {
498 return bbNByOrder;
499}
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > bbNByOrder
BB base functions by order.

◆ getBBNByOrderSharedPtr()

boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getBBNByOrderSharedPtr ( const size_t  o)
virtual

get BB base by order

Parameters
o
Returns
boost::shared_ptr<MatrixDouble>&

Definition at line 480 of file EntitiesFieldData.cpp.

480 {
481 return bbNByOrder[o];
482}

◆ getBBNMap()

std::map< std::string, boost::shared_ptr< MatrixDouble > > & MoFEM::EntitiesFieldData::EntData::getBBNMap ( )
virtual

get hash map of base function for BB base, key is a field name

Returns
std::map<std::string, boost::shared_ptr<MatrixDouble>>&

Definition at line 465 of file EntitiesFieldData.cpp.

465 {
466 return bbN;
467}
std::map< std::string, boost::shared_ptr< MatrixDouble > > bbN

◆ getBBNodeOrder()

VectorInt & MoFEM::EntitiesFieldData::EntData::getBBNodeOrder ( )
inline

Get orders at the nodes.

Returns
VectorInt&

Definition at line 1832 of file EntitiesFieldData.hpp.

1832{ return bbNodeOrder; }

◆ getBBNSharedPtr() [1/2]

boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getBBNSharedPtr ( const std::string &  field_name)
virtual

Get shared pointer to BB base base functions

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 429 of file EntitiesFieldData.cpp.

429 {
430 return bbN[field_name];
431}

◆ getBBNSharedPtr() [2/2]

const boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getBBNSharedPtr ( const std::string &  field_name) const
virtual

Get shared pointer to BB base base functions

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 437 of file EntitiesFieldData.cpp.

438 {
439 return bbN.at(field_name);
440}

◆ getDiffN() [1/7]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getDiffN ( )
inline

Get derivatives of base functions using default base.

Returns
MatrixDouble& Reference to derivative matrix

Definition at line 1656 of file EntitiesFieldData.hpp.

1656{ return getDiffN(bAse); }
MatrixDouble & getDiffN()
Get derivatives of base functions using default base.

◆ getDiffN() [2/7]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getDiffN ( const FieldApproximationBase  base)
inline

get derivatives of base functions

Matrix at rows has nb. of Gauss pts, at columns it has derivative of base functions. Columns are structured as follows, [ dN1/dx, dN1/dy, dN1/dz, dN2/dx, dN2/dy, dN2/dz, ... ]

Scalar base functions: Note that base functions are calculated in file H1.c Above description not apply for derivatives of nodal functions, since derivative of nodal functions in case of simplexes, EDGES, TRIANGLES and TETS are constant. So that matrix rows represents nb. of base functions, columns are derivatives. Nb. of columns depend on element dimension, for EDGES is one, for TRIS is 2 and TETS is 3.

Note
Note that for node element this function make no sense.

Tensorial base functions:

Note
Note: In rows are integration pts, columns are formatted that that components of vectors and then derivatives, for example row for given integration points is formatted in array

\[ t_{0,0}, t_{1,0}, t_{1,0}, t_{0,1}, t_{1,1}, t_{1,1}, t_{0,2}, t_{1,2}, t_{1,2} \]

where comma express derivative, i.e. \(t_{2,1} = \frac{\partial t_2}{\partial \xi_1}\)
Examples
mofem/atom_tests/hcurl_curl_operator.cpp, mofem/atom_tests/hdiv_divergence_operator.cpp, and mofem/atom_tests/scalar_check_approximation.cpp.

Definition at line 1627 of file EntitiesFieldData.hpp.

1627 {
1628 return *(getDiffNSharedPtr(base));
1629}

◆ getDiffN() [3/7]

const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getDiffN ( const FieldApproximationBase  base,
const int  gg 
)
inline

Get derivative of base functions at specific Gauss point.

Returned matrix has base functions in rows and derivatives in columns.

Parameters
baseApproximation base type
ggGauss point number
Returns
const MatrixAdaptor Adaptor to derivative matrix at Gauss point

Definition at line 1676 of file EntitiesFieldData.hpp.

1677 {
1678 // FIXME: That is bug, it will not work if number of integration pts is
1679 // equal to number of nodes on entity. User who not implementing low
1680 // level DataOperator will not experience this.
1681 if (getN(base).size1() == getDiffN(base).size1()) {
1682 int size = getN(base).size2();
1683 int dim = getDiffN(base).size2() / size;
1684 double *data = &getDiffN(base)(gg, 0);
1685 return MatrixAdaptor(
1686 getN(base).size2(), dim,
1687 ublas::shallow_array_adaptor<double>(getDiffN(base).size2(), data));
1688 } else {
1689 // in some cases, f.e. for derivatives of nodal base functions at only
1690 // one gauss point is needed
1691 return MatrixAdaptor(
1692 getN(base).size1(), getN(base).size2(),
1693 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1694 &getDiffN(base).data()[0]));
1695 }
1696}
MatrixShallowArrayAdaptor< double > MatrixAdaptor
Matrix adaptor.
Definition Types.hpp:131
MatrixDouble & getN()
Get base functions using default base.

◆ getDiffN() [4/7]

const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getDiffN ( const FieldApproximationBase  base,
const int  gg,
const int  nb_base_functions 
)
inline

Get derivatives of base functions at Gauss point with limited number.

Note that for multi-field elements, different fields can have different approximation orders. Since hierarchical approximation basis is used, base functions are calculated once for element using maximal order.

Parameters
baseApproximation base type
ggGauss point number
nb_base_functionsNumber of base functions
Returns
const MatrixAdaptor Adaptor to limited derivative matrix

Definition at line 1718 of file EntitiesFieldData.hpp.

1720 {
1721 // FIXME: That is bug, it will not work if number of integration pts is
1722 // equal to number of nodes on entity. User who not implementing low
1723 // level DataOperator will not experience this.
1724 if (getN(base).size1() == getDiffN(base).size1()) {
1725 (void)getN(base)(gg,
1726 nb_base_functions -
1727 1); // throw error if nb_base_functions is to big
1728 int dim = getDiffN(base).size2() / getN(base).size2();
1729 double *data = &getDiffN(base)(gg, 0);
1730 return MatrixAdaptor(
1731 nb_base_functions, dim,
1732 ublas::shallow_array_adaptor<double>(dim * nb_base_functions, data));
1733 } else {
1734 // in some cases, f.e. for derivatives of nodal base functions only one
1735 // gauss point is needed
1736 return MatrixAdaptor(
1737 getN(base).size1(), getN(base).size2(),
1738 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1739 &getDiffN(base).data()[0]));
1740 }
1741}

◆ getDiffN() [5/7]

const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getDiffN ( const int  gg)
inline

Get derivative of base functions at specific Gauss point using default base.

Parameters
ggGauss point number
Returns
const MatrixAdaptor Adaptor to derivative matrix at Gauss point

Definition at line 1698 of file EntitiesFieldData.hpp.

1698 {
1699 return getDiffN(bAse, gg);
1700}

◆ getDiffN() [6/7]

const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getDiffN ( const int  gg,
const int  nb_base_functions 
)
inline

Get derivatives of base functions at Gauss point with limited number (default base)

Parameters
ggGauss point number
nb_base_functionsNumber of base functions
Returns
const MatrixAdaptor Adaptor to limited derivative matrix

Definition at line 1744 of file EntitiesFieldData.hpp.

1745 {
1746 return getDiffN(bAse, gg, nb_base_functions);
1747}

◆ getDiffN() [7/7]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getDiffN ( const std::string &  field_name)
inline

Get derivatives of base functions for specific field.

Parameters
field_nameName of the field
Returns
MatrixDouble& Reference to derivative matrix

Definition at line 1646 of file EntitiesFieldData.hpp.

1646 {
1647 #ifndef NDEBUG
1650 "Null pointer to base functions derivative");
1651 }
1652 #endif // NDEBUG
1654}
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
@ MOFEM_DATA_INCONSISTENCY
Definition definitions.h:31

◆ getDiffNSharedPtr()

boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getDiffNSharedPtr ( const FieldApproximationBase  base)
virtual

Get shared pointer to derivatives of base functions.

Parameters
baseApproximation base type
Returns
boost::shared_ptr<MatrixDouble>& Shared pointer to derivative matrix

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 44 of file EntitiesFieldData.cpp.

45 {
46 return diffN[base];
47}

◆ getEntDataBitRefLevel()

std::vector< BitRefLevel > & MoFEM::EntitiesFieldData::EntData::getEntDataBitRefLevel ( )
virtual

Get entity bit reference level.

Returns
std::vector<BitRefLevel>& Reference to bit reference level vector

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 545 of file EntitiesFieldData.cpp.

545 {
546 return entDataBitRefLevel;
547}

◆ getFieldData() [1/2]

VectorDouble & MoFEM::EntitiesFieldData::EntData::getFieldData ( )
inline

Get DOF values on entity for modification.

Returns
VectorDouble& Reference to vector of DOF values

Definition at line 1584 of file EntitiesFieldData.hpp.

1584{ return fieldData; }
VectorDouble fieldData
Field data on entity.

◆ getFieldData() [2/2]

const VectorDouble & MoFEM::EntitiesFieldData::EntData::getFieldData ( ) const
inline

◆ getFieldDataUpToOrder()

const VectorAdaptor MoFEM::EntitiesFieldData::EntData::getFieldDataUpToOrder ( int  order)
inline

Get DOF values on entity up to given order.

Parameters
orderMaximum approximation order to include
Returns
const VectorAdaptor Adaptor to subset of DOF values

Definition at line 1568 of file EntitiesFieldData.hpp.

1568 {
1569 unsigned int size = 0;
1570 if (auto dof = dOfs[0]) {
1571 size = dof->getOrderNbDofs(order) * dof->getNbOfCoeffs();
1572 size = size < fieldData.size() ? size : fieldData.size();
1573 }
1574 double *data = &*fieldData.data().begin();
1575 return getVectorAdaptor(data, size);
1576}
constexpr int order
auto getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
Definition Templates.hpp:49

◆ getFieldDofs() [1/2]

VectorDofs & MoFEM::EntitiesFieldData::EntData::getFieldDofs ( )
inline

Definition at line 1582 of file EntitiesFieldData.hpp.

1582{ return dOfs; }

◆ getFieldDofs() [2/2]

const VectorDofs & MoFEM::EntitiesFieldData::EntData::getFieldDofs ( ) const
inline

Get DOF data structures (const version)

Returns
const VectorDofs& Reference to vector of FEDofEntity pointers
Examples
mofem/atom_tests/prism_elements_from_surface.cpp, mofem/tutorials/cor-2to5_analytical_poisson/src/PoissonOperators.hpp, and mofem/users_modules/basic_finite_elements/src/impl/HookeElement.cpp.

Definition at line 1578 of file EntitiesFieldData.hpp.

1578 {
1579 return dOfs;
1580}

◆ getFieldEntities() [1/2]

VectorFieldEntities & MoFEM::EntitiesFieldData::EntData::getFieldEntities ( )
inline

Get field entities for modification.

Returns
VectorFieldEntities& Reference to vector of FieldEntity pointers

Definition at line 1586 of file EntitiesFieldData.hpp.

1586 {
1587 return fieldEntities;
1588}
VectorFieldEntities fieldEntities
Field entities.

◆ getFieldEntities() [2/2]

const VectorFieldEntities & MoFEM::EntitiesFieldData::EntData::getFieldEntities ( ) const
inline

◆ getFTensor0FieldData()

FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > MoFEM::EntitiesFieldData::EntData::getFTensor0FieldData ( )
inline

Return scalar files as a FTensor of rank 0.

Returns
FTensor::Tensor0<FTensor::PackPtr<double *,1> >
Examples
mofem/atom_tests/continuity_check_on_skeleton_3d.cpp, and mofem/atom_tests/scalar_check_approximation.cpp.

Definition at line 411 of file EntitiesFieldData.hpp.

411 {
412 #ifndef NDEBUG
413 for (auto &d : dOfs) {
414 if (d) {
415 if (d->getNbOfCoeffs() != 1) {
416 std::stringstream s;
417 s << "Wrong number of coefficients is " << d->getNbOfCoeffs();
418 s << " but expected scalar field, tensor of rank 0";
420 }
421 break;
422 }
423 }
424 #endif
426 fieldData.data().data());
427 }

◆ getFTensor0N() [1/4]

FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > MoFEM::EntitiesFieldData::EntData::getFTensor0N ( )
inline

Get base function as Tensor0.

Return base functions for field base

Returns
Tensor0

Definition at line 1812 of file EntitiesFieldData.hpp.

1812 {
1813 return getFTensor0N(bAse);
1814};
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N()
Get base function as Tensor0.

◆ getFTensor0N() [2/4]

FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > MoFEM::EntitiesFieldData::EntData::getFTensor0N ( const FieldApproximationBase  base)
inline

◆ getFTensor0N() [3/4]

FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > MoFEM::EntitiesFieldData::EntData::getFTensor0N ( const FieldApproximationBase  base,
const int  gg,
const int  bb 
)
inline

Get base function as Tensor0 (Loop by integration points)

Parameters
base
ggintegration points
bbbase function
Returns
Tensor0

Note that:

t0 = data.getFTensor0N(base,bb);
++t0

Increment in above code will move pointer to base function in next integration point.

Definition at line 1817 of file EntitiesFieldData.hpp.

1818 {
1819 double *ptr = &getN(base)(gg, bb);
1821};

◆ getFTensor0N() [4/4]

FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > MoFEM::EntitiesFieldData::EntData::getFTensor0N ( const int  gg,
const int  bb 
)
inline

Get base function as Tensor0 (Loop by integration points)

Return base functions for field base

Parameters
bbbase function
Returns
Tensor0

Definition at line 1824 of file EntitiesFieldData.hpp.

1824 {
1825 return getFTensor0N(bAse, gg, bb);
1826};

◆ getFTensor1DiffN() [1/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( )
inline

Get derivatives of base functions.

For volume element like tetrahedral or prism,

Tensor1<double*,3> diff_base = data.getFTensor1DiffN<3>();

For face element like triangle or quad

Tensor1<double*,2> diff_base = data.getFTensor1DiffN<2>();
Returns
Tensor rank 1 (vector)

Definition at line 824 of file EntitiesFieldData.hpp.

824 {
825 double *ptr = &*getDiffN(bAse).data().begin();
827 Tensor_Dim>(ptr);
828 }

◆ getFTensor1DiffN() [2/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( const FieldApproximationBase  base)
inline

◆ getFTensor1DiffN() [3/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( const FieldApproximationBase  base,
const int  gg,
const int  bb 
)
inline

Get derivatives of base functions (Loop by integration points)

For volume element like tetrahedral or prism,

Tensor1<double*,3> diff_base = data.getFTensor1DiffN<3>(base,gg,bb);

where bb is base function and gg is integration pt. Operator ++diff_base will move tensor pointer to next integration point.

For face element like triangle or quad

Tensor1<double*,2> diff_base = data.getFTensor1DiffN<2>(base,gg,bb);
Returns
Tensor rank 1 (vector)

Definition at line 849 of file EntitiesFieldData.hpp.

850 {
851 double *ptr = &getDiffN(base)(gg, Tensor_Dim * bb);
853 Tensor_Dim>(ptr);
854 }

◆ getFTensor1DiffN() [4/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( const int  gg,
const int  bb 
)
inline

Get derivatives of base functions (Loop by integration points)

For volume element like tetrahedral or prism,

Tensor1<double*,3> diff_base = data.getFTensor1DiffN<3>(gg,bb);

where bb is base function and gg is integration pt. Operator ++diff_base will move tensor pointer to next base function.

For face element like triangle or quad

Tensor1<double*,2> diff_base = data.getFTensor1DiffN<2>(gg,bb);
Returns
Tensor rank 1 (vector)

Definition at line 874 of file EntitiesFieldData.hpp.

874 {
875 double *ptr = &getDiffN(bAse)(gg, Tensor_Dim * bb);
877 Tensor_Dim>(ptr);
878 }

◆ getFTensor1FieldData()

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1FieldData ( )
inline

Return FTensor of rank 1, i.e. vector from field data coefficients.

auto t_vec = data.getFTensor1FieldData<3>();
Template Parameters
Tensor_Dimsize of vector
Returns
FTensor::Tensor1<FTensor::CursorPtr<double *, 0>, Tensor_Dim>

Definition at line 321 of file EntitiesFieldData.hpp.

321 {
322 #ifndef NDEBUG
323 for (auto &d : dOfs) {
324 if (d) {
325 if (d->getNbOfCoeffs() != Tensor_Dim) {
326 std::stringstream s;
327 s << "Wrong number of coefficients is " << d->getNbOfCoeffs();
328 s << " but you ask for tensor rank 1 dimension " << Tensor_Dim;
330 }
331 break;
332 }
333 }
334 #endif
336 Tensor_Dim>(fieldData.data().data());
337 }

◆ getFTensor1N() [1/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1N ( )
inline

Get base functions for Hdiv space.

Example:

int nb_dofs = data.getFieldData().size();
auto t_n_hdiv = data.getFTensor1N<3>();
for(int gg = 0;gg!=nb_gauss_pts;gg++) {
int ll = 0;
for(;ll!=nb_dofs;ll++) {
double dot_product = t_n_hdiv(i)*t_n_hdiv(i);
++t_n_hdiv;
}
for(;ll!=data.getVectorN().size2()/3;ll++) {
++t_n_hdiv;
}
}
FTensor::Index< 'i', SPACE_DIM > i

Definition at line 974 of file EntitiesFieldData.hpp.

974 {
975 double *t_n_ptr = &*getN(bAse).data().begin();
977 Tensor_Dim>(t_n_ptr);
978 }

◆ getFTensor1N() [2/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1N ( const int  gg,
const int  bb 
)
inline

Get Hdiv base functions at integration point.

for(int gg = 0;gg!=nb_gauss_pts;gg++) {
auto t_base = data.getFTensor1N(gg,0);
for(int bb = 0;bb!=nb_base_functions;bb++) {
double dot = t_base(i)*t_base(i);
}
}

Definition at line 1106 of file EntitiesFieldData.hpp.

1106 {
1107 double *t_n_ptr = &getN(bAse)(gg, Tensor_Dim * bb);
1109 Tensor_Dim>(t_n_ptr);
1110 }

◆ getFTensor1N() [3/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1N ( FieldApproximationBase  base)
inline

Get base functions for Hdiv/Hcurl spaces.

Note
You probably like to use getFTensor1N(), in typical use base is set automatically based on base set to field.
Parameters
baseApproximation base

Example:

int nb_dofs = data.getFieldData().size();
auto t_n_hdiv = data.getFTensor1N<3>();
for(int gg = 0;gg!=nb_gauss_pts;gg++) {
int ll = 0;
for(;ll!=nb_dofs;ll++) {
double dot_product = t_n_hdiv(i)*t_n_hdiv(i);
++t_n_hdiv;
}
for(;ll!=data.getVectorN().size2()/3;ll++) {
++t_n_hdiv;
}
}
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp, mofem/atom_tests/continuity_check_on_skeleton_3d.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, mofem/atom_tests/hcurl_curl_operator.cpp, mofem/atom_tests/hcurl_divergence_operator_2d.cpp, thermo_elastic.cpp, and thermoplastic.cpp.

Definition at line 948 of file EntitiesFieldData.hpp.

948 {
949 double *t_n_ptr = &*getN(base).data().begin();
951 Tensor_Dim>(t_n_ptr);
952 }

◆ getFTensor1N() [4/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor1N ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)
inline

Get Hdiv base functions at integration point.

for(int gg = 0;gg!=nb_gauss_pts;gg++) {
auto t_base = data.getFTensor1N(base,gg,bb);
for(int bb = 0;bb!=nb_base_functions;bb++) {
auto dot = t_base(i)*t_base(i);
}
}

Definition at line 1086 of file EntitiesFieldData.hpp.

1086 {
1087 double *t_n_ptr = &getN(base)(gg, Tensor_Dim * bb);
1089 Tensor_Dim>(t_n_ptr);
1090 }

◆ getFTensor2DiffN() [1/6]

template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN ( )
inline

Get derivatives of base functions for Hdiv space.

Definition at line 1000 of file EntitiesFieldData.hpp.

1000 {
1001 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(bAse);
1002 }

◆ getFTensor2DiffN() [2/6]

template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN ( const int  gg,
const int  bb 
)
inline

Get derivatives of base functions for Hdiv space at integration pts.

Definition at line 1010 of file EntitiesFieldData.hpp.

1010 {
1011 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(bAse, gg, bb);
1012 }

◆ getFTensor2DiffN() [3/6]

template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN ( FieldApproximationBase  base)

Get derivatives of base functions for Hdiv space.

Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp, mofem/atom_tests/hcurl_curl_operator.cpp, mofem/atom_tests/hcurl_divergence_operator_2d.cpp, and mofem/atom_tests/hdiv_divergence_operator.cpp.

Definition at line 297 of file EntitiesFieldData.cpp.

297 {
298 std::stringstream s;
299 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
300 << " not implemented";
301 THROW_MESSAGE(s.str());
303}
#define THROW_MESSAGE(msg)
Throw MoFEM exception.

◆ getFTensor2DiffN() [4/6]

FTensor::Tensor2< FTensor::PackPtr< double *, 6 >, 3, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN< 3, 2 > ( FieldApproximationBase  base)

Definition at line 308 of file EntitiesFieldData.cpp.

320 {
321 double *t_diff_n_ptr = &*getDiffN(base).data().begin();
323 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC0_2],
324 &t_diff_n_ptr[HVEC1_0], &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC1_2],
325 &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1], &t_diff_n_ptr[HVEC2_2]);
326}
@ HVEC1_1
@ HVEC0_1
@ HVEC1_0
@ HVEC2_1
@ HVEC1_2
@ HVEC2_2
@ HVEC2_0
@ HVEC0_2

◆ getFTensor2DiffN() [5/6]

template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)

Get derivatives of base functions for Hdiv space at integration pts.

Definition at line 308 of file EntitiesFieldData.cpp.

309 {
310 std::stringstream s;
311 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
312 << " not implemented";
313 THROW_MESSAGE(s.str());
315}

◆ getFTensor2DiffN() [6/6]

FTensor::Tensor2< FTensor::PackPtr< double *, 6 >, 3, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN< 3, 2 > ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)

Definition at line 308 of file EntitiesFieldData.cpp.

331 {
332 double *t_diff_n_ptr = &getDiffN(base)(gg, 9 * bb);
334 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC0_2],
335 &t_diff_n_ptr[HVEC1_0], &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC1_2],
336 &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1], &t_diff_n_ptr[HVEC2_2]);
337}

◆ getFTensor2DiffN2() [1/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN2 ( )
inline

Get second derivatives of scalar base functions.

Definition at line 905 of file EntitiesFieldData.hpp.

905 {
906 double *ptr = &(getN(bAse, BaseDerivatives::SecondDerivative))(0, 0);
907 return FTensor::Tensor2<
909 Tensor_Dim>(ptr);
910 }

◆ getFTensor2DiffN2() [2/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN2 ( const FieldApproximationBase  base)
inline

Get second derivatives of scalar base functions.

Definition at line 883 of file EntitiesFieldData.hpp.

883 {
884 double *ptr = &(getN(base, BaseDerivatives::SecondDerivative))(0, 0);
885 return FTensor::Tensor2<
887 Tensor_Dim>(ptr);
888 }

◆ getFTensor2DiffN2() [3/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN2 ( const FieldApproximationBase  base,
const int  gg,
const int  bb 
)
inline

Get second derivatives of scalar base functions at integration pts.

Definition at line 894 of file EntitiesFieldData.hpp.

895 {
896 constexpr int TensorSize = Tensor_Dim * Tensor_Dim;
897 double *ptr =
898 &getN(base, BaseDerivatives::SecondDerivative)(gg, TensorSize * bb);
900 Tensor_Dim, Tensor_Dim>(ptr);
901 }

◆ getFTensor2DiffN2() [4/4]

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2DiffN2 ( const int  gg,
const int  bb 
)
inline

Get second derivatives of scalar base functions at integration pts.

Definition at line 915 of file EntitiesFieldData.hpp.

915 {
916 constexpr int TensorSize = Tensor_Dim * Tensor_Dim;
917 double *ptr =
918 &getN(bAse, BaseDerivatives::SecondDerivative)(gg, TensorSize * bb);
920 Tensor_Dim, Tensor_Dim>(ptr);
921 }

◆ getFTensor2FieldData()

template<int Tensor_Dim0, int Tensor_Dim1>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2FieldData ( )
inline

Return FTensor rank 2, i.e. matrix from field data coefficients.

auto t_mat = data.getFTensor2FieldData<3,3>();
Template Parameters
Tensor_Dim0First dimension of tensor
Tensor_Dim1Second dimension of tensor
Returns
FTensor::Tensor2<FTensor::CursorPtr<double *, 0>, Tensor_Dim0, Tensor_Dim1> Rank 2 tensor

Definition at line 351 of file EntitiesFieldData.hpp.

351 {
352 #ifndef NDEBUG
353 constexpr int TensorSize = Tensor_Dim0 * Tensor_Dim1;
354 for (auto &d : dOfs) {
355 if (d) {
356 if (d->getNbOfCoeffs() != TensorSize) {
357 std::stringstream s;
358 s << "Wrong number of coefficients is " << d->getNbOfCoeffs();
359 s << " but you ask for tensor rank 2 dimensions " << Tensor_Dim0;
360 s << " by " << Tensor_Dim1 << " so " << TensorSize;
361 s << " coefficients is expected";
363 }
364 break;
365 }
366 }
367 #endif
368 return FTensor::Tensor2<
370 Tensor_Dim1>(fieldData.data().data());
371 }

◆ getFTensor2N() [1/4]

template<int Tensor_Dim0, int Tensor_Dim1>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2N ( )
inline

Get base functions for Hdiv space.

Example:

int nb_dofs = data.getFieldData().size();
auto t_n_hdiv = data.getFTensor2N<3,3>();
for(int gg = 0;gg!=nb_gauss_pts;gg++) {
int ll = 0;
for(;ll!=nb_dofs;ll++) {
double dot_product = t_n_hdiv(i,j)*t_n_hdiv(i,j);
++t_n_hdiv;
}
for(;ll!=data.getVectorN().size2()/3;ll++) {
++t_n_hdiv;
}
}
FTensor::Index< 'j', 3 > j

Definition at line 1168 of file EntitiesFieldData.hpp.

1168 {
1169 double *t_n_ptr = &*(getN(bAse).data().begin());
1170 return FTensor::Tensor2<
1172 Tensor_Dim1>(t_n_ptr);
1173 }

◆ getFTensor2N() [2/4]

template<int Tensor_Dim0, int Tensor_Dim1>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2N ( const int  gg,
const int  bb 
)
inline

Get base functions for Hdiv space.

Example:

int nb_dofs = data.getFieldData().size();
for(int gg = 0;gg!=nb_gauss_pts;++gg) {
int ll = 0;
auto t_n_hdiv = data.getFTensor2N<3,3>(gg,0);
for(;ll!=nb_dofs;ll++) {
double dot_product = t_n_hdiv(i)*t_n_hdiv(i);
++t_n_hdiv;
}
for(;ll!=data.getVectorN().size2()/3;ll++) {
++t_n_hdiv;
}
}

Definition at line 1231 of file EntitiesFieldData.hpp.

1231 {
1232 constexpr int TensorSize = Tensor_Dim0 * Tensor_Dim1;
1233 double *t_n_ptr = &getN(bAse)(gg, TensorSize * bb);
1235 Tensor_Dim0, Tensor_Dim1>(t_n_ptr);
1236 }

◆ getFTensor2N() [3/4]

template<int Tensor_Dim0, int Tensor_Dim1>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2N ( FieldApproximationBase  base)
inline

Get base functions for Hdiv/Hcurl spaces.

Note
You probably like to use getFTensor1N(), in typical use base is set automatically based on base set to field.
Parameters
baseApproximation base

Example:

int nb_dofs = data.getFieldData().size();
auto t_n_hdiv = data.getFTensor2N<3,3>();
for(int gg = 0;gg!=nb_gauss_pts;gg++) {
int ll = 0;
for(;ll!=nb_dofs;ll++) {
double dot_product = t_n_hdiv(i,j)*t_n_hdiv(i,j);
++t_n_hdiv;
}
for(;ll!=data.getVectorN().size2()/3;ll++) {
++t_n_hdiv;
}
}
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 1139 of file EntitiesFieldData.hpp.

1139 {
1140 double *t_n_ptr = &*(getN(base).data().begin());
1141 return FTensor::Tensor2<
1143 Tensor_Dim1>(t_n_ptr);
1144 }

◆ getFTensor2N() [4/4]

template<int Tensor_Dim0, int Tensor_Dim1>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2N ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)
inline

Get base functions for tensor Hdiv/Hcurl spaces.

Note
You probably like to use getFTensor2N(), in typical use base is set automatically based on base set to field.
Parameters
baseApproximation base

Example:

int nb_dofs = data.getFieldData().size();
for(int gg = 0;gg!=nb_gauss_pts;gg++) {
auto t_n_hdiv = data.getFTensor2N<3>(base,gg,bb);
int ll = 0;
for(;ll!=nb_dofs;ll++) {
double dot_product = t_n_hdiv(i,j)*t_n_hdiv(i,j);
++t_n_hdiv;
}
for(;ll!=data.getVectorN().size2()/3;ll++) {
++t_n_hdiv;
}
}

Definition at line 1202 of file EntitiesFieldData.hpp.

1202 {
1203 constexpr int TensorSize = Tensor_Dim0 * Tensor_Dim1;
1204 double *t_n_ptr = &getN(base)(gg, TensorSize * bb);
1206 Tensor_Dim0, Tensor_Dim1>(t_n_ptr);
1207 }

◆ getFTensor2SymmetricFieldData()

template<int Tensor_Dim>
auto MoFEM::EntitiesFieldData::EntData::getFTensor2SymmetricFieldData ( )
inline

Return symmetric FTensor rank 2, i.e. matrix from field data coefficients.

auto t_mat = data.getFTensor2SymmetricFieldData<3>();
Template Parameters
Tensor_DimDimension of the symmetric tensor
Returns
FTensor::Tensor2_symmetric<FTensor::CursorPtr<double *, 0>, Tensor_Dim> Symmetric rank 2 tensor

Definition at line 385 of file EntitiesFieldData.hpp.

385 {
386 constexpr auto size_symm = (Tensor_Dim * (Tensor_Dim + 1)) / 2;
387 #ifndef NDEBUG
388 for (auto &d : dOfs) {
389 if (d) {
390 if (d->getNbOfCoeffs() != size_symm) {
391 std::stringstream s;
392 s << "Wrong number of coefficients is " << d->getNbOfCoeffs();
393 s << " but you ask for symmetric tensor rank 2 dimensions "
394 << Tensor_Dim << " by " << Tensor_Dim << " so " << size_symm;
395 s << " coefficients is expected";
397 }
398 break;
399 }
400 }
401 #endif
403 Tensor_Dim>(fieldData.data().data());
404 }
constexpr auto size_symm
Definition plastic.cpp:42

◆ getFTensor3Diff2N() [1/3]

template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > MoFEM::EntitiesFieldData::EntData::getFTensor3Diff2N ( )
inline

Get second derivatives of base functions for Hvec space.

Definition at line 1028 of file EntitiesFieldData.hpp.

1028 {
1029 return getFTensor3Diff2N<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(bAse);
1030 }

◆ getFTensor3Diff2N() [2/3]

template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > MoFEM::EntitiesFieldData::EntData::getFTensor3Diff2N ( FieldApproximationBase  base)

Get second derivatives of base functions for Hvec space.

◆ getFTensor3Diff2N() [3/3]

FTensor::Tensor3< FTensor::PackPtr< double *, 12 >, 3, 2, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor3Diff2N ( FieldApproximationBase  base)

Definition at line 361 of file EntitiesFieldData.cpp.

361 {
362 double *ptr = &(getN(base, BaseDerivatives::SecondDerivative))(0, 0);
364
365 &ptr[2 * HVEC0_0 + 0], &ptr[2 * HVEC0_0 + 1], &ptr[2 * HVEC0_1 + 0],
366 &ptr[2 * HVEC0_1 + 1],
367
368 &ptr[2 * HVEC1_0 + 0], &ptr[2 * HVEC1_0 + 1], &ptr[2 * HVEC1_1 + 0],
369 &ptr[2 * HVEC1_1 + 1],
370
371 &ptr[2 * HVEC2_0 + 0], &ptr[2 * HVEC2_0 + 1], &ptr[2 * HVEC2_1 + 0],
372 &ptr[2 * HVEC2_1 + 1]
373
374 };
375}
@ HVEC0_0

◆ getFTensor3DiffN() [1/6]

template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > MoFEM::EntitiesFieldData::EntData::getFTensor3DiffN ( )
inline

Get derivatives of base functions for tonsorial Hdiv space.

Definition at line 1055 of file EntitiesFieldData.hpp.

1055 {
1056 return getFTensor3DiffN<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(bAse);
1057 }

◆ getFTensor3DiffN() [2/6]

template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > MoFEM::EntitiesFieldData::EntData::getFTensor3DiffN ( const int  gg,
const int  bb 
)
inline

Get derivatives of base functions for tonsorial Hdiv space at integration pts.

Definition at line 1066 of file EntitiesFieldData.hpp.

1066 {
1067 return getFTensor3DiffN<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(bAse, gg,
1068 bb);
1069 }

◆ getFTensor3DiffN() [3/6]

template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > MoFEM::EntitiesFieldData::EntData::getFTensor3DiffN ( FieldApproximationBase  base)

Get derivatives of base functions for tonsorial Hdiv space.

Definition at line 381 of file EntitiesFieldData.cpp.

381 {
382 std::stringstream s;
383 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
384 << "x" << Tensor_Dim2 << " not implemented";
385 THROW_MESSAGE(s.str());
387}

◆ getFTensor3DiffN() [4/6]

FTensor::Tensor3< FTensor::PackPtr< double *, 27 >, 3, 3, 3 > MoFEM::EntitiesFieldData::EntData::getFTensor3DiffN ( FieldApproximationBase  base)

Definition at line 403 of file EntitiesFieldData.cpp.

403 {
404 double *ptr = &*getDiffN(base).data().begin();
405 return getFTensor3FromPtr<3, 3, 3>(ptr);
406};
FTensor::Tensor3< FTensor::PackPtr< double *, 27 >, 3, 3, 3 > getFTensor3FromPtr< 3, 3, 3 >(double *ptr)

◆ getFTensor3DiffN() [5/6]

template<int Tensor_Dim0, int Tensor_Dim1, int Tensor_Dim2>
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > MoFEM::EntitiesFieldData::EntData::getFTensor3DiffN ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)

Get derivatives of base functions for tonsorial Hdiv space at integration pts.

Definition at line 392 of file EntitiesFieldData.cpp.

393 {
394 std::stringstream s;
395 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
396 << " not implemented";
397 THROW_MESSAGE(s.str());
399}

◆ getFTensor3DiffN() [6/6]

FTensor::Tensor3< FTensor::PackPtr< double *, 27 >, 3, 3, 3 > MoFEM::EntitiesFieldData::EntData::getFTensor3DiffN ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)

Definition at line 410 of file EntitiesFieldData.cpp.

411 {
412 double *ptr = &getDiffN(base)(gg, 27 * bb);
413 return getFTensor3FromPtr<3, 3, 3>(ptr);
414};

◆ getIndices() [1/2]

VectorInt & MoFEM::EntitiesFieldData::EntData::getIndices ( )
inline

Get reference to global indices for modification.

Returns
VectorInt& Reference to global indices vector

Definition at line 1557 of file EntitiesFieldData.hpp.

1557{ return iNdices; }
VectorInt iNdices
Global indices on entity.

◆ getIndices() [2/2]

const VectorInt & MoFEM::EntitiesFieldData::EntData::getIndices ( ) const
inline

Get global indices of degrees of freedom on entity.

Returns
const VectorInt& Reference to vector of global DOF indices
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp, mofem/atom_tests/boundary_marker.cpp, mofem/atom_tests/child_and_parent.cpp, mofem/atom_tests/forces_and_sources_testing_users_base.cpp, mofem/atom_tests/hanging_node_approx.cpp, mofem/atom_tests/hcurl_divergence_operator_2d.cpp, mofem/atom_tests/prism_elements_from_surface.cpp, mofem/atom_tests/quad_polynomial_approximation.cpp, mofem/atom_tests/scalar_check_approximation.cpp, mofem/atom_tests/simple_interface.cpp, mofem/atom_tests/test_cache_on_entities.cpp, mofem/tutorials/adv-3_level_set/level_set.cpp, mofem/tutorials/adv-6_dg_projection/between_meshes_dg_projection.cpp, mofem/tutorials/cor-2to5_analytical_poisson/src/PoissonOperators.hpp, mofem/tutorials/cor-6_simple_elasticity/simple_elasticity.cpp, mofem/tutorials/cor-9_reaction_diffusion/reaction_diffusion.cpp, mofem/tutorials/fun-0_hello_world/hello_world.cpp, mofem/tutorials/scl-0_least_squares/approximaton.cpp, mofem/tutorials/scl-1_poisson_2d_homogeneous/src/poisson_2d_homogeneous.hpp, mofem/tutorials/scl-9_heat_method/heat_method.cpp, mofem/tutorials/vec-6_dg_kirchhoff_plate/plate.cpp, mofem/tutorials/vec-7_shape_optimisation/adjoint.cpp, mofem/users_modules/basic_finite_elements/src/impl/HookeElement.cpp, and mofem/users_modules/basic_finite_elements/src/impl/NavierStokesElement.cpp.

Definition at line 1523 of file EntitiesFieldData.hpp.

1523 {
1524 return iNdices;
1525}

◆ getIndicesUpToOrder()

const VectorIntAdaptor MoFEM::EntitiesFieldData::EntData::getIndicesUpToOrder ( int  order)
inline

Get global indices of DOFs on entity up to given order.

Parameters
orderMaximum approximation order to include
Returns
const VectorIntAdaptor Adaptor to subset of global indices

Definition at line 1528 of file EntitiesFieldData.hpp.

1528 {
1529 unsigned int size = 0;
1530 if (auto dof = dOfs[0]) {
1531 size = dof->getOrderNbDofs(order) * dof->getNbOfCoeffs();
1532 size = size < iNdices.size() ? size : iNdices.size();
1533 }
1534 int *data = &*iNdices.data().begin();
1535 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1536}
VectorShallowArrayAdaptor< int > VectorIntAdaptor
Definition Types.hpp:116

◆ getLocalIndices() [1/2]

VectorInt & MoFEM::EntitiesFieldData::EntData::getLocalIndices ( )
inline

Get reference to local indices for modification.

Returns
VectorInt& Reference to local indices vector

Definition at line 1559 of file EntitiesFieldData.hpp.

1559 {
1560 return localIndices;
1561}
VectorInt localIndices
Local indices on entity.

◆ getLocalIndices() [2/2]

const VectorInt & MoFEM::EntitiesFieldData::EntData::getLocalIndices ( ) const
inline

Get local indices of degrees of freedom on entity.

Returns
const VectorInt& Reference to vector of local DOF indices
Examples
mofem/atom_tests/boundary_marker.cpp, and mofem/atom_tests/prism_elements_from_surface.cpp.

Definition at line 1538 of file EntitiesFieldData.hpp.

1538 {
1539 return localIndices;
1540}

◆ getLocalIndicesUpToOrder()

const VectorIntAdaptor MoFEM::EntitiesFieldData::EntData::getLocalIndicesUpToOrder ( int  order)
inline

Get local indices of DOFs on entity up to given order.

Parameters
orderMaximum approximation order to include
Returns
const VectorIntAdaptor Adaptor to subset of local indices

Definition at line 1543 of file EntitiesFieldData.hpp.

1543 {
1544 unsigned int size = 0;
1545 if (auto dof = dOfs[0]) {
1546 size = dof->getOrderNbDofs(order) * dof->getNbOfCoeffs();
1547 size = size < localIndices.size() ? size : localIndices.size();
1548 }
1549 int *data = &*localIndices.data().begin();
1550 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1551}

◆ getN() [1/9]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getN ( )
inline

Get base functions using default base.

Returns
MatrixDouble& Reference to base function matrix

Definition at line 1624 of file EntitiesFieldData.hpp.

1624{ return getN(bAse); }

◆ getN() [2/9]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getN ( const BaseDerivatives  derivative)
inline

Get base function derivatives using default base.

Parameters
derivativeDerivative order
Returns
MatrixDouble& Reference to derivative matrix

Definition at line 1659 of file EntitiesFieldData.hpp.

1659 {
1660 return getN(bAse, derivative);
1661}

◆ getN() [3/9]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getN ( const FieldApproximationBase  base)
inline

get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb. of columns is equal to number of base functions on this entity.

Note
Note that for vectorial base, like Hdiv or Hcurl, in columns are vectorial base functions. For tonsorial would be base functions. Interpretation depends on type of base, scalar, vectorial or tonsorial and dimension of problem.
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp, mofem/atom_tests/continuity_check_on_contact_prism_side_ele.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, mofem/atom_tests/continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, mofem/atom_tests/forces_and_sources_testing_edge_element.cpp, mofem/atom_tests/forces_and_sources_testing_users_base.cpp, mofem/atom_tests/hanging_node_approx.cpp, mofem/atom_tests/hcurl_check_approx_in_2d.cpp, mofem/atom_tests/hcurl_curl_operator.cpp, mofem/atom_tests/hcurl_divergence_operator_2d.cpp, mofem/atom_tests/hdiv_divergence_operator.cpp, mofem/atom_tests/prism_elements_from_surface.cpp, mofem/atom_tests/prism_polynomial_approximation.cpp, mofem/atom_tests/quad_polynomial_approximation.cpp, mofem/atom_tests/scalar_check_approximation.cpp, mofem/tutorials/adv-3_level_set/level_set.cpp, mofem/tutorials/cor-6_simple_elasticity/simple_elasticity.cpp, mofem/tutorials/scl-9_heat_method/heat_method.cpp, mofem/tutorials/vec-6_dg_kirchhoff_plate/plate.cpp, mofem/tutorials/vec-7_shape_optimisation/adjoint.cpp, mofem/users_modules/basic_finite_elements/src/HookeElement.hpp, mofem/users_modules/basic_finite_elements/src/impl/HookeElement.cpp, and mofem/users_modules/basic_finite_elements/src/impl/NavierStokesElement.cpp.

Definition at line 1600 of file EntitiesFieldData.hpp.

1600 {
1601 #ifndef NDEBUG
1602 if (!getNSharedPtr(base)) {
1603 MOFEM_LOG_C("SELF", Sev::error, "Ptr to base %s functions is null",
1606 "Null pointer to base functions");
1607 }
1608 #endif // NDEBUG
1609 return *(getNSharedPtr(base));
1610}
#define MOFEM_LOG_C(channel, severity, format,...)
static const char *const ApproximationBaseNames[]
Definition definitions.h:72

◆ getN() [4/9]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getN ( const FieldApproximationBase  base,
const BaseDerivatives  derivative 
)
inline

Get base function derivatives with specific derivative order.

Parameters
baseApproximation base type
derivativeDerivative order
Returns
MatrixDouble& Reference to derivative matrix

Definition at line 1632 of file EntitiesFieldData.hpp.

1633 {
1634 #ifndef NDEBUG
1635 if (!getNSharedPtr(base, derivative)) {
1636 MOFEM_LOG_C("SELF", Sev::error,
1637 "Ptr to base %s functions derivative %d is null",
1638 ApproximationBaseNames[base], derivative);
1639 THROW_MESSAGE("Null pointer");
1640 }
1641 #endif
1642 return *(getNSharedPtr(base, derivative));
1643}

◆ getN() [5/9]

const VectorAdaptor MoFEM::EntitiesFieldData::EntData::getN ( const FieldApproximationBase  base,
const int  gg 
)
inline

Get base functions at specific Gauss point.

Parameters
baseApproximation base type
ggGauss point number
Returns
const VectorAdaptor Adaptor to base functions at Gauss point

Definition at line 1664 of file EntitiesFieldData.hpp.

1665 {
1666 int size = getN(base).size2();
1667 double *data = &getN(base)(gg, 0);
1668 return VectorAdaptor(size, ublas::shallow_array_adaptor<double>(size, data));
1669}
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition Types.hpp:115

◆ getN() [6/9]

const VectorAdaptor MoFEM::EntitiesFieldData::EntData::getN ( const FieldApproximationBase  base,
const int  gg,
const int  nb_base_functions 
)
inline

Get base functions at Gauss point with limited number of functions.

Note that for multi-field elements, different fields can have different approximation orders. Since hierarchical approximation basis is used, base functions are calculated once for element using maximal order.

Parameters
baseApproximation base type
ggGauss point number
nb_base_functionsNumber of base functions to return
Returns
const VectorAdaptor Adaptor to limited base functions

Definition at line 1703 of file EntitiesFieldData.hpp.

1704 {
1705 (void)getN()(gg, nb_base_functions -
1706 1); // throw error if nb_base_functions is to big
1707 double *data = &getN(base)(gg, 0);
1708 return VectorAdaptor(nb_base_functions, ublas::shallow_array_adaptor<double>(
1709 nb_base_functions, data));
1710}

◆ getN() [7/9]

const VectorAdaptor MoFEM::EntitiesFieldData::EntData::getN ( const int  gg)
inline

Get base functions at specific Gauss point using default base.

Parameters
ggGauss point number
Returns
const VectorAdaptor Adaptor to base functions at Gauss point

Definition at line 1671 of file EntitiesFieldData.hpp.

1671 {
1672 return getN(bAse, gg);
1673}

◆ getN() [8/9]

const VectorAdaptor MoFEM::EntitiesFieldData::EntData::getN ( const int  gg,
const int  nb_base_functions 
)
inline

Get base functions at Gauss point with limited number (default base)

Parameters
ggGauss point number
nb_base_functionsNumber of base functions to return
Returns
const VectorAdaptor Adaptor to limited base functions

Definition at line 1713 of file EntitiesFieldData.hpp.

1713 {
1714 return getN(bAse, gg, nb_base_functions);
1715}

◆ getN() [9/9]

MatrixDouble & MoFEM::EntitiesFieldData::EntData::getN ( const std::string &  field_name)
inline

Get base functions for specific field (Bernstein-Bezier)

Parameters
field_nameName of the field
Returns
MatrixDouble& Reference to base function matrix

Definition at line 1612 of file EntitiesFieldData.hpp.

1612 {
1613 #ifndef NDEBUG
1615 MOFEM_LOG_C("SELF", Sev::error, "Ptr to field %s base functions is null ",
1616 field_name.c_str());
1618 "Null pointer to base functions");
1619 }
1620 #endif // NDEBUG
1621 return *(getBBNSharedPtr(field_name));
1622}

◆ getNSharedPtr() [1/2]

boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getNSharedPtr ( const FieldApproximationBase  base)
virtual

Get shared pointer to base functions (zero derivative)

Parameters
baseApproximation base type
Returns
boost::shared_ptr<MatrixDouble>& Shared pointer to base function matrix

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 40 of file EntitiesFieldData.cpp.

40 {
41 return N[base];
42}

◆ getNSharedPtr() [2/2]

boost::shared_ptr< MatrixDouble > & MoFEM::EntitiesFieldData::EntData::getNSharedPtr ( const FieldApproximationBase  base,
const BaseDerivatives  derivative 
)
virtual

Get shared pointer to base functions with derivatives.

Parameters
baseApproximation base type
derivativeDerivative order (ZeroDerivative, FirstDerivative, etc.)
Returns
boost::shared_ptr<MatrixDouble>& Shared pointer to base function matrix

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 34 of file EntitiesFieldData.cpp.

35 {
36 return baseFunctionsAndBaseDerivatives[derivative][base];
37}

◆ getOrder() [1/2]

ApproximationOrder & MoFEM::EntitiesFieldData::EntData::getOrder ( )
inline

Get reference to approximation order for modification.

Returns
ApproximationOrder& Reference to approximation order

Definition at line 1555 of file EntitiesFieldData.hpp.

1555{ return oRder; }

◆ getOrder() [2/2]

ApproximationOrder MoFEM::EntitiesFieldData::EntData::getOrder ( ) const
inline

Get approximation order.

Returns
ApproximationOrder Approximation order for this entity

Definition at line 1519 of file EntitiesFieldData.hpp.

1519 {
1520 return oRder;
1521}

◆ getSense() [1/2]

int & MoFEM::EntitiesFieldData::EntData::getSense ( )
inline

Get reference to entity sense for modification.

Returns
int& Reference to entity sense

Definition at line 1553 of file EntitiesFieldData.hpp.

1553{ return sEnse; }

◆ getSense() [2/2]

int MoFEM::EntitiesFieldData::EntData::getSense ( ) const
virtual

Get entity sense for conforming approximation fields.

Entity sense is needed to calculate base functions with conforming approximation fields.

Returns
int Entity sense (orientation)

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 31 of file EntitiesFieldData.cpp.

31{ return sEnse; }

◆ getSpace()

FieldSpace & MoFEM::EntitiesFieldData::EntData::getSpace ( )
inline

◆ getVectorDiffN() [1/4]

template<int DIM0, int DIM1>
const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getVectorDiffN ( const FieldApproximationBase  base,
const int  dof,
const int  gg 
)
inline

get DiffHdiv of base functions at Gauss pts

Parameters
baseApproximation base
ggnb. of Gauss point
numberof of base functions

Definition at line 1791 of file EntitiesFieldData.hpp.

1792 {
1793 double *data =
1794 &EntitiesFieldData::EntData::getDiffN(base)(gg, DIM0 * DIM1 * dof);
1795 return MatrixAdaptor(DIM0, DIM1,
1796 ublas::shallow_array_adaptor<double>(DIM0 * DIM1, data));
1797}
constexpr int DIM1
Definition level_set.cpp:21

◆ getVectorDiffN() [2/4]

template<int DIM0, int DIM1>
const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getVectorDiffN ( const int  dof,
const int  gg 
)
inline

get DiffHdiv of base functions at Gauss pts

Parameters
ggnb. of Gauss point
numberof of base functions

Definition at line 1800 of file EntitiesFieldData.hpp.

1801 {
1802 return getVectorDiffN<DIM0, DIM1>(bAse, dof, gg);
1803}

◆ getVectorDiffN() [3/4]

template<int DIM0, int DIM1>
const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getVectorDiffN ( const int  gg)
inline

get DiffHdiv of base functions at Gauss pts

Parameters
ggnb. of Gauss point
numberof of base functions

Definition at line 1785 of file EntitiesFieldData.hpp.

1785 {
1786 return getVectorDiffN<DIM0, DIM1>(bAse, gg);
1787}

◆ getVectorDiffN() [4/4]

template<int DIM0, int DIM1>
const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getVectorDiffN ( FieldApproximationBase  base,
const int  gg 
)
inline

get DiffHdiv of base functions at Gauss pts

Parameters
baseApproximation base
ggnb. of Gauss point
numberof of base functions

Definition at line 1771 of file EntitiesFieldData.hpp.

1772 {
1773 if (PetscUnlikely(getDiffN(base).size2() % (DIM0 * DIM1))) {
1774 THROW_MESSAGE("Wrong dimension");
1775 }
1776
1777 const int nb_base_functions = getN(base).size2() / (DIM0 * DIM1);
1778 double *data = &getN(base)(gg, 0);
1779 return MatrixAdaptor(nb_base_functions, DIM0 * DIM1,
1780 ublas::shallow_array_adaptor<double>(
1781 DIM0 * DIM1 * nb_base_functions, data));
1782}

◆ getVectorN() [1/2]

template<int DIM>
const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getVectorN ( const FieldApproximationBase  base,
const int  gg 
)
inline

get Hdiv of base functions at Gauss pts

Parameters
baseApproximation base
ggnb. of Gauss point
Examples
mofem/atom_tests/hdiv_divergence_operator.cpp.

Definition at line 1751 of file EntitiesFieldData.hpp.

1752 {
1753 if (PetscUnlikely(getN(base).size2() % DIM)) {
1754 THROW_MESSAGE("Wrong dimension");
1755 }
1756
1757 const int nb_base_functions = getN(base).size2() / DIM;
1758 double *data = &getN(base)(gg, 0);
1759 return MatrixAdaptor(
1760 nb_base_functions, DIM,
1761 ublas::shallow_array_adaptor<double>(DIM * nb_base_functions, data));
1762}

◆ getVectorN() [2/2]

template<int DIM>
const MatrixAdaptor MoFEM::EntitiesFieldData::EntData::getVectorN ( const int  gg)
inline

get Hdiv of base functions at Gauss pts

Parameters
ggnb. of Gauss point
numberof of base functions

Definition at line 1765 of file EntitiesFieldData.hpp.

1765 {
1766 return getVectorN<DIM>(bAse, gg);
1767}

◆ resetFieldDependentData()

MoFEMErrorCode MoFEM::EntitiesFieldData::EntData::resetFieldDependentData ( )
inline

Reset data associated with particular field name

Returns
error code

Definition at line 122 of file EntitiesFieldData.cpp.

122 {
124 sPace = NOSPACE;
125 bAse = NOBASE;
126 fieldEntities.resize(0, false);
127 iNdices.resize(0, false);
128 localIndices.resize(0, false);
129 dOfs.resize(0, false);
130 fieldData.resize(0, false);
132}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
@ NOSPACE
Definition definitions.h:83
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...

Friends And Related Symbol Documentation

◆ OpAddParentEntData

friend struct OpAddParentEntData
friend

Definition at line 1430 of file EntitiesFieldData.hpp.

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const EntitiesFieldData::EntData e 
)
friend

Definition at line 247 of file EntitiesFieldData.cpp.

248 {
249 os << "sEnse: " << e.getSense() << std::endl
250 << "oRder: " << e.getOrder() << std::endl
251 << "global indices: " << e.getIndices() << std::endl
252 << "local indices: " << e.getLocalIndices() << std::endl;
253 // FIXME: precision should not be set here
254 os << "fieldData: " << std::fixed << std::setprecision(2) << e.getFieldData()
255 << std::endl;
256 MatrixDouble base = const_cast<EntitiesFieldData::EntData &>(e).getN();
257 MatrixDouble diff_base =
258 const_cast<EntitiesFieldData::EntData &>(e).getDiffN();
259 const double eps = 1e-6;
260 for (unsigned int ii = 0; ii != base.size1(); ii++) {
261 for (unsigned int jj = 0; jj != base.size2(); jj++) {
262 if (fabs(base(ii, jj)) < eps)
263 base(ii, jj) = 0;
264 }
265 }
266 for (unsigned int ii = 0; ii != diff_base.size1(); ii++) {
267 for (unsigned int jj = 0; jj != diff_base.size2(); jj++) {
268 if (fabs(diff_base(ii, jj)) < eps)
269 diff_base(ii, jj) = 0;
270 }
271 }
272 os << "N: " << std::fixed << base << std::endl
273 << "diffN: " << std::fixed << diff_base;
274 return os;
275}
static const double eps

◆ OpGetBrokenBaseSideData

template<typename OpBase >
friend struct OpGetBrokenBaseSideData
friend

Definition at line 1432 of file EntitiesFieldData.hpp.

Member Data Documentation

◆ bAse

FieldApproximationBase MoFEM::EntitiesFieldData::EntData::bAse
protected

Field approximation base.

Definition at line 1381 of file EntitiesFieldData.hpp.

◆ baseFunctionsAndBaseDerivatives

std::array<std::array<boost::shared_ptr<MatrixDouble>, LASTBASE>, LastDerivative> MoFEM::EntitiesFieldData::EntData::baseFunctionsAndBaseDerivatives
protected

Definition at line 1395 of file EntitiesFieldData.hpp.

◆ bbAlphaIndices

std::map<std::string, boost::shared_ptr<MatrixInt> > MoFEM::EntitiesFieldData::EntData::bbAlphaIndices
protected

Indices for Bernstein-Bezier (BB) base.

Definition at line 1406 of file EntitiesFieldData.hpp.

◆ bbAlphaIndicesByOrder

std::array<boost::shared_ptr<MatrixInt>, MaxBernsteinBezierOrder> MoFEM::EntitiesFieldData::EntData::bbAlphaIndicesByOrder
protected

BB alpha indices by order.

Definition at line 1413 of file EntitiesFieldData.hpp.

◆ bbDiffN

std::map<std::string, boost::shared_ptr<MatrixDouble> > MoFEM::EntitiesFieldData::EntData::bbDiffN
protected

Definition at line 1404 of file EntitiesFieldData.hpp.

◆ bbDiffNByOrder

std::array<boost::shared_ptr<MatrixDouble>, MaxBernsteinBezierOrder> MoFEM::EntitiesFieldData::EntData::bbDiffNByOrder
protected

BB base functions derivatives by order.

Definition at line 1411 of file EntitiesFieldData.hpp.

◆ bbFieldName

std::string MoFEM::EntitiesFieldData::EntData::bbFieldName
protected

field name

Definition at line 1401 of file EntitiesFieldData.hpp.

◆ bbN

std::map<std::string, boost::shared_ptr<MatrixDouble> > MoFEM::EntitiesFieldData::EntData::bbN
protected

Definition at line 1403 of file EntitiesFieldData.hpp.

◆ bbNByOrder

std::array<boost::shared_ptr<MatrixDouble>, MaxBernsteinBezierOrder> MoFEM::EntitiesFieldData::EntData::bbNByOrder
protected

BB base functions by order.

Definition at line 1409 of file EntitiesFieldData.hpp.

◆ bbNodeOrder

VectorInt MoFEM::EntitiesFieldData::EntData::bbNodeOrder
protected

order of nodes

Definition at line 1402 of file EntitiesFieldData.hpp.

◆ diffN

std::array<boost::shared_ptr<MatrixDouble>, LASTBASE>& MoFEM::EntitiesFieldData::EntData::diffN
protected

Derivatives of base functions.

Definition at line 1399 of file EntitiesFieldData.hpp.

◆ dofBrokenSideVec

std::vector<int> MoFEM::EntitiesFieldData::EntData::dofBrokenSideVec
protected

Map side to dofs number.

Definition at line 1389 of file EntitiesFieldData.hpp.

◆ dofBrokenTypeVec

std::vector<EntityType> MoFEM::EntitiesFieldData::EntData::dofBrokenTypeVec
protected

Map type of entity to dof number.

Definition at line 1391 of file EntitiesFieldData.hpp.

◆ dOfs

VectorDofs MoFEM::EntitiesFieldData::EntData::dOfs
protected

DoFs on entity.

Definition at line 1384 of file EntitiesFieldData.hpp.

◆ entDataBitRefLevel

std::vector<BitRefLevel> MoFEM::EntitiesFieldData::EntData::entDataBitRefLevel
protected

Bit ref level in entity.

Definition at line 1387 of file EntitiesFieldData.hpp.

◆ fieldData

VectorDouble MoFEM::EntitiesFieldData::EntData::fieldData
protected

Field data on entity.

Definition at line 1386 of file EntitiesFieldData.hpp.

◆ fieldEntities

VectorFieldEntities MoFEM::EntitiesFieldData::EntData::fieldEntities
protected

Field entities.

Definition at line 1385 of file EntitiesFieldData.hpp.

◆ iNdices

VectorInt MoFEM::EntitiesFieldData::EntData::iNdices
protected

Global indices on entity.

Definition at line 1382 of file EntitiesFieldData.hpp.

◆ localIndices

VectorInt MoFEM::EntitiesFieldData::EntData::localIndices
protected

Local indices on entity.

Definition at line 1383 of file EntitiesFieldData.hpp.

◆ MaxBernsteinBezierOrder

constexpr size_t MoFEM::EntitiesFieldData::EntData::MaxBernsteinBezierOrder = BITFEID_SIZE
staticconstexpr

Definition at line 1346 of file EntitiesFieldData.hpp.

◆ N

std::array<boost::shared_ptr<MatrixDouble>, LASTBASE>& MoFEM::EntitiesFieldData::EntData::N
protected

Base functions.

Definition at line 1397 of file EntitiesFieldData.hpp.

◆ oRder

ApproximationOrder MoFEM::EntitiesFieldData::EntData::oRder
protected

Entity order.

Definition at line 1379 of file EntitiesFieldData.hpp.

◆ sEnse

int MoFEM::EntitiesFieldData::EntData::sEnse
protected

Entity sense (orientation)

Definition at line 1378 of file EntitiesFieldData.hpp.

◆ sPace

FieldSpace MoFEM::EntitiesFieldData::EntData::sPace
protected

Entity space.

Definition at line 1380 of file EntitiesFieldData.hpp.

◆ swapBaseDiffNPtr

boost::shared_ptr<MatrixDouble> MoFEM::EntitiesFieldData::EntData::swapBaseDiffNPtr
protected

Used by Bernstein base to keep temporary pointer.

Swap approximation base.

Bernstein-Bezier (BB) base is not hierarchical, and is calculated for particular field, since it all shape functions change with the order. BB base is precalculated for every field, and when user push operator with particular field using BB base, pointers to shape functions and BaseDerivatives of shape functions are set to particular location, once operator is executed, pointers are switch back to its original position.

getNSharedPtr(base) <=== getBBNSharedPtr(field_name); // DO OPERATOR WORK getNSharedPtr(base) ==> getBBNSharedPtr(field_name);

Parameters
field_nameName of the field for which to swap base
baseApproximation base type to swap
Returns
MoFEMErrorCode Error code (0 on success)

Definition at line 1428 of file EntitiesFieldData.hpp.

◆ swapBaseNPtr

boost::shared_ptr<MatrixDouble> MoFEM::EntitiesFieldData::EntData::swapBaseNPtr
protected

Used by Bernstein base to keep temporary pointer.

Swap approximation base.

Bernstein-Bezier (BB) base is not hierarchical, and is calculated for particular field, since it all shape functions change with the order. BB base is precalculated for every field, and when user push operator with particular field using BB base, pointers to shape functions and BaseDerivatives of shape functions are set to particular location, once operator is executed, pointers are switch back to its original position.

getNSharedPtr(base) <=== getBBNSharedPtr(field_name); // DO OPERATOR WORK getNSharedPtr(base) ==> getBBNSharedPtr(field_name);

Parameters
field_nameName of the field for which to swap base
baseApproximation base type to swap
Returns
MoFEMErrorCode Error code (0 on success)

Definition at line 1421 of file EntitiesFieldData.hpp.


The documentation for this struct was generated from the following files: