![]() |
MFEM
v4.5.2
Finite element discretization library
|
This class implements the serial variational transfer between finite element spaces. Variational transfer has been shown to have better approximation properties than standard interpolation. This facilities can be used for supporting applications which require the handling of non matching meshes. For instance: General multi-physics problems, fluid structure interaction, or even visualization of average quantities within subvolumes This algorithm allows to perform quadrature in the intersection of elements of two separate and unrelated meshes. It generates quadrature rules in the intersection which allows us to integrate-with to machine precision using the mfem::MortarIntegrator interface. See https://doi.org/10.1137/15M1008361 for and in-depth explanation. At this time curved elements are not supported. More...
#include <mortarassembler.hpp>
Public Member Functions | |
MortarAssembler (const std::shared_ptr< FiniteElementSpace > &source, const std::shared_ptr< FiniteElementSpace > &destination) | |
constructs the object with source and destination spaces More... | |
~MortarAssembler () | |
bool | Assemble (std::shared_ptr< SparseMatrix > &B) |
assembles the coupling matrix B. B : source -> destination If u is a coefficient associated with source and v with destination Then v = M^(-1) * B * u; where M is the mass matrix in destination. Works with L2_FECollection, H1_FECollection and DG_FECollection (experimental with RT_FECollection and ND_FECollection). More... | |
bool | Transfer (const GridFunction &src_fun, GridFunction &dest_fun) |
transfer a function from source to destination. if the transfer is to be performed multiple times use Assemble instead More... | |
bool | Apply (const GridFunction &src_fun, GridFunction &dest_fun) |
transfer a function from source to destination. It requires that the Update function is called before More... | |
bool | Update () |
assembles the various components necessary for the transfer. To be called before calling the Apply function if the mesh geometry changed, after previous call. Works with L2_FECollection, H1_FECollection and DG_FECollection (experimental with RT_FECollection and ND_FECollection). More... | |
void | AddMortarIntegrator (const std::shared_ptr< MortarIntegrator > &integrator) |
This method must be called before Assemble or Transfer. It will assemble the operator in all intersections found. More... | |
void | SetVerbose (const bool verbose) |
Expose process details with verbose output. More... | |
void | SetAssembleMassAndCouplingTogether (const bool value) |
Control if the Mass matrix is computed together with the coupling operator every time. More... | |
void | SetMaxSolverIterations (const int max_solver_iterations) |
Control the maximum numbers of conjugate gradients steps for mass matrix inversion. More... | |
This class implements the serial variational transfer between finite element spaces. Variational transfer has been shown to have better approximation properties than standard interpolation. This facilities can be used for supporting applications which require the handling of non matching meshes. For instance: General multi-physics problems, fluid structure interaction, or even visualization of average quantities within subvolumes This algorithm allows to perform quadrature in the intersection of elements of two separate and unrelated meshes. It generates quadrature rules in the intersection which allows us to integrate-with to machine precision using the mfem::MortarIntegrator interface. See https://doi.org/10.1137/15M1008361 for and in-depth explanation. At this time curved elements are not supported.
Definition at line 34 of file mortarassembler.hpp.
mfem::MortarAssembler::MortarAssembler | ( | const std::shared_ptr< FiniteElementSpace > & | source, |
const std::shared_ptr< FiniteElementSpace > & | destination | ||
) |
constructs the object with source and destination spaces
source | the source space from where we want to transfer the discrete field |
destination | the source space to where we want to transfer the discrete field |
Definition at line 155 of file mortarassembler.cpp.
|
default |
void mfem::MortarAssembler::AddMortarIntegrator | ( | const std::shared_ptr< MortarIntegrator > & | integrator | ) |
This method must be called before Assemble or Transfer. It will assemble the operator in all intersections found.
integrator | the integrator object |
Definition at line 83 of file mortarassembler.cpp.
bool mfem::MortarAssembler::Apply | ( | const GridFunction & | src_fun, |
GridFunction & | dest_fun | ||
) |
transfer a function from source to destination. It requires that the Update function is called before
src_fun | the function associated with the source finite element space | |
[out] | dest_fun | the function associated with the destination finite element space |
Definition at line 335 of file mortarassembler.cpp.
bool mfem::MortarAssembler::Assemble | ( | std::shared_ptr< SparseMatrix > & | B | ) |
assembles the coupling matrix B. B : source -> destination If u is a coefficient associated with source and v with destination Then v = M^(-1) * B * u; where M is the mass matrix in destination. Works with L2_FECollection, H1_FECollection and DG_FECollection (experimental with RT_FECollection and ND_FECollection).
B | the assembled coupling operator. B can be passed uninitialized. |
Definition at line 171 of file mortarassembler.cpp.
void mfem::MortarAssembler::SetAssembleMassAndCouplingTogether | ( | const bool | value | ) |
Control if the Mass matrix is computed together with the coupling operator every time.
value | is set to true for computing the mass matrix operator with the coupling operator, false otherwise. The option is true by default, set to false if only the coupling operator is needed. |
Definition at line 73 of file mortarassembler.cpp.
void mfem::MortarAssembler::SetMaxSolverIterations | ( | const int | max_solver_iterations | ) |
Control the maximum numbers of conjugate gradients steps for mass matrix inversion.
max_solver_iterations | the maximum number of iterations |
Definition at line 78 of file mortarassembler.cpp.
void mfem::MortarAssembler::SetVerbose | ( | const bool | verbose | ) |
Expose process details with verbose output.
verbose | is set to true for verbose output |
Definition at line 89 of file mortarassembler.cpp.
bool mfem::MortarAssembler::Transfer | ( | const GridFunction & | src_fun, |
GridFunction & | dest_fun | ||
) |
transfer a function from source to destination. if the transfer is to be performed multiple times use Assemble instead
src_fun | the function associated with the source finite element space | |
[out] | dest_fun | the function associated with the destination finite element space |
Definition at line 329 of file mortarassembler.cpp.
bool mfem::MortarAssembler::Update | ( | ) |
assembles the various components necessary for the transfer. To be called before calling the Apply function if the mesh geometry changed, after previous call. Works with L2_FECollection, H1_FECollection and DG_FECollection (experimental with RT_FECollection and ND_FECollection).
Definition at line 363 of file mortarassembler.cpp.