v0.8.23
Namespaces | Classes | Typedefs | Functions | Variables
MoFEM Namespace Reference

implementation of Data Operators for Forces and Sources More...

Namespaces

 Exceptions
 Exceptions and handling errors data structures.
 
 Types
 Types.
 

Classes

struct  AccelerationCubitBcData
 Definition of the acceleration bc data structure. More...
 
struct  BaseFEEntity
 Keeps basic information about entity on the finite element. More...
 
struct  BaseFunction
 Base class if inherited used to calculate base functions. More...
 
struct  BaseFunctionCtx
 Base class used to exchange data between element data structures and class calculating base functions. More...
 
struct  BasicEntity
 this struct keeps basic methods for moab entity More...
 
struct  BasicEntityData
 Basic data. like access to moab interface and basic tag handlers. More...
 
struct  BasicMethod
 Data structure to exchange data between mofem and User Loop Methods.It allows to exchange data between MoFEM and user functions. It stores information about multi-indices. More...
 
struct  BasicMethodPtr
 
struct  BitFEId_mi_tag
 
struct  BitFieldId_mi_tag
 
struct  BitFieldId_space_mi_tag
 
struct  BitLevelCoupler
 Interface set parent for vertices, edges, triangles and tetrahedrons.FIXME: Not tested, slow, bugs. More...
 
struct  BitProblemId_mi_tag
 
struct  BitRefManager
 Managing BitRefLevels. More...
 
struct  Block_BodyForces
 Body force data structure. More...
 
struct  BlockData
 
struct  BlockSetAttributes
 Arbitrary block attributes data structure. More...
 
struct  BuildFiniteElements
 
struct  CfgCubitBcData
 Definition of the cfd_bc data structure. More...
 
struct  CommInterface
 Managing BitRefLevels. More...
 
struct  ComposedProblemsData
 
struct  Composite_Cubit_msId_And_MeshSetType_mi_tag
 
struct  Composite_Ent_And_EntDofIdx_mi_tag
 
struct  Composite_Ent_and_ShortId_mi_tag
 
struct  Composite_Ent_Order_And_CoeffIdx_mi_tag
 
struct  Composite_EntType_and_ParentEntType_mi_tag
 
struct  Composite_EntType_and_Space_mi_tag
 
struct  Composite_mi_tag
 
struct  Composite_Name_And_Ent_And_EntDofIdx_mi_tag
 
struct  Composite_Name_And_Ent_mi_tag
 
struct  Composite_Name_And_Part_mi_tag
 
struct  Composite_Name_And_Type_mi_tag
 
struct  Composite_Name_Ent_And_Part_mi_tag
 
struct  Composite_Name_Ent_Order_And_CoeffIdx_mi_tag
 
struct  Composite_Name_Type_And_Side_Number_mi_tag
 
struct  Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag
 
struct  Composite_ParentEnt_And_EntType_mi_tag
 
struct  Composite_Part_And_Order_mi_tag
 
struct  Composite_SeriesID_And_Step_mi_tag
 
struct  Composite_SeriesName_And_Step_mi_tag
 
struct  Composite_SeriesName_And_Time_mi_tag
 
struct  Composite_Unique_mi_tag
 
struct  CoordSys
 Structure for Coordinate system of two-point tensorScientific computing applications deal in physical quantities expressed as tensors: scalars such as temperature, vectors such as velocity, and second-order tensors such as stress. In practice, these are formally tensor fields: a tensor field assigns a tensor to each point in a mathematical space (typically a Euclidean space or manifold). More...
 
struct  CoordSysName_mi_tag
 
struct  CoordSystemsManager
 
struct  Core
 Core (interface) class. More...
 
struct  CoreInterface
 InterfaceThis interface is used by user to:
More...
 
struct  CreateRowComressedADJMatrix
 Create compressed matrix. More...
 
struct  CubitMeshSets
 this struct keeps basic methods for moab meshset about material and boundary conditions More...
 
struct  CubitMeshSets_change_add_bit_to_cubit_bc_type
 change meshset type More...
 
struct  CubitMeshSets_change_attributes
 
struct  CubitMeshSets_change_attributes_data_structure
 
struct  CubitMeshSets_change_bc_data_structure
 
struct  CubitMeshSets_change_name
 change meshset name More...
 
struct  CubitMeshSets_mask_meshset_mi_tag
 
struct  CubitMeshSets_mi_tag
 MultiIndex Tag for field id. More...
 
struct  CubitMeshSets_name
 
struct  CutMeshInterface
 Interface to cut meshes. More...
 
struct  DataForcesAndSourcesCore
 data structure for finite element entityIt keeps that about indices of degrees of freedom, dofs data, base functions functions, entity side number, type of entities, approximation order, etc. More...
 
struct  DataOperator
 base operator to do operations at Gauss Pt. level More...
 
struct  DefaultElementAdjacency
 default adjacency map More...
 
struct  DeprecatedCoreInterface
 Deprecated interface functions. More...
 
struct  DerivedDataForcesAndSourcesCore
 this class derive data form other data structure More...
 
struct  DisplacementCubitBcData
 Definition of the displacement bc data structure. More...
 
struct  DMCtx
 PETSc Discrete Manager data structure. More...
 
struct  Dof_shared_ptr_change
 
struct  DOF_Unique_mi_tag
 
struct  DofEntity
 keeps information about DOF on the entity More...
 
struct  DofEntity_active_change
 
struct  DofMethod
 Data structure to exchange data between mofem and User Loop Methods on entities.It allows to exchange data between MoFEM and user functions. It stores information about multi-indices. More...
 
struct  EdgeElementForcesAndSourcesCoreBase
 Edge finite elementUser is implementing own operator at Gauss points level, by own object derived from EdgeElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to rowOpPtrVector and rowColOpPtrVector. More...
 
struct  EdgeElementForcesAndSourcesCoreSwitch
 Edge finite elementUser is implementing own operator at Gauss points level, by own object derived from EdgeElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to rowOpPtrVector and rowColOpPtrVector. More...
 
struct  EdgePolynomialBase
 Calculate base functions on tetrahedral. More...
 
struct  Ent_Ent_mi_tag
 
struct  Ent_FiniteElement_mi_tag
 
struct  Ent_mi_tag
 
struct  Ent_Owner_mi_tag
 
struct  Ent_ParallelStatus
 
struct  EntDofIdx_mi_tag
 
struct  EntFiniteElement
 Finite element data for entity. More...
 
struct  Entity_update_pcomm_data
 
struct  EntityMethod
 Data structure to exchange data between mofem and User Loop Methods on entities.It allows to exchange data between MoFEM and user functions. It stores information about multi-indices. More...
 
struct  EntPolynomialBaseCtx
 Class used to pass element data to calculate base functions on tet,triangle,edge. More...
 
struct  EntType_mi_tag
 
struct  EqBit
 
struct  FaceElementForcesAndSourcesCoreBase
 Face finite elementUser is implementing own operator at Gauss point level, by own object derived from FaceElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to OpPtrVector. More...
 
struct  FaceElementForcesAndSourcesCoreSwitch
 Face finite element switched. More...
 
struct  FatPrismElementForcesAndSourcesCore
 FatPrism finite elementUser is implementing own operator at Gauss points level, by own object derived from FatPrismElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to rowOpPtrVector and rowColOpPtrVector. More...
 
struct  FatPrismPolynomialBase
 Calculate base functions on tetrahedralFIXME: Need moab and mofem finite element structure to work (that not perfect) More...
 
struct  FatPrismPolynomialBaseCtx
 Class used to pass element data to calculate base functions on fat prism. More...
 
struct  FE_Unique_mi_tag
 
struct  FEDofEntity
 keeps information about indexed dofs for the finite element More...
 
struct  FEEnt_mi_tag
 
struct  FEMethod
 structure for User Loop Methods on finite elementsIt can be used to calculate stiffness matrices, residuals, load vectors etc. It is low level class however in some class users looking for speed and efficiency, can use it directly. More...
 
struct  FENumeredDofEntity
 keeps information about indexed dofs for the finite element More...
 
struct  Field
 Provide data structure for (tensor) field approximation.The Field is intended to provide support for fields, with a strong bias towards supporting first and best the capabilities required for scientific computing applications. Since we work with discrete spaces, data structure has to carry information about type of approximation space, its regularity. More...
 
struct  FieldBlas
 Basic algebra on fields. More...
 
struct  FieldChangeCoordinateSystem
 Set field coordinate system. More...
 
struct  FieldEntity
 Struct keeps handle to entity in the field. More...
 
struct  FieldEntity_change_order
 structure to change FieldEntity order More...
 
struct  FieldEntityEntFiniteElementAdjacencyMap
 FieldEntityEntFiniteElementAdjacencyMap of mofem finite element and entities. More...
 
struct  FieldEntityEntFiniteElementAdjacencyMap_change_ByWhat
 
struct  FieldEvaluatorInterface
 Field evaluator interface. More...
 
struct  FieldName_mi_tag
 MultiIndex Tag for field name. More...
 
struct  FieldSeries
 Structure for recording (time) series. More...
 
struct  FieldSeriesStep
 Structure for keeping time and step. More...
 
struct  FiniteElement
 Finite element definition. More...
 
struct  FiniteElement_change_bit_add
 Add field to data. More...
 
struct  FiniteElement_change_bit_off
 Unset field from data. More...
 
struct  FiniteElement_col_change_bit_add
 Add field to column. More...
 
struct  FiniteElement_col_change_bit_off
 Unset field from column. More...
 
struct  FiniteElement_Meshset_mi_tag
 
struct  FiniteElement_name_mi_tag
 
struct  FiniteElement_row_change_bit_add
 Add field to row. More...
 
struct  FiniteElement_row_change_bit_off
 Unset field from row. More...
 
struct  FlatPrismElementForcesAndSourcesCore
 FlatPrism finite elementUser is implementing own operator at Gauss points level, by own object derived from FlatPrismElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to rowOpPtrVector and rowColOpPtrVector. More...
 
struct  FlatPrismPolynomialBase
 Calculate base functions on tetrahedralFIXME: Need moab and mofem finite element structure to work (that not perfect) More...
 
struct  FlatPrismPolynomialBaseCtx
 Class used to pass element data to calculate base functions on flat prism. More...
 
struct  ForceCubitBcData
 Definition of the force bc data structure. More...
 
struct  ForcesAndSourcesCore
 structure to get information form mofem into DataForcesAndSourcesCore More...
 
struct  GenericAttributeData
 Generic attribute data structure. More...
 
struct  GenericCubitBcData
 Generic bc data structure. More...
 
struct  HashBit
 
struct  HeatFluxCubitBcData
 Definition of the heat flux bc data structure. More...
 
struct  HelmholtzElement
 struture grouping operators and data used for helmholtz problemsIn order to assemble matrices and right hand side vectors, the loops over elements, enetities over that elememnts and finally loop over intergration points are executed. More...
 
struct  Idx_mi_tag
 
struct  IdxDataType
 
struct  IdxDataTypePtr
 
struct  IntegratedJacobiPolynomial
 
struct  IntegratedJacobiPolynomialCtx
 
struct  Interface
 
struct  interface_DofEntity
 Interface to DofEntity. More...
 
struct  interface_EntFiniteElement
 interface to EntFiniteElement More...
 
struct  interface_Field
 Pointer interface for MoFEM::Field. More...
 
struct  interface_FieldEntity
 Interface to FieldEntityinterface to FieldEntity. More...
 
struct  interface_FieldSeries
 
struct  interface_FiniteElement
 Inetface for FE. More...
 
struct  interface_NumeredDofEntity
 interface to NumeredDofEntity More...
 
struct  interface_NumeredEntFiniteElement
 interface for NumeredEntFiniteElement More...
 
struct  interface_RefElement
 intrface to RefElement More...
 
struct  interface_RefEntity
 interface to RefEntity More...
 
struct  ISManager
 Section manager is used to create indexes and sectionsFIXME: ISManager is not properly testsed by atom tests. More...
 
struct  JacobiPolynomial
 Calculating Legendre base functions. More...
 
struct  JacobiPolynomialCtx
 Class used to give arguments to Legendre base functions. More...
 
struct  KernelLobattoPolynomial
 Calculating Lobatto base functions. More...
 
struct  KernelLobattoPolynomialCtx
 Class used to give arguments to Kernel Lobatto base functions. More...
 
struct  KeyFromKey
 
struct  KspCtx
 Interface for linear (KSP) solver. More...
 
struct  KspMethod
 data structure for ksp (linear solver) contextStruture stores context data which are set in functions run by PETSc SNES functions. More...
 
struct  LegendrePolynomial
 Calculating Legendre base functions. More...
 
struct  LegendrePolynomialCtx
 Class used to give arguments to Legendre base functions. More...
 
struct  LobattoPolynomial
 Calculating Lobatto base functions. More...
 
struct  LobattoPolynomialCtx
 Class used to give arguments to Lobatto base functions. More...
 
struct  LtBit
 
struct  Mat_Elastic
 Elastic material data structure. More...
 
struct  Mat_Elastic_EberleinHolzapfel1
 Mat_Elastic with Fibres. More...
 
struct  Mat_Elastic_TransIso
 Transverse Isotropic material data structure. More...
 
struct  Mat_Interf
 Linear interface data structure. More...
 
struct  Mat_Moisture
 moisture transport material data structure More...
 
struct  Mat_Thermal
 Thermal material data structure. More...
 
struct  MatrixManager
 Matrix manager is used to build and partition problems. More...
 
struct  MedInterface
 Interface for load MED files. More...
 
struct  MeshRefinement
 Mesh refinement interface. More...
 
struct  Meshset_mi_tag
 
struct  MeshsetsManager
 Interface for managing meshsets containing materials and boundary conditions. More...
 
struct  MOFEMuuid
 MoFEM interface unique ID. More...
 
struct  NodeMergerInterface
 Merge node by collapsing edge between them. More...
 
struct  NormElement
 finite element to appeximate analytical solution on surface More...
 
struct  NumeredDofEntity
 keeps information about indexed dofs for the problemFIXME: Is too many iterator, this has to be manage more efficiently, some iterators could be moved to multi_indices views. More...
 
struct  NumeredDofEntity_local_idx_change
 
struct  NumeredDofEntity_mofem_index_change
 
struct  NumeredDofEntity_part_and_all_indices_change
 
struct  NumeredDofEntity_part_and_glob_idx_change
 
struct  NumeredDofEntity_part_and_indices_change
 
struct  NumeredDofEntity_part_and_mofem_glob_idx_change
 
struct  NumeredEntFiniteElement
 Partitioned (Indexed) Finite Element in Problem. More...
 
struct  NumeredEntFiniteElement_change_part
 Change finite element part. More...
 
struct  OpCalculateHcurlVectorCurl
 Calculate curl of vector field. More...
 
struct  OpCalculateHdivVectorDivergence
 Calculate divergence of vector field. More...
 
struct  OpCalculateHdivVectorField
 Get vector field for H-div approximation. More...
 
struct  OpCalculateHdivVectorField_General
 Get vector field for H-div approximation. More...
 
struct  OpCalculateHdivVectorField_General< Tensor_Dim, double, ublas::row_major, DoubleAllocator >
 Get vector field for H-div approximation. More...
 
struct  OpCalculateHTensorTensorField
 Calculate tenor field using vectorial base, i.e. Hdiv/Hcurl. More...
 
struct  OpCalculateHVecTensorDivergence
 Calculate divergence of tonsorial field using vectorial base. More...
 
struct  OpCalculateHVecTensorField
 Calculate tenor field using vectorial base, i.e. Hdiv/Hcurl. More...
 
struct  OpCalculateInvJacForFace
 Calculate inverse of jacobian for face element. More...
 
struct  OpCalculateInvJacForFatPrism
 Calculate inverse of jacobian for face element. More...
 
struct  OpCalculateInvJacForFlatPrism
 Calculate inverse of jacobian for face element. More...
 
struct  OpCalculateJacForFace
 Calculate jacobian for face element. More...
 
struct  OpCalculateScalarFieldGradient
 Get field gradients at integration pts for scalar filed rank 0, i.e. vector field. More...
 
struct  OpCalculateScalarFieldGradient_General
 Evaluate field gradient values for scalar field, i.e. gradient is tensor rank 1 (vector) More...
 
struct  OpCalculateScalarFieldGradient_General< Tensor_Dim, double, ublas::row_major, DoubleAllocator >
 Evaluate field gradient values for scalar field, i.e. gradient is tensor rank 1 (vector), specialization mofem_forces_and_sources_user_data_operators. More...
 
struct  OpCalculateScalarFieldValues
 Get value at integration points for scalar field. More...
 
struct  OpCalculateScalarFieldValues_General
 Calculate field values for tenor field rank 0, i.e. scalar field. More...
 
struct  OpCalculateScalarValuesDot
 
struct  OpCalculateTensor2FieldValues
 Get values at integration pts for tensor filed rank 2, i.e. matrix field. More...
 
struct  OpCalculateTensor2FieldValues_General
 Calculate field values for tenor field rank 2. More...
 
struct  OpCalculateTensor2FieldValues_General< Tensor_Dim0, Tensor_Dim1, double, ublas::row_major, DoubleAllocator >
 
struct  OpCalculateTensor2FieldValuesDot
 Get time direvarive values at integration pts for tensor filed rank 2, i.e. matrix field. More...
 
struct  OpCalculateTensor2SymmetricFieldValues
 
struct  OpCalculateTensor2SymmetricFieldValuesDot
 
struct  OpCalculateVectorFieldGradient
 Get field gradients at integration pts for scalar filed rank 0, i.e. vector field. More...
 
struct  OpCalculateVectorFieldGradient_General
 Evaluate field gradient values for vector field, i.e. gradient is tensor rank 2. More...
 
struct  OpCalculateVectorFieldGradient_General< Tensor_Dim0, Tensor_Dim1, double, ublas::row_major, DoubleAllocator >
 
struct  OpCalculateVectorFieldGradientDot
 Get field gradients time derivative at integration pts for scalar filed rank 0, i.e. vector field mofem_forces_and_sources_user_data_operators. More...
 
struct  OpCalculateVectorFieldValues
 Get values at integration pts for tensor filed rank 1, i.e. vector field. More...
 
struct  OpCalculateVectorFieldValues_General
 Calculate field values for tenor field rank 1, i.e. vector field. More...
 
struct  OpCalculateVectorFieldValues_General< Tensor_Dim, double, ublas::row_major, DoubleAllocator >
 Calculate field values (template specialization) for tensor field rank 1, i.e. vector field mofem_forces_and_sources_user_data_operators. More...
 
struct  OpCalculateVectorFieldValuesDot
 Get time direvatives of values at integration pts for tensor filed rank 1, i.e. vector field mofem_forces_and_sources_user_data_operators. More...
 
struct  OpGetCoordsAndNormalsOnFace
 Calculate normals at Gauss points of triangle element. More...
 
struct  OpGetCoordsAndNormalsOnPrism
 calculate normals at Gauss points of triangle element More...
 
struct  OpGetDataAndGradient
 Get field values and gradients at Gauss points. More...
 
struct  OpGetHoTangentOnEdge
 Calculate tangent vector on edge form HO geometry approximation. More...
 
struct  OpMakeHdivFromHcurl
 Make Hdiv space from Hcurl space in 2d. More...
 
struct  OpSetContrariantPiolaTransformOnEdge
 
struct  OpSetContravariantPiolaTransform
 apply contravariant (Piola) transfer to Hdiv space More...
 
struct  OpSetContravariantPiolaTransformFace
 Apply contravariant (Piola) transfer to Hdiv space on face. More...
 
struct  OpSetContravariantPiolaTransformOnFace
 transform Hdiv base fluxes from reference element to physical triangle More...
 
struct  OpSetCovariantPiolaTransform
 apply covariant transfer to Hcurl space More...
 
struct  OpSetCovariantPiolaTransformOnEdge
 transform Hcurl base fluxes from reference element to physical edge More...
 
struct  OpSetCovariantPiolaTransformOnFace
 transform Hcurl base fluxes from reference element to physical triangle More...
 
struct  OpSetHoContravariantPiolaTransform
 Apply contravariant (Piola) transfer to Hdiv space for HO geometr. More...
 
struct  OpSetHoCovariantPiolaTransform
 Apply covariant (Piola) transfer to Hcurl space for HO geometry. More...
 
struct  OpSetHoInvJacH1
 transform local reference derivatives of shape function to global derivatives if higher order geometry is given More...
 
struct  OpSetHoInvJacHdivAndHcurl
 transform local reference derivatives of shape function to global derivatives if higher order geometry is given More...
 
struct  OpSetInvJacH1
 Transform local reference derivatives of shape function to global derivatives. More...
 
struct  OpSetInvJacH1ForFace
 Transform local reference derivatives of shape functions to global derivatives. More...
 
struct  OpSetInvJacH1ForFatPrism
 Transform local reference derivatives of shape functions to global derivatives. More...
 
struct  OpSetInvJacH1ForFlatPrism
 Transform local reference derivatives of shape functions to global derivatives. More...
 
struct  OpSetInvJacHcurlFace
 brief Transform local reference derivatives of shape function to global derivatives for face More...
 
struct  OpSetInvJacHdivAndHcurl
 brief Transform local reference derivatives of shape function to global derivatives More...
 
struct  Order_mi_tag
 MultiIndex Tag for field order. More...
 
struct  PairNameFEMethodPtr
 
struct  ParentEntType_mi_tag
 
struct  Part_mi_tag
 
struct  PetscGlobalIdx_mi_tag
 
struct  PetscLocalIdx_mi_tag
 
struct  PressureCubitBcData
 Definition of the pressure bc data structure. More...
 
struct  PrismInterface
 Make interface on given faces and create flat prism in that space. More...
 
struct  PrismsFromSurfaceInterface
 merge node from two bit levels More...
 
struct  Problem
 keeps basic data about problemThis is low level structure with information about problem, what elements compose problem and what DOFs are on rows and columns. More...
 
struct  Problem_mi_tag
 
struct  ProblemChangeRefLevelBitAdd
 add ref level to problem More...
 
struct  ProblemChangeRefLevelBitDofMaskAdd
 set prof dof bit ref mask More...
 
struct  ProblemChangeRefLevelBitDofMaskSet
 set prof dof bit ref mask More...
 
struct  ProblemChangeRefLevelBitSet
 set ref level to problem More...
 
struct  ProblemClearComposedProblemData
 Clear composed problem data structure. More...
 
struct  ProblemClearNumeredFiniteElementsChange
 clear problem finite elements More...
 
struct  ProblemClearSubProblemData
 Clear sub-problem data structure. More...
 
struct  ProblemFiniteElementChangeBitAdd
 add finite element to problem More...
 
struct  ProblemFiniteElementChangeBitUnSet
 remove finite element from problem More...
 
struct  ProblemsManager
 Problem manager is used to build and partition problems. More...
 
struct  ProblemZeroNbColsChange
 zero nb. of DOFs in col More...
 
struct  ProblemZeroNbRowsChange
 zero nb. of DOFs in row More...
 
struct  Proc_mi_tag
 
struct  Projection10NodeCoordsOnField
 Projection of edge entities with one mid-node on hierarchical basis. More...
 
struct  ProjectionFieldOn10NodeTet
 
struct  RefElement
 keeps data about abstract refined finite element More...
 
struct  RefElement_EDGE
 keeps data about abstract EDGE finite element More...
 
struct  RefElement_MESHSET
 keeps data about abstract MESHSET finite element More...
 
struct  RefElement_PRISM
 keeps data about abstract PRISM finite element More...
 
struct  RefElement_TET
 keeps data about abstract TET finite element More...
 
struct  RefElement_TRI
 keeps data about abstract TRI finite element More...
 
struct  RefElement_VERTEX
 keeps data about abstract VERTEX finite element More...
 
struct  RefEntExtractor
 Extract entity handle form multi-index container. More...
 
struct  RefEntity
 Struct keeps handle to refined handle. More...
 
struct  RefEntity_change_left_shift
 ref mofem entity, left shift More...
 
struct  RefEntity_change_parent
 change parentUse this function with care. Some other multi-indices can deponent on this. More...
 
struct  RefEntity_change_right_shift
 ref mofem entity, right shift More...
 
struct  SeriesID_mi_tag
 
struct  SeriesName_mi_tag
 
struct  SeriesRecorder
 
struct  SetBitRefLevelTool
 tool class with methods used more than twp times More...
 
struct  SetOtherGlobalGhostVector
 
struct  SetOtherLocalGhostVector
 
struct  SideNumber_mi_tag
 
struct  Simple
 Simple interface for fast problem set-up. More...
 
struct  SmartPetscObj
 intrusive_ptr for managing petsc objects More...
 
struct  SnesCtx
 Interface for nonlinear (SNES) solver. More...
 
struct  SnesMethod
 data structure for snes (nonlinear solver) contextStructure stores context data which are set in functions run by PETSc SNES functions. More...
 
struct  Space_mi_tag
 
struct  TemperatureCubitBcData
 Definition of the temperature bc data structure. More...
 
struct  TetGenInterface
 TetGen interface. More...
 
struct  TetPolynomialBase
 Calculate base functions on tetrahedral. More...
 
struct  Tools
 Auxiliary tools. More...
 
struct  TriPolynomialBase
 Calculate base functions on triangle. More...
 
struct  TsCtx
 Interface for Time Stepping (TS) solver. More...
 
struct  TSMethod
 data structure for TS (time stepping) contextStructure stores context data which are set in functions run by PETSc Time Stepping functions. More...
 
struct  Unique_Ent_mi_tag
 
struct  Unique_FiniteElement_mi_tag
 
struct  Unique_mi_tag
 
struct  UnknownInterface
 base class for all interface classes More...
 
struct  VecManager
 Vector manager is used to create vectors \mofem_vectors. More...
 
struct  VelocityCubitBcData
 Definition of the velocity bc data structure. More...
 
struct  Version
 
struct  VertexElementForcesAndSourcesCore
 Vertex finite elementUser is implementing own operator at Gauss points level, by own object derived from VertexElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to rowOpPtrVector and rowColOpPtrVector. More...
 
struct  VolumeElementForcesAndSourcesCoreBase
 Volume finite element baseUser is implementing own operator at Gauss point level, by class derived from VolumeElementForcesAndSourcesCore::UserDataOperator. Arbitrary number of operator can be added by pushing objects to OpPtrVector. More...
 
struct  VolumeElementForcesAndSourcesCoreOnSideBase
 Base volume element used to integrate on skeleton. More...
 
struct  VolumeElementForcesAndSourcesCoreOnSideSwitch
 Volume side finite element with switches. More...
 
struct  VolumeElementForcesAndSourcesCoreSwitch
 Volume finite element with switches. More...
 

Typedefs

typedef ublas::unbounded_array< boost::shared_ptr< const FEDofEntity >, std::allocator< boost::shared_ptr< const FEDofEntity > > > DofsAllocator
 
typedef ublas::vector< boost::shared_ptr< const FEDofEntity >, DofsAllocatorVectorDofs
 
using EdgeElementForcesAndSourcesCore = EdgeElementForcesAndSourcesCoreSwitch< 0 >
 Edge finite element default. More...
 
using FaceElementForcesAndSourcesCore = FaceElementForcesAndSourcesCoreSwitch< 0 >
 Face finite element default. More...
 
using VolumeElementForcesAndSourcesCore = VolumeElementForcesAndSourcesCoreSwitch< 0 >
 Volume finite element default. More...
 
using VolumeElementForcesAndSourcesCoreOnSide = VolumeElementForcesAndSourcesCoreOnSideSwitch< 0 >
 Volume element used to integrate on skeleton. More...
 
typedef CubitMeshSet_multiIndex::index< CubitMeshSets_mi_tag >::type CubitMeshsetByType
 
typedef CubitMeshSet_multiIndex::index< CubitMeshSets_mask_meshset_mi_tag >::type CubitMeshsetByMask
 
typedef CubitMeshSet_multiIndex::index< CubitMeshSets_name >::type CubitMeshsetByName
 
typedef CubitMeshSet_multiIndex::index< CubitMeshSets_mi_tag >::type CubitMeshsetById
 
typedef multi_index_container< CubitMeshSets, indexed_by< hashed_unique< tag< Meshset_mi_tag >, member< CubitMeshSets, EntityHandle, &CubitMeshSets::meshset > >, ordered_non_unique< tag< CubitMeshSets_mi_tag >, const_mem_fun< CubitMeshSets, unsigned long int, &CubitMeshSets::getBcTypeULong > >, ordered_non_unique< tag< CubitMeshSets_mask_meshset_mi_tag >, const_mem_fun< CubitMeshSets, unsigned long int, &CubitMeshSets::getMaksedBcTypeULong > >, ordered_non_unique< tag< CubitMeshSets_name >, const_mem_fun< CubitMeshSets, std::string, &CubitMeshSets::getName > >, hashed_unique< tag< Composite_Cubit_msId_And_MeshSetType_mi_tag >, composite_key< CubitMeshSets, const_mem_fun< CubitMeshSets, int, &CubitMeshSets::getMeshsetId >, const_mem_fun< CubitMeshSets, unsigned long int, &CubitMeshSets::getMaksedBcTypeULong > > > > > CubitMeshSet_multiIndex
 Stores data about meshsets (see CubitMeshSets) storing data about boundary conditions, interfaces, sidesets, nodests, blocksets. More...
 
typedef multi_index_container< boost::shared_ptr< CoordSys >, indexed_by< ordered_unique< tag< Meshset_mi_tag >, member< CoordSys, EntityHandle, &CoordSys::meshSet > >, ordered_unique< tag< CoordSysName_mi_tag >, const_mem_fun< CoordSys, boost::string_ref, &CoordSys::getNameRef > > > > CoordSys_multiIndex
 
typedef DofEntity_multiIndex::index< FieldName_mi_tag >::type DofEntityByFieldName
 Dof multi-index by field name. More...
 
typedef DofEntity_multiIndex::index< Ent_mi_tag >::type DofEntityByEnt
 Dof multi-index by entity. More...
 
typedef DofEntity_multiIndex::index< Composite_Name_And_Ent_mi_tag >::type DofEntityByNameAndEnt
 Dof multi-index by field name and entity. More...
 
typedef DofEntity_multiIndex::index< Composite_Name_And_Type_mi_tag >::type DofEntityByNameAndType
 Dof multi-index by field name and entity type. More...
 
typedef multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, const UId &, &DofEntity::getGlobalUniqueId > > > > DofEntity_multiIndex_uid_view
 multi-index view on DofEntity by uid More...
 
typedef std::vector< boost::weak_ptr< DofEntity > > DofEntity_vector_view
 vector view on DofEntity by uid More...
 
typedef multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, const UId &, &DofEntity::getGlobalUniqueId > >, ordered_non_unique< const_mem_fun< DofEntity, char, &DofEntity::getActive > > > > DofEntity_multiIndex_active_view
 multi-index view on DofEntity activity More...
 
typedef FEDofEntity_multiIndex::index< FieldName_mi_tag >::type FEDofEntityByFieldName
 Finite element DoF multi-index by field name. More...
 
typedef FEDofEntity_multiIndex::index< Composite_Name_And_Ent_mi_tag >::type FEDofEntityByNameAndEnt
 Dof entity multi-index by field name and entity. More...
 
typedef FEDofEntity_multiIndex::index< Composite_Name_And_Type_mi_tag >::type FEDofEntityByNameAndType
 Dof entity multi-index by field name and entity type. More...
 
typedef FENumeredDofEntity_multiIndex::index< FieldName_mi_tag >::type FENumeredDofEntityByFieldName
 Finite element numbered DoF multi-index by field name. More...
 
typedef FENumeredDofEntity_multiIndex::index< Composite_Name_And_Ent_mi_tag >::type FENumeredDofEntityByNameAndEnt
 Dof entity multi-index by field name and entity. More...
 
typedef FENumeredDofEntity_multiIndex::index< Composite_Name_And_Type_mi_tag >::type FENumeredDofEntityByNameAndType
 Dof entity multi-index by field name and entity type. More...
 
typedef FENumeredDofEntity_multiIndex::index< Unique_mi_tag >::type FENumeredDofEntityByUId
 Dof entity multi-index by UId. More...
 
typedef FENumeredDofEntity_multiIndex::index< Ent_mi_tag >::type FENumeredDofEntityByEnt
 Numbered DoF multi-index by entity. More...
 
typedef NumeredDofEntity_multiIndex::index< FieldName_mi_tag >::type NumeredDofEntityByFieldName
 Numbered DoF multi-index by field name. More...
 
typedef NumeredDofEntity_multiIndex::index< Unique_mi_tag >::type NumeredDofEntityByUId
 Numbered DoF multi-index by UId. More...
 
typedef NumeredDofEntity_multiIndex::index< PetscLocalIdx_mi_tag >::type NumeredDofEntityByLocalIdx
 Numbered DoF multi-index by local index. More...
 
typedef NumeredDofEntity_multiIndex::index< Ent_mi_tag >::type NumeredDofEntityByEnt
 Numbered DoF multi-index by entity. More...
 
typedef NumeredDofEntity_multiIndex::index< Composite_Name_Ent_And_Part_mi_tag >::type NumeredDofEntityByNameEntAndPart
 Numbered DoF multi-index by name entity and partition. More...
 
typedef multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, const UId &, &NumeredDofEntity::getGlobalUniqueId > > > > NumeredDofEntity_multiIndex_uid_view_ordered
 
typedef multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< hashed_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getDofIdx > > > > NumeredDofEntity_multiIndex_idx_view_hashed
 
typedef multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getPetscLocalDofIdx > > > > NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique
 
typedef multi_index_container< boost::shared_ptr< NumeredDofEntity >, indexed_by< ordered_non_unique< const_mem_fun< NumeredDofEntity::interface_type_DofEntity, FieldCoefficientsNumber, &NumeredDofEntity::getDofCoeffIdx > > > > NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique
 
typedef multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, member< RefEntity::BasicEntity, EntityHandle, &RefEntity::ent > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType > >, ordered_non_unique< tag< ParentEntType_mi_tag >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
 
typedef multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< hashed_non_unique< const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, hashed_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< boost::shared_ptr< RefEntity >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getRefEnt >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex_view_by_hashed_parent_entity
 multi-index view of RefEntity by parent entity More...
 
typedef multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_non_unique< const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, hashed_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< boost::shared_ptr< RefEntity >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getRefEnt >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex_view_by_ordered_parent_entity
 
typedef multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< sequenced<>, ordered_unique< tag< Ent_mi_tag >, member< RefEntity::BasicEntity, EntityHandle, &RefEntity::ent > > > > RefEntity_multiIndex_view_sequence_ordered_view
 
typedef FieldEntity_multiIndex::index< FieldName_mi_tag >::type FieldEntityByFieldName
 Entity index by field name. More...
 
typedef multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< sequenced<>, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntity, EntityHandle, &FieldEntity::getEnt > > > > FieldEntity_multiIndex_ent_view
 
typedef multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< sequenced<>, ordered_non_unique< tag< Composite_EntType_and_Space_mi_tag >, composite_key< FieldEntity, const_mem_fun< FieldEntity::interface_type_RefEntity, EntityType, &FieldEntity::getEntType >, const_mem_fun< FieldEntity::interface_type_Field, FieldSpace, &FieldEntity::getSpace > > > > > FieldEntity_multiIndex_spaceType_view
 
typedef std::vector< boost::weak_ptr< FieldEntity > > FieldEntity_vector_view
 
typedef multi_index_container< boost::shared_ptr< RefElement >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getRefEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityType, &RefElement::getEntType > > > > RefElement_multiIndex
 
typedef multi_index_container< boost::shared_ptr< RefElement >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getRefEnt > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getParentEnt > >, ordered_non_unique< tag< Composite_ParentEnt_And_BitsOfRefinedEdges_mi_tag >, composite_key< RefElement, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getParentEnt >, const_mem_fun< RefElement, int, &RefElement::getBitRefEdgesUlong > > > > > RefElement_multiIndex_parents_view
 
typedef boost::function< MoFEMErrorCode(Interface &moab, const Field &field_ptr, const EntFiniteElement &fe_ptr, Range &adjacency)> ElementAdjacencyFunct
 user adjacency function More...
 
typedef EntFiniteElement_multiIndex::index< FiniteElement_name_mi_tag >::type EntFiniteElementByName
 Entity finite element multi-index by finite element name. More...
 
typedef NumeredEntFiniteElement_multiIndex::index< FiniteElement_name_mi_tag >::type NumeredEntFiniteElementbyName
 Entity finite element multi-index by finite element name. More...
 
typedef NumeredEntFiniteElement_multiIndex::index< Composite_Name_And_Part_mi_tag >::type NumeredEntFiniteElementbyNameAndPart
 Entity finite element multi-index by finite element name and partition. More...
 
typedef boost::function< int(const int order)> FieldOrderFunct
 user adjacency function More...
 
typedef FieldOrderFunct FieldOrderTable[MBMAXTYPE]
 user adjacency function table More...
 
typedef multi_index_container< boost::shared_ptr< Field >, indexed_by< ordered_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, LtBit< BitFieldId > > > > Field_multiIndex_view
 
typedef multi_index_container< FieldSeries, indexed_by< ordered_unique< tag< SeriesID_mi_tag >, const_mem_fun< FieldSeries, EntityID, &FieldSeries::get_meshset_id > >, ordered_unique< tag< SeriesName_mi_tag >, const_mem_fun< FieldSeries, boost::string_ref, &FieldSeries::getNameRef > > > > Series_multiIndex
 Series multi index. More...
 
typedef multi_index_container< FieldSeriesStep, indexed_by< ordered_unique< tag< Composite_SeriesID_And_Step_mi_tag >, composite_key< FieldSeriesStep, const_mem_fun< FieldSeriesStep::interface_type_FieldSeries, EntityID, &FieldSeriesStep::get_meshset_id >, member< FieldSeriesStep, int, &FieldSeriesStep::step_number > > >, ordered_unique< tag< Composite_SeriesName_And_Step_mi_tag >, composite_key< FieldSeriesStep, const_mem_fun< FieldSeriesStep::interface_type_FieldSeries, boost::string_ref, &FieldSeriesStep::getNameRef >, member< FieldSeriesStep, int, &FieldSeriesStep::step_number > > >, ordered_non_unique< tag< SeriesName_mi_tag >, const_mem_fun< FieldSeriesStep::interface_type_FieldSeries, boost::string_ref, &FieldSeriesStep::getNameRef > >, ordered_non_unique< tag< Composite_SeriesName_And_Time_mi_tag >, composite_key< FieldSeriesStep, const_mem_fun< FieldSeriesStep::interface_type_FieldSeries, boost::string_ref, &FieldSeriesStep::getNameRef >, const_mem_fun< FieldSeriesStep, double, &FieldSeriesStep::get_time > > > > > SeriesStep_multiIndex
 Step multi index. More...
 
typedef std::vector< PairNameFEMethodPtrFEMethodsSequence
 
typedef std::vector< BasicMethodPtrBasicMethodsSequence
 

Functions

PetscErrorCode PetscOptionsGetInt (PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
 
PetscErrorCode PetscOptionsGetReal (PetscOptions *, const char pre[], const char name[], PetscReal *dval, PetscBool *set)
 
PetscErrorCode PetscOptionsGetScalar (PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
 
PetscErrorCode PetscOptionsGetString (PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)
 
PetscErrorCode PetscOptionsGetBool (PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
 
PetscErrorCode PetscOptionsGetRealArray (PetscOptions *, const char pre[], const char name[], PetscReal dval[], PetscInt *nmax, PetscBool *set)
 
PetscErrorCode PetscOptionsGetEList (PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
 
PetscErrorCode PetscOptionsGetIntArray (PetscOptions options, const char pre[], const char name[], PetscInt dvalue[], PetscInt *nmax, PetscBool *set)
 
PetscErrorCode PetscOptionsGetScalarArray (PetscOptions options, const char pre[], const char name[], PetscScalar dvalue[], PetscInt *nmax, PetscBool *set)
 
template<typename T1 >
auto getVectorAdaptor (T1 ptr, const size_t n)
 Get Vector adaptor. More...
 
template<typename T1 >
auto getMatrixAdaptor (T1 ptr, const size_t n, const size_t m)
 Get Matrix adaptor. More...
 
template<class X >
std::string toString (X x)
 
template<class T , class A >
static FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FromVec (ublas::vector< T, A > &data)
 Get tensor rank 0 (scalar) form data vector. More...
 
template<>
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FromVec< double, DoubleAllocator > (ublas::vector< double, DoubleAllocator > &data)
 
template<int Tensor_Dim, class T , class L , class A >
static FTensor::Tensor1< FTensor::PackPtr< T *, 1 >, Tensor_Dim > getFTensor1FromMat (ublas::matrix< T, L, A > &data)
 Get tensor rank 1 (vector) form data matrix. More...
 
template<int Tensor_Dim>
static FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor1FromMat (MatrixDouble &data)
 Get tensor rank 1 (vector) form data matrix (specialization) More...
 
template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, 3 > getFTensor1FromMat< 3, double, ublas::row_major, DoubleAllocator > (MatrixDouble &data)
 
template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, 2 > getFTensor1FromMat< 2, double, ublas::row_major, DoubleAllocator > (MatrixDouble &data)
 
template<int Tensor_Dim0, int Tensor_Dim1, class T , class L , class A >
static FTensor::Tensor2< FTensor::PackPtr< T *, 1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2FromMat (ublas::matrix< T, L, A > &data)
 Get tensor rank 2 (matrix) form data matrix. More...
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 3, 3 > getFTensor2FromMat (MatrixDouble &data)
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 3, 2 > getFTensor2FromMat (MatrixDouble &data)
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 2, 2 > getFTensor2FromMat (MatrixDouble &data)
 
template<int Tensor_Dim0, int Tensor_Dim1>
static FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2FromMat (MatrixDouble &data)
 Get tensor rank 2 (matrix) form data matrix (specialization) More...
 
template<int Tensor_Dim, class T , class L , class A >
static FTensor::Tensor2_symmetric< FTensor::PackPtr< T *, 1 >, Tensor_Dim > getFTensor2SymmetricFromMat (ublas::matrix< T, L, A > &data)
 Get symmetric tensor rank 2 (matrix) form data matrix. More...
 
template<>
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, 3 > getFTensor2SymmetricFromMat (MatrixDouble &data)
 Get symmetric tensor rank 2 form matrix of for dimension 3. More...
 
template<int Tensor_Dim>
static FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor2SymmetricFromMat (MatrixDouble &data)
 Get symmetric tensor rank 2 form matrix. More...
 
template<int DIM>
FTensor::Tensor1< FTensor::PackPtr< double *, DIM >, DIM > getFTensor1FromPtr (double *ptr)
 Make Tensor1 from pointer. More...
 
template<>
FTensor::Tensor1< FTensor::PackPtr< double *, 3 >, 3 > getFTensor1FromPtr< 3 > (double *ptr)
 
template<int DIM1, int DIM2>
FTensor::Tensor2< FTensor::PackPtr< double *, DIM1 *DIM2 >, DIM1, DIM2 > getFTensor2FromPtr (double *ptr)
 Make Tensor2 from pointer. More...
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 6 >, 3, 2 > getFTensor2FromPtr< 3, 2 > (double *ptr)
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 9 >, 3, 3 > getFTensor2FromPtr< 3, 3 > (double *ptr)
 
template<class T >
static double dEterminant (T &t)
 Calculate the determinant of a 3x3 matrix or a tensor of rank 2. More...
 
template<int Tensor_Dim, class T , class L , class A >
MoFEMErrorCode invertTensor3by3 (ublas::matrix< T, L, A > &jac_data, ublas::vector< T, A > &det_data, ublas::matrix< T, L, A > &inv_jac_data)
 Calculate inverse of tensor rank 2 at integration points. More...
 
template<>
MoFEMErrorCode invertTensor3by3< 3, double, ublas::row_major, DoubleAllocator > (MatrixDouble &jac_data, VectorDouble &det_data, MatrixDouble &inv_jac_data)
 
template<class T1 , class T2 >
MoFEMErrorCode determinantTensor3by3 (T1 &t, T2 &det)
 Calculate determinant 3 by 3. More...
 
template<class T1 , class T2 >
MoFEMErrorCode determinantTensor2by2 (T1 &t, T2 &det)
 Calculate determinant 2 by 2. More...
 
template<class T1 , class T2 , class T3 >
MoFEMErrorCode invertTensor3by3 (T1 &t, T2 &det, T3 &inv_t)
 Calculate matrix inverse 3 by 3. More...
 
template<class T1 , class T2 , class T3 >
MoFEMErrorCode invertTensor2by2 (T1 &t, T2 &det, T3 &inv_t)
 Calculate matrix inverse 2 by 2. More...
 
template<typename Extractor , typename Iterator >
moab::Range::iterator insertOrdered (Range &r, Extractor, Iterator begin_iter, Iterator end_iter)
 Insert ordered mofem multi-index into range. More...
 
void tet_type_6 (moab::Interface &moab, const EntityHandle *conn, const EntityHandle *edge_new_nodes, EntityHandle *new_tets_conn)
 
int tet_type_5 (moab::Interface &moab, const EntityHandle *conn, const EntityHandle *edge_new_nodes, EntityHandle *new_tets_conn)
 
int tet_type_4 (const EntityHandle *conn, const int *split_edges, const EntityHandle *edge_new_nodes, EntityHandle *new_tets_conn)
 
int tet_type_3 (const EntityHandle *conn, const int *split_edges, const EntityHandle *edge_new_nodes, EntityHandle *new_tets_conn)
 
int tet_type_2 (const EntityHandle *conn, const int *split_edges, const EntityHandle *edge_new_nodes, EntityHandle *new_tets_conn)
 
void tet_type_1 (const EntityHandle *conn, const int split_edge, const EntityHandle edge_new_node, EntityHandle *new_tets_conn)
 
MoFEMErrorCode tri_type_3 (const EntityHandle *conn, const BitRefEdges split_edges, const EntityHandle *edge_new_nodes, EntityHandle *new_tris_conn)
 
MoFEMErrorCode prism_type_1 (const EntityHandle *conn, const BitRefEdges split_edges, const EntityHandle *edge_new_nodes, EntityHandle *new_prism_conn)
 
MoFEMErrorCode prism_type_2 (const EntityHandle *conn, const BitRefEdges split_edges, const EntityHandle *edge_new_nodes, EntityHandle *new_prism_conn)
 
MoFEMErrorCode prism_type_3 (const EntityHandle *conn, const BitRefEdges split_edges, const EntityHandle *edge_new_nodes, EntityHandle *new_prism_conn)
 
MoFEMErrorCode Hcurl_Ainsworth_EdgeBaseFunctions_MBTET (int *sense, int *p, double *N, double *diffN, double *edgeN[], double *diff_edgeN[], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Edge based H-curl base functions on tetrahedral. More...
 
MoFEMErrorCode Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_EDGE (int sense, int p, double *N, double *diffN, double *edgeN, double *diff_edgeN, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Edge based H-curl base functions on edge. More...
 
MoFEMErrorCode Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_FACE (int *sense, int *p, double *N, double *diffN, double *edgeN[], double *diff_edgeN[], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Edge based H-curl base functions on face. More...
 
MoFEMErrorCode Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET (int *faces_nodes, int *p, double *N, double *diffN, double *phi_f_e[4][3], double *diff_phi_f_e[4][3], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face edge base functions of Hcurl space on tetrahedral. More...
 
MoFEMErrorCode Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET_ON_FACE (int *faces_nodes, int p, double *N, double *diffN, double *phi_f_e[3], double *diff_phi_f_e[3], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face edge base functions of Hcurl space. More...
 
MoFEMErrorCode Hcurl_Ainsworth_BubbleFaceFunctions_MBTET (int *faces_nodes, int *p, double *N, double *diffN, double *phi_f[4], double *diff_phi_f[4], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face edge base functions of Hcurl space on face on tetrahedral. More...
 
MoFEMErrorCode Hcurl_Ainsworth_BubbleFaceFunctions_MBTET_ON_FACE (int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face edge base functions of Hcurl space on face. More...
 
MoFEMErrorCode Hcurl_Ainsworth_FaceInteriorFunctions_MBTET (int *faces_nodes, int p, double *N, double *diffN, double *phi_v, double *diff_phi_v, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face base interior function. More...
 
MoFEMErrorCode Hcurl_Ainsworth_VolumeInteriorFunctions_MBTET (int p, double *N, double *diffN, double *phi_v, double *diff_phi_v, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Volume interior function. More...
 
MoFEMErrorCode Hcurl_Ainsworth_FaceFunctions_MBTET (int *face_nodes, int *p, double *N, double *diffN, double *phi_f[4], double *diff_phi_f[4], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face H-curl functions. More...
 
MoFEMErrorCode Hcurl_Ainsworth_FaceFunctions_MBTET_ON_FACE (int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face H-curl functions. More...
 
MoFEMErrorCode Hcurl_Ainsworth_VolumeFunctions_MBTET (int p, double *N, double *diffN, double *phi_v, double *diff_phi_v, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 H-curl volume base functions. More...
 
MoFEMErrorCode Hcurl_Demkowicz_EdgeBaseFunctions_MBTET (int *sense, int *p, double *n, double *diff_n, double *phi[], double *diff_phi[], int nb_integration_pts)
 Edge based H-curl base functions on tetrahedral. More...
 
MoFEMErrorCode Hcurl_Demkowicz_EdgeBaseFunctions_MBTRI (int *sense, int *p, double *n, double *diff_n, double *phi[], double *diff_phi[], int nb_integration_pts)
 Edge based H-curl base functions on teriangle. More...
 
MoFEMErrorCode Hcurl_Demkowicz_EdgeBaseFunctions_MBEDGE (int sense, int p, double *n, double *diff_n, double *phi, double *diff_phi, int nb_integration_pts)
 Edge based H-curl base functions on edge. More...
 
MoFEMErrorCode Hcurl_Demkowicz_FaceBaseFunctions_MBTET (int *faces_nodes, int *p, double *n, double *diff_n, double *phi[], double *diff_phi[], int nb_integration_pts)
 Face base interior function. More...
 
MoFEMErrorCode Hcurl_Demkowicz_FaceBaseFunctions_MBTRI (int *faces_nodes, int p, double *n, double *diff_n, double *phi, double *diff_phi, int nb_integration_pts)
 Face base interior function. More...
 
MoFEMErrorCode Hcurl_Demkowicz_VolumeBaseFunctions_MBTET (int p, double *n, double *diff_n, double *phi, double *diff_phi, int nb_integration_pts)
 Volume base interior function. More...
 
MoFEMErrorCode Hdiv_Ainsworth_EdgeFaceShapeFunctions_MBTET (int *faces_nodes, int *p, double *N, double *diffN, double *phi_f_e[4][3], double *diff_phi_f_e[4][3], int gdim, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Hdiv base functions, Edge-based face functions by Ainsworth [1]. More...
 
MoFEMErrorCode Hdiv_Ainsworth_EdgeFaceShapeFunctions_MBTET_ON_FACE (int *faces_nodes, int p, double *N, double *diffN, double *phi_f_e[3], double *diff_phi_f_e[3], int gdim, int nb, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Hdiv base functions, Edge-based face functions by Ainsworth [1]. More...
 
MoFEMErrorCode Hdiv_Ainsworth_FaceBubbleShapeFunctions (int *faces_nodes, int *p, double *N, double *diffN, double *phi_f[], double *diff_phi_f[], int gdim, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face bubble functions by Ainsworth [1]. More...
 
MoFEMErrorCode Hdiv_Ainsworth_FaceBubbleShapeFunctions_ON_FACE (int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int gdim, int nb, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Face bubble functions by Ainsworth [1]. More...
 
MoFEMErrorCode Hdiv_Ainsworth_EdgeBasedVolumeShapeFunctions_MBTET (int p, double *N, double *diffN, double *phi_v_e[6], double *diff_phi_v_e[6], int gdim, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Hdiv base function, Edge-based interior (volume) functions by Ainsworth [1]. More...
 
MoFEMErrorCode Hdiv_Ainsworth_FaceBasedVolumeShapeFunctions_MBTET (int p, double *N, double *diffN, double *phi_v_f[], double *diff_phi_v_f[], int gdim, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 
MoFEMErrorCode Hdiv_Ainsworth_VolumeBubbleShapeFunctions_MBTET (int p, double *N, double *diffN, double *phi_v, double *diff_phi_v, int gdim, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
 Interior bubble functions by Ainsworth [1]. More...
 
MoFEMErrorCode Hdiv_Demkowicz_Face_MBTET_ON_FACE (int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int gdim, int nb)
 
MoFEMErrorCode Hdiv_Demkowicz_Interior_MBTET (int p, double *N, double *diffN, int p_face[], double *phi_f[4], double *diff_phi_f[4], double *phi_v, double *diff_phi_v, int gdim)
 
template<class TYPE >
static MoFEMErrorCode get_value (MatrixDouble &pts_x, MatrixDouble &pts_t, TYPE *ctx)
 
MoFEMErrorCode VecSetValues (Vec V, const DataForcesAndSourcesCore::EntData &data, const double *ptr, InsertMode iora)
 Assemble PETSc vector. More...
 
MoFEMErrorCode MatSetValues (Mat M, const DataForcesAndSourcesCore::EntData &row_data, const DataForcesAndSourcesCore::EntData &col_data, const double *ptr, InsertMode iora)
 Assemble PETSc matrix. More...
 
static void constructor_data (DataForcesAndSourcesCore *data, const EntityType type)
 
static void constructor_derived_data (DerivedDataForcesAndSourcesCore *derived_data, const boost::shared_ptr< DataForcesAndSourcesCore > &data_ptr)
 
std::ostream & operator<< (std::ostream &os, const DataForcesAndSourcesCore::EntData &e)
 
std::ostream & operator<< (std::ostream &os, const DataForcesAndSourcesCore &e)
 
template<typename ENTMULTIINDEX >
static int getMaxOrder (const ENTMULTIINDEX &multi_index)
 
template<class T >
static auto get_sub_iface_options_imp (T *const ptr, int) -> decltype(ptr->getSubInterfaceOptions())
 
template<class T >
static auto get_sub_iface_options_imp (T *const ptr, long) -> MoFEMErrorCode
 
static med_geometrie_element moab2med_element_type (const EntityType type)
 
std::ostream & operator<< (std::ostream &os, const MedInterface::FieldData &field_data)
 
static auto min_non_abs (const double a, const double b)
 
int fNBENTITY_GENERIC (int P)
 
int fNBENTITYSET_NOFIELD (int P)
 
int fNBVERTEX_L2 (int P)
 
int fNBVOLUMETET_L2 (int P)
 
int fNBFACETRI_L2 (int P)
 
int fNBEDGE_L2 (int P)
 
int fNBVERTEX_H1 (int P)
 number of approx. functions for H1 space on vertex More...
 
int fNBEDGE_H1 (int P)
 number of approx. functions for H1 space on edge More...
 
int fNBFACETRI_H1 (int P)
 number of approx. functions for H1 space on face More...
 
int fNBFACEQUAD_H1 (int P)
 
int fNBVOLUMETET_H1 (int P)
 number of approx. functions for H1 space on volume More...
 
int fNBVOLUMEPRISM_H1 (int P)
 
int fNBVERTEX_HCURL (int P)
 number of approx. functions for HCURL space on vertex More...
 
int fNBEDGE_AINSWORTH_HCURL (int P)
 
int fNBFACETRI_AINSWORTH_HCURL (int P)
 
int fNBVOLUMETET_AINSWORTH_HCURL (int P)
 
int fNBEDGE_DEMKOWICZ_HCURL (int P)
 
int fNBFACETRI_DEMKOWICZ_HCURL (int P)
 
int fNBVOLUMETET_DEMKOWICZ_HCURL (int P)
 
int fNBVERTEX_HDIV (int P)
 number of approx. functions for HDIV space on vertex More...
 
int fNBEDGE_HDIV (int P)
 number of approx. functions for HDIV space on edge More...
 
int fNBFACETRI_AINSWORTH_HDIV (int P)
 number of approx. functions for HDIV space on face More...
 
int fNBVOLUMETET_AINSWORTH_HDIV (int P)
 number of approx. functions for HDIV space on volume More...
 
int fNBFACETRI_DEMKOWICZ_HDIV (int P)
 
int fNBVOLUMETET_DEMKOWICZ_HDIV (int P)
 number of approx. functions for HDIV space on volume More...
 
MoFEMErrorCode test_moab (Interface &moab, const EntityHandle ent)
 Test MoAB entity handle if has structure as is assumed by MoFEM. More...
 
struct __attribute__ ((__packed__)) SideNumber
 keeps information about side number for the finite element More...
 
std::ostream & operator<< (std::ostream &os, const CubitMeshSets &e)
 
std::ostream & operator<< (std::ostream &os, const DisplacementCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const ForceCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const VelocityCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const AccelerationCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const TemperatureCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const PressureCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const HeatFluxCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const CfgCubitBcData &e)
 
std::ostream & operator<< (std::ostream &os, const BlockSetAttributes &e)
 
std::ostream & operator<< (std::ostream &os, const Mat_Elastic &e)
 
std::ostream & operator<< (std::ostream &os, const Mat_Elastic_EberleinHolzapfel1 &e)
 
std::ostream & operator<< (std::ostream &os, const Mat_Thermal &e)
 
std::ostream & operator<< (std::ostream &os, const Mat_Moisture &e)
 
std::ostream & operator<< (std::ostream &os, const Block_BodyForces &e)
 
std::ostream & operator<< (std::ostream &os, const Mat_Elastic_TransIso &e)
 
std::ostream & operator<< (std::ostream &os, const Mat_Interf &e)
 
std::ostream & operator<< (std::ostream &os, const Field &e)
 
std::ostream & operator<< (std::ostream &os, const FieldEntityEntFiniteElementAdjacencyMap &e)
 
MoFEMErrorCode test_moab (moab::Interface &moab, const EntityHandle ent)
 
std::ostream & operator<< (std::ostream &os, const DofEntity &e)
 
std::ostream & operator<< (std::ostream &os, const NumeredDofEntity &e)
 
std::ostream & operator<< (std::ostream &os, const FEDofEntity &e)
 
std::ostream & operator<< (std::ostream &os, const FENumeredDofEntity &e)
 
void * get_tag_ptr (moab::Interface &moab, Tag th, EntityHandle ent, int *tag_size)
 
MoFEMErrorCode getParentEnt (moab::Interface &moab, Range ents, std::vector< EntityHandle > vec_patent_ent)
 
std::ostream & operator<< (std::ostream &os, const RefEntity &e)
 
std::ostream & operator<< (std::ostream &os, const FieldEntity &e)
 
std::ostream & operator<< (std::ostream &os, const RefElement &e)
 
std::ostream & operator<< (std::ostream &os, const RefElement_TET &e)
 
std::ostream & operator<< (std::ostream &os, const RefElement_TRI &e)
 
std::ostream & operator<< (std::ostream &os, const RefElement_EDGE &e)
 
std::ostream & operator<< (std::ostream &os, const RefElement_VERTEX &e)
 
std::ostream & operator<< (std::ostream &os, const FiniteElement &e)
 
std::ostream & operator<< (std::ostream &os, const EntFiniteElement &e)
 
std::ostream & operator<< (std::ostream &os, const Problem &e)
 
std::ostream & operator<< (std::ostream &os, const FieldSeries &e)
 
std::ostream & operator<< (std::ostream &os, const FieldSeriesStep &e)
 
template<typename T >
PetscObject getPetscObject (T obj)
 
PetscErrorCode DMRegister_MoFEM (const char sname[])
 Register MoFEM problem. More...
 
PetscErrorCode DMMoFEMCreateMoFEM (DM dm, MoFEM::Interface *m_field_ptr, const char problem_name[], const MoFEM::BitRefLevel bit_level, const MoFEM::BitRefLevel bit_mask=MoFEM::BitRefLevel().set())
 Must be called by user to set MoFEM data structures. More...
 
PetscErrorCode DMMoFEMCreateSubDM (DM subdm, DM dm, const char problem_name[])
 Must be called by user to set Sub DM MoFEM data structures. More...
 
PetscErrorCode DMoFEMGetInterfacePtr (DM dm, MoFEM::Interface **m_field_ptr)
 Get pointer to MoFEM::Interface. More...
 
PetscErrorCode DMMoFEMGetProblemPtr (DM dm, const MoFEM::Problem **problem_ptr)
 Get pointer to problem data structure. More...
 
PetscErrorCode DMMoFEMSetDestroyProblem (DM dm, PetscBool destroy_problem)
 
PetscErrorCode DMMoFEMGetDestroyProblem (DM dm, PetscBool *destroy_problem)
 
PetscErrorCode DMMoFEMSetSquareProblem (DM dm, PetscBool square_problem)
 set squared problemIt if true is assumed that matrix has the same indexing on rows and columns. This reduces interprocessor communication. More...
 
PetscErrorCode DMMoFEMGetSquareProblem (DM dm, PetscBool *square_problem)
 get squared problemIt if true is assumed that matrix has the same indexing on rows and columns. This reduces interprocessor communication. More...
 
PetscErrorCode DMMoFEMResolveSharedFiniteElements (DM dm, const char fe_name[])
 Resolve shared entities. More...
 
DEPRECATED PetscErrorCode DMMoFEMResolveSharedEntities (DM dm, const char fe_name[])
 
PetscErrorCode DMMoFEMGetProblemFiniteElementLayout (DM dm, const char fe_name[], PetscLayout *layout)
 Get finite elements layout in the problem. More...
 
PetscErrorCode DMMoFEMAddElement (DM dm, const char fe_name[])
 add element to dm More...
 
PetscErrorCode DMMoFEMUnSetElement (DM dm, const char fe_name[])
 unset element from dm More...
 
PetscErrorCode DMoFEMMeshToLocalVector (DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
 set local (or ghosted) vector values on mesh for partition only More...
 
PetscErrorCode DMoFEMMeshToGlobalVector (DM dm, Vec g, InsertMode mode, ScatterMode scatter_mode)
 set ghosted vector values on all existing mesh entities More...
 
PetscErrorCode DMoFEMPreProcessFiniteElements (DM dm, MoFEM::FEMethod *method)
 execute finite element method for each element in dm (problem) More...
 
PetscErrorCode DMoFEMPostProcessFiniteElements (DM dm, MoFEM::FEMethod *method)
 execute finite element method for each element in dm (problem) More...
 
PetscErrorCode DMoFEMLoopFiniteElementsUpAndLowRank (DM dm, const char fe_name[], MoFEM::FEMethod *method, int low_rank, int up_rank)
 Executes FEMethod for finite elements in DM. More...
 
PetscErrorCode DMoFEMLoopFiniteElementsUpAndLowRank (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, int low_rank, int up_rank)
 Executes FEMethod for finite elements in DM. More...
 
PetscErrorCode DMoFEMLoopFiniteElements (DM dm, const char fe_name[], MoFEM::FEMethod *method)
 Executes FEMethod for finite elements in DM. More...
 
PetscErrorCode DMoFEMLoopFiniteElements (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method)
 Executes FEMethod for finite elements in DM. More...
 
PetscErrorCode DMoFEMLoopDofs (DM dm, const char field_name[], MoFEM::DofMethod *method)
 execute method for dofs on field in problem More...
 
PetscErrorCode DMMoFEMKSPSetComputeRHS (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 Set compute operator for KSP solver via sub-matrix and IS. More...
 
PetscErrorCode DMMoFEMKSPSetComputeRHS (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 set KSP right hand side evaluation function More...
 
PetscErrorCode DMMoFEMKSPSetComputeOperators (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 Set KSP operators and push mofem finite element methods. More...
 
PetscErrorCode DMMoFEMKSPSetComputeOperators (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 Set KSP operators and push mofem finite element methods. More...
 
PetscErrorCode DMMoFEMSNESSetFunction (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 set SNES residual evaluation function More...
 
PetscErrorCode DMMoFEMSNESSetFunction (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 set SNES residual evaluation function More...
 
PetscErrorCode DMMoFEMSNESSetJacobian (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 set SNES Jacobian evaluation function More...
 
PetscErrorCode DMMoFEMSNESSetJacobian (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 set SNES Jacobian evaluation function More...
 
PetscErrorCode DMMoFEMTSSetIFunction (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 set TS implicit function evaluation function More...
 
PetscErrorCode DMMoFEMTSSetIFunction (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 set TS implicit function evaluation function More...
 
PetscErrorCode DMMoFEMTSSetIJacobian (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 set TS Jacobian evaluation function More...
 
PetscErrorCode DMMoFEMTSSetIJacobian (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 set TS Jacobian evaluation function More...
 
PetscErrorCode DMMoFEMTSSetRHSFunction (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 set TS the right hand side function More...
 
PetscErrorCode DMMoFEMTSSetRHSFunction (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 set TS the right hand side function More...
 
PetscErrorCode DMMoFEMTSSetRHSJacobian (DM dm, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 set TS the right hand side jacobian More...
 
PetscErrorCode DMMoFEMTSSetRHSJacobian (DM dm, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 set TS the right hand side jacobian More...
 
PetscErrorCode DMMoFEMTSSetMonitor (DM dm, TS ts, const std::string fe_name, boost::shared_ptr< MoFEM::FEMethod > method, boost::shared_ptr< MoFEM::BasicMethod > pre_only, boost::shared_ptr< MoFEM::BasicMethod > post_only)
 Set Monitor To TS solver. More...
 
PetscErrorCode DMMoFEMTSSetMonitor (DM dm, TS ts, const char fe_name[], MoFEM::FEMethod *method, MoFEM::BasicMethod *pre_only, MoFEM::BasicMethod *post_only)
 Set Monitor To TS solver. More...
 
PetscErrorCode DMMoFEMGetKspCtx (DM dm, MoFEM::KspCtx **ksp_ctx)
 get MoFEM::KspCtx data structure More...
 
PetscErrorCode DMMoFEMGetKspCtx (DM dm, const boost::shared_ptr< MoFEM::KspCtx > &ksp_ctx)
 get MoFEM::KspCtx data structure More...
 
PetscErrorCode DMMoFEMSetKspCtx (DM dm, boost::shared_ptr< MoFEM::KspCtx > &ksp_ctx)
 set MoFEM::KspCtx data structure More...
 
PetscErrorCode DMMoFEMGetSnesCtx (DM dm, MoFEM::SnesCtx **snes_ctx)
 get MoFEM::SnesCtx data structure More...
 
PetscErrorCode DMMoFEMGetSnesCtx (DM dm, const boost::shared_ptr< MoFEM::SnesCtx > &snes_ctx)
 get MoFEM::SnesCtx data structure More...
 
PetscErrorCode DMMoFEMSetSnesCtx (DM dm, boost::shared_ptr< MoFEM::SnesCtx > &snes_ctx)
 Set MoFEM::SnesCtx data structure. More...
 
PetscErrorCode DMMoFEMGetTsCtx (DM dm, MoFEM::TsCtx **ts_ctx)
 get MoFEM::TsCtx data structure More...
 
PetscErrorCode DMMoFEMGetTsCtx (DM dm, const boost::shared_ptr< MoFEM::TsCtx > &ts_ctx)
 get MoFEM::TsCtx data structure More...
 
PetscErrorCode DMMoFEMSetTsCtx (DM dm, boost::shared_ptr< MoFEM::TsCtx > &ts_ctx)
 Set MoFEM::TsCtx data structureIt take over pointer, do not delete it, DM will destroy pointer when is destroyed. More...
 
PetscErrorCode DMMoFEMSetIsPartitioned (DM dm, PetscBool is_partitioned)
 
PetscErrorCode DMMoFEMGetIsPartitioned (DM dm, PetscBool *is_partitioned)
 
PetscErrorCode DMSetOperators_MoFEM (DM dm)
 Set operators for MoFEM dm. More...
 
PetscErrorCode DMCreate_MoFEM (DM dm)
 Create dm data structure with MoFEM data structure. More...
 
PetscErrorCode DMDestroy_MoFEM (DM dm)
 Destroys dm with MoFEM data structure. More...
 
PetscErrorCode DMCreateGlobalVector_MoFEM (DM dm, Vec *g)
 DMShellSetCreateGlobalVectorsets the routine to create a global vector associated with the shell DM. More...
 
PetscErrorCode DMCreateGlobalVector_MoFEM (DM dm, SmartPetscObj< Vec > &g_ptr)
 DMShellSetCreateGlobalVectorsets the routine to create a global vector associated with the shell DM. More...
 
PetscErrorCode DMCreateLocalVector_MoFEM (DM dm, Vec *l)
 DMShellSetCreateLocalVectorsets the routine to create a local vector associated with the shell DM. More...
 
PetscErrorCode DMCreateMatrix_MoFEM (DM dm, Mat *M)
 
PetscErrorCode DMCreateMatrix_MoFEM (DM dm, SmartPetscObj< Mat > &M)
 
PetscErrorCode DMSetFromOptions_MoFEM (DM dm)
 
PetscErrorCode DMSetUp_MoFEM (DM dm)
 
PetscErrorCode DMSubDMSetUp_MoFEM (DM subdm)
 
PetscErrorCode DMMoFEMAddSubFieldRow (DM dm, const char field_name[], EntityType lo_type=MBVERTEX, EntityType hi_type=MBMAXTYPE)
 
PetscErrorCode DMMoFEMAddSubFieldCol (DM dm, const char field_name[], EntityType lo_type=MBVERTEX, EntityType hi_type=MBMAXTYPE)
 
PetscErrorCode DMMoFEMGetIsSubDM (DM dm, PetscBool *is_sub_dm)
 
PetscErrorCode DMMoFEMGetSubRowIS (DM dm, IS *is)
 get sub problem is More...
 
PetscErrorCode DMMoFEMGetSubColIS (DM dm, IS *is)
 get sub problem is More...
 
PetscErrorCode DMMoFEMAddRowCompositeProblem (DM dm, const char prb_name[])
 Add problem to composite DM on rowThis create block on row with DOFs from problem of given name. More...
 
PetscErrorCode DMMoFEMAddColCompositeProblem (DM dm, const char prb_name[])
 Add problem to composite DM on colThis create block on col with DOFs from problem of given name. More...
 
PetscErrorCode DMMoFEMGetIsCompDM (DM dm, PetscBool *is_comp_dm)
 Get if this DM is composite DM. More...
 
PetscErrorCode DMGlobalToLocalBegin_MoFEM (DM dm, Vec, InsertMode, Vec)
 
PetscErrorCode DMGlobalToLocalEnd_MoFEM (DM dm, Vec, InsertMode, Vec)
 
PetscErrorCode DMLocalToGlobalBegin_MoFEM (DM, Vec, InsertMode, Vec)
 
PetscErrorCode DMLocalToGlobalEnd_MoFEM (DM, Vec, InsertMode, Vec)
 
PetscErrorCode DMCreateFieldIS_MoFEM (DM dm, PetscInt *numFields, char ***fieldNames, IS **fields)
 
PetscErrorCode DMMoFEMGetFieldIS (DM dm, RowColData rc, const char field_name[], IS *is)
 get field is in the problem More...
 
PetscErrorCode DMMoFEMSetVerbosity (DM dm, const int verb)
 Set verbosity level. More...
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMKSPSetComputeRHS (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMKSPSetComputeOperators (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMSNESSetFunction (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMSNESSetJacobian (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMTSSetIFunction (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMTSSetIJacobian (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMTSSetRHSFunction (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMTSSetRHSJacobian (DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode DMMoFEMTSSetMonitor (DM dm, TS ts, S fe_name, T0 method, T1 pre_only, T2 post_only)
 
PetscErrorCode KspRhs (KSP ksp, Vec f, void *ctx)
 Run over elements in the lists. More...
 
PetscErrorCode KspMat (KSP ksp, Mat A, Mat B, void *ctx)
 Run over elenents in the list. More...
 
PetscErrorCode SnesRhs (SNES snes, Vec x, Vec f, void *ctx)
 This is MoFEM implementation for the right hand side (residual vector) evaluation in SNES solver. More...
 
PetscErrorCode SnesMat (SNES snes, Vec x, Mat A, Mat B, void *ctx)
 This is MoFEM implementation for the left hand side (tangent matrix) evaluation in SNES solver. More...
 
MoFEMErrorCode SnesMoFEMSetAssemblyType (SNES snes, MatAssemblyType type)
 Set assembly type at the end of SnesMat. More...
 
MoFEMErrorCode SnesMoFEMSetBehavior (SNES snes, MoFEMTypes bh)
 Set behavior if finite element in sequence does not exist. More...
 
PetscErrorCode TsSetIFunction (TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
 Set IFunction for TS solver. More...
 
PetscErrorCode TsSetIJacobian (TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
 Set function evaluating jacobina in TS solver. More...
 
PetscErrorCode TsMonitorSet (TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
 Set monitor for TS solver. More...
 
PetscErrorCode TsSetRHSFunction (TS ts, PetscReal t, Vec u, Vec F, void *ctx)
 TS solver function. More...
 
PetscErrorCode TsSetRHSJacobian (TS ts, PetscReal t, Vec u, Mat A, Mat B, void *ctx)
 TS solver function. More...
 
DEPRECATED PetscErrorCode f_TSSetIFunction (TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
 \deprecate Do not use, change to TsSetIFunction More...
 
DEPRECATED PetscErrorCode f_TSSetIJacobian (TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
 
DEPRECATED PetscErrorCode f_TSMonitorSet (TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
 

Variables

DEPRECATED typedef DataForcesAndSourcesCore DataForcesAndSurcesCore
 
DEPRECATED typedef FlatPrismElementForcesAndSourcesCore FlatPrismElementForcesAndSurcesCore
 USe FlatPrismElementForcesAndSourcesCore. More...
 
DEPRECATED typedef ForcesAndSourcesCore ForcesAndSurcesCore
 
DEPRECATED typedef DofMethod EntMethod
 
DEPRECATED typedef Problem MoFEMProblem
 
const EntityHandle no_handle = 0
 No entity handle is indicated by zero handle, i.e. root meshset. More...
 
static const MOFEMuuid IDD_UNKNOWN_BASE_FUNCTION
 
static const MOFEMuuid IDD_TET_BASE_FUNCTION
 
static const MOFEMuuid IDD_TRI_BASE_FUNCTION
 
static const MOFEMuuid IDD_EDGE_BASE_FUNCTION
 
static const MOFEMuuid IDD_FATPRISM_BASE_FUNCTION
 
static const MOFEMuuid IDD_FLATPRISM_BASE_FUNCTION
 
static const int edges_conn [] = {0, 1, 1, 2, 2, 0, 0, 3, 1, 3, 2, 3}
 
static const int oposite_edge [] = {5, 3, 4, 1, 2, 0}
 
static const int edge_permutations [6][6]
 
static const int edge_mirror_cross [6] = {0, 3, 4, 1, 2, 5}
 
static const int edge_mirror_vertical [6] = {0, 4, 3, 2, 1, 5}
 
static const int cyclic_node_rotate_face_3 [3][4]
 
static const int cyclic_edge_rotate_face_3 [3][6]
 
static const char edge_bits_mark [] = {1, 2, 4, 8, 16, 32}
 
static const MOFEMuuid IDD_JACOBI_BASE_FUNCTION
 
static const MOFEMuuid IDD_INTEGRATED_JACOBI_BASE_FUNCTION
 
static const MOFEMuuid IDD_LEGENDRE_BASE_FUNCTION = MOFEMuuid(BitIntefaceId(LEGENDRE_BASE_FUNCTION_INTERFACE))
 
static const MOFEMuuid IDD_LOBATTO_BASE_FUNCTION = MOFEMuuid(BitIntefaceId(LOBATTO_BASE_FUNCTION_INTERFACE))
 
static const MOFEMuuid IDD_KERNEL_BASE_FUNCTION = MOFEMuuid(BitIntefaceId(KERNEL_BASE_FUNCTION_INTERFACE))
 
static const MOFEMuuid IDD_MOFEMBitLevelCoupler = MOFEMuuid( BitIntefaceId(BITLEVELCOUPLER_INTERFACE) )
 
static const MOFEMuuid IDD_MOFEMBitRefManager
 
static const MOFEMuuid IDD_MOFEMComm = MOFEMuuid(BitIntefaceId(COMM_INTERFACE))
 
static const MOFEMuuid IDD_MOFEMCoordsSystemsManager
 
static const MOFEMuuid IDD_MOFEMCutMesh
 
static const MOFEMuuid IDD_MOFEMFieldBlas
 
static const MOFEMuuid IDD_MOFEMFieldEvaluator
 
static const MOFEMuuid IDD_MOFEMCoreInterface
 
static const MOFEMuuid IDD_MOFEMDeprecatedCoreInterface
 
static const MOFEMuuid IDD_MOFEMISManager
 
static const MOFEMuuid IDD_MOFEMKspMethod
 
static const MOFEMuuid IDD_MOFEMSnesMethod
 
static const MOFEMuuid IDD_MOFEMTsMethod = MOFEMuuid(BitIntefaceId(TS_METHOD))
 
static const MOFEMuuid IDD_MOFEMBasicMethod
 
static const MOFEMuuid IDD_MOFEMFEMethod = MOFEMuuid(BitIntefaceId(FE_METHOD))
 
static const MOFEMuuid IDD_MOFEMEntityMethod
 
static const MOFEMuuid IDD_MOFEMDofMethod
 
static const MOFEMuuid IDD_MOFEMMatrixManager
 
static const MOFEMuuid IDD_MOFEMMedInterface
 
static const MOFEMuuid IDD_MOFEMMeshRefine
 
static const MOFEMuuid IDD_MOFEMMeshsetsManager
 
static const MOFEMuuid IDD_MOFEMNodeMerger
 
static const MOFEMuuid IDD_MOFEMPrismInterface
 
static const MOFEMuuid IDD_MOFEMPrismsFromSurface
 
static const MOFEMuuid IDD_MOFEMProblemsManager
 
static const MOFEMuuid IDD_MOFEMSeriesRecorder
 
static const MOFEMuuid IDD_MOFEMSimple
 
static const MOFEMuuid IDD_MOFEMTetGegInterface
 
static const MOFEMuuid IDD_MOFEMTools = MOFEMuuid(BitIntefaceId(TOOLS))
 
static const MOFEMuuid IDD_MOFEMUnknown
 
static const MOFEMuuid IDD_MOFEMVEC
 
const int prism_adj_edges [] = {6, 7, 8, -1, -1, -1, 0, 1, 2}
 
const int prism_edges_conn [6][2]
 
static moab::Error error
 
auto createSmartDM
 Creates smart DM object. More...
 
auto createSmartGhostVector
 Create smart ghost vector. More...
 
auto smartVectorDuplicate
 Create duplicate vector of smart vector. More...
 
auto createTS
 
auto createSNES
 
auto createKSP
 
static const MOFEMuuid IDD_DMCTX = MOFEMuuid(BitIntefaceId(DMCTX_INTERFACE))
 

Detailed Description

implementation of Data Operators for Forces and Sources

Create adjacent matrices using different indices.

name space of MoFEM library functions and classes

file DataOperators.cpp

The MoFEM package is copyrighted by Lukasz Kaczmarczyk. It can be freely used for educational and research purposes by other institutions. If you use this softwre pleas cite my work.

MoFEM is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MoFEM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MoFEM. If not, see http://www.gnu.org/licenses/

MoFEM is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MoFEM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MoFEM. If not, see http://www.gnu.org/licenses/

MoFEM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MoFEM. If not, see http://www.gnu.org/licenses/

Typedef Documentation

◆ BasicMethodsSequence

Definition at line 108 of file AuxPETSc.hpp.

◆ CoordSys_multiIndex

typedef multi_index_container< boost::shared_ptr<CoordSys>, indexed_by< ordered_unique<tag<Meshset_mi_tag>, member<CoordSys, EntityHandle, &CoordSys::meshSet> >, ordered_unique< tag<CoordSysName_mi_tag>, const_mem_fun<CoordSys, boost::string_ref, &CoordSys::getNameRef> > > > MoFEM::CoordSys_multiIndex

Definition at line 139 of file CoordSysMultiIndices.hpp.

◆ CubitMeshSet_multiIndex

Stores data about meshsets (see CubitMeshSets) storing data about boundary conditions, interfaces, sidesets, nodests, blocksets.

Parameters
Meshset_mi_tagindex by meshset handle
CubitMeshSets_mi_tagindex by bc type, see CubitBC
CubitMeshSets_mask_meshset_mi_tagindex by NODESET, SIDESET, BLOCKSET only
CubitMeshSets_nameindex by meshset name
Composite_Cubit_msId_And_MeshSetType_mi_tagindex by meshset id and type NODESET, SIDESET or BLOCKSET

Example:

MeshsetsManager *m_mng;
ierr = m_field.getInterface(m_mng); CHKERRG(ierr);
CubitMeshSet_multiIndex &meshsets_index = m_mng->etMeshsetsMultindex();
CubitMeshSet_multiIndex::index<CubitMeshSets_mask_meshset_mi_tag>::type::iterator
mit,hi_mit; mit =
meshsets_index.get<CubitMeshSets_mask_meshset_mi_tag>().lower_bound(BLOCKSET);
hi_mit =
meshsets_index.get<CubitMeshSets_mask_meshset_mi_tag>().upper_bound(BLOCKSET);
// Make a loop over all BLOCKSET
for(;mit!=hi_mit;mit++) {
int id = mit->getMeshsetId(); // get blockset id
EntityHandle handle = mit->getMeshset(); // get block meshset
std::vector< double > attributes;
// get block attributes
ierr = mit->getAttributes(attributes); CHKERRG(ierr);
// do something
}

Definition at line 396 of file BCMultiIndices.hpp.

◆ CubitMeshsetById

typedef CubitMeshSet_multiIndex::index<CubitMeshSets_mi_tag>::type MoFEM::CubitMeshsetById

Definition at line 34 of file MeshsetsManager.hpp.

◆ CubitMeshsetByMask

typedef CubitMeshSet_multiIndex::index<CubitMeshSets_mask_meshset_mi_tag>::type MoFEM::CubitMeshsetByMask

Definition at line 28 of file MeshsetsManager.hpp.

◆ CubitMeshsetByName

typedef CubitMeshSet_multiIndex::index<CubitMeshSets_name>::type MoFEM::CubitMeshsetByName

Definition at line 31 of file MeshsetsManager.hpp.

◆ CubitMeshsetByType

typedef CubitMeshSet_multiIndex::index<CubitMeshSets_mi_tag>::type MoFEM::CubitMeshsetByType

Definition at line 25 of file MeshsetsManager.hpp.

◆ DofsAllocator

typedef ublas::unbounded_array< boost::shared_ptr<const FEDofEntity>, std::allocator<boost::shared_ptr<const FEDofEntity> > > MoFEM::DofsAllocator

Definition at line 32 of file DataStructures.hpp.

◆ FEMethodsSequence

Definition at line 107 of file AuxPETSc.hpp.

◆ Field_multiIndex_view

typedef multi_index_container< boost::shared_ptr<Field>, indexed_by< ordered_unique<tag<BitFieldId_mi_tag>, const_mem_fun<Field, const BitFieldId &, &Field::getId>, LtBit<BitFieldId> > > > MoFEM::Field_multiIndex_view

Definition at line 538 of file FieldMultiIndices.hpp.

◆ FieldEntity_multiIndex_ent_view

typedef multi_index_container< boost::shared_ptr<FieldEntity>, indexed_by< sequenced<>, ordered_non_unique< tag<Ent_mi_tag>, const_mem_fun<FieldEntity, EntityHandle, &FieldEntity::getEnt> > > > MoFEM::FieldEntity_multiIndex_ent_view

Definition at line 886 of file EntsMultiIndices.hpp.

◆ FieldEntity_multiIndex_spaceType_view

typedef multi_index_container< boost::shared_ptr<FieldEntity>, indexed_by< sequenced<>, ordered_non_unique< tag<Composite_EntType_and_Space_mi_tag>, composite_key<FieldEntity, const_mem_fun<FieldEntity::interface_type_RefEntity, EntityType, &FieldEntity::getEntType>, const_mem_fun<FieldEntity::interface_type_Field, FieldSpace, &FieldEntity::getSpace> > > > > MoFEM::FieldEntity_multiIndex_spaceType_view

Definition at line 907 of file EntsMultiIndices.hpp.

◆ FieldEntity_vector_view

typedef std::vector<boost::weak_ptr<FieldEntity> > MoFEM::FieldEntity_vector_view

Definition at line 909 of file EntsMultiIndices.hpp.

◆ NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique

Definition at line 740 of file DofsMultiIndices.hpp.

◆ NumeredDofEntity_multiIndex_idx_view_hashed

typedef multi_index_container< boost::shared_ptr<NumeredDofEntity>, indexed_by<hashed_unique<const_mem_fun<NumeredDofEntity, DofIdx, &NumeredDofEntity::getDofIdx> > > > MoFEM::NumeredDofEntity_multiIndex_idx_view_hashed

Definition at line 727 of file DofsMultiIndices.hpp.

◆ NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique

typedef multi_index_container< boost::shared_ptr<NumeredDofEntity>, indexed_by<ordered_non_unique<const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getPetscLocalDofIdx> > > > MoFEM::NumeredDofEntity_multiIndex_petsc_local_dof_view_ordered_non_unique

Definition at line 733 of file DofsMultiIndices.hpp.

◆ NumeredDofEntity_multiIndex_uid_view_ordered

typedef multi_index_container< boost::shared_ptr<NumeredDofEntity>, indexed_by<ordered_unique< const_mem_fun<NumeredDofEntity::interface_type_DofEntity, const UId &, &NumeredDofEntity::getGlobalUniqueId> > > > MoFEM::NumeredDofEntity_multiIndex_uid_view_ordered

Definition at line 721 of file DofsMultiIndices.hpp.

◆ RefElement_multiIndex_parents_view

Definition at line 213 of file FEMultiIndices.hpp.

◆ RefEntity_multiIndex_view_by_ordered_parent_entity

typedef multi_index_container< boost::shared_ptr<RefEntity>, indexed_by< ordered_non_unique< const_mem_fun<RefEntity, EntityHandle, &RefEntity::getParentEnt> >, hashed_unique<tag<Composite_EntType_and_ParentEntType_mi_tag>, composite_key<boost::shared_ptr<RefEntity>, const_mem_fun<RefEntity, EntityHandle, &RefEntity::getRefEnt>, const_mem_fun<RefEntity, EntityHandle, &RefEntity::getParentEnt> > > > > MoFEM::RefEntity_multiIndex_view_by_ordered_parent_entity

Definition at line 481 of file EntsMultiIndices.hpp.

◆ RefEntity_multiIndex_view_sequence_ordered_view

typedef multi_index_container< boost::shared_ptr<RefEntity>, indexed_by<sequenced<>, ordered_unique<tag<Ent_mi_tag>, member<RefEntity::BasicEntity, EntityHandle, &RefEntity::ent> > > > MoFEM::RefEntity_multiIndex_view_sequence_ordered_view

Definition at line 489 of file EntsMultiIndices.hpp.

◆ VectorDofs

typedef ublas::vector<boost::shared_ptr<const FEDofEntity>, DofsAllocator> MoFEM::VectorDofs

Definition at line 34 of file DataStructures.hpp.

Function Documentation

◆ constructor_data()

static void MoFEM::constructor_data ( DataForcesAndSourcesCore data,
const EntityType  type 
)
static

Definition at line 40 of file DataStructures.cpp.

41  {
42 
44 
45  data->dataOnEntities[MBENTITYSET].push_back(new EntData());
46 
47  switch (type) {
48  case MBENTITYSET:
49  break;
50  case MBTET:
51  data->dataOnEntities[MBVERTEX].push_back(new EntData());
52  for (int ee = 0; ee != 6; ++ee) {
53  data->dataOnEntities[MBEDGE].push_back(new EntData());
54  }
55  for (int ff = 0; ff != 4; ++ff) {
56  data->dataOnEntities[MBTRI].push_back(new EntData());
57  }
58  data->dataOnEntities[MBTET].push_back(new EntData());
59  break;
60  case MBTRI:
61  data->dataOnEntities[MBVERTEX].push_back(new EntData());
62  for (int ee = 0; ee != 3; ++ee) {
63  data->dataOnEntities[MBEDGE].push_back(new EntData());
64  }
65  data->dataOnEntities[MBTRI].push_back(new EntData());
66  break;
67  case MBEDGE:
68  data->dataOnEntities[MBVERTEX].push_back(new EntData());
69  data->dataOnEntities[MBEDGE].push_back(new EntData());
70  break;
71  case MBVERTEX:
72  data->dataOnEntities[MBVERTEX].push_back(new EntData());
73  break;
74  case MBPRISM:
75  data->dataOnEntities[MBVERTEX].push_back(new EntData());
76  for (int ee = 0; ee != 9; ++ee) {
77  data->dataOnEntities[MBEDGE].push_back(new EntData());
78  }
79  for (int qq = 0; qq != 5; ++qq) {
80  data->dataOnEntities[MBQUAD].push_back(new EntData());
81  }
82  for (int ff = 0; ff != 5; ++ff) {
83  data->dataOnEntities[MBTRI].push_back(new EntData());
84  }
85  data->dataOnEntities[MBPRISM].push_back(new EntData());
86  break;
87  default:
89  }
90 }
DataForcesAndSourcesCore::EntData EntData

◆ constructor_derived_data()

static void MoFEM::constructor_derived_data ( DerivedDataForcesAndSourcesCore derived_data,
const boost::shared_ptr< DataForcesAndSourcesCore > &  data_ptr 
)
static

Definition at line 104 of file DataStructures.cpp.

106  {
107 
109  using DerivedEntData = DerivedDataForcesAndSourcesCore::DerivedEntData;
110 
111  for (int tt = MBVERTEX; tt != MBMAXTYPE; ++tt) {
112  auto &ent_data = data_ptr->dataOnEntities[tt];
113  auto &derived_ent_data = derived_data->dataOnEntities[tt];
114  for (auto &e : ent_data) {
115  boost::shared_ptr<EntData> ent_data_ptr(data_ptr, &e);
116  derived_ent_data.push_back(new DerivedEntData(ent_data_ptr));
117  }
118  }
119 }
DataForcesAndSourcesCore::EntData EntData

◆ dEterminant()

template<class T >
static double MoFEM::dEterminant ( T t)
static

Calculate the determinant of a 3x3 matrix or a tensor of rank 2.

Template Parameters
T
Parameters
t
Returns
double
Examples
EshelbianOperators.cpp, and EshelbianPlasticity.cpp.

Definition at line 388 of file Templates.hpp.

388  {
389  return t(0, 0) * t(1, 1) * t(2, 2) + t(1, 0) * t(2, 1) * t(0, 2) +
390  t(2, 0) * t(0, 1) * t(1, 2) - t(0, 0) * t(2, 1) * t(1, 2) -
391  t(2, 0) * t(1, 1) * t(0, 2) - t(1, 0) * t(0, 1) * t(2, 2);
392 }

◆ determinantTensor2by2()

template<class T1 , class T2 >
MoFEMErrorCode MoFEM::determinantTensor2by2 ( T1 &  t,
T2 &  det 
)

Calculate determinant 2 by 2.

Definition at line 431 of file Templates.hpp.

431  {
433  det = t(0, 0) * t(1, 1) - t(0, 1) * t(1, 0);
435 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ determinantTensor3by3()

template<class T1 , class T2 >
MoFEMErrorCode MoFEM::determinantTensor3by3 ( T1 &  t,
T2 &  det 
)

Calculate determinant 3 by 3.

Examples
EshelbianOperators.cpp, HookeElement.cpp, HookeElement.hpp, lorentz_force.cpp, Remodeling.cpp, and Remodeling.hpp.

Definition at line 418 of file Templates.hpp.

418  {
420  det = +t(0, 0) * t(1, 1) * t(2, 2) + t(1, 0) * t(2, 1) * t(0, 2) +
421  t(2, 0) * t(0, 1) * t(1, 2) - t(0, 0) * t(2, 1) * t(1, 2) -
422  t(2, 0) * t(1, 1) * t(0, 2) - t(1, 0) * t(0, 1) * t(2, 2);
424 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ DMMoFEMGetDestroyProblem()

PetscErrorCode MoFEM::DMMoFEMGetDestroyProblem ( DM  dm,
PetscBool *  destroy_problem 
)

Get if problem will be destroyed with DM

Parameters
dmthe DM object
destroyreturn if PETSC_TRUE problem is destroyed
Returns
error code

Definition at line 358 of file DMMMoFEM.cpp.

358  {
360  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
362  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
363  *destroy_problem = dm_field->destroyProblem;
365 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ DMMoFEMGetSubColIS()

PetscErrorCode MoFEM::DMMoFEMGetSubColIS ( DM  dm,
IS *  is 
)

get sub problem is

Parameters
dmhas to be created with DMMoFEMSetSquareProblem
isreturn is on the row
Returns
error code

Returns IS with global indices of the DM used to create SubDM

Definition at line 260 of file DMMMoFEM.cpp.

260  {
262  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
264  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
265  if (dm_field->isSubDM != PETSC_TRUE) {
266  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
267  "This DM is not created as a SubDM");
268  }
269  if (dm_field->isProblemBuild != PETSC_TRUE) {
270  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "Problem is not build");
271  }
272  boost::shared_ptr<Problem::SubProblemData> sub_data =
273  dm_field->problemPtr->getSubData();
274  CHKERR sub_data->getColIs(is);
276 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMGetSubRowIS()

PetscErrorCode MoFEM::DMMoFEMGetSubRowIS ( DM  dm,
IS *  is 
)

get sub problem is

Parameters
dmhas to be created with DMMoFEMSetSquareProblem
isreturn is on the row
Returns
error code

Returns IS with global indices of the DM used to create SubDM

Examples
analytical_poisson_field_split.cpp.

Definition at line 242 of file DMMMoFEM.cpp.

242  {
244  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
246  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
247  if (dm_field->isSubDM != PETSC_TRUE) {
248  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
249  "This DM is not created as a SubDM");
250  }
251  if (dm_field->isProblemBuild != PETSC_TRUE) {
252  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "Problem is not build");
253  }
254  boost::shared_ptr<Problem::SubProblemData> sub_data =
255  dm_field->problemPtr->getSubData();
256  CHKERR sub_data->getRowIs(is);
258 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMKSPSetComputeOperators()

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMKSPSetComputeOperators ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 567 of file DMMMoFEM.cpp.

568  {
569  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
571  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
572  if (pre_only) {
573  dm_field->kspCtx->get_preProcess_to_do_Mat().push_back(pre_only);
574  }
575  if (method) {
576  dm_field->kspCtx->get_loops_to_do_Mat().push_back(
577  PairNameFEMethodPtr(fe_name, method));
578  }
579  if (post_only) {
580  dm_field->kspCtx->get_postProcess_to_do_Mat().push_back(post_only);
581  }
582  CHKERR DMKSPSetComputeOperators(dm, KspMat, dm_field->kspCtx.get());
584 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
PetscErrorCode KspMat(KSP ksp, Mat A, Mat B, void *ctx)
Run over elenents in the list.
Definition: KspCtx.cpp:71
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMKSPSetComputeRHS()

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMKSPSetComputeRHS ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 526 of file DMMMoFEM.cpp.

527  {
528  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
530  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
531  if (pre_only) {
532  dm_field->kspCtx->get_preProcess_to_do_Rhs().push_back(pre_only);
533  }
534  if (method) {
535  dm_field->kspCtx->get_loops_to_do_Rhs().push_back(
536  PairNameFEMethodPtr(fe_name, method));
537  }
538  if (post_only) {
539  dm_field->kspCtx->get_postProcess_to_do_Rhs().push_back(post_only);
540  }
541  CHKERR DMKSPSetComputeRHS(dm, KspRhs, dm_field->kspCtx.get());
543 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
PetscErrorCode KspRhs(KSP ksp, Vec f, void *ctx)
Run over elements in the lists.
Definition: KspCtx.cpp:23
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMResolveSharedEntities()

PetscErrorCode MoFEM::DMMoFEMResolveSharedEntities ( DM  dm,
const char  fe_name[] 
)
Deprecated:
Use DMMoFEMResolveSharedFiniteElements

Definition at line 386 of file DMMMoFEM.cpp.

386  {
387  return DMMoFEMResolveSharedFiniteElements(dm, fe_name);
388 }
PetscErrorCode DMMoFEMResolveSharedFiniteElements(DM dm, const char fe_name[])
Resolve shared entities.
Definition: DMMMoFEM.cpp:376

◆ DMMoFEMSetDestroyProblem()

PetscErrorCode MoFEM::DMMoFEMSetDestroyProblem ( DM  dm,
PetscBool  destroy_problem 
)

If this is set to PETSC_TRUE problem is deleted with DM

Parameters
dmthe DM object
destroyif PETSC_TRUE problem is destroyed
Returns
error code
Examples
EshelbianPlasticity.cpp.

Definition at line 349 of file DMMMoFEM.cpp.

349  {
351  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
353  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
354  dm_field->destroyProblem = destroy_problem;
356 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ DMMoFEMSetVerbosity()

PetscErrorCode MoFEM::DMMoFEMSetVerbosity ( DM  dm,
const int  verb 
)

Set verbosity level.

Parameters
dm
verbsee VERBOSITY_LEVELS for list of the levels
Returns
PetscErrorCode

Definition at line 1307 of file DMMMoFEM.cpp.

1307  {
1308  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
1310  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
1311  dm_field->verbosity = verb;
1313 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ DMMoFEMSNESSetFunction()

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMSNESSetFunction ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 607 of file DMMMoFEM.cpp.

608  {
609  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
611  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
612  if (pre_only) {
613  dm_field->snesCtx->get_preProcess_to_do_Rhs().push_back(pre_only);
614  }
615  if (method) {
616  dm_field->snesCtx->get_loops_to_do_Rhs().push_back(
617  PairNameFEMethodPtr(fe_name, method));
618  }
619  if (post_only) {
620  dm_field->snesCtx->get_postProcess_to_do_Rhs().push_back(post_only);
621  }
622  CHKERR DMSNESSetFunction(dm, SnesRhs, dm_field->snesCtx.get());
624 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407
PetscErrorCode SnesRhs(SNES snes, Vec x, Vec f, void *ctx)
This is MoFEM implementation for the right hand side (residual vector) evaluation in SNES solver.
Definition: SnesCtx.cpp:23

◆ DMMoFEMSNESSetJacobian()

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMSNESSetJacobian ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 648 of file DMMMoFEM.cpp.

649  {
650  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
652  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
653  if (pre_only) {
654  dm_field->snesCtx->get_preProcess_to_do_Mat().push_back(pre_only);
655  }
656  if (method) {
657  dm_field->snesCtx->get_loops_to_do_Mat().push_back(
658  PairNameFEMethodPtr(fe_name, method));
659  }
660  if (post_only) {
661  dm_field->snesCtx->get_postProcess_to_do_Mat().push_back(post_only);
662  }
663  CHKERR DMSNESSetJacobian(dm, SnesMat, dm_field->snesCtx.get());
665 }
PetscErrorCode SnesMat(SNES snes, Vec x, Mat A, Mat B, void *ctx)
This is MoFEM implementation for the left hand side (tangent matrix) evaluation in SNES solver.
Definition: SnesCtx.cpp:121
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMTSSetIFunction()

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMTSSetIFunction ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 689 of file DMMMoFEM.cpp.

690  {
691  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
693  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
694  if (pre_only) {
695  dm_field->tsCtx->get_preProcess_to_do_IFunction().push_back(pre_only);
696  }
697  if (method) {
698  dm_field->tsCtx->get_loops_to_do_IFunction().push_back(
699  PairNameFEMethodPtr(fe_name, method));
700  }
701  if (post_only) {
702  dm_field->tsCtx->get_postProcess_to_do_IFunction().push_back(post_only);
703  }
704  CHKERR DMTSSetIFunction(dm, TsSetIFunction, dm_field->tsCtx.get());
706 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
PetscErrorCode TsSetIFunction(TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
Set IFunction for TS solver.
Definition: TsCtx.cpp:17
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMTSSetIJacobian()

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMTSSetIJacobian ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 732 of file DMMMoFEM.cpp.

733  {
734  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
736  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
737  if (pre_only) {
738  dm_field->tsCtx->get_preProcess_to_do_IJacobian().push_back(pre_only);
739  }
740  if (method) {
741  dm_field->tsCtx->get_loops_to_do_IJacobian().push_back(
742  PairNameFEMethodPtr(fe_name, method));
743  }
744  if (post_only) {
745  dm_field->tsCtx->get_postProcess_to_do_IJacobian().push_back(post_only);
746  }
747  CHKERR DMTSSetIJacobian(dm, TsSetIJacobian, dm_field->tsCtx.get());
749 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407
PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
Set function evaluating jacobina in TS solver.
Definition: TsCtx.cpp:108

◆ DMMoFEMTSSetMonitor() [1/3]

PetscErrorCode MoFEM::DMMoFEMTSSetMonitor ( DM  dm,
TS  ts,
const std::string  fe_name,
boost::shared_ptr< MoFEM::FEMethod method,
boost::shared_ptr< MoFEM::BasicMethod pre_only,
boost::shared_ptr< MoFEM::BasicMethod post_only 
)

Set Monitor To TS solver.

See PETSc documentaton here

Parameters
dm
tstime solver
fe_name
method
pre_only
post_only
Returns
PetscErrorCod
Examples
reaction_diffusion_equation.cpp.

Definition at line 880 of file DMMMoFEM.cpp.

883  {
884  return DMMoFEMTSSetMonitor<const std::string,
885  boost::shared_ptr<MoFEM::FEMethod>,
886  boost::shared_ptr<MoFEM::BasicMethod>,
887  boost::shared_ptr<MoFEM::BasicMethod>>(
888  dm, ts, fe_name, method, pre_only, post_only);
890 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static PetscErrorCode DMMoFEMTSSetMonitor(DM dm, TS ts, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:853

◆ DMMoFEMTSSetMonitor() [2/3]

PetscErrorCode MoFEM::DMMoFEMTSSetMonitor ( DM  dm,
TS  ts,
const char  fe_name[],
MoFEM::FEMethod method,
MoFEM::BasicMethod pre_only,
MoFEM::BasicMethod post_only 
)

Set Monitor To TS solver.

See PETSc documentaton here

Parameters
dm
tstime solver
fe_name
method
pre_only
post_only
Returns
PetscErrorCod

Definition at line 869 of file DMMMoFEM.cpp.

872  {
873  return DMMoFEMTSSetMonitor<const char *, MoFEM::FEMethod *,
875  dm, ts, fe_name, method, pre_only, post_only);
877 }
structure for User Loop Methods on finite elementsIt can be used to calculate stiffness matrices,...
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static PetscErrorCode DMMoFEMTSSetMonitor(DM dm, TS ts, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:853
Data structure to exchange data between mofem and User Loop Methods.It allows to exchange data betwee...

◆ DMMoFEMTSSetMonitor() [3/3]

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMTSSetMonitor ( DM  dm,
TS  ts,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 853 of file DMMMoFEM.cpp.

854  {
855  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
857  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
858  if (pre_only)
859  dm_field->tsCtx->get_preProcess_to_do_Monitor().push_back(pre_only);
860  if (method)
861  dm_field->tsCtx->get_loops_to_do_Monitor().push_back(
862  PairNameFEMethodPtr(fe_name, method));
863  if (post_only)
864  dm_field->tsCtx->get_postProcess_to_do_Monitor().push_back(post_only);
865  CHKERR TSMonitorSet(ts, TsMonitorSet, dm_field->tsCtx.get(), PETSC_NULL);
867 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
Set monitor for TS solver.
Definition: TsCtx.cpp:190
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMTSSetRHSFunction() [1/3]

PetscErrorCode MoFEM::DMMoFEMTSSetRHSFunction ( DM  dm,
const std::string  fe_name,
boost::shared_ptr< MoFEM::FEMethod method,
boost::shared_ptr< MoFEM::BasicMethod pre_only,
boost::shared_ptr< MoFEM::BasicMethod post_only 
)

set TS the right hand side function

See petsc documentation

Parameters
dm
fe_name
method
pre_only
post_only
Returns
PetscErrorCode
Examples
reaction_diffusion_equation.cpp.

Definition at line 800 of file DMMMoFEM.cpp.

803  {
804  return DMMoFEMTSSetRHSFunction<const std::string,
805  boost::shared_ptr<MoFEM::FEMethod>,
806  boost::shared_ptr<MoFEM::BasicMethod>,
807  boost::shared_ptr<MoFEM::BasicMethod>>(
808  dm, fe_name, method, pre_only, post_only);
810 }
static PetscErrorCode DMMoFEMTSSetRHSFunction(DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:773
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ DMMoFEMTSSetRHSFunction() [2/3]

PetscErrorCode MoFEM::DMMoFEMTSSetRHSFunction ( DM  dm,
const char  fe_name[],
MoFEM::FEMethod method,
MoFEM::BasicMethod pre_only,
MoFEM::BasicMethod post_only 
)

set TS the right hand side function

See petsc documentation

Parameters
dm
fe_name
method
pre_only
post_only
Returns
PetscErrorCode

Definition at line 789 of file DMMMoFEM.cpp.

792  {
793  return DMMoFEMTSSetRHSFunction<const char *, MoFEM::FEMethod *,
795  dm, fe_name, method, pre_only, post_only);
797 }
structure for User Loop Methods on finite elementsIt can be used to calculate stiffness matrices,...
static PetscErrorCode DMMoFEMTSSetRHSFunction(DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:773
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
Data structure to exchange data between mofem and User Loop Methods.It allows to exchange data betwee...

◆ DMMoFEMTSSetRHSFunction() [3/3]

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMTSSetRHSFunction ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 773 of file DMMMoFEM.cpp.

774  {
775  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
777  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
778  if (pre_only)
779  dm_field->tsCtx->get_preProcess_to_do_RHSFunction().push_back(pre_only);
780  if (method)
781  dm_field->tsCtx->get_loops_to_do_RHSFunction().push_back(
782  PairNameFEMethodPtr(fe_name, method));
783  if (post_only)
784  dm_field->tsCtx->get_postProcess_to_do_RHSFunction().push_back(post_only);
785  CHKERR DMTSSetRHSFunction(dm, TsSetRHSFunction, dm_field->tsCtx.get());
787 }
PetscErrorCode TsSetRHSFunction(TS ts, PetscReal t, Vec u, Vec F, void *ctx)
TS solver function.
Definition: TsCtx.cpp:241
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ DMMoFEMTSSetRHSJacobian() [1/3]

PetscErrorCode MoFEM::DMMoFEMTSSetRHSJacobian ( DM  dm,
const std::string  fe_name,
boost::shared_ptr< MoFEM::FEMethod method,
boost::shared_ptr< MoFEM::BasicMethod pre_only,
boost::shared_ptr< MoFEM::BasicMethod post_only 
)

set TS the right hand side jacobian

See petsc documentation

Parameters
dm
fe_name
method
pre_only
post_only
Returns
PetscErrorCode

Definition at line 840 of file DMMMoFEM.cpp.

843  {
844  return DMMoFEMTSSetRHSJacobian<const std::string,
845  boost::shared_ptr<MoFEM::FEMethod>,
846  boost::shared_ptr<MoFEM::BasicMethod>,
847  boost::shared_ptr<MoFEM::BasicMethod>>(
848  dm, fe_name, method, pre_only, post_only);
850 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static PetscErrorCode DMMoFEMTSSetRHSJacobian(DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:813

◆ DMMoFEMTSSetRHSJacobian() [2/3]

PetscErrorCode MoFEM::DMMoFEMTSSetRHSJacobian ( DM  dm,
const char  fe_name[],
MoFEM::FEMethod method,
MoFEM::BasicMethod pre_only,
MoFEM::BasicMethod post_only 
)

set TS the right hand side jacobian

See petsc documentation

Parameters
dm
fe_name
method
pre_only
post_only
Returns
PetscErrorCode

Definition at line 829 of file DMMMoFEM.cpp.

832  {
833  return DMMoFEMTSSetRHSJacobian<const char *, MoFEM::FEMethod *,
835  dm, fe_name, method, pre_only, post_only);
837 }
structure for User Loop Methods on finite elementsIt can be used to calculate stiffness matrices,...
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
static PetscErrorCode DMMoFEMTSSetRHSJacobian(DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:813
Data structure to exchange data between mofem and User Loop Methods.It allows to exchange data betwee...

◆ DMMoFEMTSSetRHSJacobian() [3/3]

template<class S , class T0 , class T1 , class T2 >
static PetscErrorCode MoFEM::DMMoFEMTSSetRHSJacobian ( DM  dm,
fe_name,
T0  method,
T1  pre_only,
T2  post_only 
)
static

Definition at line 813 of file DMMMoFEM.cpp.

814  {
815  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
817  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
818  if (pre_only)
819  dm_field->tsCtx->get_preProcess_to_do_RHSFunction().push_back(pre_only);
820  if (method)
821  dm_field->tsCtx->get_loops_to_do_RHSFunction().push_back(
822  PairNameFEMethodPtr(fe_name, method));
823  if (post_only)
824  dm_field->tsCtx->get_postProcess_to_do_RHSFunction().push_back(post_only);
825  CHKERR DMTSSetRHSJacobian(dm, TsSetRHSJacobian, dm_field->tsCtx.get());
827 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
PetscErrorCode TsSetRHSJacobian(TS ts, PetscReal t, Vec u, Mat A, Mat B, void *ctx)
TS solver function.
Definition: TsCtx.cpp:325
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ f_TSMonitorSet()

DEPRECATED PetscErrorCode MoFEM::f_TSMonitorSet ( TS  ts,
PetscInt  step,
PetscReal  t,
Vec  u,
void *  ctx 
)
Deprecated:
Do not use, change to TsMonitorSet
Examples
Remodeling.cpp.

Definition at line 320 of file TsCtx.hpp.

321  {
322  return TsMonitorSet(ts, step, t, u, ctx);
323 }
PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
Set monitor for TS solver.
Definition: TsCtx.cpp:190

◆ f_TSSetIFunction()

DEPRECATED PetscErrorCode MoFEM::f_TSSetIFunction ( TS  ts,
PetscReal  t,
Vec  u,
Vec  u_t,
Vec  F,
void *  ctx 
)

\deprecate Do not use, change to TsSetIFunction

Definition at line 307 of file TsCtx.hpp.

308  {
309  return TsSetIFunction(ts, t, u, u_t, F, ctx);
310 }
PetscErrorCode TsSetIFunction(TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
Set IFunction for TS solver.
Definition: TsCtx.cpp:17

◆ f_TSSetIJacobian()

DEPRECATED PetscErrorCode MoFEM::f_TSSetIJacobian ( TS  ts,
PetscReal  t,
Vec  u,
Vec  u_t,
PetscReal  a,
Mat  A,
Mat  B,
void *  ctx 
)
Deprecated:
Do not use, change to TsSetIJacobian

Definition at line 313 of file TsCtx.hpp.

315  {
316  return TsSetIJacobian(ts, t, u, u_t, a, A, B, ctx);
317 }
PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
Set function evaluating jacobina in TS solver.
Definition: TsCtx.cpp:108

◆ fNBEDGE_AINSWORTH_HCURL()

int MoFEM::fNBEDGE_AINSWORTH_HCURL ( int  P)

Definition at line 61 of file CoreDataStructures.hpp.

61 { return NBEDGE_AINSWORTH_HCURL(P); }
#define NBEDGE_AINSWORTH_HCURL(P)

◆ fNBEDGE_DEMKOWICZ_HCURL()

int MoFEM::fNBEDGE_DEMKOWICZ_HCURL ( int  P)

Definition at line 69 of file CoreDataStructures.hpp.

69 { return NBEDGE_DEMKOWICZ_HCURL(P); }
#define NBEDGE_DEMKOWICZ_HCURL(P)

◆ fNBEDGE_H1()

int MoFEM::fNBEDGE_H1 ( int  P)

number of approx. functions for H1 space on edge

Definition at line 48 of file CoreDataStructures.hpp.

48 { return NBEDGE_H1(P); }
#define NBEDGE_H1(P)
Numer of base function on edge for H1 space.

◆ fNBEDGE_HDIV()

int MoFEM::fNBEDGE_HDIV ( int  P)

number of approx. functions for HDIV space on edge

Definition at line 85 of file CoreDataStructures.hpp.

85  {
86  (void)P;
87  return NBEDGE_HDIV(P);
88 }
#define NBEDGE_HDIV(P)

◆ fNBEDGE_L2()

int MoFEM::fNBEDGE_L2 ( int  P)

Definition at line 43 of file CoreDataStructures.hpp.

43 { return NBEDGE_L2(P); }
#define NBEDGE_L2(P)
Number of base functions on edge fro L2 space.

◆ fNBENTITY_GENERIC()

int MoFEM::fNBENTITY_GENERIC ( int  P)

Definition at line 28 of file CoreDataStructures.hpp.

28  {
29  (void)P;
30  return 0;
31 }

◆ fNBENTITYSET_NOFIELD()

int MoFEM::fNBENTITYSET_NOFIELD ( int  P)

Definition at line 32 of file CoreDataStructures.hpp.

32  {
33  (void)P;
34  return 1;
35 }

◆ fNBFACEQUAD_H1()

int MoFEM::fNBFACEQUAD_H1 ( int  P)

Definition at line 51 of file CoreDataStructures.hpp.

51 { return NBFACEQUAD_H1(P); }
#define NBFACEQUAD_H1(P)
Number of base functions on quad for H1 space.

◆ fNBFACETRI_AINSWORTH_HCURL()

int MoFEM::fNBFACETRI_AINSWORTH_HCURL ( int  P)

Definition at line 62 of file CoreDataStructures.hpp.

62  {
63  return NBFACETRI_AINSWORTH_HCURL(P);
64 }
#define NBFACETRI_AINSWORTH_HCURL(P)

◆ fNBFACETRI_AINSWORTH_HDIV()

int MoFEM::fNBFACETRI_AINSWORTH_HDIV ( int  P)

number of approx. functions for HDIV space on face

Definition at line 90 of file CoreDataStructures.hpp.

90  {
91  return NBFACETRI_AINSWORTH_HDIV(P);
92 }
#define NBFACETRI_AINSWORTH_HDIV(P)

◆ fNBFACETRI_DEMKOWICZ_HCURL()

int MoFEM::fNBFACETRI_DEMKOWICZ_HCURL ( int  P)

Definition at line 70 of file CoreDataStructures.hpp.

70  {
71  return NBFACETRI_DEMKOWICZ_HCURL(P);
72 }
#define NBFACETRI_DEMKOWICZ_HCURL(P)

◆ fNBFACETRI_DEMKOWICZ_HDIV()

int MoFEM::fNBFACETRI_DEMKOWICZ_HDIV ( int  P)

Definition at line 98 of file CoreDataStructures.hpp.

98  {
99  return NBFACETRI_DEMKOWICZ_HDIV(P);
100 }
#define NBFACETRI_DEMKOWICZ_HDIV(P)

◆ fNBFACETRI_H1()

int MoFEM::fNBFACETRI_H1 ( int  P)

number of approx. functions for H1 space on face

Definition at line 50 of file CoreDataStructures.hpp.

50 { return NBFACETRI_H1(P); }
#define NBFACETRI_H1(P)
Number of base function on triangle for H1 space.

◆ fNBFACETRI_L2()

int MoFEM::fNBFACETRI_L2 ( int  P)

Definition at line 42 of file CoreDataStructures.hpp.

42 { return NBFACETRI_L2(P); }
#define NBFACETRI_L2(P)
Number of base functions on triangle for L2 space.

◆ fNBVERTEX_H1()

int MoFEM::fNBVERTEX_H1 ( int  P)

number of approx. functions for H1 space on vertex

Definition at line 46 of file CoreDataStructures.hpp.

46 { return (P == 1) ? 1 : 0; }

◆ fNBVERTEX_HCURL()

int MoFEM::fNBVERTEX_HCURL ( int  P)

number of approx. functions for HCURL space on vertex

Definition at line 57 of file CoreDataStructures.hpp.

57  {
58  (void)P;
59  return 0;
60 }

◆ fNBVERTEX_HDIV()

int MoFEM::fNBVERTEX_HDIV ( int  P)

number of approx. functions for HDIV space on vertex

zero number of digrees of freedom on vertex for that space

Definition at line 80 of file CoreDataStructures.hpp.

80  {
81  (void)P;
82  return 0;
83 }

◆ fNBVERTEX_L2()

int MoFEM::fNBVERTEX_L2 ( int  P)

Definition at line 37 of file CoreDataStructures.hpp.

37  {
38  (void)P;
39  return 0;
40 }

◆ fNBVOLUMEPRISM_H1()

int MoFEM::fNBVOLUMEPRISM_H1 ( int  P)

Definition at line 54 of file CoreDataStructures.hpp.

54 { return NBVOLUMEPRISM_H1(P); }
#define NBVOLUMEPRISM_H1(P)
Number of base functions on prism for H1 space.

◆ fNBVOLUMETET_AINSWORTH_HCURL()

int MoFEM::fNBVOLUMETET_AINSWORTH_HCURL ( int  P)

Definition at line 65 of file CoreDataStructures.hpp.

65  {
67 }
#define NBVOLUMETET_AINSWORTH_HCURL(P)

◆ fNBVOLUMETET_AINSWORTH_HDIV()

int MoFEM::fNBVOLUMETET_AINSWORTH_HDIV ( int  P)

number of approx. functions for HDIV space on volume

Definition at line 94 of file CoreDataStructures.hpp.

94  {
96 }
#define NBVOLUMETET_AINSWORTH_HDIV(P)

◆ fNBVOLUMETET_DEMKOWICZ_HCURL()

int MoFEM::fNBVOLUMETET_DEMKOWICZ_HCURL ( int  P)

Definition at line 73 of file CoreDataStructures.hpp.

73  {
75 }
#define NBVOLUMETET_DEMKOWICZ_HCURL(P)

◆ fNBVOLUMETET_DEMKOWICZ_HDIV()

int MoFEM::fNBVOLUMETET_DEMKOWICZ_HDIV ( int  P)

number of approx. functions for HDIV space on volume

Definition at line 102 of file CoreDataStructures.hpp.

102  {
103  return NBVOLUMETET_DEMKOWICZ_HDIV(P);
104 }
#define NBVOLUMETET_DEMKOWICZ_HDIV(P)

◆ fNBVOLUMETET_H1()

int MoFEM::fNBVOLUMETET_H1 ( int  P)

number of approx. functions for H1 space on volume

Definition at line 53 of file CoreDataStructures.hpp.

53 { return NBVOLUMETET_H1(P); }
#define NBVOLUMETET_H1(P)
Number of base functions on tetrahedron fro H1 space.

◆ fNBVOLUMETET_L2()

int MoFEM::fNBVOLUMETET_L2 ( int  P)

Definition at line 41 of file CoreDataStructures.hpp.

41 { return NBVOLUMETET_L2(P); }
#define NBVOLUMETET_L2(P)
Number of base functions on tetrahedron for L2 space.

◆ get_sub_iface_options_imp() [1/2]

template<class T >
static auto MoFEM::get_sub_iface_options_imp ( T *const  ptr,
int   
) -> decltype(ptr->getSubInterfaceOptions())
static

Definition at line 72 of file Core.cpp.

73  {
74  return ptr->getSubInterfaceOptions();
75 };

◆ get_sub_iface_options_imp() [2/2]

template<class T >
static auto MoFEM::get_sub_iface_options_imp ( T *const  ptr,
long   
) -> MoFEMErrorCode
static

Definition at line 80 of file Core.cpp.

80  {
81  return 0;
82 };

◆ get_tag_ptr()

void* MoFEM::get_tag_ptr ( moab::Interface &  moab,
Tag  th,
EntityHandle  ent,
int tag_size 
)

Definition at line 26 of file EntsMultiIndices.cpp.

27  {
28  ApproximationOrder *ret_val;
29  rval = moab.tag_get_by_ptr(th, &ent, 1, (const void **)&ret_val, tag_size);
30  if (rval != MB_SUCCESS) {
31  *tag_size = 0;
32  return NULL;
33  } else {
34  return ret_val;
35  }
36 }
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:37
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84

◆ get_value()

template<class TYPE >
static MoFEMErrorCode MoFEM::get_value ( MatrixDouble pts_x,
MatrixDouble pts_t,
TYPE *  ctx 
)
static

Definition at line 53 of file JacobiPolynomial.cpp.

54  {
56  ctx->baseFunPtr->resize(pts_x.size2(), ctx->P + 1, false);
57  ctx->baseDiffFunPtr->resize(pts_x.size2(), ctx->dIm * (ctx->P + 1), false);
58  if (pts_x.size1() != pts_t.size1() || pts_x.size2() != pts_t.size2()) {
59  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
60  "Inconsistent size of arguments");
61  }
62  double *l = NULL;
63  double *diff_l = NULL;
64  for (unsigned int gg = 0; gg < pts_x.size2(); gg++) {
65  if (ctx->baseFunPtr)
66  l = &((*ctx->baseFunPtr)(gg, 0));
67  if (ctx->baseDiffFunPtr)
68  diff_l = &((*ctx->baseDiffFunPtr)(gg, 0));
69  ierr = (ctx->basePolynomialsType1)(ctx->P, ctx->aLpha, pts_x(0, gg),
70  pts_t(0, gg), ctx->diffX, ctx->diffT, l,
71  diff_l, ctx->dIm);
72  CHKERRG(ierr);
73  }
75 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508

◆ getFTensor0FromVec()

template<class T , class A >
static FTensor::Tensor0<FTensor::PackPtr<double *, 1> > MoFEM::getFTensor0FromVec ( ublas::vector< T, A > &  data)
static

Get tensor rank 0 (scalar) form data vector.

Example how to use it.

vec.resize(nb_gauss_pts,false);
vec.clear();
auto t0 = getFTensor0FromData(data);
for(int gg = 0;gg!=nb_gauss_pts;gg++) {
++t0;
}
Examples
ElasticityMixedFormulation.hpp, EshelbianOperators.cpp, HookeElement.cpp, HookeElement.hpp, PoissonOperators.hpp, reaction_diffusion_equation.cpp, Remodeling.cpp, testing_jacobian_of_hook_scaled_with_density_element.cpp, and UnsaturatedFlow.hpp.

Definition at line 142 of file Templates.hpp.

142  {
143  static_assert(!std::is_same<T, T>::value, "not implemented");
145 }

◆ getFTensor0FromVec< double, DoubleAllocator >()

Definition at line 149 of file Templates.hpp.

150  {
151  return FTensor::Tensor0<FTensor::PackPtr<double *, 1>>(&*data.data().begin());
152 }

◆ getFTensor1FromMat() [1/2]

template<int Tensor_Dim, class T , class L , class A >
static FTensor::Tensor1<FTensor::PackPtr<T *, 1>, Tensor_Dim> MoFEM::getFTensor1FromMat ( ublas::matrix< T, L, A > &  data)
static

Get tensor rank 1 (vector) form data matrix.

Definition at line 159 of file Templates.hpp.

159  {
160  static_assert(!std::is_same<T, T>::value, "not implemented");
161 }

◆ getFTensor1FromMat() [2/2]

template<int Tensor_Dim>
static FTensor::Tensor1<FTensor::PackPtr<double *, 1>, Tensor_Dim> MoFEM::getFTensor1FromMat ( MatrixDouble data)
static

Get tensor rank 1 (vector) form data matrix (specialization)

Definition at line 168 of file Templates.hpp.

168  {
169  return getFTensor1FromMat<Tensor_Dim, double, ublas::row_major,
170  DoubleAllocator>(data);
171 }
static FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor1FromMat(MatrixDouble &data)
Get tensor rank 1 (vector) form data matrix (specialization)
Definition: Templates.hpp:168
std::vector< double, std::allocator< double > > DoubleAllocator
Definition: Types.hpp:70

◆ getFTensor1FromMat< 2, double, ublas::row_major, DoubleAllocator >()

template<>
FTensor::Tensor1<FTensor::PackPtr<double *, 1>, 2> MoFEM::getFTensor1FromMat< 2, double, ublas::row_major, DoubleAllocator > ( MatrixDouble data)

Definition at line 186 of file Templates.hpp.

187  {
188  if (data.size1() != 2) {
189  THROW_MESSAGE("Wrong size of data matrix");
190  }
191  return FTensor::Tensor1<FTensor::PackPtr<double *, 1>, 2>(&data(0, 0),
192  &data(1, 0));
193 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620

◆ getFTensor1FromMat< 3, double, ublas::row_major, DoubleAllocator >()

template<>
FTensor::Tensor1<FTensor::PackPtr<double *, 1>, 3> MoFEM::getFTensor1FromMat< 3, double, ublas::row_major, DoubleAllocator > ( MatrixDouble data)

Definition at line 175 of file Templates.hpp.

176  {
177  if (data.size1() != 3) {
178  THROW_MESSAGE("Wrong size of data matrix");
179  }
181  &data(0, 0), &data(1, 0), &data(2, 0));
182 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620

◆ getFTensor1FromPtr()

template<int DIM>
FTensor::Tensor1<FTensor::PackPtr<double *, DIM>, DIM> MoFEM::getFTensor1FromPtr ( double ptr)

Make Tensor1 from pointer.

Template Parameters
DIM
Parameters
ptr
Returns
FTensor::Tensor2<FTensor::PackPtr<double *, 3 * DIM>, 3, DIM>

Definition at line 334 of file Templates.hpp.

334  {
335  static_assert(DIM != 3, "not implemented");
336 };

◆ getFTensor1FromPtr< 3 >()

Definition at line 340 of file Templates.hpp.

340  {
342  &ptr[HVEC0], &ptr[HVEC1], &ptr[HVEC2]);
343 };

◆ getFTensor2FromMat() [1/5]

template<int Tensor_Dim0, int Tensor_Dim1, class T , class L , class A >
static FTensor::Tensor2<FTensor::PackPtr<T *, 1>, Tensor_Dim0, Tensor_Dim1> MoFEM::getFTensor2FromMat ( ublas::matrix< T, L, A > &  data)
static

Get tensor rank 2 (matrix) form data matrix.

Deprecated:
Name change to getFTensor1FromMat

Definition at line 211 of file Templates.hpp.

211  {
212  static_assert(!std::is_same<T, T>::value, "not implemented");
213 }

◆ getFTensor2FromMat() [2/5]

template<>
FTensor::Tensor2<FTensor::PackPtr<double *, 1>, 3, 3> MoFEM::getFTensor2FromMat ( MatrixDouble data)

Template specialization for getFTensor2FromMat

Definition at line 221 of file Templates.hpp.

221  {
222  if (data.size1() != 9) {
223  THROW_MESSAGE("Wrong size of data matrix; numer of rows is " +
224  boost::lexical_cast<std::string>(data.size1()));
225  }
227  &data(0, 0), &data(1, 0), &data(2, 0), &data(3, 0), &data(4, 0),
228  &data(5, 0), &data(6, 0), &data(7, 0), &data(8, 0));
229 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620

◆ getFTensor2FromMat() [3/5]

template<>
FTensor::Tensor2<FTensor::PackPtr<double *, 1>, 3, 2> MoFEM::getFTensor2FromMat ( MatrixDouble data)

Template specialization for getFTensor2FromMat

Definition at line 236 of file Templates.hpp.

236  {
237  if (data.size1() != 6) {
238  THROW_MESSAGE("Wrong size of data matrix");
239  }
241  &data(0, 0), &data(1, 0), &data(2, 0), &data(3, 0), &data(4, 0),
242  &data(5, 0));
243 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620

◆ getFTensor2FromMat() [4/5]

template<>
FTensor::Tensor2<FTensor::PackPtr<double *, 1>, 2, 2> MoFEM::getFTensor2FromMat ( MatrixDouble data)

Template specialization for getFTensor2FromMat

Definition at line 250 of file Templates.hpp.

250  {
251  if (data.size1() != 4) {
252  THROW_MESSAGE("Wrong size of data matrix");
253  }
255  &data(0, 0), &data(1, 0), &data(2, 0), &data(3, 0));
256 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620

◆ getFTensor2FromMat() [5/5]

template<int Tensor_Dim0, int Tensor_Dim1>
static FTensor::Tensor2<FTensor::PackPtr<double *, 1>, Tensor_Dim0, Tensor_Dim1> MoFEM::getFTensor2FromMat ( MatrixDouble data)
static

Get tensor rank 2 (matrix) form data matrix (specialization)

Definition at line 264 of file Templates.hpp.

264  {
265  return getFTensor2FromMat<Tensor_Dim0, Tensor_Dim1, double, ublas::row_major,
266  DoubleAllocator>(data);
267 }
static FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix (specialization)
Definition: Templates.hpp:264
std::vector< double, std::allocator< double > > DoubleAllocator
Definition: Types.hpp:70

◆ getFTensor2FromPtr()

template<int DIM1, int DIM2>
FTensor::Tensor2<FTensor::PackPtr<double *, DIM1 * DIM2>, DIM1, DIM2> MoFEM::getFTensor2FromPtr ( double ptr)

Make Tensor2 from pointer.

Template Parameters
DIM
Parameters
ptr
Returns
FTensor::Tensor2<FTensor::PackPtr<double *, DIM1 * DIM2>, DIM1, DIM2>

Definition at line 354 of file Templates.hpp.

354  {
355  static_assert(DIM1 != 3, "not implemented");
356  static_assert(DIM2 >= 2 && DIM2 <= 3, "not implemented");
357 };

◆ getFTensor2FromPtr< 3, 2 >()

template<>
FTensor::Tensor2<FTensor::PackPtr<double *, 6>, 3, 2> MoFEM::getFTensor2FromPtr< 3, 2 > ( double ptr)

Definition at line 361 of file Templates.hpp.

361  {
363  &ptr[HVEC0_0], &ptr[HVEC0_1],
364 
365  &ptr[HVEC1_0], &ptr[HVEC1_1],
366 
367  &ptr[HVEC2_0], &ptr[HVEC2_1]);
368 };

◆ getFTensor2FromPtr< 3, 3 >()

template<>
FTensor::Tensor2<FTensor::PackPtr<double *, 9>, 3, 3> MoFEM::getFTensor2FromPtr< 3, 3 > ( double ptr)

Definition at line 372 of file Templates.hpp.

372  {
374  &ptr[HVEC0_0], &ptr[HVEC0_1], &ptr[HVEC0_2],
375 
376  &ptr[HVEC1_0], &ptr[HVEC1_1], &ptr[HVEC1_2],
377 
378  &ptr[HVEC2_0], &ptr[HVEC2_1], &ptr[HVEC2_2]);
379 };

◆ getFTensor2SymmetricFromMat() [1/3]

template<int Tensor_Dim, class T , class L , class A >
static FTensor::Tensor2_symmetric<FTensor::PackPtr<T *, 1>, Tensor_Dim> MoFEM::getFTensor2SymmetricFromMat ( ublas::matrix< T, L, A > &  data)
static

Get symmetric tensor rank 2 (matrix) form data matrix.

Deprecated:
Name change to getFTensor1FromMat

Definition at line 284 of file Templates.hpp.

284  {
285  static_assert(!std::is_same<T, T>::value, "not implemented");
286 }

◆ getFTensor2SymmetricFromMat() [2/3]

template<>
FTensor::Tensor2_symmetric<FTensor::PackPtr<double *, 1>, 3> MoFEM::getFTensor2SymmetricFromMat ( MatrixDouble data)

Get symmetric tensor rank 2 form matrix of for dimension 3.

Specialisation for symmetric tensor 2

Template Parameters

Definition at line 299 of file Templates.hpp.

299  {
300  if (data.size1() != 6) {
301  THROW_MESSAGE("Wrong size of data matrix");
302  }
304  &data(0, 0), &data(1, 0), &data(2, 0), &data(3, 0), &data(4, 0),
305  &data(5, 0));
306 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620

◆ getFTensor2SymmetricFromMat() [3/3]

template<int Tensor_Dim>
static FTensor::Tensor2_symmetric<FTensor::PackPtr<double *, 1>, Tensor_Dim> MoFEM::getFTensor2SymmetricFromMat ( MatrixDouble data)
static

Get symmetric tensor rank 2 form matrix.

Specialisation for symmetric tensor 2

Template Parameters
Tensor_Dim
Parameters
data
Returns
FTensor::Tensor2_symmetric<FTensor::PackPtr<double *, 1>, Tensor_Dim>

Definition at line 320 of file Templates.hpp.

320  {
322  DoubleAllocator>(data);
323 }
static FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor2SymmetricFromMat(MatrixDouble &data)
Get symmetric tensor rank 2 form matrix.
Definition: Templates.hpp:320
std::vector< double, std::allocator< double > > DoubleAllocator
Definition: Types.hpp:70

◆ getMatrixAdaptor()

template<typename T1 >
auto MoFEM::getMatrixAdaptor ( T1  ptr,
const size_t  n,
const size_t  m 
)

Get Matrix adaptor.

double *a;
CHKERR VecGetArray(v,&a);
for(int n = 0; n != nodes; ++n) {
auto F = getMatrixAdaptor(&a[3*3*n], 3, 3);
MatrixDouble C = prod(F, trans(F));
}
CHKERR VecRetsoreArray(v,&a);
Examples
field_evaluator.cpp.

Definition at line 69 of file Templates.hpp.

69  {
70  typedef typename std::remove_pointer<T1>::type T;
71  return MatrixShallowArrayAdaptor<T>(
72  n, m, ublas::shallow_array_adaptor<T>(n * m, ptr));
73 };

◆ getMaxOrder()

template<typename ENTMULTIINDEX >
static int MoFEM::getMaxOrder ( const ENTMULTIINDEX &  multi_index)
static

Definition at line 126 of file ForcesAndSourcesCore.cpp.

126  {
127  int max_order = 0;
128  for (auto ent_field_weak_ptr : multi_index)
129  if (auto e = ent_field_weak_ptr.lock()) {
130  const int order = e->getMaxOrder();
131  max_order = (max_order < order) ? order : max_order;
132  }
133  return max_order;
134 }
const int order
approximation order

◆ getParentEnt()

MoFEMErrorCode MoFEM::getParentEnt ( moab::Interface &  moab,
Range  ents,
std::vector< EntityHandle vec_patent_ent 
)

Definition at line 98 of file EntsMultiIndices.cpp.

99  {
100 
102  Tag th_ref_parent_handle;
103  CHKERR moab.tag_get_handle("_RefParentHandle", th_ref_parent_handle);
104  vec_patent_ent.resize(ents.size());
105  CHKERR moab.tag_get_data(th_ref_parent_handle, ents,
106  &*vec_patent_ent.begin());
108 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

◆ getPetscObject()

template<typename T >
PetscObject MoFEM::getPetscObject ( T  obj)

Definition at line 23 of file AuxPETSc.hpp.

23  {
24  return reinterpret_cast<PetscObject>(obj);
25 }

◆ getVectorAdaptor()

template<typename T1 >
auto MoFEM::getVectorAdaptor ( T1  ptr,
const size_t  n 
)

Get Vector adaptor.

double *a;
CHKERR VecGetArray(v,&a);
for(int n = 0; n != nodes; ++n) {
auto a = getVectorAdaptor(&a[3*n], 3);
double dot = inner_prod(a, a);
}
CHKERR VecRetsoreArray(v,&a);
Examples
EshelbianPlasticity.cpp.

Definition at line 43 of file Templates.hpp.

43  {
44  typedef typename std::remove_pointer<T1>::type T;
45  return VectorShallowArrayAdaptor<T>(n,
46  ublas::shallow_array_adaptor<T>(n, ptr));
47 };

◆ Hcurl_Ainsworth_BubbleFaceFunctions_MBTET()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_BubbleFaceFunctions_MBTET ( int faces_nodes,
int p,
double N,
double diffN,
double phi_f[4],
double diff_phi_f[4],
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Face edge base functions of Hcurl space on face on tetrahedral.

On each face we have P*(P-1) base functions and are 4 faces.

See NBFACETRI_AINSWORTH_EDGE_HCURL

Parameters
face_nodesarray [4*3] of local indices of face nodes
papproximation order
Narray shape functions evaluated at each integration point
diffNderivatives of nodal shape functions
phi_f[4]calculated shape functions for each face
diff_phi_v[4]derivatives of shape functions for each face
nb_integration_ptsnumber of shape functions
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 546 of file Hcurl.cpp.

551  {
552 
554 
557 
558  // double coords[] = { 0,0,0, 1,0,0, 0,1,0, 0,0,1 };
559  // FTensor::Tensor1<double*,3> t_coords[4] = {
560  // FTensor::Tensor1<double*,3>(&coords[0],&coords[ 1],&coords[ 2]),
561  // FTensor::Tensor1<double*,3>(&coords[3],&coords[ 4],&coords[ 5]),
562  // FTensor::Tensor1<double*,3>(&coords[6],&coords[ 7],&coords[ 8]),
563  // FTensor::Tensor1<double*,3>(&coords[9],&coords[10],&coords[11])
564  // };
565  FTensor::Tensor1<double *, 3> t_node_diff_ksi[4] = {
566  FTensor::Tensor1<double *, 3>(&diffN[0], &diffN[1], &diffN[2]),
567  FTensor::Tensor1<double *, 3>(&diffN[3], &diffN[4], &diffN[5]),
568  FTensor::Tensor1<double *, 3>(&diffN[6], &diffN[7], &diffN[8]),
569  FTensor::Tensor1<double *, 3>(&diffN[9], &diffN[10], &diffN[11])};
570  FTensor::Tensor1<double, 3> t_diff_ksi0i, t_diff_ksi0j;
571  FTensor::Tensor1<double, 3> diff_beta_0ij;
572 
575 
576  for (int ff = 0; ff != 4; ff++) {
577 
578  if (NBFACETRI_AINSWORTH_FACE_HCURL(p[ff]) == 0)
579  continue;
580 
581  int n0 = faces_nodes[3 * ff + 0];
582  int n1 = faces_nodes[3 * ff + 1];
583  int n2 = faces_nodes[3 * ff + 2];
584 
585  // tou_0i(i) = t_coords[n1](i)-t_coords[n0](i);
586  // tou_0j(i) = t_coords[n2](i)-t_coords[n0](i);
587  tou_0i(i) = t_node_diff_ksi[n1](i) - t_node_diff_ksi[n0](i);
588  tou_0j(i) = t_node_diff_ksi[n2](i) - t_node_diff_ksi[n0](i);
589 
590  t_diff_ksi0i(i) = t_node_diff_ksi[n1](i) - t_node_diff_ksi[n0](i);
591  t_diff_ksi0j(i) = t_node_diff_ksi[n2](i) - t_node_diff_ksi[n0](i);
592 
593  double psi_l_0i[p[ff] + 1], diff_psi_l_0i[3 * p[ff] + 3];
594  double psi_l_0j[p[ff] + 1], diff_psi_l_0j[3 * p[ff] + 3];
595 
596  FTensor::Tensor1<double *, 3> t_phi_f(&phi_f[ff][0], &phi_f[ff][1],
597  &phi_f[ff][2], 3);
599  &diff_phi_f[ff][0], &diff_phi_f[ff][3], &diff_phi_f[ff][6],
600  &diff_phi_f[ff][1], &diff_phi_f[ff][4], &diff_phi_f[ff][7],
601  &diff_phi_f[ff][2], &diff_phi_f[ff][5], &diff_phi_f[ff][8], 9);
603 
604  for (int ii = 0; ii != nb_integration_pts; ii++) {
605 
606  const int node_shift = ii * 4;
607  const double beta_0ij =
608  N[node_shift + n0] * N[node_shift + n1] * N[node_shift + n2];
609  diff_beta_0ij(i) =
610  t_node_diff_ksi[n0](i) * N[node_shift + n1] * N[node_shift + n2] +
611  N[node_shift + n0] * t_node_diff_ksi[n1](i) * N[node_shift + n2] +
612  N[node_shift + n0] * N[node_shift + n1] * t_node_diff_ksi[n2](i);
613 
614  const double ksi_0i = N[node_shift + n1] - N[node_shift + n0];
615  ierr = base_polynomials(p[ff], ksi_0i, &t_diff_ksi0i(0), psi_l_0i,
616  diff_psi_l_0i, 3);
617  CHKERRG(ierr);
618  const double ksi_0j = N[node_shift + n2] - N[node_shift + n0];
619  ierr = base_polynomials(p[ff], ksi_0j, &t_diff_ksi0j(0), psi_l_0j,
620  diff_psi_l_0j, 3);
621  CHKERRG(ierr);
622 
623  int cc = 0;
624  for (int oo = 0; oo <= (p[ff] - 3); oo++) {
625  FTensor::Tensor1<double *, 3> t_diff_psi_l_0i(
626  &diff_psi_l_0i[0], &diff_psi_l_0i[p[ff] + 1],
627  &diff_psi_l_0i[2 * p[ff] + 2], 1);
628  for (int pp0 = 0; pp0 <= oo; pp0++) {
629  const int pp1 = oo - pp0;
630  if (pp1 >= 0) {
631  FTensor::Tensor1<double *, 3> t_diff_psi_l_0j(
632  &diff_psi_l_0j[pp1], &diff_psi_l_0j[p[ff] + 1 + pp1],
633  &diff_psi_l_0j[2 * p[ff] + 2 + pp1], 1);
634  // base functions
635  const double a = beta_0ij * psi_l_0i[pp0] * psi_l_0j[pp1];
636  t_phi_f(i) = a * tou_0i(i);
637  ++t_phi_f;
638  ++cc;
639  t_phi_f(i) = a * tou_0j(i);
640  ++t_phi_f;
641  ++cc;
642  // diff base functions
643  t_b(j) = diff_beta_0ij(j) * psi_l_0i[pp0] * psi_l_0j[pp1] +
644  beta_0ij * t_diff_psi_l_0i(j) * psi_l_0j[pp1] +
645  beta_0ij * psi_l_0i[pp0] * t_diff_psi_l_0j(j);
646  t_diff_phi_f(i, j) = t_b(j) * tou_0i(i);
647  ++t_diff_phi_f;
648  t_diff_phi_f(i, j) = t_b(j) * tou_0j(i);
649  ++t_diff_phi_f;
650  ++t_diff_psi_l_0i;
651  }
652  }
653  }
654  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_FACE_HCURL(p[ff]);
655  if (cc != nb_base_fun_on_face) {
656  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
657  "Wrong number of base functions %d != %d", cc,
658  nb_base_fun_on_face);
659  }
660  }
661  }
663 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
const int N
Definition: speed_test.cpp:3
#define NBFACETRI_AINSWORTH_FACE_HCURL(P)

◆ Hcurl_Ainsworth_BubbleFaceFunctions_MBTET_ON_FACE()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_BubbleFaceFunctions_MBTET_ON_FACE ( int faces_nodes,
int  p,
double N,
double diffN,
double phi_f,
double diff_phi_f,
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Face edge base functions of Hcurl space on face.

On each face we have P*(P-1) base functions and are 4 faces.

See NBFACETRI_AINSWORTH_EDGE_HCURL

Parameters
face_nodesarray [4*3] of local indices of face nodes
papproximation order
Narray shape functions evaluated at each integration point
diffNderivatives of nodal shape functions
phi_f[4]calculated shape functions for each face
diff_phi_v[4]derivatives of shape functions for each face
nb_integration_ptsnumber of shape functions
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 665 of file Hcurl.cpp.

670  {
671 
673 
674  double zero = 0;
675  FTensor::Tensor2<double *, 3, 3> t_node_diff_ksi(&diffN[0], &diffN[1], &zero,
676  &diffN[2], &diffN[3], &zero,
677  &diffN[4], &diffN[5], &zero);
678 
681 
682  if (NBFACETRI_AINSWORTH_FACE_HCURL(p) == 0)
684 
688 
689  const int node0 = faces_nodes[0];
690  const int node1 = faces_nodes[1];
691  const int node2 = faces_nodes[2];
692 
695 
696  tou_0i(i) = t_node_diff_ksi(N1, i) - t_node_diff_ksi(N0, i);
697  ;
698  tou_0j(i) = t_node_diff_ksi(N2, i) - t_node_diff_ksi(N0, i);
699  ;
700 
701  double psi_l_0i[p + 1], psi_l_0j[p + 1];
702  double diff_psi_l_0i[2 * p + 2], diff_psi_l_0j[2 * p + 2];
703  FTensor::Tensor1<double *, 3> t_phi_f(&phi_f[0], &phi_f[1], &phi_f[2], 3);
705  &diff_phi_f[HVEC0_0], &diff_phi_f[HVEC0_1], &diff_phi_f[HVEC1_0],
706  &diff_phi_f[HVEC1_1], &diff_phi_f[HVEC2_0], &diff_phi_f[HVEC2_1]);
707 
708  double diff_ksi_0i[] = {t_node_diff_ksi(node1, 0) - t_node_diff_ksi(node0, 0),
709  t_node_diff_ksi(node1, 1) -
710  t_node_diff_ksi(node0, 1)};
711  double diff_ksi_0j[] = {t_node_diff_ksi(node2, 0) - t_node_diff_ksi(node0, 0),
712  t_node_diff_ksi(node2, 1) -
713  t_node_diff_ksi(node0, 1)};
714 
715  for (int ii = 0; ii != nb_integration_pts; ii++) {
716 
717  const int node_shift = ii * 3;
718  const double n0 = N[node_shift + node0];
719  const double n1 = N[node_shift + node1];
720  const double n2 = N[node_shift + node2];
721 
722  const double beta_0ij = n0 * n1 * n2;
723  FTensor::Tensor1<double, 2> diff_beta_0ij(
724  t_node_diff_ksi(node0, 0) * n1 * n2 +
725  n0 * t_node_diff_ksi(node1, 0) * n2 +
726  n0 * n1 * t_node_diff_ksi(node2, 0),
727  t_node_diff_ksi(node0, 1) * n1 * n2 +
728  n0 * t_node_diff_ksi(node1, 1) * n2 +
729  n0 * n1 * t_node_diff_ksi(node2, 1));
730 
731  const double ksi_0i = N[node_shift + node1] - N[node_shift + node0];
732  ierr = base_polynomials(p, ksi_0i, diff_ksi_0i, psi_l_0i, diff_psi_l_0i, 2);
733  CHKERRG(ierr);
734  const double ksi_0j = N[node_shift + node2] - N[node_shift + node0];
735  ierr = base_polynomials(p, ksi_0j, diff_ksi_0j, psi_l_0j, diff_psi_l_0j, 2);
736  CHKERRG(ierr);
737 
738  int cc = 0;
740  for (int oo = 0; oo <= (p - 3); oo++) {
741  for (int pp0 = 0; pp0 <= oo; pp0++) {
742  const int pp1 = oo - pp0;
743  if (pp1 >= 0) {
744  FTensor::Tensor1<double, 2> t_diff_psi_l_0i(
745  diff_psi_l_0i[0 + pp0], diff_psi_l_0i[p + 1 + pp0]);
746  FTensor::Tensor1<double, 2> t_diff_psi_l_0j(
747  diff_psi_l_0j[0 + pp1], diff_psi_l_0j[p + 1 + pp1]);
748  const double a = beta_0ij * psi_l_0i[pp0] * psi_l_0j[pp1];
749  t_diff_a(j) = diff_beta_0ij(j) * psi_l_0i[pp0] * psi_l_0j[pp1] +
750  beta_0ij * psi_l_0i[pp0] * t_diff_psi_l_0j(j) +
751  beta_0ij * psi_l_0j[pp1] * t_diff_psi_l_0i(j);
752 
753  t_phi_f(i) = a * tou_0i(i);
754  t_diff_phi_f(i, j) = tou_0i(i) * t_diff_a(j);
755  ++t_phi_f;
756  ++t_diff_phi_f;
757  ++cc;
758  t_phi_f(i) = a * tou_0j(i);
759  t_diff_phi_f(i, j) = tou_0j(i) * t_diff_a(j);
760  ++t_phi_f;
761  ++t_diff_phi_f;
762  ++cc;
763  }
764  }
765  }
766 
767  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_FACE_HCURL(p);
768  if (cc != nb_base_fun_on_face) {
769  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
770  "Wrong number of base functions %d != %d", cc,
771  nb_base_fun_on_face);
772  }
773  }
774 
776 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
const int N
Definition: speed_test.cpp:3
#define NBFACETRI_AINSWORTH_FACE_HCURL(P)

◆ Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET ( int faces_nodes,
int p,
double N,
double diffN,
double phi_f_e[4][3],
double diff_phi_f_e[4][3],
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Face edge base functions of Hcurl space on tetrahedral.

On each edge we have (P-1) base functions, and each face has 3 edges and are 4 faces on tetrahedral.

See NBFACETRI_AINSWORTH_EDGE_HCURL

Parameters
face_nodesarray [4*3] of local indices of face nodes
papproximation order
Narray shape functions evaluated at each integration point
diffNderivatives of nodal shape functions
phi_f[4]calculated shape functions for each face
diff_phi_v[4]derivatives of shape functions for each face
nb_integration_ptsnumber of shape functions
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 364 of file Hcurl.cpp.

369  {
370 
372  const int edges[3][2] = {{0, 1}, {1, 2}, {2, 0}};
373 
376 
377  FTensor::Tensor1<double *, 3> t_node_diff_ksi[4] = {
378  FTensor::Tensor1<double *, 3>(&diffN[0], &diffN[1], &diffN[2]),
379  FTensor::Tensor1<double *, 3>(&diffN[3], &diffN[4], &diffN[5]),
380  FTensor::Tensor1<double *, 3>(&diffN[6], &diffN[7], &diffN[8]),
381  FTensor::Tensor1<double *, 3>(&diffN[9], &diffN[10], &diffN[11])};
382  FTensor::Tensor1<double, 3> t_edge_diff_ksi;
383  FTensor::Tensor1<double, 3> t_diff_beta_e;
384 
385  for (int ff = 0; ff != 4; ff++) {
386 
387  const int o_nodes[3] = {faces_nodes[3 * ff + 2], faces_nodes[3 * ff + 0],
388  faces_nodes[3 * ff + 1]};
389  FTensor::Tensor1<double *, 3> t_opposite_node_diff[3] = {
390  FTensor::Tensor1<double *, 3>(&diffN[3 * o_nodes[0] + 0],
391  &diffN[3 * o_nodes[0] + 1],
392  &diffN[3 * o_nodes[0] + 2]),
393  FTensor::Tensor1<double *, 3>(&diffN[3 * o_nodes[1] + 0],
394  &diffN[3 * o_nodes[1] + 1],
395  &diffN[3 * o_nodes[1] + 2]),
396  FTensor::Tensor1<double *, 3>(&diffN[3 * o_nodes[2] + 0],
397  &diffN[3 * o_nodes[2] + 1],
398  &diffN[3 * o_nodes[2] + 2])};
399  double psi_l[p[ff] + 1], diff_psi_l[3 * p[ff] + 3];
400 
401  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_EDGE_HCURL(p[ff]);
402  // cerr << nb_base_fun_on_face << " " << p[ff] << endl;
403  if (nb_base_fun_on_face == 0)
404  continue;
405 
406  for (int ee = 0; ee != 3; ee++) {
407 
408  FTensor::Tensor1<double *, 3> t_face_edge_base(
409  &phi_f_e[ff][ee][0], &phi_f_e[ff][ee][1], &phi_f_e[ff][ee][2], 3);
410  FTensor::Tensor2<double *, 3, 3> t_diff_face_edge_base(
411  &diff_phi_f_e[ff][ee][0], &diff_phi_f_e[ff][ee][3],
412  &diff_phi_f_e[ff][ee][6], &diff_phi_f_e[ff][ee][1],
413  &diff_phi_f_e[ff][ee][4], &diff_phi_f_e[ff][ee][7],
414  &diff_phi_f_e[ff][ee][2], &diff_phi_f_e[ff][ee][5],
415  &diff_phi_f_e[ff][ee][8], 9);
416  const int en[] = {faces_nodes[3 * ff + edges[ee][0]],
417  faces_nodes[3 * ff + edges[ee][1]]};
418  t_edge_diff_ksi(i) =
419  t_node_diff_ksi[en[1]](i) - t_node_diff_ksi[en[0]](i);
420 
421  for (int ii = 0; ii != nb_integration_pts; ii++) {
422 
423  const int node_shift = ii * 4;
424  const double n[] = {N[node_shift + faces_nodes[3 * ff + edges[ee][0]]],
425  N[node_shift + faces_nodes[3 * ff + edges[ee][1]]]};
426  const double ksi_0i = n[1] - n[0];
427  ierr = base_polynomials(p[ff], ksi_0i, &t_edge_diff_ksi(0), psi_l,
428  diff_psi_l, 3);
429  CHKERRG(ierr);
430  FTensor::Tensor1<double *, 3> t_diff_psi_l(
431  &diff_psi_l[0], &diff_psi_l[p[ff] + 1], &diff_psi_l[2 * p[ff] + 2],
432  1);
433 
434  const double beta_e = n[0] * n[1];
435  t_diff_beta_e(j) =
436  t_node_diff_ksi[en[0]](j) * n[1] + n[0] * t_node_diff_ksi[en[1]](j);
437 
438  for (int ll = 0; ll != nb_base_fun_on_face; ll++) {
439  // if(ll == nb_base_fun_on_face-1) cerr << psi_l[ll] << endl;
440 
441  t_face_edge_base(i) =
442  beta_e * psi_l[ll] * t_opposite_node_diff[ee](i);
443  ++t_face_edge_base;
444 
445  t_diff_face_edge_base(i, j) =
446  (beta_e * t_diff_psi_l(j) + t_diff_beta_e(j) * psi_l[ll]) *
447  t_opposite_node_diff[ee](i);
448 
449  ++t_diff_face_edge_base;
450  ++t_diff_psi_l;
451  }
452  }
453  }
454  }
455 
457 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
#define NBFACETRI_AINSWORTH_EDGE_HCURL(P)
const int N
Definition: speed_test.cpp:3

◆ Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET_ON_FACE()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET_ON_FACE ( int faces_nodes,
int  p,
double N,
double diffN,
double phi_f_e[3],
double diff_phi_f_e[3],
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Face edge base functions of Hcurl space.

On each edge we have (P-1) base functions, and each face has 3 edges and are 4 faces on tetrahedral.

See NBFACETRI_AINSWORTH_EDGE_HCURL

Parameters
face_nodesarray [4*3] of local indices of face nodes
papproximation order
Narray shape functions evaluated at each integration point
diffNderivatives of nodal shape functions
phi_f[4]calculated shape functions for each face
diff_phi_v[4]derivatives of shape functions for each face
nb_integration_ptsnumber of shape functions
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 459 of file Hcurl.cpp.

464  {
465 
467 
468  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_EDGE_HCURL(p);
469  if (nb_base_fun_on_face == 0)
471 
472  const int edges[3][2] = {{0, 1}, {1, 2}, {2, 0}};
473 
476 
477  const int o_nodes[3] = {2, 0, 1};
478  FTensor::Tensor2<double, 3, 3> t_opposite_node_diff(
479  diffN[2 * o_nodes[0] + 0], diffN[2 * o_nodes[0] + 1], 0.,
480  diffN[2 * o_nodes[1] + 0], diffN[2 * o_nodes[1] + 1], 0.,
481  diffN[2 * o_nodes[2] + 0], diffN[2 * o_nodes[2] + 1], 0.);
482  double psi_l[p + 1];
483  double diff_psi_l[2 * p + 2];
484 
485  FTensor::Tensor1<double *, 3> t_face_edge_base[3] = {
486  FTensor::Tensor1<double *, 3>(&phi_f_e[0][HVEC0], &phi_f_e[0][HVEC1],
487  &phi_f_e[0][HVEC2], 3),
488  FTensor::Tensor1<double *, 3>(&phi_f_e[1][HVEC0], &phi_f_e[1][HVEC1],
489  &phi_f_e[1][HVEC2], 3),
490  FTensor::Tensor1<double *, 3>(&phi_f_e[2][HVEC0], &phi_f_e[2][HVEC1],
491  &phi_f_e[2][HVEC2], 3),
492  };
494  t_diff_face_edge_base[3] = {
496  &diff_phi_f_e[0][HVEC0_0], &diff_phi_f_e[0][HVEC0_1],
497  &diff_phi_f_e[0][HVEC1_0], &diff_phi_f_e[0][HVEC1_1],
498  &diff_phi_f_e[0][HVEC2_0], &diff_phi_f_e[0][HVEC2_1]),
500  &diff_phi_f_e[1][HVEC0_0], &diff_phi_f_e[1][HVEC0_1],
501  &diff_phi_f_e[1][HVEC1_0], &diff_phi_f_e[1][HVEC1_1],
502  &diff_phi_f_e[1][HVEC2_0], &diff_phi_f_e[1][HVEC2_1]),
504  &diff_phi_f_e[2][HVEC0_0], &diff_phi_f_e[2][HVEC0_1],
505  &diff_phi_f_e[2][HVEC1_0], &diff_phi_f_e[2][HVEC1_1],
506  &diff_phi_f_e[2][HVEC2_0], &diff_phi_f_e[2][HVEC2_1])};
507 
508  for (int ee = 0; ee != 3; ee++) {
509 
510  const int node0 = faces_nodes[edges[ee][0]];
511  const int node1 = faces_nodes[edges[ee][1]];
512  double diff_ksi0i[] = {diffN[2 * node1 + 0] - diffN[2 * node0 + 0],
513  diffN[2 * node1 + 1] - diffN[2 * node0 + 1]};
514 
515  for (int ii = 0; ii != nb_integration_pts; ii++) {
516 
517  const int node_shift = ii * 3;
518  const double n0 = N[node_shift + node0];
519  const double n1 = N[node_shift + node1];
520  const double ksi_0i = n1 - n0;
521  ierr = base_polynomials(p, ksi_0i, diff_ksi0i, psi_l, diff_psi_l, 2);
522  CHKERRG(ierr);
523  const double beta_e = n0 * n1;
524  FTensor::Tensor1<double, 2> t_diff_beta_e(
525  diffN[2 * node0 + 0] * n1 + n0 * diffN[2 * node1 + 0],
526  diffN[2 * node0 + 1] * n1 + n0 * diffN[2 * node1 + 1]);
527  FTensor::Tensor1<double *, 2> t_diff_psi_l(&diff_psi_l[0],
528  &diff_psi_l[p + 1], 1);
529 
530  for (int ll = 0; ll != nb_base_fun_on_face; ll++) {
531  t_face_edge_base[ee](i) =
532  beta_e * psi_l[ll] * t_opposite_node_diff(ee, i);
533  t_diff_face_edge_base[ee](i, j) =
534  beta_e * t_opposite_node_diff(ee, i) * t_diff_psi_l(j) +
535  psi_l[ll] * t_opposite_node_diff(ee, i) * t_diff_beta_e(j);
536  ++t_face_edge_base[ee];
537  ++t_diff_face_edge_base[ee];
538  ++t_diff_psi_l;
539  }
540  }
541  }
542 
544 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
#define NBFACETRI_AINSWORTH_EDGE_HCURL(P)
const int N
Definition: speed_test.cpp:3

◆ Hcurl_Ainsworth_EdgeBaseFunctions_MBTET()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_EdgeBaseFunctions_MBTET ( int sense,
int p,
double N,
double diffN,
double edgeN[],
double diff_edgeN[],
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Edge based H-curl base functions on tetrahedral.

Function generates hierarchical base of h-curl comforting functions on tetrahedral edge. For more details see [3].

On each tetrahedral's edge we have P+1 functions. See NBEDGE_AINSWORTH_HCURL

Parameters
sensesense fo edge (i.e. unique orientation)
parray of oder for each edge
Narray shape functions evaluated at each integration point
diffNderivatives of shape functions
edgeNbase functions on edges
diff_edgeNderivatives of edge shape functions
nb_integration_ptsnumber of integration points
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 16 of file Hcurl.cpp.

21  {
23 
24  const int edges_nodes[6][2] = {{0, 1}, {1, 2}, {2, 0},
25  {0, 3}, {1, 3}, {2, 3}};
26  int P[6];
27  for (int ee = 0; ee != 6; ee++)
28  P[ee] = NBEDGE_AINSWORTH_HCURL(p[ee]);
29 
32 
33  FTensor::Tensor1<double *, 3> t_node_diff_ksi[4] = {
34  FTensor::Tensor1<double *, 3>(&diffN[0], &diffN[1], &diffN[2]),
35  FTensor::Tensor1<double *, 3>(&diffN[3], &diffN[4], &diffN[5]),
36  FTensor::Tensor1<double *, 3>(&diffN[6], &diffN[7], &diffN[8]),
37  FTensor::Tensor1<double *, 3>(&diffN[9], &diffN[10], &diffN[11])};
38  double edge_diff_ksi[6][3];
39  FTensor::Tensor1<double *, 3> t_edge_diff_ksi[6] = {
40  FTensor::Tensor1<double *, 3>(&edge_diff_ksi[0][0], &edge_diff_ksi[0][1],
41  &edge_diff_ksi[0][2]),
42  FTensor::Tensor1<double *, 3>(&edge_diff_ksi[1][0], &edge_diff_ksi[1][1],
43  &edge_diff_ksi[1][2]),
44  FTensor::Tensor1<double *, 3>(&edge_diff_ksi[2][0], &edge_diff_ksi[2][1],
45  &edge_diff_ksi[2][2]),
46  FTensor::Tensor1<double *, 3>(&edge_diff_ksi[3][0], &edge_diff_ksi[3][1],
47  &edge_diff_ksi[3][2]),
48  FTensor::Tensor1<double *, 3>(&edge_diff_ksi[4][0], &edge_diff_ksi[4][1],
49  &edge_diff_ksi[4][2]),
50  FTensor::Tensor1<double *, 3>(&edge_diff_ksi[5][0], &edge_diff_ksi[5][1],
51  &edge_diff_ksi[5][2])};
52  for (int ee = 0; ee != 6; ee++) {
53  t_edge_diff_ksi[ee](i) = (t_node_diff_ksi[edges_nodes[ee][1]](i) -
54  t_node_diff_ksi[edges_nodes[ee][0]](i)) *
55  sense[ee];
56  }
57 
58  FTensor::Tensor1<double *, 3> t_edge_n[6] = {
59  FTensor::Tensor1<double *, 3>(&edge_n[0][0], &edge_n[0][1], &edge_n[0][2],
60  3),
61  FTensor::Tensor1<double *, 3>(&edge_n[1][0], &edge_n[1][1], &edge_n[1][2],
62  3),
63  FTensor::Tensor1<double *, 3>(&edge_n[2][0], &edge_n[2][1], &edge_n[2][2],
64  3),
65  FTensor::Tensor1<double *, 3>(&edge_n[3][0], &edge_n[3][1], &edge_n[3][2],
66  3),
67  FTensor::Tensor1<double *, 3>(&edge_n[4][0], &edge_n[4][1], &edge_n[4][2],
68  3),
69  FTensor::Tensor1<double *, 3>(&edge_n[5][0], &edge_n[5][1], &edge_n[5][2],
70  3)};
71  FTensor::Tensor2<double *, 3, 3> t_diff_edge_n[6] = {
73  &diff_edge_n[0][0], &diff_edge_n[0][3], &diff_edge_n[0][6],
74  &diff_edge_n[0][1], &diff_edge_n[0][4], &diff_edge_n[0][7],
75  &diff_edge_n[0][2], &diff_edge_n[0][5], &diff_edge_n[0][8], 9),
77  &diff_edge_n[1][0], &diff_edge_n[1][3], &diff_edge_n[1][6],
78  &diff_edge_n[1][1], &diff_edge_n[1][4], &diff_edge_n[1][7],
79  &diff_edge_n[1][2], &diff_edge_n[1][5], &diff_edge_n[1][8], 9),
81  &diff_edge_n[2][0], &diff_edge_n[2][3], &diff_edge_n[2][6],
82  &diff_edge_n[2][1], &diff_edge_n[2][4], &diff_edge_n[2][7],
83  &diff_edge_n[2][2], &diff_edge_n[2][5], &diff_edge_n[2][8], 9),
85  &diff_edge_n[3][0], &diff_edge_n[3][3], &diff_edge_n[3][6],
86  &diff_edge_n[3][1], &diff_edge_n[3][4], &diff_edge_n[3][7],
87  &diff_edge_n[3][2], &diff_edge_n[3][5], &diff_edge_n[3][8], 9),
89  &diff_edge_n[4][0], &diff_edge_n[4][3], &diff_edge_n[4][6],
90  &diff_edge_n[4][1], &diff_edge_n[4][4], &diff_edge_n[4][7],
91  &diff_edge_n[4][2], &diff_edge_n[4][5], &diff_edge_n[4][8], 9),
93  &diff_edge_n[5][0], &diff_edge_n[5][3], &diff_edge_n[5][6],
94  &diff_edge_n[5][1], &diff_edge_n[5][4], &diff_edge_n[5][7],
95  &diff_edge_n[5][2], &diff_edge_n[5][5], &diff_edge_n[5][8], 9)};
96  FTensor::Tensor1<double, 3> t_psi_e_0, t_psi_e_1;
97  FTensor::Tensor2<double, 3, 3> t_diff_psi_e_0, t_diff_psi_e_1;
98 
99  for (int ii = 0; ii != nb_integration_pts; ii++) {
100 
101  const int node_shift = ii * 4;
102  for (int ee = 0; ee != 6; ee++) {
103 
104  if (P[ee] == 0)
105  continue;
106 
107  t_psi_e_0(i) = (N[node_shift + edges_nodes[ee][1]] *
108  t_node_diff_ksi[edges_nodes[ee][0]](i) -
109  N[node_shift + edges_nodes[ee][0]] *
110  t_node_diff_ksi[edges_nodes[ee][1]](i)) *
111  sense[ee];
112  t_diff_psi_e_0(i, j) = (t_node_diff_ksi[edges_nodes[ee][1]](j) *
113  t_node_diff_ksi[edges_nodes[ee][0]](i) -
114  t_node_diff_ksi[edges_nodes[ee][0]](j) *
115  t_node_diff_ksi[edges_nodes[ee][1]](i)) *
116  sense[ee];
117 
118  t_psi_e_1(i) = N[node_shift + edges_nodes[ee][1]] *
119  t_node_diff_ksi[edges_nodes[ee][0]](i) +
120  N[node_shift + edges_nodes[ee][0]] *
121  t_node_diff_ksi[edges_nodes[ee][1]](i);
122  t_diff_psi_e_1(i, j) = t_node_diff_ksi[edges_nodes[ee][1]](j) *
123  t_node_diff_ksi[edges_nodes[ee][0]](i) +
124  t_node_diff_ksi[edges_nodes[ee][0]](j) *
125  t_node_diff_ksi[edges_nodes[ee][1]](i);
126 
127  (t_edge_n[ee])(i) = t_psi_e_0(i);
128  ++(t_edge_n[ee]);
129  (t_edge_n[ee])(i) = t_psi_e_1(i);
130  ++(t_edge_n[ee]);
131 
132  (t_diff_edge_n[ee])(i, j) = t_diff_psi_e_0(i, j);
133  ++(t_diff_edge_n[ee]);
134  (t_diff_edge_n[ee])(i, j) = t_diff_psi_e_1(i, j);
135  ++(t_diff_edge_n[ee]);
136 
137  if (p[ee] > 1) {
138 
139  const double ksi_0i = (N[node_shift + edges_nodes[ee][1]] -
140  N[node_shift + edges_nodes[ee][0]]) *
141  sense[ee];
142  double psi_l[p[ee] + 1], diff_psi_l[3 * p[ee] + 3];
143  ierr = base_polynomials(p[ee], ksi_0i, &edge_diff_ksi[ee][0], psi_l,
144  diff_psi_l, 3);
145  CHKERRG(ierr);
146  FTensor::Tensor1<double *, 3> t_diff_psi_l(
147  &diff_psi_l[0], &diff_psi_l[p[ee] + 1], &diff_psi_l[2 * p[ee] + 2],
148  1);
149 
150  for (int ll = 2; ll != P[ee]; ll++) {
151 
152  const double a = (double)(2 * ll + 1) / (double)(ll + 1);
153  const double b = (double)(ll) / (double)(ll + 1);
154 
155  (t_edge_n[ee])(i) = a * psi_l[ll - 1] * t_psi_e_1(i) -
156  b * psi_l[ll - 2] * t_psi_e_0(i);
157  ++(t_edge_n[ee]);
158 
159  (t_diff_edge_n[ee])(i, j) =
160  -b * (t_diff_psi_l(j) * t_psi_e_0(i) +
161  psi_l[ll - 2] * t_diff_psi_e_0(i, j));
162  ++t_diff_psi_l;
163  (t_diff_edge_n[ee])(i, j) +=
164  a * (t_diff_psi_l(j) * t_psi_e_1(i) +
165  psi_l[ll - 1] * t_diff_psi_e_1(i, j));
166  ++(t_diff_edge_n[ee]);
167  }
168  }
169  }
170  }
171 
173 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
#define NBEDGE_AINSWORTH_HCURL(P)
const int N
Definition: speed_test.cpp:3

◆ Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_EDGE()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_EDGE ( int  sense,
int  p,
double N,
double diffN,
double edgeN,
double diff_edgeN,
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Edge based H-curl base functions on edge.

Function generates hierarchical base of h-curl comforting functions on tetrahedral edge. For more details see [3].

On each edge we have P+1 functions. See NBEDGE_AINSWORTH_HCURL

Parameters
sensesense fo edge (i.e. unique orientation)
parray of oder for each edge
Narray shape functions evaluated at each integration point
diffNderivatives of shape functions
edgeNbase functions on edges
diff_edgeNderivatives of edge shape functions
nb_integration_ptsnumber of integration points
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 175 of file Hcurl.cpp.

180  {
182 
183  if (NBEDGE_AINSWORTH_HCURL(p) == 0)
185  if (diff_edge_n != NULL)
186  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
187  "Calculation of derivatives not implemented");
188 
190  FTensor::Tensor1<double, 3> t_node_diff_ksi[2];
191  t_node_diff_ksi[0](0) = diffN[0];
192  t_node_diff_ksi[0](1) = 0;
193  t_node_diff_ksi[0](2) = 0;
194  t_node_diff_ksi[1](0) = diffN[1];
195  t_node_diff_ksi[1](1) = 0;
196  t_node_diff_ksi[1](2) = 0;
197 
199  &edge_n[0], &edge_n[1], &edge_n[2]);
200  FTensor::Tensor1<double, 3> t_psi_e_0, t_psi_e_1;
201 
202  for (int ii = 0; ii != nb_integration_pts; ii++) {
203 
204  const int node_shift = ii * 2;
205 
206  t_psi_e_0(i) = (N[node_shift + 1] * t_node_diff_ksi[0](i) -
207  N[node_shift + 0] * t_node_diff_ksi[1](i)) *
208  sense;
209  t_psi_e_1(i) = N[node_shift + 1] * t_node_diff_ksi[0](i) +
210  N[node_shift + 0] * t_node_diff_ksi[1](i);
211 
212  t_edge_n(i) = t_psi_e_0(i);
213  ++t_edge_n;
214 
215  t_edge_n(i) = t_psi_e_1(i);
216  ++t_edge_n;
217 
218  if (p > 1) {
219 
220  const double ksi_0i = (N[node_shift + 1] - N[node_shift + 0]) * sense;
221  double psi_l[p + 1];
222  CHKERR base_polynomials(p, ksi_0i, NULL, psi_l, NULL, 3);
223 
224  for (int ll = 2; ll != NBEDGE_AINSWORTH_HCURL(p); ll++) {
225  const double a = (double)(2 * ll + 1) / (double)(ll + 1);
226  const double b = (double)(ll) / (double)(ll + 1);
227  t_edge_n(i) =
228  a * psi_l[ll - 1] * t_psi_e_1(i) - b * psi_l[ll - 2] * t_psi_e_0(i);
229  ++t_edge_n;
230  }
231 
232  }
233  }
234 
236 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
#define NBEDGE_AINSWORTH_HCURL(P)
#define CHKERR
Inline error check.
Definition: definitions.h:596
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407
const int N
Definition: speed_test.cpp:3

◆ Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_FACE()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_EdgeBaseFunctions_MBTET_ON_FACE ( int sense,
int p,
double N,
double diffN,
double edgeN[],
double diff_edgeN[],
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Edge based H-curl base functions on face.

Function generates hierarchical base of h-curl comforting functions on tetrahedral edge. For more details see [3].

On each face's edge we have P+1 functions. See NBEDGE_AINSWORTH_HCURL

Parameters
sensesense fo edge (i.e. unique orientation)
parray of oder for each edge
Narray shape functions evaluated at each integration point
diffNderivatives of shape functions
edgeNbase functions on edges
diff_edgeNderivatives of edge shape functions
nb_integration_ptsnumber of integration points
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 238 of file Hcurl.cpp.

243  {
244 
246 
247  // TODO This is not by atom tests properly
248 
249  const int edges_nodes[3][2] = {{0, 1}, {1, 2}, {2, 0}};
250  int P[3];
251  for (int ee = 0; ee < 3; ee++)
252  P[ee] = NBEDGE_AINSWORTH_HCURL(p[ee]);
253 
256 
257  FTensor::Tensor1<double, 3> t_node_diff_ksi[3] = {
258  FTensor::Tensor1<double, 3>(diffN[0], diffN[1], 0.),
259  FTensor::Tensor1<double, 3>(diffN[2], diffN[3], 0.),
260  FTensor::Tensor1<double, 3>(diffN[4], diffN[5], 0.),
261  };
262  FTensor::Tensor1<double, 2> t_2d_diff_ksi[3] = {
263  FTensor::Tensor1<double, 2>(diffN[0], diffN[1]),
264  FTensor::Tensor1<double, 2>(diffN[2], diffN[3]),
265  FTensor::Tensor1<double, 2>(diffN[4], diffN[5])};
266 
267  FTensor::Tensor1<double *, 3> t_edge_n[3] = {
268  FTensor::Tensor1<double *, 3>(&edge_n[0][0], &edge_n[0][1], &edge_n[0][2],
269  3),
270  FTensor::Tensor1<double *, 3>(&edge_n[1][0], &edge_n[1][1], &edge_n[1][2],
271  3),
272  FTensor::Tensor1<double *, 3>(&edge_n[2][0], &edge_n[2][1], &edge_n[2][2],
273  3)};
274  FTensor::Tensor2<FTensor::PackPtr<double *, 6>, 3, 2> t_diff_edge_n[3] = {
276  &diff_edge_n[0][HVEC0_0], &diff_edge_n[0][HVEC0_1],
277  &diff_edge_n[0][HVEC1_0], &diff_edge_n[0][HVEC1_1],
278  &diff_edge_n[0][HVEC2_0], &diff_edge_n[0][HVEC2_1]),
280  &diff_edge_n[1][HVEC0_0], &diff_edge_n[1][HVEC0_1],
281  &diff_edge_n[1][HVEC1_0], &diff_edge_n[1][HVEC1_1],
282  &diff_edge_n[1][HVEC2_0], &diff_edge_n[1][HVEC2_1]),
284  &diff_edge_n[2][HVEC0_0], &diff_edge_n[2][HVEC0_1],
285  &diff_edge_n[2][HVEC1_0], &diff_edge_n[2][HVEC1_1],
286  &diff_edge_n[2][HVEC2_0], &diff_edge_n[2][HVEC2_1])};
287 
288  FTensor::Tensor1<double, 3> t_psi_e_0, t_psi_e_1;
289  FTensor::Tensor2<double, 3, 2> t_diff_psi_e_0, t_diff_psi_e_1;
290 
291  for (int ee = 0; ee != 3; ee++) {
292 
293  if (P[ee] == 0)
294  continue;
295  const int node0 = edges_nodes[ee][0];
296  const int node1 = edges_nodes[ee][1];
297  const int sense_edge = sense[ee];
298 
299  t_diff_psi_e_0(i, j) =
300  (t_node_diff_ksi[node0](i) * t_2d_diff_ksi[node1](j) -
301  t_node_diff_ksi[node1](i) * t_2d_diff_ksi[node0](j)) *
302  sense_edge;
303  t_diff_psi_e_1(i, j) = t_node_diff_ksi[node0](i) * t_2d_diff_ksi[node1](j) +
304  t_node_diff_ksi[node1](i) * t_2d_diff_ksi[node0](j);
305 
306  for (int ii = 0; ii != nb_integration_pts; ii++) {
307 
308  const int node_shift = ii * 3;
309  const double n0 = N[node_shift + node0];
310  const double n1 = N[node_shift + node1];
311 
312  t_psi_e_0(i) =
313  (n1 * t_node_diff_ksi[node0](i) - n0 * t_node_diff_ksi[node1](i)) *
314  sense_edge;
315  t_psi_e_1(i) =
316  n1 * t_node_diff_ksi[node0](i) + n0 * t_node_diff_ksi[node1](i);
317 
318  (t_edge_n[ee])(i) = t_psi_e_0(i);
319  (t_diff_edge_n[ee])(i, j) = t_diff_psi_e_0(i, j);
320  ++(t_edge_n[ee]);
321  ++(t_diff_edge_n[ee]);
322  (t_edge_n[ee])(i) = t_psi_e_1(i);
323  (t_diff_edge_n[ee])(i, j) = t_diff_psi_e_1(i, j);
324  ++(t_edge_n[ee]);
325  ++(t_diff_edge_n[ee]);
326 
327  if (p[ee] > 1) {
328  const double ksi_0i = (n1 - n0) * sense_edge;
329  double diff_ksi_0i[] = {
330  ((t_2d_diff_ksi[node1])(0) - (t_2d_diff_ksi[node0])(0)) *
331  sense_edge,
332  ((t_2d_diff_ksi[node1])(1) - (t_2d_diff_ksi[node0])(1)) *
333  sense_edge};
334 
335  double psi_l[p[ee] + 1], diff_psi_l[2 * p[ee] + 2];
336  ierr =
337  base_polynomials(p[ee], ksi_0i, diff_ksi_0i, psi_l, diff_psi_l, 2);
338  CHKERRG(ierr);
339  FTensor::Tensor1<double *, 2> t_diff_psi_ll_m1(
340  &diff_psi_l[0 + 2 - 1], &diff_psi_l[p[ee] + 1 + 2 - 1], 1);
341  FTensor::Tensor1<double *, 2> t_diff_psi_ll_m2(
342  &diff_psi_l[0 + 2 - 2], &diff_psi_l[p[ee] + 1 + 2 - 2], 1);
343  for (int ll = 2; ll != P[ee]; ll++) {
344  const double a = (double)(2 * ll + 1) / (double)(ll + 1);
345  const double b = (double)(ll) / (double)(ll + 1);
346  (t_edge_n[ee])(i) = a * psi_l[ll - 1] * t_psi_e_1(i) -
347  b * psi_l[ll - 2] * t_psi_e_0(i);
348  (t_diff_edge_n[ee])(i, j) = a * t_psi_e_1(i) * t_diff_psi_ll_m1(j) +
349  a * psi_l[ll - 1] * t_diff_psi_e_1(i, j) -
350  b * t_psi_e_0(i) * t_diff_psi_ll_m2(j) -
351  b * psi_l[ll - 2] * t_diff_psi_e_0(i, j);
352  ++(t_edge_n[ee]);
353  ++(t_diff_edge_n[ee]);
354  ++t_diff_psi_ll_m1;
355  ++t_diff_psi_ll_m2;
356  }
357  }
358  }
359  }
360 
362 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
#define NBEDGE_AINSWORTH_HCURL(P)
const int N
Definition: speed_test.cpp:3

◆ Hcurl_Ainsworth_FaceFunctions_MBTET()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_FaceFunctions_MBTET ( int face_nodes,
int p,
double N,
double diffN,
double phi_f[4],
double diff_phi_f[4],
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Face H-curl functions.

Face H-curl functions are set of Eddge-Based Face functions (Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET) and Bubble-Face functions (Hcurl_Ainsworth_BubbleFaceFunctions_MBTET).

See NBVOLUMETET_AINSWORTH_FACE_HCURL

Parameters
face_nodesarray [4*3] of local indices of face nodes
papproximation order
Nnodal shape functions
diffNderivatives of nodal shape functions
phi_f[4]calculated shape functions for each face
diff_phi_v[4]derivatives of shape functions for each face
nb_integration_ptsnumber of shape functions
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 1058 of file Hcurl.cpp.

1063  {
1064 
1066 
1067  try {
1068 
1069  MatrixDouble base_face_edge_functions[4];
1070  MatrixDouble diff_base_face_edge_functions[4];
1071  double *phi_f_e[4][3];
1072  double *diff_phi_f_e[4][3];
1073  for (int ff = 0; ff != 4; ff++) {
1074  if (NBFACETRI_AINSWORTH_EDGE_HCURL(p[ff]) == 0) {
1075  for (int ee = 0; ee != 3; ee++) {
1076  phi_f_e[ff][ee] = NULL;
1077  diff_phi_f_e[ff][ee] = NULL;
1078  }
1079  } else {
1080  base_face_edge_functions[ff].resize(
1081  3, 3 * NBFACETRI_AINSWORTH_EDGE_HCURL(p[ff]) * nb_integration_pts);
1082  diff_base_face_edge_functions[ff].resize(
1083  3, 9 * NBFACETRI_AINSWORTH_EDGE_HCURL(p[ff]) * nb_integration_pts);
1084  // base_face_edge_functions[ff].clear();
1085  // diff_base_face_edge_functions[ff].clear();
1086  for (int ee = 0; ee != 3; ee++) {
1087  phi_f_e[ff][ee] = &base_face_edge_functions[ff](ee, 0);
1088  diff_phi_f_e[ff][ee] = &diff_base_face_edge_functions[ff](ee, 0);
1089  }
1090  }
1091  }
1093  face_nodes, p, N, diffN, phi_f_e, diff_phi_f_e, nb_integration_pts,
1094  base_polynomials);
1095  CHKERRG(ierr);
1096 
1097  VectorDouble base_face_bubble_functions[4];
1098  VectorDouble diff_base_face_bubble_functions[4];
1099  double *phi_f_f[4];
1100  double *diff_phi_f_f[4];
1101  for (int ff = 0; ff != 4; ff++) {
1102  int nb_dofs = NBFACETRI_AINSWORTH_FACE_HCURL(p[ff]);
1103  if (nb_dofs == 0) {
1104  phi_f_f[ff] = NULL;
1105  diff_phi_f_f[ff] = NULL;
1106  } else {
1107  base_face_bubble_functions[ff].resize(3 * nb_dofs * nb_integration_pts,
1108  false);
1109  diff_base_face_bubble_functions[ff].resize(
1110  9 * nb_dofs * nb_integration_pts, false);
1111  phi_f_f[ff] = &*base_face_bubble_functions[ff].data().begin();
1112  diff_phi_f_f[ff] = &*diff_base_face_bubble_functions[ff].data().begin();
1113  }
1114  }
1116  face_nodes, p, N, diffN, phi_f_f, diff_phi_f_f, nb_integration_pts,
1117  base_polynomials);
1118  CHKERRG(ierr);
1119 
1122 
1123  for (int ff = 0; ff != 4; ff++) {
1124 
1125  if (NBFACETRI_AINSWORTH_EDGE_HCURL(p[ff]) == 0)
1126  continue;
1127 
1128  FTensor::Tensor1<double *, 3> t_face_edge_base[] = {
1129  FTensor::Tensor1<double *, 3>(&phi_f_e[ff][0][0], &phi_f_e[ff][0][1],
1130  &phi_f_e[ff][0][2], 3),
1131  FTensor::Tensor1<double *, 3>(&phi_f_e[ff][1][0], &phi_f_e[ff][1][1],
1132  &phi_f_e[ff][1][2], 3),
1133  FTensor::Tensor1<double *, 3>(&phi_f_e[ff][2][0], &phi_f_e[ff][2][1],
1134  &phi_f_e[ff][2][2], 3)};
1135  FTensor::Tensor2<double *, 3, 3> t_diff_face_edge_base[] = {
1137  &diff_phi_f_e[ff][0][0], &diff_phi_f_e[ff][0][3],
1138  &diff_phi_f_e[ff][0][6], &diff_phi_f_e[ff][0][1],
1139  &diff_phi_f_e[ff][0][4], &diff_phi_f_e[ff][0][7],
1140  &diff_phi_f_e[ff][0][2], &diff_phi_f_e[ff][0][5],
1141  &diff_phi_f_e[ff][0][8], 9),
1143  &diff_phi_f_e[ff][1][0], &diff_phi_f_e[ff][1][3],
1144  &diff_phi_f_e[ff][1][6], &diff_phi_f_e[ff][1][1],
1145  &diff_phi_f_e[ff][1][4], &diff_phi_f_e[ff][1][7],
1146  &diff_phi_f_e[ff][1][2], &diff_phi_f_e[ff][1][5],
1147  &diff_phi_f_e[ff][1][8], 9),
1149  &diff_phi_f_e[ff][2][0], &diff_phi_f_e[ff][2][3],
1150  &diff_phi_f_e[ff][2][6], &diff_phi_f_e[ff][2][1],
1151  &diff_phi_f_e[ff][2][4], &diff_phi_f_e[ff][2][7],
1152  &diff_phi_f_e[ff][2][2], &diff_phi_f_e[ff][2][5],
1153  &diff_phi_f_e[ff][2][8], 9)};
1154 
1155  FTensor::Tensor1<double *, 3> t_face_base(&phi_f[ff][0], &phi_f[ff][1],
1156  &phi_f[ff][2], 3);
1157  FTensor::Tensor2<double *, 3, 3> t_diff_face_base(
1158  &diff_phi_f[ff][0], &diff_phi_f[ff][3], &diff_phi_f[ff][6],
1159  &diff_phi_f[ff][1], &diff_phi_f[ff][4], &diff_phi_f[ff][7],
1160  &diff_phi_f[ff][2], &diff_phi_f[ff][5], &diff_phi_f[ff][8], 9);
1161 
1162  if (NBFACETRI_AINSWORTH_FACE_HCURL(p[ff]) > 0) {
1163  FTensor::Tensor1<double *, 3> t_face_face_base(
1164  &phi_f_f[ff][0], &phi_f_f[ff][1], &phi_f_f[ff][2], 3);
1165  FTensor::Tensor2<double *, 3, 3> t_diff_face_face_base(
1166  &diff_phi_f_f[ff][0], &diff_phi_f_f[ff][3], &diff_phi_f_f[ff][6],
1167  &diff_phi_f_f[ff][1], &diff_phi_f_f[ff][4], &diff_phi_f_f[ff][7],
1168  &diff_phi_f_f[ff][2], &diff_phi_f_f[ff][5], &diff_phi_f_f[ff][8],
1169  9);
1170  for (int ii = 0; ii != nb_integration_pts; ii++) {
1171  int cc = 0;
1172  for (int oo = 0; oo <= p[ff]; oo++) {
1173  // Face-edge base
1174  if (oo > 1) {
1175  for (int ee = 0; ee != 3; ee++) {
1176  for (int ll = NBFACETRI_AINSWORTH_EDGE_HCURL(oo - 1);
1177  ll != NBFACETRI_AINSWORTH_EDGE_HCURL(oo); ll++) {
1178  t_face_base(i) = t_face_edge_base[ee](i);
1179  ++cc;
1180  ++t_face_base;
1181  ++t_face_edge_base[ee];
1182  t_diff_face_base(i, j) = t_diff_face_edge_base[ee](i, j);
1183  ++t_diff_face_base;
1184  ++t_diff_face_edge_base[ee];
1185  // cerr << oo << " " << ll << " " << cc << " " <<
1186  // NBFACETRI_AINSWORTH_EDGE_HCURL(oo) << endl;
1187  }
1188  }
1189  }
1190  // Face-face base
1191  if (oo > 2) {
1192  for (int ll = NBFACETRI_AINSWORTH_FACE_HCURL(oo - 1);
1193  ll != NBFACETRI_AINSWORTH_FACE_HCURL(oo); ll++) {
1194  t_face_base(i) = t_face_face_base(i);
1195  ++cc;
1196  ++t_face_base;
1197  ++t_face_face_base;
1198  t_diff_face_base(i, j) = t_diff_face_face_base(i, j);
1199  ++t_diff_face_base;
1200  ++t_diff_face_face_base;
1201  }
1202  }
1203  }
1204  // check consistency
1205  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_HCURL(p[ff]);
1206  if (cc != nb_base_fun_on_face) {
1207  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1208  "Wrong number of base functions %d != %d", cc,
1209  nb_base_fun_on_face);
1210  }
1211  }
1212  } else {
1213  for (int ii = 0; ii != nb_integration_pts; ii++) {
1214  int cc = 0;
1215  for (int oo = 0; oo <= p[ff]; oo++) {
1216  // Face-edge base
1217  if (oo > 1) {
1218  for (int ee = 0; ee != 3; ee++) {
1219  for (int ll = NBFACETRI_AINSWORTH_EDGE_HCURL(oo - 1);
1220  ll != NBFACETRI_AINSWORTH_EDGE_HCURL(oo); ll++) {
1221  t_face_base(i) = t_face_edge_base[ee](i);
1222  ++cc;
1223  ++t_face_base;
1224  ++t_face_edge_base[ee];
1225  t_diff_face_base(i, j) = t_diff_face_edge_base[ee](i, j);
1226  ++t_diff_face_base;
1227  ++t_diff_face_edge_base[ee];
1228  // cerr << oo << " " << ll << " " << cc << " " <<
1229  // NBFACETRI_AINSWORTH_EDGE_HCURL(oo) << endl;
1230  }
1231  }
1232  }
1233  }
1234  // check consistency
1235  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_HCURL(p[ff]);
1236  if (cc != nb_base_fun_on_face) {
1237  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1238  "Wrong number of base functions %d != %d", cc,
1239  nb_base_fun_on_face);
1240  }
1241  }
1242  }
1243  }
1244 
1245  } catch (MoFEMException const &e) {
1246  SETERRQ(PETSC_COMM_SELF, e.errorCode, e.errorMessage);
1247  } catch (std::exception &ex) {
1248  std::ostringstream ss;
1249  ss << "thorw in method: " << ex.what() << " at line " << __LINE__
1250  << " in file " << __FILE__;
1251  SETERRQ(PETSC_COMM_SELF, MOFEM_STD_EXCEPTION_THROW, ss.str().c_str());
1252  }
1253 
1255 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:77
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
MoFEMErrorCode Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET(int *faces_nodes, int *p, double *N, double *diffN, double *phi_f_e[4][3], double *diff_phi_f_e[4][3], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Face edge base functions of Hcurl space on tetrahedral.
Definition: Hcurl.cpp:364
#define NBFACETRI_AINSWORTH_HCURL(P)
#define NBFACETRI_AINSWORTH_EDGE_HCURL(P)
ublas::vector< double, DoubleAllocator > VectorDouble
Definition: Types.hpp:76
const int N
Definition: speed_test.cpp:3
MoFEMErrorCode Hcurl_Ainsworth_BubbleFaceFunctions_MBTET(int *faces_nodes, int *p, double *N, double *diffN, double *phi_f[4], double *diff_phi_f[4], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Face edge base functions of Hcurl space on face on tetrahedral.
Definition: Hcurl.cpp:546
#define NBFACETRI_AINSWORTH_FACE_HCURL(P)

◆ Hcurl_Ainsworth_FaceFunctions_MBTET_ON_FACE()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_FaceFunctions_MBTET_ON_FACE ( int faces_nodes,
int  p,
double N,
double diffN,
double phi_f,
double diff_phi_f,
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Face H-curl functions.

Face H-curl functions are set of Eddge-Based Face functions (Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET) and Bubble-Face functions (Hcurl_Ainsworth_BubbleFaceFunctions_MBTET).

See NBVOLUMETET_AINSWORTH_FACE_HCURL

Parameters
face_nodesarray [4*3] of local indices of face nodes
papproximation order
Nnodal shape functions
diffNderivatives of nodal shape functions
phi_f[4]calculated shape functions for each face
diff_phi_v[4]derivatives of shape functions for each face
nb_integration_ptsnumber of shape functions
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 1257 of file Hcurl.cpp.

1262  {
1263 
1265 
1266  if (NBFACETRI_AINSWORTH_EDGE_HCURL(p) == 0)
1268 
1269  MatrixDouble base_face_edge_functions, diff_base_face_edge_functions;
1270  double *phi_f_e[3];
1271  double *diff_phi_f_e[3];
1272  base_face_edge_functions.resize(3, 3 * NBFACETRI_AINSWORTH_EDGE_HCURL(p) *
1273  nb_integration_pts);
1274  diff_base_face_edge_functions.resize(
1275  3, 2 * 3 * NBFACETRI_AINSWORTH_EDGE_HCURL(p) * nb_integration_pts);
1276  // base_face_edge_functions.clear();
1277  for (int ee = 0; ee != 3; ee++) {
1278  phi_f_e[ee] = &base_face_edge_functions(ee, 0);
1279  diff_phi_f_e[ee] = &diff_base_face_edge_functions(ee, 0);
1280  }
1282  faces_nodes, p, N, diffN, phi_f_e, diff_phi_f_e, nb_integration_pts,
1283  base_polynomials);
1284  CHKERRG(ierr);
1285 
1286  VectorDouble base_face_bubble_functions;
1287  VectorDouble diff_base_face_bubble_functions;
1288  double *phi_f_f, *diff_phi_f_f;
1289  base_face_bubble_functions.resize(3 * NBFACETRI_AINSWORTH_FACE_HCURL(p) *
1290  nb_integration_pts);
1291  diff_base_face_bubble_functions.resize(
1292  2 * 3 * NBFACETRI_AINSWORTH_FACE_HCURL(p) * nb_integration_pts);
1293  phi_f_f = &*base_face_bubble_functions.data().begin();
1294  diff_phi_f_f = &*diff_base_face_bubble_functions.data().begin();
1296  faces_nodes, p, N, diffN, phi_f_f, diff_phi_f_f, nb_integration_pts,
1297  base_polynomials);
1298  CHKERRG(ierr);
1299  // cerr << diff_base_face_bubble_functions << endl;
1300 
1303 
1304  FTensor::Tensor1<double *, 3> t_face_edge_base[] = {
1305  FTensor::Tensor1<double *, 3>(&phi_f_e[0][HVEC0], &phi_f_e[0][HVEC1],
1306  &phi_f_e[0][HVEC2], 3),
1307  FTensor::Tensor1<double *, 3>(&phi_f_e[1][HVEC0], &phi_f_e[1][HVEC1],
1308  &phi_f_e[1][HVEC2], 3),
1309  FTensor::Tensor1<double *, 3>(&phi_f_e[2][HVEC0], &phi_f_e[2][HVEC1],
1310  &phi_f_e[2][HVEC2], 3)};
1312  t_diff_face_edge_base[] = {
1314  &diff_phi_f_e[0][HVEC0_0], &diff_phi_f_e[0][HVEC0_1],
1315  &diff_phi_f_e[0][HVEC1_0], &diff_phi_f_e[0][HVEC1_1],
1316  &diff_phi_f_e[0][HVEC2_0], &diff_phi_f_e[0][HVEC2_1]),
1318  &diff_phi_f_e[1][HVEC0_0], &diff_phi_f_e[1][HVEC0_1],
1319  &diff_phi_f_e[1][HVEC1_0], &diff_phi_f_e[1][HVEC1_1],
1320  &diff_phi_f_e[1][HVEC2_0], &diff_phi_f_e[1][HVEC2_1]),
1322  &diff_phi_f_e[2][HVEC0_0], &diff_phi_f_e[2][HVEC0_1],
1323  &diff_phi_f_e[2][HVEC1_0], &diff_phi_f_e[2][HVEC1_1],
1324  &diff_phi_f_e[2][HVEC2_0], &diff_phi_f_e[2][HVEC2_1])};
1325 
1326  FTensor::Tensor1<double *, 3> t_face_base(&phi_f[0], &phi_f[1], &phi_f[2], 3);
1327  FTensor::Tensor2<FTensor::PackPtr<double *, 6>, 3, 2> t_diff_face_base(
1328  &diff_phi_f[HVEC0_0], &diff_phi_f[HVEC0_1], &diff_phi_f[HVEC1_0],
1329  &diff_phi_f[HVEC1_1], &diff_phi_f[HVEC2_0], &diff_phi_f[HVEC2_1]);
1330 
1331  if (NBFACETRI_AINSWORTH_FACE_HCURL(p) > 0) {
1332  FTensor::Tensor1<double *, 3> t_face_face_base(
1333  &phi_f_f[HVEC0], &phi_f_f[HVEC1], &phi_f_f[HVEC2], 3);
1334  FTensor::Tensor2<FTensor::PackPtr<double *, 6>, 3, 2> t_diff_face_face_base(
1335  &diff_phi_f_f[HVEC0_0], &diff_phi_f_f[HVEC0_1], &diff_phi_f_f[HVEC1_0],
1336  &diff_phi_f_f[HVEC1_1], &diff_phi_f_f[HVEC2_0], &diff_phi_f_f[HVEC2_1]);
1337  for (int ii = 0; ii != nb_integration_pts; ii++) {
1338  int cc = 0;
1339  for (int oo = 0; oo <= p; oo++) {
1340  // Face-edge base
1341  if (oo > 1) {
1342  for (int ee = 0; ee != 3; ee++) {
1343  for (int ll = NBFACETRI_AINSWORTH_EDGE_HCURL(oo - 1);
1344  ll != NBFACETRI_AINSWORTH_EDGE_HCURL(oo); ll++) {
1345  t_face_base(i) = t_face_edge_base[ee](i);
1346  t_diff_face_base(i, j) = t_diff_face_edge_base[ee](i, j);
1347  ++cc;
1348  ++t_face_base;
1349  ++t_face_edge_base[ee];
1350  ++t_diff_face_base;
1351  ++t_diff_face_edge_base[ee];
1352  }
1353  }
1354  }
1355  // Face-face base
1356  if (oo > 2) {
1357  for (int ll = NBFACETRI_AINSWORTH_FACE_HCURL(oo - 1);
1358  ll != NBFACETRI_AINSWORTH_FACE_HCURL(oo); ll++) {
1359  t_face_base(i) = t_face_face_base(i);
1360  t_diff_face_base(i, j) = t_diff_face_face_base(i, j);
1361  ++cc;
1362  ++t_face_base;
1363  ++t_face_face_base;
1364  ++t_diff_face_base;
1365  ++t_diff_face_face_base;
1366  }
1367  }
1368  }
1369  // check consistency
1370  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_HCURL(p);
1371  if (cc != nb_base_fun_on_face) {
1372  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1373  "Wrong number of base functions %d != %d", cc,
1374  nb_base_fun_on_face);
1375  }
1376  }
1377  } else {
1378  for (int ii = 0; ii != nb_integration_pts; ii++) {
1379  int cc = 0;
1380  for (int oo = 0; oo <= p; oo++) {
1381  // Face-edge base
1382  if (oo > 1) {
1383  for (int ee = 0; ee != 3; ee++) {
1384  for (int ll = NBFACETRI_AINSWORTH_EDGE_HCURL(oo - 1);
1385  ll != NBFACETRI_AINSWORTH_EDGE_HCURL(oo); ll++) {
1386  t_face_base(i) = t_face_edge_base[ee](i);
1387  t_diff_face_base(i, j) = t_diff_face_edge_base[ee](i, j);
1388  ++cc;
1389  ++t_face_base;
1390  ++t_face_edge_base[ee];
1391  ++t_diff_face_base;
1392  ++t_diff_face_edge_base[ee];
1393  // cerr << oo << " " << ll << " " << cc << " " <<
1394  // NBFACETRI_AINSWORTH_EDGE_HCURL(oo) << endl;
1395  }
1396  }
1397  }
1398  }
1399  // check consistency
1400  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_HCURL(p);
1401  if (cc != nb_base_fun_on_face) {
1402  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1403  "Wrong number of base functions %d != %d", cc,
1404  nb_base_fun_on_face);
1405  }
1406  }
1407  }
1408 
1410 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:501
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
Definition: Types.hpp:77
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:544
MoFEMErrorCode Hcurl_Ainsworth_EdgeBasedFaceFunctions_MBTET_ON_FACE(int *faces_nodes, int p, double *N, double *diffN, double *phi_f_e[3], double *diff_phi_f_e[3], int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Face edge base functions of Hcurl space.
Definition: Hcurl.cpp:459
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
MoFEMErrorCode Hcurl_Ainsworth_BubbleFaceFunctions_MBTET_ON_FACE(int *faces_nodes, int p, double *N, double *diffN, double *phi_f, double *diff_phi_f, int nb_integration_pts, PetscErrorCode(*base_polynomials)(int p, double s, double *diff_s, double *L, double *diffL, const int dim))
Face edge base functions of Hcurl space on face.
Definition: Hcurl.cpp:665
#define NBFACETRI_AINSWORTH_HCURL(P)
#define NBFACETRI_AINSWORTH_EDGE_HCURL(P)
ublas::vector< double, DoubleAllocator > VectorDouble
Definition: Types.hpp:76
const int N
Definition: speed_test.cpp:3
#define NBFACETRI_AINSWORTH_FACE_HCURL(P)

◆ Hcurl_Ainsworth_FaceInteriorFunctions_MBTET()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_FaceInteriorFunctions_MBTET ( int faces_nodes,
int  p,
double N,
double diffN,
double phi_v,
double diff_phi_v,
int  nb_integration_pts,
PetscErrorCode(*)(int p, double s, double *diff_s, double *L, double *diffL, const int dim)  base_polynomials 
)

Face base interior function.

On each face we have P*(P-1)/2 and are 4 faces on Tetrahedral.

See NBFACETRI_AINSWORTH_FACE_HCURL

Parameters
face_nodesarray [4*3] of local indices of face nodes
papproximation order
Nnodal shape functions
diffNderivatives of nodal shape functions
phi_vcalculated shape functions
diff_phi_vderivatives of shape functions
nb_integration_ptsnumber of shape functions
base_polynomialspolynomial base function (f.e. Legendre of Lobatto)
Returns
error code

Definition at line 778 of file Hcurl.cpp.

783  {
784 
786 
789 
790  const int face_opposite_nodes[] = {2, 0, 1, 3};
791 
794 
795  FTensor::Tensor1<double *, 3> t_node_diff_ksi[4] = {
796  FTensor::Tensor1<double *, 3>(&diffN[0], &diffN[1], &diffN[2]),
797  FTensor::Tensor1<double *, 3>(&diffN[3], &diffN[4], &diffN[5]),
798  FTensor::Tensor1<double *, 3>(&diffN[6], &diffN[7], &diffN[8]),
799  FTensor::Tensor1<double *, 3>(&diffN[9], &diffN[10], &diffN[11])};
800  FTensor::Tensor1<double, 3> t_diff_ksi0i, t_diff_ksi0j;
801 
802  MatrixDouble m_psi_l_0i(4, p + 1);
803  MatrixDouble m_psi_l_0j(4, p + 1);
804  MatrixDouble m_diff_psi_l_0i(4, 3 * p + 3);
805  MatrixDouble m_diff_psi_l_0j(4, 3 * p + 3);
806 
807  double *psi_l_0i[] = {&m_psi_l_0i(0, 0), &m_psi_l_0i(1, 0), &m_psi_l_0i(2, 0),
808  &m_psi_l_0i(3, 0)};
809  double *psi_l_0j[] = {&m_psi_l_0j(0, 0), &m_psi_l_0j(1, 0), &m_psi_l_0j(2, 0),
810  &m_psi_l_0j(3, 0)};
811  double *diff_psi_l_0i[] = {&m_diff_psi_l_0i(0, 0), &m_diff_psi_l_0i(1, 0),
812  &m_diff_psi_l_0i(2, 0), &m_diff_psi_l_0i(3, 0)};
813  double *diff_psi_l_0j[] = {&m_diff_psi_l_0j(0, 0), &m_diff_psi_l_0j(1, 0),
814  &m_diff_psi_l_0j(2, 0), &m_diff_psi_l_0j(3, 0)};
815  double beta_f[4];
816 
817  FTensor::Tensor1<double, 3> t_diff_beta_f[4];
818 
819  FTensor::Tensor1<double *, 3> t_phi_v(&phi_v[0], &phi_v[1], &phi_v[2], 3);
821  &diff_phi_v[0], &diff_phi_v[3], &diff_phi_v[6], &diff_phi_v[1],
822  &diff_phi_v[4], &diff_phi_v[7], &diff_phi_v[2], &diff_phi_v[5],
823  &diff_phi_v[8], 9);
824 
825  for (int ii = 0; ii != nb_integration_pts; ii++) {
826 
827  for (int ff = 0; ff != 4; ff++) {
828 
829  t_diff_ksi0i(i) = t_node_diff_ksi[faces_nodes[3 * ff + 1]](i) -
830  t_node_diff_ksi[faces_nodes[3 * ff + 0]](i);
831  t_diff_ksi0j(i) = t_node_diff_ksi[faces_nodes[3 * ff + 2]](i) -
832  t_node_diff_ksi[faces_nodes[3 * ff + 0]](i);
833 
834