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  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  EdgeElementForcesAndSourcesCore
 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  FaceElementForcesAndSourcesCore
 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  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  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  OpSetContravariantPiolaTransform
 apply contravariant (Piola) transfer to Hdiv space More...
 
struct  OpSetContravariantPiolaTransformOnTriangle
 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  OpSetCovariantPiolaTransformOnTriangle
 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  VolumeElementForcesAndSourcesCore
 Volume finite elementUser 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  VolumeElementForcesAndSourcesCoreOnSide
 Volume element used to integrate on skeleton. 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
 
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<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)
 
static MoFEMErrorCode get_porblem_row_indices (const ForcesAndSourcesCore *fe_ptr, const EntityType type, const int side, const std::string field_name, VectorInt &indices)
 
static MoFEMErrorCode get_porblem_col_indices (const ForcesAndSourcesCore *fe_ptr, const EntityType type, const int side, const std::string field_name, VectorInt &indices)
 
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 DMMoFEMResolveSharedEntities (DM dm, const char fe_name[])
 Resolve shared entities. More...
 
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 EdgeElementForcesAndSourcesCore EdgeElementForcesAndSurcesCore
 Use EdgeElementForcesAndSourcesCore. More...
 
DEPRECATED typedef FatPrismElementForcesAndSourcesCore FatPrismElementForcesAndSurcesCore
 
DEPRECATED typedef FlatPrismElementForcesAndSourcesCore FlatPrismElementForcesAndSurcesCore
 USe FlatPrismElementForcesAndSourcesCore. More...
 
DEPRECATED typedef ForcesAndSourcesCore ForcesAndSurcesCore
 
DEPRECATED typedef VertexElementForcesAndSourcesCore VertexElementForcesAndSurcesCore
 
DEPRECATED typedef VolumeElementForcesAndSourcesCore VolumeElementForcesAndSurcesCore
 
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 = MOFEMuuid(BitIntefaceId(FLATPRISM_BASE_FUNCTION_INTERFACE))
 
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_MOFEMCoordsSystemsManager = MOFEMuuid( BitIntefaceId(COORDSSYSTEMMANAGER_INTERFACE) )
 
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 = MOFEMuuid(BitIntefaceId(PRISMSFROMSURFACE_INTERFACE))
 
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 140 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 880 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 901 of file EntsMultiIndices.hpp.

◆ FieldEntity_vector_view

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

Definition at line 903 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 475 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 483 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 331 of file Templates.hpp.

331  {
332  return t(0, 0) * t(1, 1) * t(2, 2) + t(1, 0) * t(2, 1) * t(0, 2) +
333  t(2, 0) * t(0, 1) * t(1, 2) - t(0, 0) * t(2, 1) * t(1, 2) -
334  t(2, 0) * t(1, 1) * t(0, 2) - t(1, 0) * t(0, 1) * t(2, 2);
335 }

◆ determinantTensor2by2()

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

Calculate determinant 2 by 2.

Definition at line 374 of file Templates.hpp.

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

◆ 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 361 of file Templates.hpp.

361  {
363  det = +t(0, 0) * t(1, 1) * t(2, 2) + t(1, 0) * t(2, 1) * t(0, 2) +
364  t(2, 0) * t(0, 1) * t(1, 2) - t(0, 0) * t(2, 1) * t(1, 2) -
365  t(2, 0) * t(1, 1) * t(0, 2) - t(1, 0) * t(0, 1) * t(2, 2);
367 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

◆ 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:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

◆ 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:500
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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:500
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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 563 of file DMMMoFEM.cpp.

564  {
565  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
567  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
568  if (pre_only) {
569  dm_field->kspCtx->get_preProcess_to_do_Mat().push_back(pre_only);
570  }
571  if (method) {
572  dm_field->kspCtx->get_loops_to_do_Mat().push_back(
573  PairNameFEMethodPtr(fe_name, method));
574  }
575  if (post_only) {
576  dm_field->kspCtx->get_postProcess_to_do_Mat().push_back(post_only);
577  }
578  CHKERR DMKSPSetComputeOperators(dm, KspMat, dm_field->kspCtx.get());
580 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
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:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

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

523  {
524  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
526  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
527  if (pre_only) {
528  dm_field->kspCtx->get_preProcess_to_do_Rhs().push_back(pre_only);
529  }
530  if (method) {
531  dm_field->kspCtx->get_loops_to_do_Rhs().push_back(
532  PairNameFEMethodPtr(fe_name, method));
533  }
534  if (post_only) {
535  dm_field->kspCtx->get_postProcess_to_do_Rhs().push_back(post_only);
536  }
537  CHKERR DMKSPSetComputeRHS(dm, KspRhs, dm_field->kspCtx.get());
539 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
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:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

◆ 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 1303 of file DMMMoFEM.cpp.

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

◆ 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 603 of file DMMMoFEM.cpp.

604  {
605  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
607  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
608  if (pre_only) {
609  dm_field->snesCtx->get_preProcess_to_do_Rhs().push_back(pre_only);
610  }
611  if (method) {
612  dm_field->snesCtx->get_loops_to_do_Rhs().push_back(
613  PairNameFEMethodPtr(fe_name, method));
614  }
615  if (post_only) {
616  dm_field->snesCtx->get_postProcess_to_do_Rhs().push_back(post_only);
617  }
618  CHKERR DMSNESSetFunction(dm, SnesRhs, dm_field->snesCtx.get());
620 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406
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 644 of file DMMMoFEM.cpp.

645  {
646  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
648  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
649  if (pre_only) {
650  dm_field->snesCtx->get_preProcess_to_do_Mat().push_back(pre_only);
651  }
652  if (method) {
653  dm_field->snesCtx->get_loops_to_do_Mat().push_back(
654  PairNameFEMethodPtr(fe_name, method));
655  }
656  if (post_only) {
657  dm_field->snesCtx->get_postProcess_to_do_Mat().push_back(post_only);
658  }
659  CHKERR DMSNESSetJacobian(dm, SnesMat, dm_field->snesCtx.get());
661 }
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:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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 685 of file DMMMoFEM.cpp.

686  {
687  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
689  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
690  if (pre_only) {
691  dm_field->tsCtx->get_preProcess_to_do_IFunction().push_back(pre_only);
692  }
693  if (method) {
694  dm_field->tsCtx->get_loops_to_do_IFunction().push_back(
695  PairNameFEMethodPtr(fe_name, method));
696  }
697  if (post_only) {
698  dm_field->tsCtx->get_postProcess_to_do_IFunction().push_back(post_only);
699  }
700  CHKERR DMTSSetIFunction(dm, TsSetIFunction, dm_field->tsCtx.get());
702 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
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:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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 728 of file DMMMoFEM.cpp.

729  {
730  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
732  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
733  if (pre_only) {
734  dm_field->tsCtx->get_preProcess_to_do_IJacobian().push_back(pre_only);
735  }
736  if (method) {
737  dm_field->tsCtx->get_loops_to_do_IJacobian().push_back(
738  PairNameFEMethodPtr(fe_name, method));
739  }
740  if (post_only) {
741  dm_field->tsCtx->get_postProcess_to_do_IJacobian().push_back(post_only);
742  }
743  CHKERR DMTSSetIJacobian(dm, TsSetIJacobian, dm_field->tsCtx.get());
745 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406
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 876 of file DMMMoFEM.cpp.

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

◆ 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 865 of file DMMMoFEM.cpp.

868  {
869  return DMMoFEMTSSetMonitor<const char *, MoFEM::FEMethod *,
871  dm, ts, fe_name, method, pre_only, post_only);
873 }
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:507
static PetscErrorCode DMMoFEMTSSetMonitor(DM dm, TS ts, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:849
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 849 of file DMMMoFEM.cpp.

850  {
851  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
853  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
854  if (pre_only)
855  dm_field->tsCtx->get_preProcess_to_do_Monitor().push_back(pre_only);
856  if (method)
857  dm_field->tsCtx->get_loops_to_do_Monitor().push_back(
858  PairNameFEMethodPtr(fe_name, method));
859  if (post_only)
860  dm_field->tsCtx->get_postProcess_to_do_Monitor().push_back(post_only);
861  CHKERR TSMonitorSet(ts, TsMonitorSet, dm_field->tsCtx.get(), PETSC_NULL);
863 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
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:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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 796 of file DMMMoFEM.cpp.

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

◆ 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 785 of file DMMMoFEM.cpp.

788  {
789  return DMMoFEMTSSetRHSFunction<const char *, MoFEM::FEMethod *,
791  dm, fe_name, method, pre_only, post_only);
793 }
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:769
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
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 769 of file DMMMoFEM.cpp.

770  {
771  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
773  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
774  if (pre_only)
775  dm_field->tsCtx->get_preProcess_to_do_RHSFunction().push_back(pre_only);
776  if (method)
777  dm_field->tsCtx->get_loops_to_do_RHSFunction().push_back(
778  PairNameFEMethodPtr(fe_name, method));
779  if (post_only)
780  dm_field->tsCtx->get_postProcess_to_do_RHSFunction().push_back(post_only);
781  CHKERR DMTSSetRHSFunction(dm, TsSetRHSFunction, dm_field->tsCtx.get());
783 }
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:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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 836 of file DMMMoFEM.cpp.

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

◆ 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 825 of file DMMMoFEM.cpp.

828  {
829  return DMMoFEMTSSetRHSJacobian<const char *, MoFEM::FEMethod *,
831  dm, fe_name, method, pre_only, post_only);
833 }
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:507
static PetscErrorCode DMMoFEMTSSetRHSJacobian(DM dm, S fe_name, T0 method, T1 pre_only, T2 post_only)
Definition: DMMMoFEM.cpp:809
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 809 of file DMMMoFEM.cpp.

810  {
811  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
813  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
814  if (pre_only)
815  dm_field->tsCtx->get_preProcess_to_do_RHSFunction().push_back(pre_only);
816  if (method)
817  dm_field->tsCtx->get_loops_to_do_RHSFunction().push_back(
818  PairNameFEMethodPtr(fe_name, method));
819  if (post_only)
820  dm_field->tsCtx->get_postProcess_to_do_RHSFunction().push_back(post_only);
821  CHKERR DMTSSetRHSJacobian(dm, TsSetRHSJacobian, dm_field->tsCtx.get());
823 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
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:406

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

static MoFEMErrorCode MoFEM::get_porblem_col_indices ( const ForcesAndSourcesCore fe_ptr,
const EntityType  type,
const int  side,
const std::string  field_name,
VectorInt indices 
)
static

Definition at line 1094 of file ForcesAndSourcesCore.cpp.

1096  {
1098  switch (type) {
1099  case MBVERTEX:
1100  CHKERR fe_ptr->getProblemNodesColIndices(field_name, indices);
1101  break;
1102  default:
1103  CHKERR fe_ptr->getProblemTypeColIndices(field_name, type, side, indices);
1104  }
1106 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ get_porblem_row_indices()

static MoFEMErrorCode MoFEM::get_porblem_row_indices ( const ForcesAndSourcesCore fe_ptr,
const EntityType  type,
const int  side,
const std::string  field_name,
VectorInt indices 
)
static

Definition at line 1079 of file ForcesAndSourcesCore.cpp.

1081  {
1083  switch (type) {
1084  case MBVERTEX:
1085  CHKERR fe_ptr->getProblemNodesRowIndices(field_name, indices);
1086  break;
1087  default:
1088  CHKERR fe_ptr->getProblemTypeRowIndices(field_name, type, side, indices);
1089  }
1091 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

◆ 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");
144 }

◆ getFTensor0FromVec< double, DoubleAllocator >()

Definition at line 148 of file Templates.hpp.

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

◆ 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 158 of file Templates.hpp.

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

◆ 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 167 of file Templates.hpp.

167  {
168  return getFTensor1FromMat<Tensor_Dim, double, ublas::row_major,
169  DoubleAllocator>(data);
170 }
static FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor1FromMat(MatrixDouble &data)
Get tensor rank 1 (vector) form data matrix (specialization)
Definition: Templates.hpp:167
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 185 of file Templates.hpp.

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

◆ 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 174 of file Templates.hpp.

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

◆ 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 210 of file Templates.hpp.

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

◆ getFTensor2FromMat() [2/5]

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

Template specialization for getFTensor2FromMat

Definition at line 220 of file Templates.hpp.

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

◆ getFTensor2FromMat() [3/5]

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

Template specialization for getFTensor2FromMat

Definition at line 235 of file Templates.hpp.

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

◆ getFTensor2FromMat() [4/5]

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

Template specialization for getFTensor2FromMat

Definition at line 249 of file Templates.hpp.

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

◆ 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 263 of file Templates.hpp.

263  {
264  return getFTensor2FromMat<Tensor_Dim0, Tensor_Dim1, double, ublas::row_major,
265  DoubleAllocator>(data);
266 }
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:263
std::vector< double, std::allocator< double > > DoubleAllocator
Definition: Types.hpp:70

◆ 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 283 of file Templates.hpp.

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

◆ 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 298 of file Templates.hpp.

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

◆ 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 319 of file Templates.hpp.

319  {
321  DoubleAllocator>(data);
322 }
static FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor2SymmetricFromMat(MatrixDouble &data)
Get symmetric tensor rank 2 form matrix.
Definition: Templates.hpp:319
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 127 of file ForcesAndSourcesCore.cpp.

127  {
128  int max_order = 0;
129  for (auto ent_field_weak_ptr : multi_index)
130  if (auto e = ent_field_weak_ptr.lock()) {
131  const int order = e->getMaxOrder();
132  max_order = (max_order < order) ? order : max_order;
133  }
134  return max_order;
135 }
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:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ 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 540 of file Hcurl.cpp.

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

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

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

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

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

179  {
181 
182  if (NBEDGE_AINSWORTH_HCURL(p) == 0)
184  if (diff_edge_n != NULL) {
185  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
186  "Calculation of derivatives not implemented");
187  }
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 
198  FTensor::Tensor1<double *, 3> t_edge_n(&edge_n[0], &edge_n[1], &edge_n[2], 3);
199  FTensor::Tensor1<double, 3> t_psi_e_0, t_psi_e_1;
200 
201  for (int ii = 0; ii != nb_integration_pts; ii++) {
202 
203  const int node_shift = ii * 2;
204 
205  t_psi_e_0(i) = (N[node_shift + 1] * t_node_diff_ksi[0](i) -
206  N[node_shift + 0] * t_node_diff_ksi[1](i)) *
207  sense;
208  t_psi_e_1(i) = N[node_shift + 1] * t_node_diff_ksi[0](i) +
209  N[node_shift + 0] * t_node_diff_ksi[1](i);
210  t_edge_n(i) = t_psi_e_0(i);
211  ++t_edge_n;
212  t_edge_n(i) = t_psi_e_1(i);
213  ++t_edge_n;
214 
215  if (p > 1) {
216  const double ksi_0i = (N[node_shift + 1] - N[node_shift + 0]) * sense;
217  double psi_l[p + 1];
218  ierr = base_polynomials(p, ksi_0i, NULL, psi_l, NULL, 3);
219  CHKERRG(ierr);
220  for (int ll = 2; ll != NBEDGE_AINSWORTH_HCURL(p); ll++) {
221  const double a = (double)(2 * ll + 1) / (double)(ll + 1);
222  const double b = (double)(ll) / (double)(ll + 1);
223  t_edge_n(i) =
224  a * psi_l[ll - 1] * t_psi_e_1(i) - b * psi_l[ll - 2] * t_psi_e_0(i);
225  ++t_edge_n;
226  }
227  }
228  }
229 
231 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
#define NBEDGE_AINSWORTH_HCURL(P)
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 233 of file Hcurl.cpp.

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

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

1256  {
1257 
1259 
1260  if (NBFACETRI_AINSWORTH_EDGE_HCURL(p) == 0)
1262 
1263  MatrixDouble base_face_edge_functions, diff_base_face_edge_functions;
1264  double *phi_f_e[3];
1265  double *diff_phi_f_e[3];
1266  base_face_edge_functions.resize(3, 3 * NBFACETRI_AINSWORTH_EDGE_HCURL(p) *
1267  nb_integration_pts);
1268  diff_base_face_edge_functions.resize(
1269  3, 2 * 3 * NBFACETRI_AINSWORTH_EDGE_HCURL(p) * nb_integration_pts);
1270  // base_face_edge_functions.clear();
1271  for (int ee = 0; ee != 3; ee++) {
1272  phi_f_e[ee] = &base_face_edge_functions(ee, 0);
1273  diff_phi_f_e[ee] = &diff_base_face_edge_functions(ee, 0);
1274  }
1276  faces_nodes, p, N, diffN, phi_f_e, diff_phi_f_e, nb_integration_pts,
1277  base_polynomials);
1278  CHKERRG(ierr);
1279 
1280  VectorDouble base_face_bubble_functions;
1281  VectorDouble diff_base_face_bubble_functions;
1282  double *phi_f_f, *diff_phi_f_f;
1283  base_face_bubble_functions.resize(3 * NBFACETRI_AINSWORTH_FACE_HCURL(p) *
1284  nb_integration_pts);
1285  diff_base_face_bubble_functions.resize(
1286  2 * 3 * NBFACETRI_AINSWORTH_FACE_HCURL(p) * nb_integration_pts);
1287  phi_f_f = &*base_face_bubble_functions.data().begin();
1288  diff_phi_f_f = &*diff_base_face_bubble_functions.data().begin();
1290  faces_nodes, p, N, diffN, phi_f_f, diff_phi_f_f, nb_integration_pts,
1291  base_polynomials);
1292  CHKERRG(ierr);
1293  // cerr << diff_base_face_bubble_functions << endl;
1294 
1297 
1298  FTensor::Tensor1<double *, 3> t_face_edge_base[] = {
1299  FTensor::Tensor1<double *, 3>(&phi_f_e[0][HVEC0], &phi_f_e[0][HVEC1],
1300  &phi_f_e[0][HVEC2], 3),
1301  FTensor::Tensor1<double *, 3>(&phi_f_e[1][HVEC0], &phi_f_e[1][HVEC1],
1302  &phi_f_e[1][HVEC2], 3),
1303  FTensor::Tensor1<double *, 3>(&phi_f_e[2][HVEC0], &phi_f_e[2][HVEC1],
1304  &phi_f_e[2][HVEC2], 3)};
1305  FTensor::Tensor2<FTensor::PackPtr<double *, 6>, 3, 2> t_diff_face_edge_base[] = {
1307  &diff_phi_f_e[0][HVEC0_0], &diff_phi_f_e[0][HVEC0_1],
1308  &diff_phi_f_e[0][HVEC1_0], &diff_phi_f_e[0][HVEC1_1],
1309  &diff_phi_f_e[0][HVEC2_0], &diff_phi_f_e[0][HVEC2_1]),
1311  &diff_phi_f_e[1][HVEC0_0], &diff_phi_f_e[1][HVEC0_1],
1312  &diff_phi_f_e[1][HVEC1_0], &diff_phi_f_e[1][HVEC1_1],
1313  &diff_phi_f_e[1][HVEC2_0], &diff_phi_f_e[1][HVEC2_1]),
1315  &diff_phi_f_e[2][HVEC0_0], &diff_phi_f_e[2][HVEC0_1],
1316  &diff_phi_f_e[2][HVEC1_0], &diff_phi_f_e[2][HVEC1_1],
1317  &diff_phi_f_e[2][HVEC2_0], &diff_phi_f_e[2][HVEC2_1])};
1318 
1319  FTensor::Tensor1<double *, 3> t_face_base(&phi_f[0], &phi_f[1], &phi_f[2], 3);
1320  FTensor::Tensor2<FTensor::PackPtr<double *, 6>, 3, 2> t_diff_face_base(
1321  &diff_phi_f[HVEC0_0], &diff_phi_f[HVEC0_1], &diff_phi_f[HVEC1_0],
1322  &diff_phi_f[HVEC1_1], &diff_phi_f[HVEC2_0], &diff_phi_f[HVEC2_1]);
1323 
1324  if (NBFACETRI_AINSWORTH_FACE_HCURL(p) > 0) {
1325  FTensor::Tensor1<double *, 3> t_face_face_base(
1326  &phi_f_f[HVEC0], &phi_f_f[HVEC1], &phi_f_f[HVEC2], 3);
1327  FTensor::Tensor2<FTensor::PackPtr<double *, 6>, 3, 2> t_diff_face_face_base(
1328  &diff_phi_f_f[HVEC0_0], &diff_phi_f_f[HVEC0_1],
1329  &diff_phi_f_f[HVEC1_0], &diff_phi_f_f[HVEC1_1],
1330  &diff_phi_f_f[HVEC2_0], &diff_phi_f_f[HVEC2_1]);
1331  for (int ii = 0; ii != nb_integration_pts; ii++) {
1332  int cc = 0;
1333  for (int oo = 0; oo <= p; oo++) {
1334  // Face-edge base
1335  if (oo > 1) {
1336  for (int ee = 0; ee != 3; ee++) {
1337  for (int ll = NBFACETRI_AINSWORTH_EDGE_HCURL(oo - 1);
1338  ll != NBFACETRI_AINSWORTH_EDGE_HCURL(oo); ll++) {
1339  t_face_base(i) = t_face_edge_base[ee](i);
1340  t_diff_face_base(i, j) = t_diff_face_edge_base[ee](i, j);
1341  ++cc;
1342  ++t_face_base;
1343  ++t_face_edge_base[ee];
1344  ++t_diff_face_base;
1345  ++t_diff_face_edge_base[ee];
1346  }
1347  }
1348  }
1349  // Face-face base
1350  if (oo > 2) {
1351  for (int ll = NBFACETRI_AINSWORTH_FACE_HCURL(oo - 1);
1352  ll != NBFACETRI_AINSWORTH_FACE_HCURL(oo); ll++) {
1353  t_face_base(i) = t_face_face_base(i);
1354  t_diff_face_base(i, j) = t_diff_face_face_base(i, j);
1355  ++cc;
1356  ++t_face_base;
1357  ++t_face_face_base;
1358  ++t_diff_face_base;
1359  ++t_diff_face_face_base;
1360  }
1361  }
1362  }
1363  // check consistency
1364  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_HCURL(p);
1365  if (cc != nb_base_fun_on_face) {
1366  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1367  "Wrong number of base functions %d != %d", cc,
1368  nb_base_fun_on_face);
1369  }
1370  }
1371  } else {
1372  for (int ii = 0; ii != nb_integration_pts; ii++) {
1373  int cc = 0;
1374  for (int oo = 0; oo <= p; oo++) {
1375  // Face-edge base
1376  if (oo > 1) {
1377  for (int ee = 0; ee != 3; ee++) {
1378  for (int ll = NBFACETRI_AINSWORTH_EDGE_HCURL(oo - 1);
1379  ll != NBFACETRI_AINSWORTH_EDGE_HCURL(oo); ll++) {
1380  t_face_base(i) = t_face_edge_base[ee](i);
1381  t_diff_face_base(i, j) = t_diff_face_edge_base[ee](i, j);
1382  ++cc;
1383  ++t_face_base;
1384  ++t_face_edge_base[ee];
1385  ++t_diff_face_base;
1386  ++t_diff_face_edge_base[ee];
1387  // cerr << oo << " " << ll << " " << cc << " " <<
1388  // NBFACETRI_AINSWORTH_EDGE_HCURL(oo) << endl;
1389  }
1390  }
1391  }
1392  }
1393  // check consistency
1394  const int nb_base_fun_on_face = NBFACETRI_AINSWORTH_HCURL(p);
1395  if (cc != nb_base_fun_on_face) {
1396  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1397  "Wrong number of base functions %d != %d", cc,
1398  nb_base_fun_on_face);
1399  }
1400  }
1401  }
1402 
1404 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
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:543
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:454
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
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:659
#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 772 of file Hcurl.cpp.

777  {
778 
780 
783 
784  const int face_opposite_nodes[] = {2, 0, 1, 3};
785 
788 
789  FTensor::Tensor1<double *, 3> t_node_diff_ksi[4] = {
790  FTensor::Tensor1<double *, 3>(&diffN[0], &diffN[1], &diffN[2]),
791  FTensor::Tensor1<double *, 3>(&diffN[3], &diffN[4], &diffN[5]),
792  FTensor::Tensor1<double *, 3>(&diffN[6], &diffN[7], &diffN[8]),
793  FTensor::Tensor1<double *, 3>(&diffN[9], &diffN[10], &diffN[11])};
794  FTensor::Tensor1<double, 3> t_diff_ksi0i, t_diff_ksi0j;
795 
796  MatrixDouble m_psi_l_0i(4, p + 1);
797  MatrixDouble m_psi_l_0j(4, p + 1);
798  MatrixDouble m_diff_psi_l_0i(4, 3 * p + 3);
799  MatrixDouble m_diff_psi_l_0j(4, 3 * p + 3);
800 
801  double *psi_l_0i[] = {&m_psi_l_0i(0, 0), &m_psi_l_0i(1, 0), &m_psi_l_0i(2, 0),
802  &m_psi_l_0i(3, 0)};
803  double *psi_l_0j[] = {&m_psi_l_0j(0, 0), &m_psi_l_0j(1, 0), &m_psi_l_0j(2, 0),
804  &m_psi_l_0j(3, 0)};
805  double *diff_psi_l_0i[] = {&m_diff_psi_l_0i(0, 0), &m_diff_psi_l_0i(1, 0),
806  &m_diff_psi_l_0i(2, 0), &m_diff_psi_l_0i(3, 0)};
807  double *diff_psi_l_0j[] = {&m_diff_psi_l_0j(0, 0), &m_diff_psi_l_0j(1, 0),
808  &m_diff_psi_l_0j(2, 0), &m_diff_psi_l_0j(3, 0)};
809  double beta_f[4];
810 
811  FTensor::Tensor1<double, 3> t_diff_beta_f[4];
812 
813  FTensor::Tensor1<double *, 3> t_phi_v(&phi_v[0], &phi_v[1], &phi_v[2], 3);
815  &diff_phi_v[0], &diff_phi_v[3], &diff_phi_v[6], &diff_phi_v[1],
816  &diff_phi_v[4], &diff_phi_v[7], &diff_phi_v[2], &diff_phi_v[5],
817  &diff_phi_v[8], 9);
818 
819  for (int ii = 0; ii != nb_integration_pts; ii++) {
820 
821  for (int ff = 0; ff != 4; ff++) {
822 
823  t_diff_ksi0i(i) = t_node_diff_ksi[faces_nodes[3 * ff + 1]](i) -
824  t_node_diff_ksi[faces_nodes[3 * ff + 0]](i);
825  t_diff_ksi0j(i) = t_node_diff_ksi[faces_nodes[3 * ff + 2]](i) -
826  t_node_diff_ksi[faces_nodes[3 * ff + 0]](i);
827 
828  const int node_shift = ii * 4;
829 
830  beta_f[ff] = N[node_shift + faces_nodes[3 * ff + 0]] *
831  N[node_shift + faces_nodes[3 * ff + 1]] *
832  N[node_shift + faces_nodes[3 * ff + 2]];
833 
834  t_diff_beta_f[ff](j) = t_node_diff_ksi[faces_nodes[3 * ff + 0]](j) *
835  N[node_shift + faces_nodes[3 * ff + 1]] *
836  N[node_shift + faces_nodes[3 * ff + 2]] +
837  N[node_shift + faces_nodes[3 * ff + 0]] *
838  t_node_diff_ksi[faces_nodes[3 * ff + 1]](j) *
839  N[node_shift + faces_nodes[3 * ff + 2]] +
840  N[node_shift + faces_nodes[3 * ff + 0]] *
841  N[node_shift + faces_nodes[3 * ff + 1]] *
842  t_node_diff_ksi[faces_nodes[3 * ff + 2]](j);
843 
844  const double ksi_0i = N[node_shift + faces_nodes[3 * ff + 1]] -
845  N[node_shift + faces_nodes[3 * ff + 0]];
846  ierr = base_polynomials(p, ksi_0i, &t_diff_ksi0i(0), psi_l_0i[ff],
847  diff_psi_l_0i[ff], 3);
848  CHKERRG(ierr);
849 
850  const double ksi_0j = N[node_shift + faces_nodes[3 * ff + 2]] -
851  N[node_shift + faces_nodes[3 * ff + 0]];
852  ierr = base_polynomials(p, ksi_0j, &t_diff_ksi0j(0), psi_l_0j[ff],
853  diff_psi_l_0j[ff], 3);
854  CHKERRG(ierr);
855  }
856 
857  int cc = 0;
858  for (int oo = 0; oo <= (p - 3); oo++) {
859  FTensor::Tensor1<double *, 3> t_diff_psi_l_0i[] = {
860  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[0][0],
861  &diff_psi_l_0i[0][p + 1],
862  &diff_psi_l_0i[0][2 * p + 2], 1),
863  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[1][0],
864  &diff_psi_l_0i[1][p + 1],
865  &diff_psi_l_0i[1][2 * p + 2], 1),
866  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[2][0],
867  &diff_psi_l_0i[2][p + 1],
868  &diff_psi_l_0i[2][2 * p + 2], 1),
869  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[3][0],
870  &diff_psi_l_0i[3][p + 1],
871  &diff_psi_l_0i[3][2 * p + 2], 1),
872  };
873  for (int pp0 = 0; pp0 <= oo; pp0++) {
874  const int pp1 = oo - pp0;
875  if (pp1 >= 0) {
876  for (int ff = 0; ff != 4; ff++) {
877  FTensor::Tensor1<double *, 3> t_diff_psi_l_0j(
878  &m_diff_psi_l_0j(ff, pp1), &m_diff_psi_l_0j(ff, p + 1 + pp1),
879  &m_diff_psi_l_0j(ff, 2 * p + 2 + pp1), 1);
880  const double t = psi_l_0i[ff][pp0] * psi_l_0j[ff][pp1];
881  const double a = beta_f[ff] * t;
882  t_phi_v(i) = a * t_node_diff_ksi[face_opposite_nodes[ff]](i);
883  ++t_phi_v;
884  ++cc;
885  t_diff_phi_v(i, j) =
886  (t_diff_beta_f[ff](j) * t +
887  beta_f[ff] * t_diff_psi_l_0i[ff](j) * psi_l_0j[ff][pp1] +
888  beta_f[ff] * psi_l_0i[ff][pp0] * t_diff_psi_l_0j(j)) *
889  t_node_diff_ksi[face_opposite_nodes[ff]](i);
890  ++t_diff_phi_v;
891  ++t_diff_psi_l_0i[ff];
892  }
893  }
894  }
895  }
896 
897  const int nb_base_fun_on_face = NBVOLUMETET_AINSWORTH_FACE_HCURL(p);
898  if (cc != nb_base_fun_on_face) {
899  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
900  "Wrong number of base functions %d != %d", cc,
901  nb_base_fun_on_face);
902  }
903  }
904 
906 }
#define NBVOLUMETET_AINSWORTH_FACE_HCURL(P)
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
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:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
const int N
Definition: speed_test.cpp:3

◆ Hcurl_Ainsworth_VolumeFunctions_MBTET()

MoFEMErrorCode MoFEM::Hcurl_Ainsworth_VolumeFunctions_MBTET ( 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 
)

H-curl volume base functions.

Volume base functions are collection of iace interior base functions and volume interior base functions.

Parameters
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 1406 of file Hcurl.cpp.

1411  {
1412