v0.15.0
Loading...
Searching...
No Matches
Classes | Namespaces | Typedefs | Enumerations | Functions
FormsIntegrators.hpp File Reference

Forms integrators. More...

Go to the source code of this file.

Classes

struct  MoFEM::EssentialBcStorage
 [Storage and set boundary conditions] More...
 
struct  MoFEM::OpSetBc
 Set indices on entities on finite element. More...
 
struct  MoFEM::OpUnSetBc
 Unset indices on entities on finite element. More...
 
struct  MoFEM::AssemblyTypeSelector< A >
 Template selector for assembly type. More...
 
struct  MoFEM::OpBaseImpl< A, EleOp >
 
struct  MoFEM::FormsIntegrators< EleOp >
 Integrator forms. More...
 
struct  MoFEM::FormsIntegrators< EleOp >::Assembly< A >
 Assembly methods. More...
 

Namespaces

namespace  MoFEM
 implementation of Data Operators for Forces and Sources
 

Typedefs

using MoFEM::ScalarFun = boost::function< double(const double, const double, const double)>
 Scalar function type.
 
using MoFEM::TimeFun = boost::function< double(double)>
 Lambda function used to scale with time.
 
using MoFEM::FEFun = boost::function< double(const FEMethod *fe_ptr)>
 Lambda function used to scale with time.
 
using MoFEM::ConstantFun = boost::function< double()>
 Constant function type.
 
template<int DIM>
using MoFEM::VectorFun = boost::function< FTensor::Tensor1< double, DIM >(const double, const double, const double)>
 Vector function type.
 

Enumerations

enum  MoFEM::AssemblyType {
  MoFEM::PETSC , MoFEM::SCHUR , MoFEM::BLOCK_MAT , MoFEM::BLOCK_SCHUR ,
  MoFEM::BLOCK_PRECONDITIONER_SCHUR , MoFEM::USER_ASSEMBLE , MoFEM::LAST_ASSEMBLE
}
 [Storage and set boundary conditions] More...
 
enum  MoFEM::IntegrationType { MoFEM::GAUSS , MoFEM::USER_INTEGRATION , MoFEM::LAST_INTEGRATION }
 Form integrator integration types. More...
 

Functions

template<>
MoFEMErrorCode MoFEM::VecSetValues< EssentialBcStorage > (Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
 Set values to vector in operator.
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< EssentialBcStorage > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
 Set values to matrix in operator.
 
template<>
MoFEMErrorCode MoFEM::MatSetValues< AssemblyTypeSelector< PETSC > > (Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
 
template<>
MoFEMErrorCode MoFEM::VecSetValues< AssemblyTypeSelector< PETSC > > (Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
 
double MoFEM::scalar_fun_one (const double, const double, const double)
 Default scalar function returning 1.
 

Detailed Description

Forms integrators.

This file provides a higher-level abstraction layer over MoFEM's generic UserDataOperator system for finite element computations. It implements structured approaches to linear and bilinear form integration within finite element operator pipelines.

Forms as Operator Abstractions

Forms integrators represent one level of abstraction above generic user data operators, providing structured interfaces for common finite element operations:

These forms encapsulate the integration logic while maintaining compatibility with MoFEM's finite element pipeline architecture.

Integration with Finite Element Pipelines

Forms integrators work within MoFEM's operator pipeline system:

  1. Finite Element Context: Forms operate within specific finite elements that define geometry, connectivity, and field definitions
  2. Operator Sequencing: Forms are added to finite element operator pipelines alongside preprocessing, integration, and postprocessing operators
  3. Data Flow: Forms access field data, geometry, and integration points through the standard ForcesAndSourcesCore infrastructure
  4. Assembly: Computed local contributions are assembled into global algebraic structures (vectors, matrices)

Assembly Type Abstraction

Assembly types control how local finite element contributions are assembled into global algebraic structures:

Assembly types are compile-time template parameters, enabling optimized code generation for different algebraic backends and solution strategies.

Integration Method Selection

Integration methods determine how numerical integration is performed:

Integration methods are template parameters that work with assembly types to provide flexible, efficient integration strategies for different physics and discretization requirements.

Note: Specialized methods can be introduced for specific cases, such as fast integration exploiting Bernstein–Bézier basis with Duffy transforms on simplex elements, or dedicated GPU backends for element-wise integration and assembly. These can be expressed as additional integration tags and paired with corresponding assembly strategies.

Typical Workflow

  1. Select assembly type based on algebraic solution strategy
  2. Choose integration method appropriate for physics and accuracy requirements
  3. Instantiate specific form type (Linear/BiLinear/TriLinear)
  4. Configure field operations and boundary conditions
  5. Add form operators to finite element pipeline
  6. Execute pipeline to assemble global algebraic system

This abstraction enables systematic construction of finite element methods while maintaining performance and flexibility for advanced solution techniques.

Definition in file FormsIntegrators.hpp.