v0.13.1
Public Types | Protected Attributes | Friends | 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
}
 

Protected Attributes

int sEnse
 Entity sense (orientation) More...
 
ApproximationOrder oRder
 Entity order. More...
 
FieldSpace sPace
 Entity space. More...
 
FieldApproximationBase bAse
 Field approximation base. More...
 
BitRefLevel entDataBitRefLevel
 Bit ref level in entity. More...
 
VectorInt iNdices
 Global indices on entity. More...
 
VectorInt localIndices
 Local indices on entity. More...
 
VectorDofs dOfs
 DoFs on entity. More...
 
VectorFieldEntities fieldEntities
 Field entities. More...
 
VectorDouble fieldData
 Field data on entity. More...
 
std::array< std::array< boost::shared_ptr< MatrixDouble >, LASTBASE >, LastDerivativebaseFunctionsAndBaseDerivatives
 
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & N
 Base functions. More...
 
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & diffN
 Derivatives of base functions. More...
 
std::string bbFieldName
 field name More...
 
VectorInt bbNodeOrder
 order of nodes More...
 
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. More...
 
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrderbbNByOrder
 BB base functions by order. More...
 
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrderbbDiffNByOrder
 BB base functions direvatives by order. More...
 
std::array< boost::shared_ptr< MatrixInt >, MaxBernsteinBezierOrderbbAlphaIndicesByOrder
 BB alpha indices by order. More...
 
boost::shared_ptr< MatrixDoubleswapBaseNPtr
 Used by Bernstein base to keep temporally pointer. More...
 
boost::shared_ptr< MatrixDoubleswapBaseDiffNPtr
 Used by Bernstein base to keep temporally pointer. More...
 

Friends

struct OpAddParentEntData
 

Bernstein-Bezier base only functions

static constexpr size_t MaxBernsteinBezierOrder = BITFEID_SIZE
 
VectorIntgetBBNodeOrder ()
 Get orders at the nodes. More...
 
MatrixIntgetBBAlphaIndices ()
 Get file BB indices. More...
 
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 More...
 
virtual std::map< std::string, boost::shared_ptr< MatrixDouble > > & getBBDiffNMap ()
 get hash map of direvarives base function for BB base, key is a field name More...
 
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesByOrderSharedPtr (const size_t o)
 get ALpha indices for BB base by order More...
 
virtual boost::shared_ptr< MatrixDouble > & getBBNByOrderSharedPtr (const size_t o)
 get BB base by order More...
 
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNByOrderSharedPtr (const size_t o)
 get BB base derivative by order More...
 
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. More...
 

Auxiliary functions

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

Constructor and destructor

 EntData (const bool allocate_base_matrices=true)
 
virtual ~EntData ()=default
 

Sense, order and indices

virtual int getSense () const
 get entity sense, need to calculate base functions with conforming approximation fields More...
 
ApproximationOrder getOrder () const
 get approximation order More...
 
const VectorIntgetIndices () const
 Get global indices of dofs on entity. More...
 
const VectorIntAdaptor getIndicesUpToOrder (int order)
 get global indices of dofs on entity up to given order More...
 
const VectorIntgetLocalIndices () const
 get local indices of dofs on entity More...
 
const VectorIntAdaptor getLocalIndicesUpToOrder (int order)
 get local indices of dofs on entity up to given order More...
 
int & getSense ()
 
ApproximationOrdergetOrder ()
 
VectorIntgetIndices ()
 
VectorIntgetLocalIndices ()
 

Data on entity

const VectorDoublegetFieldData () const
 get dofs values More...
 
const VectorAdaptor getFieldDataUpToOrder (int order)
 get dofs values up to given order More...
 
const VectorDofsgetFieldDofs () const
 get dofs data stature FEDofEntity More...
 
VectorDoublegetFieldData ()
 get dofs data stature FEDofEntity More...
 
const VectorFieldEntitiesgetFieldEntities () const
 get field entities More...
 
VectorFieldEntitiesgetFieldEntities ()
 get field entities More...
 
virtual BitRefLevelgetEntDataBitRefLevel ()
 
template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1FieldData ()
 Return FTensor of rank 1, i.e. vector from filed data coeffinects. More...
 
template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2FieldData ()
 Return FTensor rank 2, i.e. matrix from filed data coeffinects. More...
 
template<int Tensor_Dim>
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *,(Tensor_Dim *(Tensor_Dim+1))/2 >, Tensor_Dim > getFTensor2SymmetricFieldData ()
 Return symmetric FTensor rank 2, i.e. matrix from filed data coeffinects. More...
 
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FieldData ()
 Resturn scalar files as a FTensor of rank 0. More...
 
VectorDofsgetFieldDofs ()
 

Base and space

FieldApproximationBasegetBase ()
 Get approximation base. More...
 
FieldSpacegetSpace ()
 Get field space. More...
 
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr (const FieldApproximationBase base, const BaseDerivatives direvatie)
 
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr (const FieldApproximationBase base)
 
virtual boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr (const FieldApproximationBase base)
 

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. More...
 
MatrixDoublegetN (const std::string &field_name)
 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. More...
 
MatrixDoublegetN ()
 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. More...
 
MatrixDoublegetDiffN (const FieldApproximationBase base)
 get derivatives of base functions More...
 
MatrixDoublegetN (const FieldApproximationBase base, const BaseDerivatives derivative)
 Get base function derivative. More...
 
MatrixDoublegetDiffN (const std::string &field_name)
 get derivatives of base functions More...
 
MatrixDoublegetDiffN ()
 get derivatives of base functions More...
 
MatrixDoublegetN (const BaseDerivatives derivative)
 Get base function derivative. More...
 
const VectorAdaptor getN (const FieldApproximationBase base, const int gg)
 get base functions at Gauss pts More...
 
const VectorAdaptor getN (const int gg)
 get base functions at Gauss pts More...
 
const MatrixAdaptor getDiffN (const FieldApproximationBase base, const int gg)
 get derivative of base functions at Gauss pts More...
 
const MatrixAdaptor getDiffN (const int gg)
 get derivative of base functions at Gauss pts More...
 
const VectorAdaptor getN (const FieldApproximationBase base, const int gg, const int nb_base_functions)
 get base functions at Gauss pts More...
 
const VectorAdaptor getN (const int gg, const int nb_base_functions)
 get base functions at Gauss pts More...
 
const MatrixAdaptor getDiffN (const FieldApproximationBase base, const int gg, const int nb_base_functions)
 get derivatives of base functions at Gauss pts More...
 
const MatrixAdaptor getDiffN (const int gg, const int nb_base_functions)
 get derivatives of base functions at Gauss pts More...
 

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

Hdiv/Hcurl

template<int DIM>
const MatrixAdaptor getVectorN (const FieldApproximationBase base, const int gg)
 get Hdiv of base functions at Gauss pts More...
 
template<int DIM>
const MatrixAdaptor getVectorN (const int gg)
 get Hdiv of base functions at Gauss pts More...
 
template<int DIM0, int DIM1>
const MatrixAdaptor getVectorDiffN (FieldApproximationBase base, const int gg)
 get DiffHdiv of base functions at Gauss pts More...
 
template<int DIM0, int DIM1>
const MatrixAdaptor getVectorDiffN (const int gg)
 get DiffHdiv of base functions at Gauss pts More...
 
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 More...
 
template<int DIM0, int DIM1>
const MatrixAdaptor getVectorDiffN (const int dof, const int gg)
 get DiffHdiv of base functions at Gauss pts More...
 

Get base functions with FTensor

FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N (const FieldApproximationBase base)
 Get base function as Tensor0. More...
 
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N ()
 Get base function as Tensor0. More...
 
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) More...
 
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N (const int gg, const int bb)
 Get base function as Tensor0 (Loop by integration points) More...
 
template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN (const FieldApproximationBase base)
 Get derivatives of base functions. More...
 
template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN ()
 Get derivatives of base functions. More...
 
template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN (const FieldApproximationBase base, const int gg, const int bb)
 Get derivatives of base functions (Loop by integration points) More...
 
template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN (const int gg, const int bb)
 Get derivatives of base functions (Loop by integration points) More...
 
template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N (FieldApproximationBase base)
 Get base functions for Hdiv/Hcurl spaces. More...
 
template<int Tensor_Dim>
auto getFTensor1N ()
 Get base functions for Hdiv space. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N (FieldApproximationBase base, const int gg, const int bb)
 Get Hdiv base functions at integration point. More...
 
template<int Tensor_Dim>
auto getFTensor1N (const int gg, const int bb)
 Get Hdiv base functions at integration point. More...
 
template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2N (FieldApproximationBase base)
 Get base functions for Hdiv/Hcurl spaces. More...
 
template<int Tensor_Dim0, int Tensor_Dim1>
auto getFTensor2N ()
 Get base functions for Hdiv space. More...
 
template<int Tensor_Dim0, int Tensor_Dim1>
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2N (FieldApproximationBase base, const int gg, const int bb)
 Get base functions for tensor Hdiv/Hcurl spaces. More...
 
template<int Tensor_Dim0, int Tensor_Dim1>
auto getFTensor2N (const int gg, const int bb)
 Get base functions for Hdiv space. More...
 

Specializations for tensor base function

template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1N (FieldApproximationBase base)
 
template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1N (FieldApproximationBase base, const int gg, const int bb)
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > getFTensor2N (FieldApproximationBase base)
 

Specializations for direcatives of base functions

template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1DiffN (const FieldApproximationBase base)
 Get spatial derivative of base function tensor for dimension 3d. More...
 
template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1DiffN ()
 Get spatial derivative of base function tensor for dimension 3d. More...
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 6 >, 3, 2 > getFTensor2DiffN (FieldApproximationBase base)
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 6 >, 3, 2 > getFTensor2DiffN (FieldApproximationBase base, const int gg, const int bb)
 
template<>
FTensor::Tensor3< FTensor::PackPtr< double *, 12 >, 3, 2, 2 > getFTensor3Diff2N (FieldApproximationBase base)
 

Specializations for field data

template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1FieldData ()
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > getFTensor2FieldData ()
 
template<>
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 6 >, 3 > getFTensor2SymmetricFieldData ()
 

Specializations for H1/L2

template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1DiffN (const FieldApproximationBase base, const int gg, const int bb)
 Get spatial derivative of base function tensor for dimension 3d. More...
 
template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1DiffN (const int gg, const int bb)
 Get spatial derivative of base function tensor for dimension 3d. More...
 

Specializations for HDiv/HCrul

template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > getFTensor2N (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
EshelbianOperators.cpp, EshelbianPlasticity.cpp, HookeElement.cpp, HookeElement.hpp, HookeInternalStressElement.hpp, NavierStokesElement.cpp, NavierStokesElement.hpp, OpPostProcElastic.hpp, PlasticOps.hpp, PlasticOpsGeneric.hpp, PlasticOpsMonitor.hpp, PlasticThermalOps.hpp, PoissonDiscontinousGalerkin.hpp, approx_sphere.cpp, boundary_marker.cpp, build_large_problem.cpp, child_and_parent.cpp, contact.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, eigen_elastic.cpp, field_evaluator.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_flat_prism_element.cpp, forces_and_sources_testing_users_base.cpp, free_surface.cpp, hanging_node_approx.cpp, hcurl_check_approx_in_2d.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, hdiv_divergence_operator.cpp, heat_equation.cpp, heat_method.cpp, hello_world.cpp, higher_derivatives.cpp, lorentz_force.cpp, mesh_smoothing.cpp, mixed_poisson.cpp, nonlinear_elastic.cpp, phase.cpp, plastic.cpp, plate.cpp, plot_base.cpp, poisson_2d_dis_galerkin.cpp, poisson_2d_homogeneous.hpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, reaction_diffusion.cpp, scalar_check_approximation.cpp, shallow_wave.cpp, simple_elasticity.cpp, simple_interface.cpp, simple_l2_only.cpp, test_cache_on_entities.cpp, thermo_plastic.cpp, and wave_equation.cpp.

Definition at line 139 of file EntitiesFieldData.hpp.

Member Enumeration Documentation

◆ BaseDerivatives

enum MoFEM::EntitiesFieldData::EntData::BaseDerivatives
Enumerator
ZeroDerivative 
FirstDerivative 
SecondDerivative 
ThirdDerivative 
ForthDerivative 
LastDerivative 

Definition at line 141 of file EntitiesFieldData.hpp.

Constructor & Destructor Documentation

◆ EntData()

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

Definition at line 22 of file EntitiesFieldData.cpp.

26 if (allocate_base_matrices) {
27
28 for (auto d = 0; d != LastDerivative; ++d) {
29 for (int b = 0; b != LASTBASE; ++b) {
31 }
32 }
33 }
34}
@ LASTBASE
Definition: definitions.h:82
@ NOBASE
Definition: definitions.h:72
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: dTensor0.hpp:27
UBlasMatrix< double > MatrixDouble
Definition: Types.hpp:88
int sEnse
Entity sense (orientation)
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 depene on approximation order. Such case demand special handling, that appropiate 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 148 of file EntitiesFieldData.cpp.

149 {
151 auto make_swap = [](boost::shared_ptr<MatrixDouble> &ptr,
152 boost::shared_ptr<MatrixDouble> &ptrBB,
153 boost::shared_ptr<MatrixDouble> &swap_ptr) {
154 if (swap_ptr) {
155 ptr = swap_ptr;
156 swap_ptr.reset();
157 } else {
158 swap_ptr = ptr;
159 ptr = ptrBB;
160 }
161 };
166}
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
constexpr auto field_name
boost::shared_ptr< MatrixDouble > swapBaseDiffNPtr
Used by Bernstein base to keep temporally pointer.
boost::shared_ptr< MatrixDouble > swapBaseNPtr
Used by Bernstein base to keep temporally pointer.
virtual boost::shared_ptr< MatrixDouble > & getBBNSharedPtr(const std::string &field_name)
virtual boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr(const FieldApproximationBase base)
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr(const FieldApproximationBase base, const BaseDerivatives direvatie)
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr(const std::string &field_name)

◆ getBase()

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

Get approximation base.

Returns
Approximation base
Examples
hanging_node_approx.cpp.

Definition at line 1312 of file EntitiesFieldData.hpp.

1312{ return bAse; }

◆ getBBAlphaIndices()

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

Get file BB indices.

Returns
MatrixInt&

Definition at line 1548 of file EntitiesFieldData.hpp.

1548 {
1550}
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 763 of file EntitiesFieldData.cpp.

763 {
765}
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 747 of file EntitiesFieldData.cpp.

747 {
748 return bbAlphaIndicesByOrder[o];
749}
static Index< 'o', 3 > o

◆ getBBAlphaIndicesMap()

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

Definition at line 732 of file EntitiesFieldData.cpp.

732 {
733 return bbAlphaIndices;
734}
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 695 of file EntitiesFieldData.cpp.

696 {
698}

◆ getBBDiffNByOrderArray()

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

Definition at line 775 of file EntitiesFieldData.cpp.

775 {
776 return bbDiffNByOrder;
777}
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > bbDiffNByOrder
BB base functions direvatives 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 757 of file EntitiesFieldData.cpp.

757 {
758 return bbDiffNByOrder[o];
759}

◆ getBBDiffNMap()

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

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

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

Definition at line 742 of file EntitiesFieldData.cpp.

742 {
743 return bbDiffN;
744}
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 718 of file EntitiesFieldData.cpp.

718 {
719 return bbDiffN[field_name];
720}

◆ 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 726 of file EntitiesFieldData.cpp.

727 {
728 return bbDiffN.at(field_name);
729}

◆ getBBNByOrderArray()

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

Definition at line 769 of file EntitiesFieldData.cpp.

769 {
770 return bbNByOrder;
771}
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 752 of file EntitiesFieldData.cpp.

752 {
753 return bbNByOrder[o];
754}

◆ 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 737 of file EntitiesFieldData.cpp.

737 {
738 return bbN;
739}
std::map< std::string, boost::shared_ptr< MatrixDouble > > bbN

◆ getBBNodeOrder()

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

Get orders at the nodes.

Returns
VectorInt&

Definition at line 1546 of file EntitiesFieldData.hpp.

1546{ 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 701 of file EntitiesFieldData.cpp.

701 {
702 return bbN[field_name];
703}

◆ 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 709 of file EntitiesFieldData.cpp.

710 {
711 return bbN.at(field_name);
712}

◆ getDiffN() [1/7]

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

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.

Tonsorial base functions:

Note
Note: In rows ale 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}\)

Definition at line 1351 of file EntitiesFieldData.hpp.

1351{ return getDiffN(bAse); }
MatrixDouble & getDiffN()
get derivatives of base functions

◆ getDiffN() [2/7]

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

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.

Tonsorial base functions:

Note
Note: In rows ale 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
PoissonDiscontinousGalerkin.hpp, hcurl_curl_operator.cpp, hdiv_divergence_operator.cpp, and scalar_check_approximation.cpp.

Definition at line 1328 of file EntitiesFieldData.hpp.

1328 {
1329 return *(getDiffNSharedPtr(base));
1330}

◆ getDiffN() [3/7]

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

get derivative of base functions at Gauss pts

returned matrix on rows has base functions, in column its derivatives.

Parameters
baseApproximation base
ggNb. of Gauss pts.

Definition at line 1371 of file EntitiesFieldData.hpp.

1372 {
1373 // FIXME: That is bug, it will not work if number of integration pts is
1374 // equal to number of nodes on entity. User who not implementing low
1375 // level DataOperator will not experience this.
1376 if (getN(base).size1() == getDiffN(base).size1()) {
1377 int size = getN(base).size2();
1378 int dim = getDiffN(base).size2() / size;
1379 double *data = &getDiffN(base)(gg, 0);
1380 return MatrixAdaptor(
1381 getN(base).size2(), dim,
1382 ublas::shallow_array_adaptor<double>(getDiffN(base).size2(), data));
1383 } else {
1384 // in some cases, f.e. for derivatives of nodal base functions at only
1385 // one gauss point is needed
1386 return MatrixAdaptor(
1387 getN(base).size1(), getN(base).size2(),
1388 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1389 &getDiffN(base).data()[0]));
1390 }
1391}
const int dim
MatrixShallowArrayAdaptor< double > MatrixAdaptor
Matrix adaptor.
Definition: Types.hpp:143
MatrixDouble & getN()
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....

◆ getDiffN() [4/7]

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

get derivatives of base functions at Gauss pts

Note that multi field element, two different field can have different approximation orders. Since we use hierarchical approximation basis, base functions are calculated once for element, using maximal approximation order on given entity.

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

Definition at line 1413 of file EntitiesFieldData.hpp.

1415 {
1416 // FIXME: That is bug, it will not work if number of integration pts is
1417 // equal to number of nodes on entity. User who not implementing low
1418 // level DataOperator will not experience this.
1419 if (getN(base).size1() == getDiffN(base).size1()) {
1420 (void)getN(base)(gg,
1421 nb_base_functions -
1422 1); // throw error if nb_base_functions is to big
1423 int dim = getDiffN(base).size2() / getN(base).size2();
1424 double *data = &getDiffN(base)(gg, 0);
1425 return MatrixAdaptor(
1426 nb_base_functions, dim,
1427 ublas::shallow_array_adaptor<double>(dim * nb_base_functions, data));
1428 } else {
1429 // in some cases, f.e. for derivatives of nodal base functions only one
1430 // gauss point is needed
1431 return MatrixAdaptor(
1432 getN(base).size1(), getN(base).size2(),
1433 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1434 &getDiffN(base).data()[0]));
1435 }
1436}

◆ getDiffN() [5/7]

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

get derivative of base functions at Gauss pts

returned matrix on rows has base functions, in column its derivatives.

Parameters
ggnb. of Gauss pts.

Definition at line 1393 of file EntitiesFieldData.hpp.

1393 {
1394 return getDiffN(bAse, gg);
1395}

◆ getDiffN() [6/7]

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

get derivatives of base functions at Gauss pts

Note that multi field element, two different field can have different approximation orders. Since we use hierarchical approximation basis, base functions are calculated once for element, using maximal approximation order on given entity.

Parameters
ggnb. of Gauss point
nb_base_functionsnumber of of base functions

Definition at line 1439 of file EntitiesFieldData.hpp.

1440 {
1441 return getDiffN(bAse, gg, nb_base_functions);
1442}

◆ getDiffN() [7/7]

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

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.

Tonsorial base functions:

Note
Note: In rows ale 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}\)

Definition at line 1347 of file EntitiesFieldData.hpp.

1347 {
1349}

◆ getDiffNSharedPtr()

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

Get shared pointer to derivatives of base base functions

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 49 of file EntitiesFieldData.cpp.

50 {
51 return diffN[base];
52}

◆ getEntDataBitRefLevel()

BitRefLevel & MoFEM::EntitiesFieldData::EntData::getEntDataBitRefLevel ( )
virtual

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 817 of file EntitiesFieldData.cpp.

817 {
818 return entDataBitRefLevel;
819}

◆ getFieldData() [1/2]

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

get dofs data stature FEDofEntity

Definition at line 1274 of file EntitiesFieldData.hpp.

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

◆ getFieldData() [2/2]

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

◆ getFieldDataUpToOrder()

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

get dofs values up to given order

Definition at line 1258 of file EntitiesFieldData.hpp.

1258 {
1259 unsigned int size = 0;
1260 if (auto dof = dOfs[0]) {
1261 size = dof->getOrderNbDofs(order) * dof->getNbOfCoeffs();
1262 size = size < fieldData.size() ? size : fieldData.size();
1263 }
1264 double *data = &*fieldData.data().begin();
1265 return getVectorAdaptor(data, size);
1266}
auto getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
Definition: Templates.hpp:45

◆ getFieldDofs() [1/2]

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

Definition at line 1272 of file EntitiesFieldData.hpp.

1272{ return dOfs; }

◆ getFieldDofs() [2/2]

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

get dofs data stature FEDofEntity

Examples
EshelbianOperators.cpp, HookeElement.cpp, and prism_elements_from_surface.cpp.

Definition at line 1268 of file EntitiesFieldData.hpp.

1268 {
1269 return dOfs;
1270}

◆ getFieldEntities() [1/2]

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

get field entities

Definition at line 1276 of file EntitiesFieldData.hpp.

1276 {
1277 return fieldEntities;
1278}
VectorFieldEntities fieldEntities
Field entities.

◆ getFieldEntities() [2/2]

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

get field entities

Examples
hanging_node_approx.cpp, and test_cache_on_entities.cpp.

Definition at line 1281 of file EntitiesFieldData.hpp.

1281 {
1282 return fieldEntities;
1283}

◆ getFTensor0FieldData()

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

Resturn scalar files as a FTensor of rank 0.

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

Definition at line 386 of file EntitiesFieldData.cpp.

386 {
387 if (dOfs[0]->getNbOfCoeffs() != 1) {
388 std::stringstream s;
389 s << "Wrong number of coefficients is " << dOfs[0]->getNbOfCoeffs();
390 s << " but expected scalar field, tensor of rank 0";
391 THROW_MESSAGE(s.str());
392 }
394 &*fieldData.data().begin());
395}
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574

◆ getFTensor0N() [1/4]

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

Get base function as Tensor0.

Return base functions for field base

Returns
Tensor0

Definition at line 1507 of file EntitiesFieldData.hpp.

1507 {
1508 return getFTensor0N(bAse);
1509};
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)

◆ getFTensor0N() [3/4]

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

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 1512 of file EntitiesFieldData.hpp.

1513 {
1514 double *ptr = &getN(base)(gg, bb);
1516};

◆ getFTensor0N() [4/4]

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

Get base function as Tensor0 (Loop by integration points)

Return base functions for field base

Parameters
bbbase function
Returns
Tensor0

Definition at line 1519 of file EntitiesFieldData.hpp.

1519 {
1520 return getFTensor0N(bAse, gg, bb);
1521};

◆ getFTensor1DiffN() [1/8]

template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( )

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 409 of file EntitiesFieldData.cpp.

409 {
410 return getFTensor1DiffN<Tensor_Dim>(bAse);
411}

◆ getFTensor1DiffN() [2/8]

FTensor::Tensor1< FTensor::PackPtr< double *, 2 >, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN< 2 >

Get spatial derivative of base function tensor for dimension 3d.

Get spatial derivative of base function tensor for dimension 2d.

Definition at line 409 of file EntitiesFieldData.cpp.

430 {
431 return getFTensor1DiffN<3>(bAse);
432}

◆ getFTensor1DiffN() [3/8]

template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( const FieldApproximationBase  base)

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>();
Parameters
basefunctions
Returns
Tensor rank 1 (vector)
Examples
HookeElement.cpp, HookeElement.hpp, HookeInternalStressElement.hpp, NavierStokesElement.cpp, heat_method.cpp, higher_derivatives.cpp, poisson_2d_homogeneous.hpp, reaction_diffusion.cpp, scalar_check_approximation.cpp, shallow_wave.cpp, and simple_elasticity.cpp.

Definition at line 399 of file EntitiesFieldData.cpp.

400 {
401 std::stringstream s;
402 s << "Template for tensor dimension " << Tensor_Dim << " not implemented";
403 THROW_MESSAGE(s.str());
405}

◆ getFTensor1DiffN() [4/8]

FTensor::Tensor1< FTensor::PackPtr< double *, 2 >, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN< 2 > ( const FieldApproximationBase  base)

Get spatial derivative of base function tensor for dimension 3d.

Get spatial derivative of base function tensor for dimension 2d.

Definition at line 409 of file EntitiesFieldData.cpp.

419 {
420 double *ptr = &*getDiffN(base).data().begin();
422 &ptr[2]);
423}

◆ getFTensor1DiffN() [5/8]

template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( const FieldApproximationBase  base,
const int  gg,
const int  bb 
)

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 456 of file EntitiesFieldData.cpp.

457 {
458 std::stringstream s;
459 s << "Template for tensor dimension " << Tensor_Dim << " not implemented";
460 THROW_MESSAGE(s.str());
462}

◆ getFTensor1DiffN() [6/8]

FTensor::Tensor1< FTensor::PackPtr< double *, 2 >, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN< 2 > ( const FieldApproximationBase  base,
const int  gg,
const int  bb 
)

Get spatial derivative of base function tensor for dimension 3d.

Get spatial derivative of base function tensor for dimension 2d.

Definition at line 456 of file EntitiesFieldData.cpp.

470 {
471 double *ptr = &getDiffN(base)(gg, 3 * bb);
473 &ptr[2]);
474}

◆ getFTensor1DiffN() [7/8]

template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN ( const int  gg,
const int  bb 
)

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)

◆ getFTensor1DiffN() [8/8]

FTensor::Tensor1< FTensor::PackPtr< double *, 2 >, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor1DiffN< 2 > ( const int  gg,
const int  bb 
)

Get spatial derivative of base function tensor for dimension 3d.

Get spatial derivative of base function tensor for dimension 2d.

Definition at line 456 of file EntitiesFieldData.cpp.

481 {
482 return getFTensor1DiffN<3>(bAse, gg, bb);
483}

◆ getFTensor1FieldData() [1/2]

template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor1FieldData ( )

Return FTensor of rank 1, i.e. vector from filed data coeffinects.

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

Definition at line 1287 of file EntitiesFieldData.hpp.

1287 {
1288 std::stringstream s;
1289 s << "Not implemented for this dimension dim = " << Tensor_Dim;
1290 THROW_MESSAGE(s.str());
1291}

◆ getFTensor1FieldData() [2/2]

FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, 1 > MoFEM::EntitiesFieldData::EntData::getFTensor1FieldData< 1 >

Definition at line 282 of file EntitiesFieldData.cpp.

299 {
300 if (dOfs[0]->getNbOfCoeffs() != 3) {
301 std::stringstream s;
302 s << "Wrong number of coefficients is " << dOfs[0]->getNbOfCoeffs();
303 s << " but you ask for tensor rank 1 dimension 3";
304 THROW_MESSAGE(s.str());
305 }
306 double *ptr = &*fieldData.data().begin();
308 &ptr[2]);
309}

◆ getFTensor1N() [1/6]

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

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 1523 of file EntitiesFieldData.hpp.

1523 {
1524 return getFTensor1N<Tensor_Dim>(bAse);
1525}

◆ getFTensor1N() [2/6]

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

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 1528 of file EntitiesFieldData.hpp.

1528 {
1529 return getFTensor1N<Tensor_Dim>(bAse, gg, bb);
1530}

◆ getFTensor1N() [3/6]

template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor1N ( FieldApproximationBase  base)

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
EshelbianOperators.cpp, continuity_check_on_skeleton_3d.cpp, continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, hcurl_curl_operator.cpp, and hcurl_divergence_operator_2d.cpp.

Definition at line 513 of file EntitiesFieldData.cpp.

513 {
514 std::stringstream s;
515 s << "Template for tensor dimension " << Tensor_Dim << " not implemented";
516 THROW_MESSAGE(s.str());
518}

◆ getFTensor1N() [4/6]

FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > MoFEM::EntitiesFieldData::EntData::getFTensor1N< 3 > ( FieldApproximationBase  base)

Definition at line 544 of file EntitiesFieldData.cpp.

555 {
556 double *t_n_ptr = &*getN(base).data().begin();
557 return FTensor::Tensor1<FTensor::PackPtr<double *, 3>, 3>(t_n_ptr, // HVEC0
558 &t_n_ptr[HVEC1],
559 &t_n_ptr[HVEC2]);
560}
@ HVEC1
Definition: definitions.h:199
@ HVEC2
Definition: definitions.h:199

◆ getFTensor1N() [5/6]

template<int Tensor_Dim>
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor1N ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)

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 522 of file EntitiesFieldData.cpp.

523 {
524 std::stringstream s;
525 s << "Template for tensor dimension " << Tensor_Dim << " not implemented";
526 THROW_MESSAGE(s.str());
528}

◆ getFTensor1N() [6/6]

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

Definition at line 544 of file EntitiesFieldData.cpp.

565 {
566 double *t_n_ptr = &getN(base)(gg, 3 * bb);
567 return FTensor::Tensor1<FTensor::PackPtr<double *, 3>, 3>(t_n_ptr, // HVEC0
568 &t_n_ptr[HVEC1],
569 &t_n_ptr[HVEC2]);
570}

◆ 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 ( )

Get derivatives of base functions for Hdiv space.

Definition at line 763 of file EntitiesFieldData.hpp.

763 {
764 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(bAse);
765 }

◆ 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 
)

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

Definition at line 773 of file EntitiesFieldData.hpp.

773 {
774 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(bAse, gg, bb);
775 }

◆ 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
EshelbianOperators.cpp, hcurl_curl_operator.cpp, hcurl_divergence_operator_2d.cpp, and hdiv_divergence_operator.cpp.

Definition at line 533 of file EntitiesFieldData.cpp.

533 {
534 std::stringstream s;
535 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
536 << " not implemented";
537 THROW_MESSAGE(s.str());
539}

◆ getFTensor2DiffN() [4/6]

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

Definition at line 544 of file EntitiesFieldData.cpp.

575 {
576 double *t_diff_n_ptr = &*getDiffN(base).data().begin();
578 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC0_2],
579 &t_diff_n_ptr[HVEC1_0], &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC1_2],
580 &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1], &t_diff_n_ptr[HVEC2_2]);
581}
@ HVEC1_1
Definition: definitions.h:209
@ HVEC0_1
Definition: definitions.h:208
@ HVEC1_0
Definition: definitions.h:206
@ HVEC2_1
Definition: definitions.h:210
@ HVEC1_2
Definition: definitions.h:212
@ HVEC2_2
Definition: definitions.h:213
@ HVEC2_0
Definition: definitions.h:207
@ HVEC0_2
Definition: definitions.h:211

◆ 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 544 of file EntitiesFieldData.cpp.

545 {
546 std::stringstream s;
547 s << "Template for tensor dimension " << Tensor_Dim0 << "x" << Tensor_Dim1
548 << " not implemented";
549 THROW_MESSAGE(s.str());
551}

◆ 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 544 of file EntitiesFieldData.cpp.

586 {
587 double *t_diff_n_ptr = &getDiffN(base)(gg, 9 * bb);
589 t_diff_n_ptr, &t_diff_n_ptr[HVEC0_1], &t_diff_n_ptr[HVEC0_2],
590 &t_diff_n_ptr[HVEC1_0], &t_diff_n_ptr[HVEC1_1], &t_diff_n_ptr[HVEC1_2],
591 &t_diff_n_ptr[HVEC2_0], &t_diff_n_ptr[HVEC2_1], &t_diff_n_ptr[HVEC2_2]);
592}

◆ getFTensor2FieldData() [1/2]

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

Return FTensor rank 2, i.e. matrix from filed data coeffinects.

auto t_mat = data.getFTensor2FieldData<3,3>();
Template Parameters
Tensor_Dim0
Tensor_Dim1
Returns
FTensor::Tensor2<FTensor::PackPtr<double *, Tensor_Dim0 * Tensor_Dim1>, Tensor_Dim0, Tensor_Dim1>

Definition at line 1296 of file EntitiesFieldData.hpp.

1296 {
1297 std::stringstream s;
1298 s << "Not implemented for this dimension dim0 = " << Tensor_Dim0;
1299 s << " and dim1 " << Tensor_Dim1;
1300 THROW_MESSAGE(s.str());
1301}

◆ getFTensor2FieldData() [2/2]

FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > MoFEM::EntitiesFieldData::EntData::getFTensor2FieldData< 3, 3 >

Definition at line 282 of file EntitiesFieldData.cpp.

339 {
340 if (dOfs[0]->getNbOfCoeffs() != 9) {
341 std::stringstream s;
342 s << "Wrong number of coefficients is " << dOfs[0]->getNbOfCoeffs();
343 s << " but you ask for tensor rank 2 dimensions 3 by 3 so 9 coefficients "
344 "is expected";
345 THROW_MESSAGE(s.str());
346 }
347 double *ptr = &*fieldData.data().begin();
349 ptr, &ptr[1], &ptr[2], &ptr[3], &ptr[4], &ptr[5], &ptr[6], &ptr[7],
350 &ptr[8]);
351}

◆ getFTensor2N() [1/6]

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

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 1533 of file EntitiesFieldData.hpp.

1533 {
1534 return getFTensor2N<Tensor_Dim0, Tensor_Dim1>(bAse);
1535}

◆ getFTensor2N() [2/6]

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

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 1538 of file EntitiesFieldData.hpp.

1538 {
1539 return getFTensor2N<Tensor_Dim0, Tensor_Dim1>(bAse, gg, bb);
1540}

◆ getFTensor2N() [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::getFTensor2N ( FieldApproximationBase  base)

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
EshelbianOperators.cpp.

Definition at line 635 of file EntitiesFieldData.cpp.

635 {
636 std::stringstream s;
637 s << "Template for tensor dimension " << Tensor_Dim0 << ", " << Tensor_Dim1
638 << " not implemented";
639 THROW_MESSAGE(s.str());
641 Tensor_Dim0, Tensor_Dim1>();
642}

◆ getFTensor2N() [4/6]

FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > MoFEM::EntitiesFieldData::EntData::getFTensor2N< 3, 3 > ( FieldApproximationBase  base)

Definition at line 635 of file EntitiesFieldData.cpp.

646 {
647 double *t_n_ptr = &*(getN(base).data().begin());
649
650 &t_n_ptr[HVEC0], &t_n_ptr[HVEC1], &t_n_ptr[HVEC2],
651
652 &t_n_ptr[3 + HVEC0], &t_n_ptr[3 + HVEC1], &t_n_ptr[3 + HVEC2],
653
654 &t_n_ptr[6 + HVEC0], &t_n_ptr[6 + HVEC1], &t_n_ptr[6 + HVEC2]
655
656 );
657}
@ HVEC0
Definition: definitions.h:199

◆ getFTensor2N() [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::getFTensor2N ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)

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 662 of file EntitiesFieldData.cpp.

663 {
664 std::stringstream s;
665 s << "Template for tensor dimension " << Tensor_Dim0 << ", " << Tensor_Dim1
666 << " not implemented";
667 THROW_MESSAGE(s.str());
669 Tensor_Dim0, Tensor_Dim1>();
670}

◆ getFTensor2N() [6/6]

template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > MoFEM::EntitiesFieldData::EntData::getFTensor2N ( FieldApproximationBase  base,
const int  gg,
const int  bb 
)

Definition at line 662 of file EntitiesFieldData.cpp.

675 {
676 double *t_n_ptr = &getN(base)(gg, 9 * bb);
678
679 &t_n_ptr[HVEC0], &t_n_ptr[HVEC1], &t_n_ptr[HVEC2],
680
681 &t_n_ptr[3 + HVEC0], &t_n_ptr[3 + HVEC1], &t_n_ptr[3 + HVEC2],
682
683 &t_n_ptr[6 + HVEC0], &t_n_ptr[6 + HVEC1], &t_n_ptr[6 + HVEC2]
684
685 );
686}

◆ getFTensor2SymmetricFieldData() [1/2]

template<int Tensor_Dim>
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *,(Tensor_Dim *(Tensor_Dim+1))/2 >, Tensor_Dim > MoFEM::EntitiesFieldData::EntData::getFTensor2SymmetricFieldData ( )

Return symmetric FTensor rank 2, i.e. matrix from filed data coeffinects.

auto t_mat = data.getFTensor2SymmetricFieldData<3>();
Template Parameters
Tensor_Dimdimension of the tensor
Returns
FTensor::Tensor2_symmetric<FTensor::PackPtr<double *, (Tensor_Dim
  • (Tensor_Dim + 1)) / 2>, Tensor_Dim>

Definition at line 1306 of file EntitiesFieldData.hpp.

1306 {
1307 std::stringstream s;
1308 s << "Not implemented for this dimension dim = " << Tensor_Dim;
1309 THROW_MESSAGE(s.str());
1310}

◆ getFTensor2SymmetricFieldData() [2/2]

FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 3 >, 2 > MoFEM::EntitiesFieldData::EntData::getFTensor2SymmetricFieldData< 2 >

Definition at line 282 of file EntitiesFieldData.cpp.

355 {
356 if (dOfs[0]->getNbOfCoeffs() != 6) {
357 std::stringstream s;
358 s << "Wrong number of coefficients is " << dOfs[0]->getNbOfCoeffs();
359 s << " but you ask for symmetric tensor rank 2 dimensions 3 by 3 so 6 "
360 "coefficients "
361 "is expected";
362 THROW_MESSAGE(s.str());
363 }
364 double *ptr = &*fieldData.data().begin();
366 ptr, &ptr[1], &ptr[2], &ptr[3], &ptr[4], &ptr[5]);
367}

◆ 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 ( )

Get second derivatives of base functions for Hvec space.

Definition at line 791 of file EntitiesFieldData.hpp.

791 {
792 return getFTensor3Diff2N<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(bAse);
793 }

◆ 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 616 of file EntitiesFieldData.cpp.

616 {
617 double *ptr = &(getN(base, BaseDerivatives::SecondDerivative))(0, 0);
619
620 &ptr[2 * HVEC0_0 + 0], &ptr[2 * HVEC0_0 + 1], &ptr[2 * HVEC0_1 + 0],
621 &ptr[2 * HVEC0_1 + 1],
622
623 &ptr[2 * HVEC1_0 + 0], &ptr[2 * HVEC1_0 + 1], &ptr[2 * HVEC1_1 + 0],
624 &ptr[2 * HVEC1_1 + 1],
625
626 &ptr[2 * HVEC2_0 + 0], &ptr[2 * HVEC2_0 + 1], &ptr[2 * HVEC2_1 + 0],
627 &ptr[2 * HVEC2_1 + 1]
628
629 };
630}
@ HVEC0_0
Definition: definitions.h:205

◆ getIndices() [1/2]

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

Definition at line 1247 of file EntitiesFieldData.hpp.

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

◆ getIndices() [2/2]

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

◆ getIndicesUpToOrder()

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

get global indices of dofs on entity up to given order

Definition at line 1218 of file EntitiesFieldData.hpp.

1218 {
1219 unsigned int size = 0;
1220 if (auto dof = dOfs[0]) {
1221 size = dof->getOrderNbDofs(order) * dof->getNbOfCoeffs();
1222 size = size < iNdices.size() ? size : iNdices.size();
1223 }
1224 int *data = &*iNdices.data().begin();
1225 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1226}
VectorShallowArrayAdaptor< int > VectorIntAdaptor
Definition: Types.hpp:127

◆ getLocalIndices() [1/2]

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

Definition at line 1249 of file EntitiesFieldData.hpp.

1249 {
1250 return localIndices;
1251}
VectorInt localIndices
Local indices on entity.

◆ getLocalIndices() [2/2]

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

get local indices of dofs on entity

Examples
boundary_marker.cpp, and prism_elements_from_surface.cpp.

Definition at line 1228 of file EntitiesFieldData.hpp.

1228 {
1229 return localIndices;
1230}

◆ getLocalIndicesUpToOrder()

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

get local indices of dofs on entity up to given order

Definition at line 1233 of file EntitiesFieldData.hpp.

1233 {
1234 unsigned int size = 0;
1235 if (auto dof = dOfs[0]) {
1236 size = dof->getOrderNbDofs(order) * dof->getNbOfCoeffs();
1237 size = size < localIndices.size() ? size : localIndices.size();
1238 }
1239 int *data = &*localIndices.data().begin();
1240 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1241}

◆ getN() [1/9]

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

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 tonsorial base functions. Interpretation depends on type of base, scalar, vectorial or tonsorial and dimension fo problem.

Definition at line 1325 of file EntitiesFieldData.hpp.

1325{ return getN(bAse); }

◆ getN() [2/9]

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

Get base function derivative.

Parameters
derivative
Returns
MatrixDouble&

Definition at line 1354 of file EntitiesFieldData.hpp.

1354 {
1355 return getN(bAse, derivative);
1356}

◆ getN() [3/9]

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

◆ getN() [4/9]

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

Get base function derivative.

Parameters
basebase
derivativederivative
Returns
MatrixDouble&

Definition at line 1333 of file EntitiesFieldData.hpp.

1334 {
1335#ifndef NDEBUG
1336 if (!getNSharedPtr(base, derivative)) {
1337 MOFEM_LOG_C("SELF", Sev::error,
1338 "Ptr to base %s functions derivative %d is null",
1339 ApproximationBaseNames[base], derivative);
1340 THROW_MESSAGE("Null pointer");
1341 }
1342#endif
1343 return *(getNSharedPtr(base, derivative));
1344}
#define MOFEM_LOG_C(channel, severity, format,...)
Definition: LogManager.hpp:314
static const char *const ApproximationBaseNames[]
Definition: definitions.h:85

◆ getN() [5/9]

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

get base functions at Gauss pts

Definition at line 1359 of file EntitiesFieldData.hpp.

1360 {
1361 int size = getN(base).size2();
1362 double *data = &getN(base)(gg, 0);
1363 return VectorAdaptor(size, ublas::shallow_array_adaptor<double>(size, data));
1364}
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition: Types.hpp:126

◆ getN() [6/9]

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

get base functions at Gauss pts

Note that multi field element, two different field can have different approximation orders. Since we use hierarchical approximation basis, base functions are calculated once for element, using maximal approximation order on given entity.

Parameters
baseApproximation base
ggnumber of Gauss point
nb_base_functionsnumber of of base functions returned

Definition at line 1398 of file EntitiesFieldData.hpp.

1399 {
1400 (void)getN()(gg, nb_base_functions -
1401 1); // throw error if nb_base_functions is to big
1402 double *data = &getN(base)(gg, 0);
1403 return VectorAdaptor(nb_base_functions, ublas::shallow_array_adaptor<double>(
1404 nb_base_functions, data));
1405}

◆ getN() [7/9]

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

get base functions at Gauss pts

Definition at line 1366 of file EntitiesFieldData.hpp.

1366 {
1367 return getN(bAse, gg);
1368}

◆ getN() [8/9]

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

get base functions at Gauss pts

Note that multi field element, two different field can have different approximation orders. Since we use hierarchical approximation basis, base functions are calculated once for element, using maximal approximation order on given entity.

Parameters
ggnumber of Gauss point
nb_base_functionsnumber of of base functions returned

Definition at line 1408 of file EntitiesFieldData.hpp.

1408 {
1409 return getN(bAse, gg, nb_base_functions);
1410}

◆ getN() [9/9]

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

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 tonsorial base functions. Interpretation depends on type of base, scalar, vectorial or tonsorial and dimension fo problem.

Definition at line 1321 of file EntitiesFieldData.hpp.

1321 {
1322 return *(getBBNSharedPtr(field_name));
1323}

◆ getNSharedPtr() [1/2]

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

Get shared pointer to base base functions

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 45 of file EntitiesFieldData.cpp.

45 {
46 return N[base];
47}

◆ getNSharedPtr() [2/2]

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

Get shared pointer to base base functions

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 39 of file EntitiesFieldData.cpp.

40 {
41 return baseFunctionsAndBaseDerivatives[direvatie][base];
42}

◆ getOrder() [1/2]

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

Definition at line 1245 of file EntitiesFieldData.hpp.

1245{ return oRder; }

◆ getOrder() [2/2]

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

get approximation order

Definition at line 1209 of file EntitiesFieldData.hpp.

1209 {
1210 return oRder;
1211}

◆ getSense() [1/2]

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

Definition at line 1243 of file EntitiesFieldData.hpp.

1243{ return sEnse; }

◆ getSense() [2/2]

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

get entity sense, need to calculate base functions with conforming approximation fields

Reimplemented in MoFEM::DerivedEntitiesFieldData::DerivedEntData.

Definition at line 36 of file EntitiesFieldData.cpp.

36{ return sEnse; }

◆ getSpace()

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

Get field space.

Returns
Field space
Examples
continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_3d.cpp, and hanging_node_approx.cpp.

Definition at line 1314 of file EntitiesFieldData.hpp.

1314{ return sPace; }

◆ getVectorDiffN() [1/4]

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

get DiffHdiv of base functions at Gauss pts

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

Definition at line 1486 of file EntitiesFieldData.hpp.

1487 {
1488 double *data =
1489 &EntitiesFieldData::EntData::getDiffN(base)(gg, DIM0 * DIM1 * dof);
1490 return MatrixAdaptor(DIM0, DIM1,
1491 ublas::shallow_array_adaptor<double>(DIM0 * DIM1, data));
1492}

◆ getVectorDiffN() [2/4]

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

get DiffHdiv of base functions at Gauss pts

Parameters
ggnb. of Gauss point
numberof of base functions

Definition at line 1495 of file EntitiesFieldData.hpp.

1496 {
1497 return getVectorDiffN<DIM0, DIM1>(bAse, dof, gg);
1498}

◆ getVectorDiffN() [3/4]

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

get DiffHdiv of base functions at Gauss pts

Parameters
ggnb. of Gauss point
numberof of base functions

Definition at line 1480 of file EntitiesFieldData.hpp.

1480 {
1481 return getVectorDiffN<DIM0, DIM1>(bAse, gg);
1482}

◆ getVectorDiffN() [4/4]

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

get DiffHdiv of base functions at Gauss pts

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

Definition at line 1466 of file EntitiesFieldData.hpp.

1467 {
1468 if (PetscUnlikely(getDiffN(base).size2() % (DIM0 * DIM1))) {
1469 THROW_MESSAGE("Wrong dimension");
1470 }
1471
1472 const int nb_base_functions = getN(base).size2() / (DIM0 * DIM1);
1473 double *data = &getN(base)(gg, 0);
1474 return MatrixAdaptor(nb_base_functions, DIM0 * DIM1,
1475 ublas::shallow_array_adaptor<double>(
1476 DIM0 * DIM1 * nb_base_functions, data));
1477}

◆ getVectorN() [1/2]

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

get Hdiv of base functions at Gauss pts

Parameters
baseApproximation base
ggnb. of Gauss point
Examples
hdiv_divergence_operator.cpp.

Definition at line 1446 of file EntitiesFieldData.hpp.

1447 {
1448 if (PetscUnlikely(getN(base).size2() % DIM)) {
1449 THROW_MESSAGE("Wrong dimension");
1450 }
1451
1452 const int nb_base_functions = getN(base).size2() / DIM;
1453 double *data = &getN(base)(gg, 0);
1454 return MatrixAdaptor(
1455 nb_base_functions, DIM,
1456 ublas::shallow_array_adaptor<double>(DIM * nb_base_functions, data));
1457}

◆ getVectorN() [2/2]

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

get Hdiv of base functions at Gauss pts

Parameters
ggnb. of Gauss point
numberof of base functions

Definition at line 1460 of file EntitiesFieldData.hpp.

1460 {
1461 return getVectorN<DIM>(bAse, gg);
1462}

◆ resetFieldDependentData()

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

Reset data associated with particular field name

Returns
error code

Definition at line 127 of file EntitiesFieldData.cpp.

127 {
129 sPace = NOSPACE;
130 bAse = NOBASE;
131 fieldEntities.resize(0, false);
132 iNdices.resize(0, false);
133 localIndices.resize(0, false);
134 dOfs.resize(0, false);
135 fieldData.resize(0, false);
137}
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
@ NOSPACE
Definition: definitions.h:96
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453

Friends And Related Function Documentation

◆ OpAddParentEntData

friend struct OpAddParentEntData
friend

Definition at line 1126 of file EntitiesFieldData.hpp.

◆ operator<<

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

Definition at line 252 of file EntitiesFieldData.cpp.

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

Member Data Documentation

◆ bAse

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

Field approximation base.

Definition at line 1081 of file EntitiesFieldData.hpp.

◆ baseFunctionsAndBaseDerivatives

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

Definition at line 1091 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 1102 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 1109 of file EntitiesFieldData.hpp.

◆ bbDiffN

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

Definition at line 1100 of file EntitiesFieldData.hpp.

◆ bbDiffNByOrder

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

BB base functions direvatives by order.

Definition at line 1107 of file EntitiesFieldData.hpp.

◆ bbFieldName

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

field name

Definition at line 1097 of file EntitiesFieldData.hpp.

◆ bbN

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

Definition at line 1099 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 1105 of file EntitiesFieldData.hpp.

◆ bbNodeOrder

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

order of nodes

Definition at line 1098 of file EntitiesFieldData.hpp.

◆ diffN

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

Derivatives of base functions.

Definition at line 1095 of file EntitiesFieldData.hpp.

◆ dOfs

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

DoFs on entity.

Definition at line 1085 of file EntitiesFieldData.hpp.

◆ entDataBitRefLevel

BitRefLevel MoFEM::EntitiesFieldData::EntData::entDataBitRefLevel
protected

Bit ref level in entity.

Definition at line 1082 of file EntitiesFieldData.hpp.

◆ fieldData

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

Field data on entity.

Definition at line 1087 of file EntitiesFieldData.hpp.

◆ fieldEntities

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

Field entities.

Definition at line 1086 of file EntitiesFieldData.hpp.

◆ iNdices

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

Global indices on entity.

Definition at line 1083 of file EntitiesFieldData.hpp.

◆ localIndices

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

Local indices on entity.

Definition at line 1084 of file EntitiesFieldData.hpp.

◆ MaxBernsteinBezierOrder

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

Definition at line 1048 of file EntitiesFieldData.hpp.

◆ N

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

Base functions.

Definition at line 1093 of file EntitiesFieldData.hpp.

◆ oRder

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

Entity order.

Definition at line 1079 of file EntitiesFieldData.hpp.

◆ sEnse

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

Entity sense (orientation)

Definition at line 1078 of file EntitiesFieldData.hpp.

◆ sPace

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

Entity space.

Definition at line 1080 of file EntitiesFieldData.hpp.

◆ swapBaseDiffNPtr

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

Used by Bernstein base to keep temporally 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 paricular field using BB base, pointers to shape funtions and BaseDerivatives of shape functions are set to particular location, once operator is executed, pointers are switch back to its oroginal position.

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

Parameters
field_name
base
Returns
MoFEMErrorCode

Definition at line 1124 of file EntitiesFieldData.hpp.

◆ swapBaseNPtr

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

Used by Bernstein base to keep temporally 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 paricular field using BB base, pointers to shape funtions and BaseDerivatives of shape functions are set to particular location, once operator is executed, pointers are switch back to its oroginal position.

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

Parameters
field_name
base
Returns
MoFEMErrorCode

Definition at line 1117 of file EntitiesFieldData.hpp.


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