v0.8.14
Classes | Typedefs | Functions | Variables
MoFEM Namespace Reference

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

Classes

struct  AccelerationCubitBcData
 Definition of the acceleration bc data structure. More...
 
struct  BaseFEDofEntity
 keeps basic information about indexed dofs for 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  CfgCubitBcData
 Definition of the cfd_bc data structure. More...
 
struct  ComposedProblemsData
 
struct  Composite_Cubit_msId_And_MeshSetType_mi_tag
 
struct  Composite_Ent_and_ShortId_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. 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  ErrorCheckerCode
 Error check for inline function check. More...
 
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  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
 user adjacency function table 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 sections. 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  LengthMapData
 
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  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  MoFEMErrorCodeGeneric
 
struct  MoFEMErrorCodeGeneric< moab::ErrorCode >
 
struct  MoFEMErrorCodeGeneric< PetscErrorCode >
 
struct  MoFEMException
 Exception to catch. More...
 
struct  MoFEMExceptionInitial
 
struct  MoFEMExceptionRepeat
 
struct  MOFEMuuid
 MoFEM interface unique ID. More...
 
struct  NodeMergerInterface
 merge node from two bit levels 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_mofem_part_and_all_index_change
 
struct  NumeredDofEntity_part_change
 
struct  NumeredEntFiniteElement
 Partitioned (Indexed) Finite Element in Problem. More...
 
struct  NumeredEntFiniteElement_change_part
 Change finite element part. 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  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  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  OpCalculateTensor2SymmetricFieldValues
 
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  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  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  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  SaveData
 
struct  SeriesID_mi_tag
 
struct  SeriesName_mi_tag
 
struct  SeriesRecorder
 
struct  SetBitRefLevelTool
 tool class with methods used more than twp times More...
 
struct  SideNumber_mi_tag
 
struct  Simple
 Simple interface for fast problem set-up. 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  TemperatureCubitBcData
 Definition of the temperature bc data structure. More...
 
struct  TetGenInterface
 use TetGen to generate mesh 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  UpdateMeshsets
 
struct  VecManager
 Vector manager is used to create 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 moab::ErrorCode MoABErrorCode
 MoAB error code. More...
 
typedef PetscErrorCode MoFEMErrorCode
 MoFEM/PETSc error code. More...
 
typedef int DofIdx
 Index of DOF. More...
 
typedef int FEIdx
 Index of the element. More...
 
typedef int EntIdx
 Index of DOF on the entity. More...
 
typedef int EntPart
 Partition owning entity. More...
 
typedef double FieldData
 Field data type. More...
 
typedef int ApproximationOrder
 Approximation on the entity. More...
 
typedef int FieldCoefficientsNumber
 Number of field coefficients. More...
 
typedef uint128_t UId
 Unique Id. More...
 
typedef int ShortId
 Unique Id in the field. More...
 
typedef std::bitset< BITREFEDGES_SIZEBitRefEdges
 
typedef std::bitset< BITREFLEVEL_SIZEBitRefLevel
 Bit structure attached to each entity identifying to what mesh entity is attached. More...
 
typedef std::bitset< BITFIELDID_SIZEBitFieldId
 
typedef std::bitset< BITFEID_SIZEBitFEId
 
typedef std::bitset< BITPROBLEMID_SIZEBitProblemId
 
typedef std::bitset< BITINTERFACEUID_SIZEBitIntefaceId
 
typedef std::bitset< 32 > CubitBCType
 
typedef std::vector< int, std::allocator< int > > IntAllocator
 
typedef std::vector< double, std::allocator< double > > DoubleAllocator
 
typedef ublas::vector< int, IntAllocatorVectorInt
 
typedef ublas::vector< double, DoubleAllocatorVectorDouble
 
typedef ublas::matrix< double, ublas::row_major, DoubleAllocatorMatrixDouble
 
template<typename T , size_t N>
using VectorBoundedArray = ublas::vector< T, ublas::bounded_array< T, N > >
 
typedef VectorBoundedArray< int, 3 > VectorInt3
 
typedef VectorBoundedArray< int, 9 > VectorInt9
 
typedef VectorBoundedArray< double, 3 > VectorDouble3
 
typedef VectorBoundedArray< double, 6 > VectorDouble6
 
typedef VectorBoundedArray< double, 9 > VectorDouble9
 
typedef VectorBoundedArray< double, 12 > VectorDouble12
 
template<typename T , size_t N>
using MatrixBoundedArray = ublas::matrix< T, ublas::row_major, ublas::bounded_array< T, N > >
 
typedef MatrixBoundedArray< double, 9 > MatrixDouble3by3
 
template<typename T >
using VectorShallowArrayAdaptor = ublas::vector< T, ublas::shallow_array_adaptor< T > >
 
typedef VectorShallowArrayAdaptor< doubleVectorAdaptor
 
typedef VectorShallowArrayAdaptor< intVectorIntAdaptor
 
template<typename T >
using MatrixShallowArrayAdaptor = ublas::matrix< double, ublas::row_major, ublas::shallow_array_adaptor< double > >
 
typedef MatrixShallowArrayAdaptor< doubleMatrixAdaptor
 
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 multi_index_container< LengthMapData, indexed_by< ordered_non_unique< member< LengthMapData, double, &LengthMapData::lEngth > >, hashed_unique< member< LengthMapData, EntityHandle, &LengthMapData::eDge > > >> LengthMapData_multi_index
 
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, UId, &DofEntity::getGlobalUniqueId > > > > DofEntity_multiIndex_uid_view
 multi-index view on DofEntity by uid More...
 
typedef multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< const_mem_fun< DofEntity, 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 multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_non_unique< const_mem_fun< DofEntity, ApproximationOrder, &DofEntity::getDofOrder > > > > DofEntity_multiIndex_order_view
 multi-index view on DofEntity order More...
 
typedef multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_non_unique< const_mem_fun< DofEntity::interface_type_RefEntity, EntityType, &DofEntity::getEntType > > > > DofEntity_multiIndex_ent_type_view
 multi-index view on DofEntity type 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, DofIdx, &NumeredDofEntity::getPetscGlobalDofIdx > > > > NumeredDofEntity_multiIndex_petsc_global_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< NumeredDofEntity >, indexed_by< ordered_unique< member< NumeredDofEntity, const DofIdx, &NumeredDofEntity::petscGloablDofIdx > > > > NumeredDofEntity_multiIndex_global_index_view
 
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< 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< 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

template<class X >
std::string toString (X x)
 
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)
 
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)
 
void tet_type_6 (Interface &moab, const EntityHandle *conn, const EntityHandle *edge_new_nodes, EntityHandle *new_tets_conn)
 
int tet_type_5 (Interface &moab, const EntityHandle *conn, const EntityHandle *edge_new_nodes, EntityHandle *new_tets_conn)
 
template<class TYPE >
static MoFEMErrorCode get_value (MatrixDouble &pts_x, MatrixDouble &pts_t, TYPE *ctx)
 
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. More...
 
template<class T1 , class T2 , class T3 >
MoFEMErrorCode invertTensor3by3 (T1 &t, T2 &det, T3 &inv_t)
 Calculate matrix inverse. More...
 
template<class T , class A >
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FromVec (ublas::vector< T, A > &data)
 Get tensor rank 0 (scalar) form data vectorExample how to use it. More...
 
template<class T , class A >
DEPRECATED FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getTensor0FormData (ublas::vector< T, A > &data)
 
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 >
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>
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_Dim>
DEPRECATED FTensor::Tensor1< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getTensor1FormData (MatrixDouble &data)
 
template<int Tensor_Dim0, int Tensor_Dim1, class T , class L , class A >
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)
 Get tensor rank 2 (matrix) form data matrix (specialization) More...
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 3, 2 > getFTensor2FromMat (MatrixDouble &data)
 Get tensor rank 2 (matrix) form data matrix (specialization) More...
 
template<int Tensor_Dim0, int Tensor_Dim1>
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_Dim0, int Tensor_Dim1>
DEPRECATED FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim0, Tensor_Dim1 > getTensor2FormData (MatrixDouble &data)
 
template<int Tensor_Dim, class T , class L , class A >
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>
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor2SymmetricFromMat (MatrixDouble &data)
 Get symmetric tensor rank 2 form matrix. More...
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 3, 3 > getFTensor2FromMat< 3, 3, double, ublas::row_major, DoubleAllocator > (MatrixDouble &data)
 
template<>
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, 3, 2 > getFTensor2FromMat< 3, 2, double, ublas::row_major, DoubleAllocator > (MatrixDouble &data)
 
template<>
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, 3 > getFTensor2SymmetricFromMat< 3, double, ublas::row_major, DoubleAllocator > (MatrixDouble &data)
 
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 DOFMULTIINDEX >
static int getMaxOrder (const DOFMULTIINDEX &dof_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)
 
static double get_ave_edge_length (const EntityHandle ent, const Range &vol_edges, moab::Interface &moab)
 
static med_geometrie_element moab2med_element_type (const EntityType type)
 
std::ostream & operator<< (std::ostream &os, const MedInterface::FieldData &field_data)
 
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)
 
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 (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)
 
template<typename FE_DOFS , typename MOFEM_DOFS , typename MOFEM_DOFS_VIEW >
static MoFEMErrorCode get_fe_dof_view (const FE_DOFS &fe_dofs_view, const MOFEM_DOFS &mofem_dofs, MOFEM_DOFS_VIEW &mofem_dofs_view, const int operation_type)
 
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)
 
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 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 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 DMSetFromOptions_MoFEM (DM dm)
 
PetscErrorCode DMSetUp_MoFEM (DM dm)
 
PetscErrorCode DMSubDMSetUp_MoFEM (DM subdm)
 
PetscErrorCode DMMoFEMAddSubFieldRow (DM dm, const char field_name[])
 
PetscErrorCode DMMoFEMAddSubFieldCol (DM dm, const char field_name[])
 
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)
 
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 SNESMoFEMSetAssmblyType (SNES snes, MatAssemblyType type)
 
MoFEMErrorCode SNESMoFEMSetBehavior (SNES snes, MoFEMTypes bh)
 Set behavior if finite element in sequence does not exist. More...
 
PetscErrorCode f_TSSetIFunction (TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
 
PetscErrorCode f_TSSetIJacobian (TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
 
PetscErrorCode f_TSMonitorSet (TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
 

Variables

DEPRECATED typedef IntAllocator IntAllacator
 
DEPRECATED typedef DoubleAllocator DoubleAllacator
 
DEPRECATED typedef DataForcesAndSourcesCore DataForcesAndSurcesCore
 
DEPRECATED typedef DerivedDataForcesAndSourcesCore DerivedDataForcesAndSurcesCore
 
DEPRECATED typedef EdgeElementForcesAndSourcesCore EdgeElementForcesAndSurcesCore
 Use EdgeElementForcesAndSourcesCore. More...
 
DEPRECATED typedef FaceElementForcesAndSourcesCore FaceElementForcesAndSurcesCore
 
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
 
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
 
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
 
const EntityHandle no_handle = 0
 
auto getVectorAdaptor
 Get Vector adaptor. 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 = MOFEMuuid(BitIntefaceId(FATPRISM_BASE_FUNCTION_INTERFACE))
 
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_MOFEMCoreInterface
 
static const MOFEMuuid IDD_MOFEMDeprecatedCoreInterface
 
static const MOFEMuuid IDD_MOFEMISManager = MOFEMuuid( BitIntefaceId(ISMANAGER_INTERFACE) )
 
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_MOFEMMedInterface = MOFEMuuid( BitIntefaceId(MED_INTERFACE) )
 
static const MOFEMuuid IDD_MOFEMMeshRefine
 
static const MOFEMuuid IDD_MOFEMMeshsetsManager
 
static const MOFEMuuid IDD_MOFEMNodeMerger = MOFEMuuid( BitIntefaceId(NODEMERGER_INTERFACE) )
 
static const MOFEMuuid IDD_MOFEMPrismInterface
 
static const MOFEMuuid IDD_MOFEMPrismsFromSurface = MOFEMuuid(BitIntefaceId(PRISMSFROMSURFACE_INTERFACE))
 
static const MOFEMuuid IDD_MOFEMProblemsManager
 
static const MOFEMuuid IDD_MOFEMSeriesRecorder = MOFEMuuid( BitIntefaceId(SERIES_RECORDER) )
 
static const MOFEMuuid IDD_MOFEMSimple = MOFEMuuid( BitIntefaceId(SIMPLE_INTERFACE) )
 
static const MOFEMuuid IDD_MOFEMTetGegInterface
 
static const MOFEMuuid IDD_MOFEMTools = MOFEMuuid( BitIntefaceId(TOOLS) )
 
static const MOFEMuuid IDD_MOFEMUnknown
 
static const MOFEMuuid IDD_MOFEMVEC = MOFEMuuid( BitIntefaceId(VECMANAGER_INTERFACE) )
 
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
 
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 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/

Typedef Documentation

◆ ApproximationOrder

Approximation on the entity.

Definition at line 131 of file Common.hpp.

◆ BasicMethodsSequence

Definition at line 54 of file AuxPETSc.hpp.

◆ BitFEId

typedef std::bitset<BITFEID_SIZE> MoFEM::BitFEId

Definition at line 150 of file Common.hpp.

◆ BitFieldId

typedef std::bitset<BITFIELDID_SIZE> MoFEM::BitFieldId

Definition at line 149 of file Common.hpp.

◆ BitIntefaceId

Definition at line 152 of file Common.hpp.

◆ BitProblemId

typedef std::bitset<BITPROBLEMID_SIZE> MoFEM::BitProblemId

Definition at line 151 of file Common.hpp.

◆ BitRefEdges

typedef std::bitset<BITREFEDGES_SIZE> MoFEM::BitRefEdges

Definition at line 141 of file Common.hpp.

◆ BitRefLevel

typedef std::bitset<BITREFLEVEL_SIZE> MoFEM::BitRefLevel

Bit structure attached to each entity identifying to what mesh entity is attached.

Examples:
field_to_vertices.cpp, forces_and_sources_testing_users_base.cpp, MagneticElement.hpp, mesh_cut.cpp, mesh_smoothing.cpp, Remodeling.hpp, split_sideset.cpp, unsaturated_transport.cpp, and UnsaturatedFlow.hpp.

Definition at line 147 of file Common.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.

◆ CubitBCType

bc & material meshsets

Definition at line 200 of file Common.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 406 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.

◆ DofIdx

typedef int MoFEM::DofIdx

Index of DOF.

Definition at line 126 of file Common.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.

◆ DoubleAllocator

typedef std::vector<double, std::allocator<double> > MoFEM::DoubleAllocator

Definition at line 207 of file Common.hpp.

◆ EntIdx

typedef int MoFEM::EntIdx

Index of DOF on the entity.

Definition at line 128 of file Common.hpp.

◆ EntPart

Partition owning entity.

Definition at line 129 of file Common.hpp.

◆ FEIdx

typedef int MoFEM::FEIdx

Index of the element.

Definition at line 127 of file Common.hpp.

◆ FEMethodsSequence

Definition at line 53 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 492 of file FieldMultiIndices.hpp.

◆ FieldCoefficientsNumber

Number of field coefficients.

Definition at line 132 of file Common.hpp.

◆ FieldData

Field data type.

Definition at line 130 of file Common.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 835 of file EntsMultiIndices.hpp.

◆ IntAllocator

typedef std::vector<int, std::allocator<int> > MoFEM::IntAllocator

Definition at line 206 of file Common.hpp.

◆ LengthMapData_multi_index

typedef multi_index_container< LengthMapData, indexed_by< ordered_non_unique< member<LengthMapData, double, &LengthMapData::lEngth> >, hashed_unique< member<LengthMapData, EntityHandle, &LengthMapData::eDge> > >> MoFEM::LengthMapData_multi_index

Definition at line 1608 of file CutMeshInterface.cpp.

◆ MatrixAdaptor

Examples:
SmallStrainPlasticity.hpp.

Definition at line 266 of file Common.hpp.

◆ MatrixBoundedArray

template<typename T , size_t N>
using MoFEM::MatrixBoundedArray = typedef ublas::matrix<T, ublas::row_major, ublas::bounded_array<T, N> >

Definition at line 227 of file Common.hpp.

◆ MatrixDouble

typedef ublas::matrix<double, ublas::row_major, DoubleAllocator> MoFEM::MatrixDouble

◆ MatrixDouble3by3

Definition at line 228 of file Common.hpp.

◆ MatrixShallowArrayAdaptor

template<typename T >
using MoFEM::MatrixShallowArrayAdaptor = typedef ublas::matrix<double, ublas::row_major, ublas::shallow_array_adaptor<double> >

Definition at line 265 of file Common.hpp.

◆ MoABErrorCode

typedef moab::ErrorCode MoFEM::MoABErrorCode

MoAB error code.

Definition at line 59 of file Common.hpp.

◆ MoFEMErrorCode

typedef PetscErrorCode MoFEM::MoFEMErrorCode

◆ NumeredDofEntity_multiIndex_coeff_idx_ordered_non_unique

Definition at line 777 of file DofsMultiIndices.hpp.

◆ NumeredDofEntity_multiIndex_global_index_view

typedef multi_index_container< boost::shared_ptr<NumeredDofEntity>, indexed_by<ordered_unique<member<NumeredDofEntity, const DofIdx, &NumeredDofEntity::petscGloablDofIdx> > > > MoFEM::NumeredDofEntity_multiIndex_global_index_view

Definition at line 872 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 758 of file DofsMultiIndices.hpp.

◆ NumeredDofEntity_multiIndex_petsc_global_dof_view_ordered_non_unique

typedef multi_index_container< boost::shared_ptr<NumeredDofEntity>, indexed_by<ordered_non_unique<const_mem_fun< NumeredDofEntity, DofIdx, &NumeredDofEntity::getPetscGlobalDofIdx> > > > MoFEM::NumeredDofEntity_multiIndex_petsc_global_dof_view_ordered_non_unique

Definition at line 770 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 764 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 752 of file DofsMultiIndices.hpp.

◆ RefElement_multiIndex_parents_view

Definition at line 229 of file FEMultiIndices.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 468 of file EntsMultiIndices.hpp.

◆ ShortId

Unique Id in the field.

Definition at line 137 of file Common.hpp.

◆ UId

typedef uint128_t MoFEM::UId

Unique Id.

Definition at line 136 of file Common.hpp.

◆ VectorAdaptor

Examples:
SmallStrainPlasticity.hpp.

Definition at line 234 of file Common.hpp.

◆ VectorBoundedArray

template<typename T , size_t N>
using MoFEM::VectorBoundedArray = typedef ublas::vector<T, ublas::bounded_array<T, N> >

Definition at line 216 of file Common.hpp.

◆ VectorDofs

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

Definition at line 34 of file DataStructures.hpp.

◆ VectorDouble

typedef ublas::vector<double, DoubleAllocator> MoFEM::VectorDouble

◆ VectorDouble12

Definition at line 223 of file Common.hpp.

◆ VectorDouble3

Examples:
mesh_smoothing.cpp.

Definition at line 220 of file Common.hpp.

◆ VectorDouble6

Definition at line 221 of file Common.hpp.

◆ VectorDouble9

Definition at line 222 of file Common.hpp.

◆ VectorInt

typedef ublas::vector<int, IntAllocator> MoFEM::VectorInt

Definition at line 210 of file Common.hpp.

◆ VectorInt3

Definition at line 218 of file Common.hpp.

◆ VectorInt9

Definition at line 219 of file Common.hpp.

◆ VectorIntAdaptor

Definition at line 235 of file Common.hpp.

◆ VectorShallowArrayAdaptor

template<typename T >
using MoFEM::VectorShallowArrayAdaptor = typedef ublas::vector<T, ublas::shallow_array_adaptor<T> >

Definition at line 233 of file Common.hpp.

Function Documentation

◆ constructor_data()

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

Definition at line 138 of file DataStructures.cpp.

139  {
140 
142 
143  data->dataOnEntities[MBENTITYSET].push_back(new EntData());
144 
145  switch (type) {
146  case MBENTITYSET:
147  break;
148  case MBTET:
149  data->dataOnEntities[MBVERTEX].push_back(new EntData());
150  for (int ee = 0; ee != 6; ++ee) {
151  data->dataOnEntities[MBEDGE].push_back(new EntData());
152  }
153  for (int ff = 0; ff != 4; ++ff) {
154  data->dataOnEntities[MBTRI].push_back(new EntData());
155  }
156  data->dataOnEntities[MBTET].push_back(new EntData());
157  break;
158  case MBTRI:
159  data->dataOnEntities[MBVERTEX].push_back(new EntData());
160  for (int ee = 0; ee != 3; ++ee) {
161  data->dataOnEntities[MBEDGE].push_back(new EntData());
162  }
163  data->dataOnEntities[MBTRI].push_back(new EntData());
164  break;
165  case MBEDGE:
166  data->dataOnEntities[MBVERTEX].push_back(new EntData());
167  data->dataOnEntities[MBEDGE].push_back(new EntData());
168  break;
169  case MBVERTEX:
170  data->dataOnEntities[MBVERTEX].push_back(new EntData());
171  break;
172  case MBPRISM:
173  data->dataOnEntities[MBVERTEX].push_back(new EntData());
174  for (int ee = 0; ee != 9; ++ee) {
175  data->dataOnEntities[MBEDGE].push_back(new EntData());
176  }
177  for (int qq = 0; qq != 5; ++qq) {
178  data->dataOnEntities[MBQUAD].push_back(new EntData());
179  }
180  for (int ff = 0; ff != 5; ++ff) {
181  data->dataOnEntities[MBTRI].push_back(new EntData());
182  }
183  data->dataOnEntities[MBPRISM].push_back(new EntData());
184  break;
185  default:
187  }
188 }
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 202 of file DataStructures.cpp.

204  {
205 
207  using DerivedEntData = DerivedDataForcesAndSourcesCore::DerivedEntData;
208 
209  for (int tt = MBVERTEX; tt != MBMAXTYPE; ++tt) {
210  auto &ent_data = data_ptr->dataOnEntities[tt];
211  auto &derived_ent_data = derived_data->dataOnEntities[tt];
212  for (auto &e : ent_data) {
213  boost::shared_ptr<EntData> ent_data_ptr(data_ptr, &e);
214  derived_ent_data.push_back(new DerivedEntData(ent_data_ptr));
215  }
216  }
217 }
DataForcesAndSourcesCore::EntData EntData

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

380  {
382  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
384  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
385  *destroy_problem = dm_field->destroyProblem;
387 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

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

282  {
284  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
286  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
287  if (dm_field->isSubDM != PETSC_TRUE) {
288  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
289  "This DM is not created as a SubDM");
290  }
291  if (dm_field->isProblemBuild != PETSC_TRUE) {
292  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "Problem is not build");
293  }
294  boost::shared_ptr<Problem::SubProblemData> sub_data =
295  dm_field->problemPtr->getSubData();
296  CHKERR sub_data->getColIs(is);
298 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

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

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

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

586  {
587  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
589  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
590  if (pre_only) {
591  dm_field->kspCtx->get_preProcess_to_do_Mat().push_back(pre_only);
592  }
593  if (method) {
594  dm_field->kspCtx->get_loops_to_do_Mat().push_back(
595  PairNameFEMethodPtr(fe_name, method));
596  }
597  if (post_only) {
598  dm_field->kspCtx->get_postProcess_to_do_Mat().push_back(post_only);
599  }
600  CHKERR DMKSPSetComputeOperators(dm, KspMat, dm_field->kspCtx.get());
602 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
PetscErrorCode KspMat(KSP ksp, Mat A, Mat B, void *ctx)
Run over elenents in the list.
Definition: KspCtx.cpp:90
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

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

545  {
546  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
548  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
549  if (pre_only) {
550  dm_field->kspCtx->get_preProcess_to_do_Rhs().push_back(pre_only);
551  }
552  if (method) {
553  dm_field->kspCtx->get_loops_to_do_Rhs().push_back(
554  PairNameFEMethodPtr(fe_name, method));
555  }
556  if (post_only) {
557  dm_field->kspCtx->get_postProcess_to_do_Rhs().push_back(post_only);
558  }
559  CHKERR DMKSPSetComputeRHS(dm, KspRhs, dm_field->kspCtx.get());
561 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
PetscErrorCode KspRhs(KSP ksp, Vec f, void *ctx)
Run over elements in the lists.
Definition: KspCtx.cpp:54
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

◆ 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

Definition at line 371 of file DMMMoFEM.cpp.

371  {
373  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
375  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
376  dm_field->destroyProblem = destroy_problem;
378 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

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

1180  {
1181  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
1183  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
1184  dm_field->verbosity = verb;
1186 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

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

626  {
627  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
629  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
630  if (pre_only) {
631  dm_field->snesCtx->get_preProcess_to_do_Rhs().push_back(pre_only);
632  }
633  if (method) {
634  dm_field->snesCtx->get_loops_to_do_Rhs().push_back(
635  PairNameFEMethodPtr(fe_name, method));
636  }
637  if (post_only) {
638  dm_field->snesCtx->get_postProcess_to_do_Rhs().push_back(post_only);
639  }
640  CHKERR DMSNESSetFunction(dm, SnesRhs, dm_field->snesCtx.get());
642 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403
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:55

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

667  {
668  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
670  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
671  if (pre_only) {
672  dm_field->snesCtx->get_preProcess_to_do_Mat().push_back(pre_only);
673  }
674  if (method) {
675  dm_field->snesCtx->get_loops_to_do_Mat().push_back(
676  PairNameFEMethodPtr(fe_name, method));
677  }
678  if (post_only) {
679  dm_field->snesCtx->get_postProcess_to_do_Mat().push_back(post_only);
680  }
681  CHKERR DMSNESSetJacobian(dm, SnesMat, dm_field->snesCtx.get());
683 }
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:128
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

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

708  {
709  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
711  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
712  if (pre_only) {
713  dm_field->tsCtx->get_preProcess_to_do_IFunction().push_back(pre_only);
714  }
715  if (method) {
716  dm_field->tsCtx->get_loops_to_do_IFunction().push_back(
717  PairNameFEMethodPtr(fe_name, method));
718  }
719  if (post_only) {
720  dm_field->tsCtx->get_postProcess_to_do_IFunction().push_back(post_only);
721  }
722  CHKERR DMTSSetIFunction(dm, f_TSSetIFunction, dm_field->tsCtx.get());
724 }
PetscErrorCode f_TSSetIFunction(TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
Definition: TsCtx.cpp:56
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

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

751  {
752  PetscValidHeaderSpecific(dm, DM_CLASSID, 1);
754  DMCtx *dm_field = static_cast<DMCtx *>(dm->data);
755  if (pre_only) {
756  dm_field->tsCtx->get_preProcess_to_do_IJacobian().push_back(pre_only);
757  }
758  if (method) {
759  dm_field->tsCtx->get_loops_to_do_IJacobian().push_back(
760  PairNameFEMethodPtr(fe_name, method));
761  }
762  if (post_only) {
763  dm_field->tsCtx->get_postProcess_to_do_IJacobian().push_back(post_only);
764  }
765  CHKERR DMTSSetIJacobian(dm, f_TSSetIJacobian, dm_field->tsCtx.get());
767 }
PetscErrorCode f_TSSetIJacobian(TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
Definition: TsCtx.cpp:119
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

◆ f_TSMonitorSet()

PetscErrorCode MoFEM::f_TSMonitorSet ( TS  ts,
PetscInt  step,
PetscReal  t,
Vec  u,
void *  ctx 
)
Examples:
UnsaturatedFlow.hpp.

Definition at line 187 of file TsCtx.cpp.

187  {
188  // PetscValidHeaderSpecific(ts,TS_CLASSID,1);
190  TsCtx* ts_ctx = (TsCtx*)ctx;
191  PetscLogEventBegin(ts_ctx->MOFEM_EVENT_TsCtxRHSFunction,0,0,0,0);
192  ierr = VecGhostUpdateBegin(u,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
193  ierr = VecGhostUpdateEnd(u,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
194  ierr = ts_ctx->mField.getInterface<VecManager>()->setLocalGhostVector(
195  ts_ctx->problemName,COL,u,INSERT_VALUES,SCATTER_REVERSE
196  ); CHKERRG(ierr);
197  //preproces
198  TsCtx::BasicMethodsSequence::iterator bit = ts_ctx->preProcess_Monitor.begin();
199  for(;bit!=ts_ctx->preProcess_Monitor.end();bit++) {
200  (*bit)->ts_u = u;
201  (*bit)->ts_t = t;
202  (*bit)->ts_step = step;
203  (*bit)->ts_F = PETSC_NULL;
204  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSSETIJACOBIAN);
205  ierr = (*bit)->setTs(ts); CHKERRG(ierr);
206  ierr = ts_ctx->mField.problem_basic_method_preProcess(ts_ctx->problemName,*(*(bit))); CHKERRG(ierr);
207  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSNONE); CHKERRG(ierr); CHKERRG(ierr);
208  }
209  TsCtx::FEMethodsSequence::iterator lit = ts_ctx->loops_to_do_Monitor.begin();
210  for(;lit!=ts_ctx->loops_to_do_Monitor.end();lit++) {
211  lit->second->ts_u = u;
212  lit->second->ts_t = t;
213  lit->second->ts_step = step;
214  lit->second->ts_F = PETSC_NULL;
215  ierr = lit->second->setTsCtx(TSMethod::CTX_TSTSMONITORSET);
216  ierr = lit->second->setTs(ts); CHKERRG(ierr);
217  ierr = ts_ctx->mField.loop_finite_elements(ts_ctx->problemName,lit->first,*(lit->second),ts_ctx->bH); CHKERRG(ierr);
218  ierr = lit->second->setTsCtx(TSMethod::CTX_TSNONE);
219  }
220  //post process
221  bit = ts_ctx->postProcess_Monitor.begin();
222  for(;bit!=ts_ctx->postProcess_Monitor.end();bit++) {
223  (*bit)->ts_u = u;
224  (*bit)->ts_t = t;
225  (*bit)->ts_step = step;
226  (*bit)->ts_F = PETSC_NULL;
227  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSSETIJACOBIAN);
228  ierr = (*bit)->setTs(ts); CHKERRG(ierr);
229  ierr = ts_ctx->mField.problem_basic_method_postProcess(ts_ctx->problemName,*(*(bit))); CHKERRG(ierr);
230  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSNONE); CHKERRG(ierr);
231  }
232  PetscLogEventEnd(ts_ctx->MOFEM_EVENT_TsCtxRHSFunction,0,0,0,0);
234 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

◆ f_TSSetIFunction()

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

Definition at line 56 of file TsCtx.cpp.

56  {
57  // PetscValidHeaderSpecific(ts,TS_CLASSID,1);
59  TsCtx* ts_ctx = (TsCtx*)ctx;
60  PetscLogEventBegin(ts_ctx->MOFEM_EVENT_TsCtxIFunction,0,0,0,0);
61  ierr = VecGhostUpdateBegin(u,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
62  ierr = VecGhostUpdateEnd(u,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
63  ierr = VecGhostUpdateBegin(u_t,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
64  ierr = VecGhostUpdateEnd(u_t,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
65  ierr = ts_ctx->mField.getInterface<VecManager>()->setLocalGhostVector(
66  ts_ctx->problemName,COL,u,INSERT_VALUES,SCATTER_REVERSE
67  ); CHKERRG(ierr);
68  ierr = VecZeroEntries(F); CHKERRG(ierr);
69  ierr = VecGhostUpdateBegin(F,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
70  ierr = VecGhostUpdateEnd(F,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
71  int step;
72  ierr = TSGetTimeStepNumber(ts,&step); CHKERRG(ierr);
73  //preprocess
74  TsCtx::BasicMethodsSequence::iterator bit = ts_ctx->preProcess_IFunction.begin();
75  for(;bit!=ts_ctx->preProcess_IFunction.end();bit++) {
76  (*bit)->ts_u = u;
77  (*bit)->ts_u_t = u_t;
78  (*bit)->ts_F = F;
79  (*bit)->ts_t = t;
80  (*bit)->ts_step = step;
81  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSSETIFUNCTION);
82  ierr = (*bit)->setTs(ts); CHKERRG(ierr);
83  ierr = ts_ctx->mField.problem_basic_method_preProcess(ts_ctx->problemName,*(*(bit))); CHKERRG(ierr);
84  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSNONE);
85  }
86  //fe loops
87  TsCtx::FEMethodsSequence::iterator lit = ts_ctx->loops_to_do_IFunction.begin();
88  for(;lit!=ts_ctx->loops_to_do_IFunction.end();lit++) {
89  lit->second->ts_u = u;
90  lit->second->ts_u_t = u_t;
91  lit->second->ts_F = F;
92  lit->second->ts_t = t;
93  lit->second->ts_step = step;
94  ierr = lit->second->setTsCtx(TSMethod::CTX_TSSETIFUNCTION);
95  ierr = lit->second->setTs(ts); CHKERRG(ierr);
96  ierr = ts_ctx->mField.loop_finite_elements(ts_ctx->problemName,lit->first,*(lit->second),ts_ctx->bH); CHKERRG(ierr);
97  ierr = lit->second->setTsCtx(TSMethod::CTX_TSNONE);
98  }
99  //post process
100  bit = ts_ctx->postProcess_IFunction.begin();
101  for(;bit!=ts_ctx->postProcess_IFunction.end();bit++) {
102  (*bit)->ts_u = u;
103  (*bit)->ts_u_t = u_t;
104  (*bit)->ts_F = F;
105  (*bit)->ts_t = t;
106  (*bit)->ts_step = step;
107  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSSETIFUNCTION);
108  ierr = (*bit)->setTs(ts); CHKERRG(ierr);
109  ierr = ts_ctx->mField.problem_basic_method_postProcess(ts_ctx->problemName,*(*(bit))); CHKERRG(ierr);
110  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSNONE);
111  }
112  ierr = VecGhostUpdateBegin(F,ADD_VALUES,SCATTER_REVERSE); CHKERRG(ierr);
113  ierr = VecGhostUpdateEnd(F,ADD_VALUES,SCATTER_REVERSE); CHKERRG(ierr);
114  ierr = VecAssemblyBegin(F); CHKERRG(ierr);
115  ierr = VecAssemblyEnd(F); CHKERRG(ierr);
116  PetscLogEventEnd(ts_ctx->MOFEM_EVENT_TsCtxIFunction,0,0,0,0);
118 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

◆ f_TSSetIJacobian()

PetscErrorCode MoFEM::f_TSSetIJacobian ( TS  ts,
PetscReal  t,
Vec  u,
Vec  u_t,
PetscReal  a,
Mat  A,
Mat  B,
void *  ctx 
)

Definition at line 119 of file TsCtx.cpp.

119  {
120  // PetscValidHeaderSpecific(ts,TS_CLASSID,1);
122  TsCtx* ts_ctx = (TsCtx*)ctx;
123  PetscLogEventBegin(ts_ctx->MOFEM_EVENT_TsCtxIFunction,0,0,0,0);
124  ierr = VecGhostUpdateBegin(u,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
125  ierr = VecGhostUpdateEnd(u,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
126  ierr = VecGhostUpdateBegin(u_t,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
127  ierr = VecGhostUpdateEnd(u_t,INSERT_VALUES,SCATTER_FORWARD); CHKERRG(ierr);
128  ierr = ts_ctx->mField.getInterface<VecManager>()->setLocalGhostVector(
129  ts_ctx->problemName,COL,u,INSERT_VALUES,SCATTER_REVERSE
130  ); CHKERRG(ierr);
131  if(ts_ctx->zeroMatrix) {
132  ierr = MatZeroEntries(B); CHKERRG(ierr);
133  }
134  int step;
135  ierr = TSGetTimeStepNumber(ts,&step); CHKERRG(ierr);
136  //preproces
137  TsCtx::BasicMethodsSequence::iterator bit = ts_ctx->preProcess_IJacobian.begin();
138  for(;bit!=ts_ctx->preProcess_IJacobian.end();bit++) {
139  (*bit)->ts_u = u;
140  (*bit)->ts_u_t = u_t;
141  (*bit)->ts_A = A;
142  (*bit)->ts_B = B;
143  (*bit)->ts_t = t;
144  (*bit)->ts_a = a;
145  (*bit)->ts_step = step;
146  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSSETIJACOBIAN);
147  ierr = (*bit)->setTs(ts); CHKERRG(ierr);
148  ierr = ts_ctx->mField.problem_basic_method_preProcess(ts_ctx->problemName,*(*(bit))); CHKERRG(ierr);
149  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSNONE); CHKERRG(ierr); CHKERRG(ierr);
150  }
151  TsCtx::FEMethodsSequence::iterator lit = ts_ctx->loops_to_do_IJacobian.begin();
152  for(;lit!=ts_ctx->loops_to_do_IJacobian.end();lit++) {
153  lit->second->ts_u = u;
154  lit->second->ts_u_t = u_t;
155  lit->second->ts_A = A;
156  lit->second->ts_B = B;
157  lit->second->ts_t = t;
158  lit->second->ts_a = a;
159  lit->second->ts_step = step;
160  ierr = lit->second->setTsCtx(TSMethod::CTX_TSSETIJACOBIAN);
161  ierr = lit->second->setTs(ts); CHKERRG(ierr);
162  ierr = ts_ctx->mField.loop_finite_elements(ts_ctx->problemName,lit->first,*(lit->second),ts_ctx->bH); CHKERRG(ierr);
163  ierr = lit->second->setTsCtx(TSMethod::CTX_TSNONE); CHKERRG(ierr);
164  }
165  //post process
166  bit = ts_ctx->postProcess_IJacobian.begin();
167  for(;bit!=ts_ctx->postProcess_IJacobian.end();bit++) {
168  (*bit)->ts_u = u;
169  (*bit)->ts_u_t = u_t;
170  (*bit)->ts_A = A;
171  (*bit)->ts_B = B;
172  (*bit)->ts_t = t;
173  (*bit)->ts_a = a;
174  (*bit)->ts_step = step;
175  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSSETIJACOBIAN);
176  ierr = (*bit)->setTs(ts); CHKERRG(ierr);
177  ierr = ts_ctx->mField.problem_basic_method_postProcess(ts_ctx->problemName,*(*(bit))); CHKERRG(ierr);
178  ierr = (*bit)->setTsCtx(TSMethod::CTX_TSNONE); CHKERRG(ierr);
179  }
180  if(ts_ctx->zeroMatrix) {
181  ierr = MatAssemblyBegin(B,MAT_FINAL_ASSEMBLY); CHKERRG(ierr);
182  ierr = MatAssemblyEnd(B,MAT_FINAL_ASSEMBLY); CHKERRG(ierr);
183  }
184  PetscLogEventEnd(ts_ctx->MOFEM_EVENT_TsCtxIFunction,0,0,0,0);
186 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

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

static double MoFEM::get_ave_edge_length ( const EntityHandle  ent,
const Range &  vol_edges,
moab::Interface &  moab 
)
static

Definition at line 282 of file CutMeshInterface.cpp.

284  {
285  Range adj_edges;
286  if (moab.type_from_handle(ent) == MBVERTEX) {
287  CHKERR moab.get_adjacencies(&ent, 1, 1, false, adj_edges);
288  } else {
289  Range nodes;
290  CHKERR moab.get_connectivity(&ent, 1, nodes);
291  CHKERR moab.get_adjacencies(&ent, 1, 1, false, adj_edges,
292  moab::Interface::UNION);
293  }
294  adj_edges = intersect(adj_edges, vol_edges);
295  double ave_l = 0;
296  for (auto e : adj_edges) {
297  int num_nodes;
298  const EntityHandle *conn;
299  CHKERR moab.get_connectivity(e, conn, num_nodes, true);
300  VectorDouble6 coords(6);
301  CHKERR moab.get_coords(conn, num_nodes, &coords[0]);
303  &coords[0], &coords[1], &coords[2]);
305  &coords[3], &coords[4], &coords[5]);
307  t_n0(i) -= t_n1(i);
308  ave_l += sqrt(t_n0(i) * t_n0(i));
309  }
310  return ave_l / adj_edges.size();
311 };
VectorBoundedArray< double, 6 > VectorDouble6
Definition: Common.hpp:221
#define CHKERR
Inline error check.
Definition: definitions.h:578

◆ get_fe_dof_view()

template<typename FE_DOFS , typename MOFEM_DOFS , typename MOFEM_DOFS_VIEW >
static MoFEMErrorCode MoFEM::get_fe_dof_view ( const FE_DOFS &  fe_dofs_view,
const MOFEM_DOFS &  mofem_dofs,
MOFEM_DOFS_VIEW &  mofem_dofs_view,
const int  operation_type 
)
static

Definition at line 1066 of file FEMultiIndices.cpp.

1067  {
1069  typename boost::multi_index::index<MOFEM_DOFS, Unique_mi_tag>::type::iterator
1070  mofem_it,
1071  mofem_it_end;
1072  typename FE_DOFS::iterator it, it_end;
1073  if (operation_type == moab::Interface::UNION) {
1074  mofem_it = mofem_dofs.template get<Unique_mi_tag>().begin();
1075  mofem_it_end = mofem_dofs.template get<Unique_mi_tag>().end();
1076  it = fe_dofs_view.begin();
1077  it_end = fe_dofs_view.end();
1078  for (; it != it_end; it++) {
1079  const UId &globalUid = (*it)->getGlobalUniqueId();
1080  if (mofem_it != mofem_it_end) {
1081  if ((*mofem_it)->getGlobalUniqueId() != globalUid) {
1082  mofem_it = mofem_dofs.template get<Unique_mi_tag>().find(globalUid);
1083  } // else lucky guess
1084  } else {
1085  mofem_it = mofem_dofs.template get<Unique_mi_tag>().find(globalUid);
1086  }
1087  if (mofem_it != mofem_it_end) {
1088  mofem_dofs_view.insert(mofem_dofs_view.end(), *mofem_it);
1089  mofem_it++;
1090  }
1091  }
1092  } else {
1093  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
1094  }
1096 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490
uint128_t UId
Unique Id.
Definition: Common.hpp:136

◆ 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 1328 of file ForcesAndSourcesCore.cpp.

1330  {
1332  switch (type) {
1333  case MBVERTEX:
1334  CHKERR fe_ptr->getProblemNodesColIndices(field_name, indices);
1335  break;
1336  default:
1337  CHKERR fe_ptr->getProblemTypeColIndices(field_name, type, side, indices);
1338  }
1340 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

◆ 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 1313 of file ForcesAndSourcesCore.cpp.

1315  {
1317  switch (type) {
1318  case MBVERTEX:
1319  CHKERR fe_ptr->getProblemNodesRowIndices(field_name, indices);
1320  break;
1321  default:
1322  CHKERR fe_ptr->getProblemTypeRowIndices(field_name, type, side, indices);
1323  }
1325 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

◆ get_tag_ptr()

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

Definition at line 41 of file EntsMultiIndices.cpp.

42  {
43  ApproximationOrder *ret_val;
44  rval = moab.tag_get_by_ptr(th, &ent, 1, (const void **)&ret_val, tag_size);
45  if (rval != MB_SUCCESS) {
46  *tag_size = 0;
47  return NULL;
48  } else {
49  return ret_val;
50  }
51 }
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78
int ApproximationOrder
Approximation on the entity.
Definition: Common.hpp:131

◆ get_value()

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

Definition at line 66 of file JacobiPolynomial.cpp.

67  {
69  ctx->baseFunPtr->resize(pts_x.size2(), ctx->P + 1, false);
70  ctx->baseDiffFunPtr->resize(pts_x.size2(), ctx->dIm * (ctx->P + 1), false);
71  if (pts_x.size1() != pts_t.size1() || pts_x.size2() != pts_t.size2()) {
72  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
73  "Inconsistent size of arguments");
74  }
75  double *l = NULL;
76  double *diff_l = NULL;
77  for (unsigned int gg = 0; gg < pts_x.size2(); gg++) {
78  if (ctx->baseFunPtr)
79  l = &((*ctx->baseFunPtr)(gg, 0));
80  if (ctx->baseDiffFunPtr)
81  diff_l = &((*ctx->baseDiffFunPtr)(gg, 0));
82  ierr = (ctx->basePolynomialsType1)(ctx->P, ctx->aLpha, pts_x(0, gg),
83  pts_t(0, gg), ctx->diffX, ctx->diffT, l,
84  diff_l, ctx->dIm);
85  CHKERRG(ierr);
86  }
88 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:483
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:526
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:490

◆ getFTensor0FromVec< double, DoubleAllocator >()

Definition at line 66 of file DataStructures.cpp.

67  {
69  &*data.data().begin());
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 85 of file DataStructures.cpp.

86  {
87  if (data.size1() != 2) {
88  THROW_MESSAGE("Wrong size of data matrix");
89  }
91  &data(1, 0));
92 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:602

◆ 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 74 of file DataStructures.cpp.

75  {
76  if (data.size1() != 3) {
77  THROW_MESSAGE("Wrong size of data matrix");
78  }
80  &data(0, 0), &data(1, 0), &data(2, 0));
81 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:602

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

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

Definition at line 108 of file DataStructures.cpp.

109  {
110  if (data.size1() != 6) {
111  THROW_MESSAGE("Wrong size of data matrix");
112  }
114  &data(0, 0), &data(1, 0), &data(2, 0), &data(3, 0), &data(4, 0),
115  &data(5, 0));
116 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:602

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

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

Definition at line 96 of file DataStructures.cpp.

97  {
98  if (data.size1() != 9) {
99  THROW_MESSAGE("Wrong size of data matrix");
100  }
102  &data(0, 0), &data(1, 0), &data(2, 0), &data(3, 0), &data(4, 0),
103  &data(5, 0), &data(6, 0), &data(7, 0), &data(8, 0));
104 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:602

◆ getFTensor2SymmetricFromMat() [1/2]

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
<br>

Definition at line 193 of file DataStructures.hpp.

193  {
195  DoubleAllocator>(data);
196 }
std::vector< double, std::allocator< double > > DoubleAllocator
Definition: Common.hpp:207
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor2SymmetricFromMat(MatrixDouble &data)
Get symmetric tensor rank 2 form matrix.

◆ getFTensor2SymmetricFromMat() [2/2]

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

Get symmetric tensor rank 2 form matrix.

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

Specialisation for symmetric tensor 2

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

Definition at line 193 of file DataStructures.hpp.

193  {
195  DoubleAllocator>(data);
196 }
std::vector< double, std::allocator< double > > DoubleAllocator
Definition: Common.hpp:207
FTensor::Tensor2_symmetric< FTensor::PackPtr< double *, 1 >, Tensor_Dim > getFTensor2SymmetricFromMat(MatrixDouble &data)
Get symmetric tensor rank 2 form matrix.

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

Definition at line 120 of file DataStructures.cpp.

121  {
122  if (data.size1() != 6) {
123  THROW_MESSAGE("Wrong size of data matrix");
124  }
126  &data(0, 0), &data(1, 0), &data(2, 0), &data(3, 0), &data(4, 0),
127  &data(5, 0));
128 }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:602

◆ getMaxOrder()

template<typename DOFMULTIINDEX >
static int MoFEM::getMaxOrder ( const DOFMULTIINDEX &  dof_multi_index)
static

Definition at line 173 of file ForcesAndSourcesCore.cpp.

173  {
174  int max_order = 0;
175  typename DOFMULTIINDEX::iterator dit, hi_dit;
176  dit = dof_multi_index.begin();
177  hi_dit = dof_multi_index.end();
178  for (; dit != hi_dit; dit++) {
179  if ((*dit)->getEntDofIdx() != 0)
180  continue;
181  int dit_max_order = (*dit)->getMaxOrder();
182  max_order = (max_order > dit_max_order) ? max_order : dit_max_order;
183  }
184  return max_order;
185 }

◆ getParentEnt()

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

Definition at line 113 of file EntsMultiIndices.cpp.

114  {
115 
117  Tag th_ref_parent_handle;
118  CHKERR moab.tag_get_handle("_RefParentHandle", th_ref_parent_handle);
119  vec_patent_ent.resize(ents.size());
120  CHKERR moab.tag_get_data(th_ref_parent_handle, ents,
121  &*vec_patent_ent.begin());
123 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return() ...
Definition: definitions.h:459
#define CHKERR
Inline error check.
Definition: definitions.h:578
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:403

◆ getTensor0FormData()

template<class T , class A >
DEPRECATED FTensor::Tensor0<FTensor::PackPtr<double *, 1> > MoFEM::getTensor0FormData ( ublas::vector< T, A > &  data)
Deprecated:
Name change to getFTensor0FromVec

Definition at line 64 of file DataStructures.hpp.

64  {
65  return getFTensor0FromVec(data);
66 }
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FromVec(ublas::vector< T, A > &data)
Get tensor rank 0 (scalar) form data vectorExample how to use it.

◆ getTensor1FormData()

template<int Tensor_Dim>
DEPRECATED FTensor::Tensor1<FTensor::PackPtr<double *, 1>, Tensor_Dim> MoFEM::getTensor1FormData ( MatrixDouble data)
Deprecated:
Name change to getFTensor1FromMat

Definition at line 109 of file DataStructures.hpp.

109  {
110  return getFTensor1FromMat<Tensor_Dim>(data);
111 }

◆ getTensor2FormData()

template<int Tensor_Dim0, int Tensor_Dim1>
DEPRECATED FTensor::Tensor2<FTensor::PackPtr<double *, 1>, Tensor_Dim0, Tensor_Dim1> MoFEM::getTensor2FormData ( MatrixDouble data)
Deprecated:
Name change to getFTensor1FromMat

Definition at line 155 of file DataStructures.hpp.

155  {
156  return getFTensor2FromMat<Tensor_Dim0, Tensor_Dim1>(data);
157 }

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

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

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

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

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

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

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

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

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

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

784  {
785 
787 
790 
791  const int face_opposite_nodes[] = {2, 0, 1, 3};
792 
795 
796  FTensor::Tensor1<double *, 3> t_node_diff_ksi[4] = {
797  FTensor::Tensor1<double *, 3>(&diffN[0], &diffN[1], &diffN[2]),
798  FTensor::Tensor1<double *, 3>(&diffN[3], &diffN[4], &diffN[5]),
799  FTensor::Tensor1<double *, 3>(&diffN[6], &diffN[7], &diffN[8]),
800  FTensor::Tensor1<double *, 3>(&diffN[9], &diffN[10], &diffN[11])};
801  FTensor::Tensor1<double, 3> t_diff_ksi0i, t_diff_ksi0j;
802 
803  MatrixDouble m_psi_l_0i(4, p + 1);
804  MatrixDouble m_psi_l_0j(4, p + 1);
805  MatrixDouble m_diff_psi_l_0i(4, 3 * p + 3);
806  MatrixDouble m_diff_psi_l_0j(4, 3 * p + 3);
807 
808  double *psi_l_0i[] = {&m_psi_l_0i(0, 0), &m_psi_l_0i(1, 0), &m_psi_l_0i(2, 0),
809  &m_psi_l_0i(3, 0)};
810  double *psi_l_0j[] = {&m_psi_l_0j(0, 0), &m_psi_l_0j(1, 0), &m_psi_l_0j(2, 0),
811  &m_psi_l_0j(3, 0)};
812  double *diff_psi_l_0i[] = {&m_diff_psi_l_0i(0, 0), &m_diff_psi_l_0i(1, 0),
813  &m_diff_psi_l_0i(2, 0), &m_diff_psi_l_0i(3, 0)};
814  double *diff_psi_l_0j[] = {&m_diff_psi_l_0j(0, 0), &m_diff_psi_l_0j(1, 0),
815  &m_diff_psi_l_0j(2, 0), &m_diff_psi_l_0j(3, 0)};
816  double beta_f[4];
817 
818  FTensor::Tensor1<double, 3> t_diff_beta_f[4];
819 
820  FTensor::Tensor1<double *, 3> t_phi_v(&phi_v[0], &phi_v[1], &phi_v[2], 3);
822  &diff_phi_v[0], &diff_phi_v[3], &diff_phi_v[6], &diff_phi_v[1],
823  &diff_phi_v[4], &diff_phi_v[7], &diff_phi_v[2], &diff_phi_v[5],
824  &diff_phi_v[8], 9);
825 
826  for (int ii = 0; ii != nb_integration_pts; ii++) {
827 
828  for (int ff = 0; ff != 4; ff++) {
829 
830  t_diff_ksi0i(i) = t_node_diff_ksi[faces_nodes[3 * ff + 1]](i) -
831  t_node_diff_ksi[faces_nodes[3 * ff + 0]](i);
832  t_diff_ksi0j(i) = t_node_diff_ksi[faces_nodes[3 * ff + 2]](i) -
833  t_node_diff_ksi[faces_nodes[3 * ff + 0]](i);
834 
835  const int node_shift = ii * 4;
836 
837  beta_f[ff] = N[node_shift + faces_nodes[3 * ff + 0]] *
838  N[node_shift + faces_nodes[3 * ff + 1]] *
839  N[node_shift + faces_nodes[3 * ff + 2]];
840 
841  t_diff_beta_f[ff](j) = t_node_diff_ksi[faces_nodes[3 * ff + 0]](j) *
842  N[node_shift + faces_nodes[3 * ff + 1]] *
843  N[node_shift + faces_nodes[3 * ff + 2]] +
844  N[node_shift + faces_nodes[3 * ff + 0]] *
845  t_node_diff_ksi[faces_nodes[3 * ff + 1]](j) *
846  N[node_shift + faces_nodes[3 * ff + 2]] +
847  N[node_shift + faces_nodes[3 * ff + 0]] *
848  N[node_shift + faces_nodes[3 * ff + 1]] *
849  t_node_diff_ksi[faces_nodes[3 * ff + 2]](j);
850 
851  const double ksi_0i = N[node_shift + faces_nodes[3 * ff + 1]] -
852  N[node_shift + faces_nodes[3 * ff + 0]];
853  ierr = base_polynomials(p, ksi_0i, &t_diff_ksi0i(0), psi_l_0i[ff],
854  diff_psi_l_0i[ff], 3);
855  CHKERRG(ierr);
856 
857  const double ksi_0j = N[node_shift + faces_nodes[3 * ff + 2]] -
858  N[node_shift + faces_nodes[3 * ff + 0]];
859  ierr = base_polynomials(p, ksi_0j, &t_diff_ksi0j(0), psi_l_0j[ff],
860  diff_psi_l_0j[ff], 3);
861  CHKERRG(ierr);
862  }
863 
864  int cc = 0;
865  for (int oo = 0; oo <= (p - 3); oo++) {
866  FTensor::Tensor1<double *, 3> t_diff_psi_l_0i[] = {
867  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[0][0],
868  &diff_psi_l_0i[0][p + 1],
869  &diff_psi_l_0i[0][2 * p + 2], 1),
870  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[1][0],
871  &diff_psi_l_0i[1][p + 1],
872  &diff_psi_l_0i[1][2 * p + 2], 1),
873  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[2][0],
874  &diff_psi_l_0i[2][p + 1],
875  &diff_psi_l_0i[2][2 * p + 2], 1),
876  FTensor::Tensor1<double *, 3>(&diff_psi_l_0i[3][0],
877  &diff_psi_l_0i[3][p + 1],
878  &diff_psi_l_0i[3][2 * p + 2], 1),
879  };
880  for (int pp0 = 0; pp0 <= oo; pp0++) {
881  const int pp1 = oo - pp0;
882  if (pp1 >= 0) {
883  for (int ff = 0; ff != 4; ff++) {
884  FTensor::Tensor1<double *, 3> t_diff_psi_l_0j(
885  &m_diff_psi_l_0j(ff, pp1), &m_diff_psi_l_0j(ff, p + 1 + pp1),
886  &m_diff_psi_l_0j(ff, 2 * p + 2 + pp1), 1);
887  const double t = psi_l_0i[ff][pp0] * psi_l_0j[ff][pp1];
888  const double a = beta_f[ff] * t;
889