Class to store weak form components (bilinear and linear forms, and optionally mixed and nonlinear forms) and build methods. More...
#include <EquationSystem.h>
Public Member Functions | |
EquationSystem ()=default | |
~EquationSystem () override | |
virtual void | AddTestVariableNameIfMissing (const std::string &test_var_name) |
Add test variable to EquationSystem. More... | |
virtual void | AddTrialVariableNameIfMissing (const std::string &trial_var_name) |
Add trial variable to EquationSystem. More... | |
virtual void | AddKernel (std::shared_ptr< MFEMKernel > kernel) |
Add kernels. More... | |
virtual void | AddIntegratedBC (std::shared_ptr< MFEMIntegratedBC > kernel) |
virtual void | AddEssentialBC (std::shared_ptr< MFEMEssentialBC > bc) |
virtual void | ApplyEssentialBCs () |
virtual void | Init (Moose::MFEM::GridFunctions &gridfunctions, const Moose::MFEM::FESpaces &fespaces, mfem::AssemblyLevel assembly_level) |
Build forms. More... | |
virtual void | BuildLinearForms () |
virtual void | BuildBilinearForms () |
virtual void | BuildMixedBilinearForms () |
virtual void | BuildEquationSystem () |
virtual void | FormLinearSystem (mfem::OperatorHandle &op, mfem::BlockVector &trueX, mfem::BlockVector &trueRHS) |
Form linear system, with essential boundary conditions accounted for. More... | |
virtual void | FormSystem (mfem::OperatorHandle &op, mfem::BlockVector &trueX, mfem::BlockVector &trueRHS) |
virtual void | FormLegacySystem (mfem::OperatorHandle &op, mfem::BlockVector &trueX, mfem::BlockVector &trueRHS) |
virtual void | BuildJacobian (mfem::BlockVector &trueX, mfem::BlockVector &trueRHS) |
Build linear system, with essential boundary conditions accounted for. More... | |
void | Mult (const mfem::Vector &u, mfem::Vector &residual) const override |
Compute residual y = Mu. More... | |
mfem::Operator & | GetGradient (const mfem::Vector &u) const override |
Compute J = M + grad_H(u) More... | |
virtual void | RecoverFEMSolution (mfem::BlockVector &trueX, Moose::MFEM::GridFunctions &gridfunctions) |
Update variable from solution vector after solve. More... | |
const std::vector< std::string > & | TrialVarNames () const |
const std::vector< std::string > & | TestVarNames () const |
Public Attributes | |
std::vector< mfem::Array< int > > | _ess_tdof_lists |
Protected Member Functions | |
void | DeleteAllBlocks () |
Deletes the HypreParMatrix associated with any pointer stored in _h_blocks, and then proceeds to delete all dynamically allocated memory for _h_blocks itself, resetting all dimensions to zero. More... | |
bool | VectorContainsName (const std::vector< std::string > &the_vector, const std::string &name) const |
template<class FormType > | |
void | ApplyDomainBLFIntegrators (const std::string &trial_var_name, const std::string &test_var_name, std::shared_ptr< FormType > form, Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMKernel >>>> &kernels_map) |
Template method for applying BilinearFormIntegrators on domains from kernels to a BilinearForm, or MixedBilinearForm. More... | |
void | ApplyDomainLFIntegrators (const std::string &test_var_name, std::shared_ptr< mfem::ParLinearForm > form, Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMKernel >>>> &kernels_map) |
template<class FormType > | |
void | ApplyBoundaryBLFIntegrators (const std::string &trial_var_name, const std::string &test_var_name, std::shared_ptr< FormType > form, Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMIntegratedBC >>>> &integrated_bc_map) |
void | ApplyBoundaryLFIntegrators (const std::string &test_var_name, std::shared_ptr< mfem::ParLinearForm > form, Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMIntegratedBC >>>> &integrated_bc_map) |
Protected Attributes | |
std::vector< std::string > | _trial_var_names |
Names of all variables corresponding to gridfunctions. More... | |
Moose::MFEM::GridFunctions | _trial_variables |
Pointers to trial variables. More... | |
std::vector< std::string > | _test_var_names |
Names of all test variables corresponding to linear forms in this equation system. More... | |
std::vector< mfem::ParFiniteElementSpace * > | _test_pfespaces |
Pointers to finite element spaces associated with test variables. More... | |
Moose::MFEM::NamedFieldsMap< mfem::ParBilinearForm > | _blfs |
Moose::MFEM::NamedFieldsMap< mfem::ParLinearForm > | _lfs |
Moose::MFEM::NamedFieldsMap< mfem::ParNonlinearForm > | _nlfs |
Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< mfem::ParMixedBilinearForm > > | _mblfs |
std::vector< std::unique_ptr< mfem::ParGridFunction > > | _xs |
Gridfunctions for setting Dirichlet BCs. More... | |
std::vector< std::unique_ptr< mfem::ParGridFunction > > | _dxdts |
mfem::Array2D< const mfem::HypreParMatrix * > | _h_blocks |
Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMKernel > > > > | _kernels_map |
Arrays to store kernels to act on each component of weak form. More... | |
Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMIntegratedBC > > > > | _integrated_bc_map |
Arrays to store integrated BCs to act on each component of weak form. More... | |
Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMEssentialBC > > > | _essential_bc_map |
Arrays to store essential BCs to act on each component of weak form. More... | |
mfem::OperatorHandle | _jacobian |
mfem::AssemblyLevel | _assembly_level |
Friends | |
class | EquationSystemProblemOperator |
class | TimeDomainEquationSystemProblemOperator |
Class to store weak form components (bilinear and linear forms, and optionally mixed and nonlinear forms) and build methods.
Definition at line 30 of file EquationSystem.h.
|
default |
|
override |
Definition at line 18 of file EquationSystem.C.
|
virtual |
Definition at line 104 of file EquationSystem.C.
|
virtual |
Definition at line 81 of file EquationSystem.C.
|
virtual |
Add kernels.
Reimplemented in Moose::MFEM::TimeDependentEquationSystem.
Definition at line 58 of file EquationSystem.C.
Referenced by Moose::MFEM::TimeDependentEquationSystem::AddKernel().
|
virtual |
Add test variable to EquationSystem.
Definition at line 49 of file EquationSystem.C.
Referenced by AddEssentialBC(), AddIntegratedBC(), AddKernel(), and Moose::MFEM::TimeDependentEquationSystem::AddKernel().
|
virtual |
Add trial variable to EquationSystem.
Reimplemented in Moose::MFEM::TimeDependentEquationSystem.
Definition at line 40 of file EquationSystem.C.
Referenced by AddIntegratedBC(), and AddKernel().
|
protected |
Definition at line 230 of file EquationSystem.h.
|
inlineprotected |
Definition at line 256 of file EquationSystem.h.
Referenced by BuildLinearForms().
|
protected |
Template method for applying BilinearFormIntegrators on domains from kernels to a BilinearForm, or MixedBilinearForm.
Definition at line 182 of file EquationSystem.h.
|
inlineprotected |
Definition at line 206 of file EquationSystem.h.
Referenced by BuildLinearForms().
|
virtual |
Definition at line 117 of file EquationSystem.C.
Referenced by BuildLinearForms().
|
virtual |
Reimplemented in Moose::MFEM::TimeDependentEquationSystem.
Definition at line 337 of file EquationSystem.C.
Referenced by Moose::MFEM::TimeDependentEquationSystem::BuildBilinearForms(), and BuildEquationSystem().
|
virtual |
Definition at line 396 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystemProblemOperator::Init(), and Moose::MFEM::TimeDomainEquationSystemProblemOperator::Init().
|
virtual |
Build linear system, with essential boundary conditions accounted for.
Definition at line 254 of file EquationSystem.C.
Referenced by Moose::MFEM::TimeDomainEquationSystemProblemOperator::BuildEquationSystemOperator(), and Moose::MFEM::EquationSystemProblemOperator::Solve().
|
virtual |
Definition at line 314 of file EquationSystem.C.
Referenced by BuildEquationSystem(), and Moose::MFEM::TimeDependentEquationSystem::UpdateEquationSystem().
|
virtual |
Definition at line 358 of file EquationSystem.C.
Referenced by BuildEquationSystem(), and Moose::MFEM::TimeDependentEquationSystem::UpdateEquationSystem().
|
protected |
Deletes the HypreParMatrix associated with any pointer stored in _h_blocks, and then proceeds to delete all dynamically allocated memory for _h_blocks itself, resetting all dimensions to zero.
Definition at line 21 of file EquationSystem.C.
Referenced by FormLegacySystem(), Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem(), and ~EquationSystem().
|
virtual |
Reimplemented in Moose::MFEM::TimeDependentEquationSystem.
Definition at line 193 of file EquationSystem.C.
Referenced by FormLinearSystem().
|
virtual |
Form linear system, with essential boundary conditions accounted for.
Definition at line 150 of file EquationSystem.C.
Referenced by BuildJacobian().
|
virtual |
Reimplemented in Moose::MFEM::TimeDependentEquationSystem.
Definition at line 171 of file EquationSystem.C.
Referenced by FormLinearSystem().
|
override |
Compute J = M + grad_H(u)
Definition at line 270 of file EquationSystem.C.
|
virtual |
Build forms.
Definition at line 288 of file EquationSystem.C.
|
override |
Compute residual y = Mu.
Definition at line 262 of file EquationSystem.C.
|
virtual |
Update variable from solution vector after solve.
Definition at line 276 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystemProblemOperator::Solve().
|
inline |
Definition at line 87 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystemProblemOperator::SetGridFunctions(), and Moose::MFEM::TimeDomainEquationSystemProblemOperator::SetGridFunctions().
|
inline |
Definition at line 86 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystemProblemOperator::SetGridFunctions(), and Moose::MFEM::TimeDomainEquationSystemProblemOperator::SetGridFunctions().
|
protected |
Definition at line 30 of file EquationSystem.C.
Referenced by AddTestVariableNameIfMissing(), AddTrialVariableNameIfMissing(), and Moose::MFEM::TimeDependentEquationSystem::AddTrialVariableNameIfMissing().
|
friend |
Definition at line 34 of file EquationSystem.h.
|
friend |
Definition at line 35 of file EquationSystem.h.
|
protected |
Definition at line 177 of file EquationSystem.h.
Referenced by BuildBilinearForms(), Moose::MFEM::TimeDependentEquationSystem::BuildBilinearForms(), BuildMixedBilinearForms(), FormLinearSystem(), and Init().
|
protected |
Definition at line 116 of file EquationSystem.h.
Referenced by BuildBilinearForms(), Moose::MFEM::TimeDependentEquationSystem::BuildBilinearForms(), FormLegacySystem(), Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem(), FormSystem(), Moose::MFEM::TimeDependentEquationSystem::FormSystem(), and Moose::MFEM::TimeDependentEquationSystem::SetTimeStep().
|
protected |
Definition at line 158 of file EquationSystem.h.
Referenced by Init().
std::vector<mfem::Array<int> > Moose::MFEM::EquationSystem::_ess_tdof_lists |
Definition at line 84 of file EquationSystem.h.
Referenced by ApplyEssentialBCs(), FormLegacySystem(), Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem(), FormSystem(), and Moose::MFEM::TimeDependentEquationSystem::FormSystem().
|
protected |
Arrays to store essential BCs to act on each component of weak form.
Named according to test variable.
Definition at line 173 of file EquationSystem.h.
Referenced by AddEssentialBC(), and ApplyEssentialBCs().
|
protected |
Definition at line 160 of file EquationSystem.h.
Referenced by DeleteAllBlocks(), FormLegacySystem(), and Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem().
|
protected |
Arrays to store integrated BCs to act on each component of weak form.
Named according to test and trial variables.
Definition at line 170 of file EquationSystem.h.
Referenced by AddIntegratedBC(), BuildBilinearForms(), Moose::MFEM::TimeDependentEquationSystem::BuildBilinearForms(), and BuildLinearForms().
|
mutableprotected |
Definition at line 175 of file EquationSystem.h.
Referenced by BuildJacobian(), GetGradient(), and Mult().
|
protected |
Arrays to store kernels to act on each component of weak form.
Named according to test and trial variables.
Definition at line 165 of file EquationSystem.h.
Referenced by AddKernel(), BuildBilinearForms(), BuildLinearForms(), and BuildMixedBilinearForms().
|
protected |
Definition at line 117 of file EquationSystem.h.
Referenced by BuildLinearForms(), FormLegacySystem(), Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem(), FormSystem(), and Moose::MFEM::TimeDependentEquationSystem::FormSystem().
|
protected |
Definition at line 120 of file EquationSystem.h.
Referenced by BuildMixedBilinearForms(), and FormLegacySystem().
|
protected |
Definition at line 118 of file EquationSystem.h.
|
protected |
Pointers to finite element spaces associated with test variables.
Definition at line 113 of file EquationSystem.h.
Referenced by ApplyEssentialBCs(), BuildBilinearForms(), Moose::MFEM::TimeDependentEquationSystem::BuildBilinearForms(), BuildLinearForms(), BuildMixedBilinearForms(), FormLegacySystem(), and Init().
|
protected |
Names of all test variables corresponding to linear forms in this equation system.
Definition at line 111 of file EquationSystem.h.
Referenced by AddTestVariableNameIfMissing(), ApplyEssentialBCs(), BuildBilinearForms(), Moose::MFEM::TimeDependentEquationSystem::BuildBilinearForms(), BuildLinearForms(), BuildMixedBilinearForms(), FormLegacySystem(), Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem(), FormLinearSystem(), FormSystem(), Moose::MFEM::TimeDependentEquationSystem::FormSystem(), Init(), Moose::MFEM::TimeDependentEquationSystem::SetTimeStep(), and TestVarNames().
|
protected |
Names of all variables corresponding to gridfunctions.
This may differ from test_var_names when time derivatives are present.
Definition at line 107 of file EquationSystem.h.
Referenced by AddTrialVariableNameIfMissing(), Moose::MFEM::TimeDependentEquationSystem::AddTrialVariableNameIfMissing(), BuildMixedBilinearForms(), FormLegacySystem(), FormLinearSystem(), RecoverFEMSolution(), and TrialVarNames().
|
protected |
Pointers to trial variables.
Definition at line 109 of file EquationSystem.h.
Referenced by Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem(), Moose::MFEM::TimeDependentEquationSystem::FormSystem(), and Init().
|
protected |
Gridfunctions for setting Dirichlet BCs.
Definition at line 157 of file EquationSystem.h.
Referenced by ApplyEssentialBCs(), FormLegacySystem(), Moose::MFEM::TimeDependentEquationSystem::FormLegacySystem(), FormSystem(), Moose::MFEM::TimeDependentEquationSystem::FormSystem(), and Init().