Class to store weak form components for time dependent PDEs. More...
#include <EquationSystem.h>
Public Member Functions | |
TimeDependentEquationSystem () | |
void | AddCoupledVariableNameIfMissing (const std::string &coupled_var_name) override |
Add coupled variable to EquationSystem. More... | |
virtual void | SetTimeStep (double dt) |
virtual void | UpdateEquationSystem () |
virtual void | AddKernel (std::shared_ptr< MFEMKernel > kernel) override |
Add kernels. More... | |
virtual void | BuildBilinearForms () override |
Build bilinear forms. More... | |
virtual void | FormLegacySystem (mfem::OperatorHandle &op, mfem::BlockVector &truedXdt, mfem::BlockVector &trueRHS) override |
virtual void | FormSystem (mfem::OperatorHandle &op, mfem::BlockVector &truedXdt, mfem::BlockVector &trueRHS) override |
virtual void | AddTestVariableNameIfMissing (const std::string &test_var_name) |
Add test variable to EquationSystem. More... | |
virtual void | AddIntegratedBC (std::shared_ptr< MFEMIntegratedBC > kernel) |
virtual void | AddEssentialBC (std::shared_ptr< MFEMEssentialBC > bc) |
virtual void | Init (Moose::MFEM::GridFunctions &gridfunctions, const Moose::MFEM::FESpaces &fespaces, mfem::AssemblyLevel assembly_level) |
Initialise. More... | |
virtual void | BuildLinearForms () |
Build linear forms and eliminate constrained DoFs. More... | |
virtual void | ApplyEssentialBCs () |
virtual void | EliminateCoupledVariables () |
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 | 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 | |
mfem::ConstantCoefficient | _dt_coef |
Coefficient for timestep scaling. More... | |
Moose::MFEM::NamedFieldsMap< Moose::MFEM::NamedFieldsMap< std::vector< std::shared_ptr< MFEMKernel > > > > | _td_kernels_map |
Moose::MFEM::NamedFieldsMap< mfem::ParBilinearForm > | _td_blfs |
Container to store contributions to weak form of the form (F du/dt, v) More... | |
std::vector< std::string > | _coupled_var_names |
Names of all trial variables of kernels and boundary conditions added to this EquationSystem. More... | |
std::vector< std::string > | _trial_var_names |
Subset of _coupled_var_names of all variables corresponding to gridfunctions with degrees of freedom that comprise the state vector of this EquationSystem. More... | |
std::vector< std::string > | _eliminated_var_names |
Names of all coupled variables without a corresponding test variable. More... | |
Moose::MFEM::GridFunctions | _eliminated_variables |
Pointers to coupled variables not part of the reduced EquationSystem. 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... | |
std::vector< mfem::ParFiniteElementSpace * > | _coupled_pfespaces |
Pointers to finite element spaces associated with coupled 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 > > | _var_ess_constraints |
Gridfunctions holding essential constraints from Dirichlet BCs. More... | |
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 |
Private Member Functions | |
virtual void | SetTrialVariableNames () override |
Set trial variable names from subset of coupled variables that have an associated test variable. More... | |
Class to store weak form components for time dependent PDEs.
Definition at line 298 of file EquationSystem.h.
Moose::MFEM::TimeDependentEquationSystem::TimeDependentEquationSystem | ( | ) |
Definition at line 448 of file EquationSystem.C.
|
overridevirtual |
Add coupled variable to EquationSystem.
The TimeDependentEquationSystem operator expects to act on a vector of variable time derivatives, so the coupled variable must be the time derivative of the 'base' variable
When implicit, also register test_var_name in _eliminated_variables for the elimination of 'old' variable values from the previous timestep
Reimplemented from Moose::MFEM::EquationSystem.
Definition at line 451 of file EquationSystem.C.
Referenced by AddKernel().
|
virtualinherited |
Definition at line 114 of file EquationSystem.C.
|
virtualinherited |
Definition at line 91 of file EquationSystem.C.
|
overridevirtual |
Add kernels.
Reimplemented from Moose::MFEM::EquationSystem.
Definition at line 501 of file EquationSystem.C.
|
virtualinherited |
Add test variable to EquationSystem.
Definition at line 47 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystem::AddEssentialBC(), Moose::MFEM::EquationSystem::AddIntegratedBC(), Moose::MFEM::EquationSystem::AddKernel(), and AddKernel().
|
protectedinherited |
Definition at line 245 of file EquationSystem.h.
|
inlineprotectedinherited |
Definition at line 271 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::BuildLinearForms().
|
protectedinherited |
Template method for applying BilinearFormIntegrators on domains from kernels to a BilinearForm, or MixedBilinearForm.
Definition at line 197 of file EquationSystem.h.
|
inlineprotectedinherited |
Definition at line 221 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::BuildLinearForms().
|
virtualinherited |
Definition at line 164 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystem::BuildLinearForms().
|
overridevirtual |
Build bilinear forms.
Reimplemented from Moose::MFEM::EquationSystem.
Definition at line 531 of file EquationSystem.C.
|
virtualinherited |
Definition at line 441 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystemProblemOperator::Init(), Moose::MFEM::TimeDomainEquationSystemProblemOperator::Init(), and UpdateEquationSystem().
|
virtualinherited |
Build linear system, with essential boundary conditions accounted for.
Definition at line 320 of file EquationSystem.C.
Referenced by Moose::MFEM::TimeDomainEquationSystemProblemOperator::BuildEquationSystemOperator(), and Moose::MFEM::EquationSystemProblemOperator::Solve().
|
virtualinherited |
Build linear forms and eliminate constrained DoFs.
Definition at line 354 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystem::BuildEquationSystem().
|
virtualinherited |
Definition at line 402 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystem::BuildEquationSystem().
|
protectedinherited |
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 Moose::MFEM::EquationSystem::FormLegacySystem(), FormLegacySystem(), and Moose::MFEM::EquationSystem::~EquationSystem().
|
virtualinherited |
Definition at line 197 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystem::BuildLinearForms().
|
overridevirtual |
Reimplemented from Moose::MFEM::EquationSystem.
Definition at line 581 of file EquationSystem.C.
|
virtualinherited |
Form linear system, with essential boundary conditions accounted for.
Definition at line 214 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystem::BuildJacobian().
|
overridevirtual |
Reimplemented from Moose::MFEM::EquationSystem.
Definition at line 622 of file EquationSystem.C.
|
overrideinherited |
Compute J = M + grad_H(u)
Definition at line 336 of file EquationSystem.C.
|
virtualinherited |
Initialise.
Definition at line 127 of file EquationSystem.C.
|
overrideinherited |
Compute residual y = Mu.
Definition at line 328 of file EquationSystem.C.
|
virtualinherited |
Update variable from solution vector after solve.
Definition at line 342 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystemProblemOperator::Solve().
|
virtual |
Definition at line 462 of file EquationSystem.C.
Referenced by Moose::MFEM::TimeDomainEquationSystemProblemOperator::BuildEquationSystemOperator().
|
overrideprivatevirtual |
Set trial variable names from subset of coupled variables that have an associated test variable.
Reimplemented from Moose::MFEM::EquationSystem.
Definition at line 477 of file EquationSystem.C.
|
inlineinherited |
Definition at line 92 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystemProblemOperator::SetGridFunctions(), and Moose::MFEM::TimeDomainEquationSystemProblemOperator::SetGridFunctions().
|
inlineinherited |
Definition at line 91 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystemProblemOperator::SetGridFunctions(), and Moose::MFEM::TimeDomainEquationSystemProblemOperator::SetGridFunctions().
|
virtual |
Definition at line 659 of file EquationSystem.C.
Referenced by Moose::MFEM::TimeDomainEquationSystemProblemOperator::BuildEquationSystemOperator().
|
protectedinherited |
Definition at line 30 of file EquationSystem.C.
Referenced by Moose::MFEM::EquationSystem::AddCoupledVariableNameIfMissing(), Moose::MFEM::EquationSystem::AddTestVariableNameIfMissing(), Moose::MFEM::EquationSystem::SetTrialVariableNames(), and SetTrialVariableNames().
|
protectedinherited |
Definition at line 192 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::BuildBilinearForms(), BuildBilinearForms(), Moose::MFEM::EquationSystem::BuildMixedBilinearForms(), Moose::MFEM::EquationSystem::FormLinearSystem(), and Moose::MFEM::EquationSystem::Init().
|
protectedinherited |
Definition at line 132 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::BuildBilinearForms(), BuildBilinearForms(), Moose::MFEM::EquationSystem::FormLegacySystem(), FormLegacySystem(), Moose::MFEM::EquationSystem::FormSystem(), FormSystem(), and SetTimeStep().
|
protectedinherited |
Pointers to finite element spaces associated with coupled variables.
Definition at line 129 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::BuildMixedBilinearForms(), and Moose::MFEM::EquationSystem::Init().
|
protectedinherited |
Names of all trial variables of kernels and boundary conditions added to this EquationSystem.
Definition at line 115 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::AddCoupledVariableNameIfMissing(), Moose::MFEM::EquationSystem::BuildMixedBilinearForms(), Moose::MFEM::EquationSystem::Init(), Moose::MFEM::EquationSystem::SetTrialVariableNames(), and SetTrialVariableNames().
|
protected |
Coefficient for timestep scaling.
Definition at line 319 of file EquationSystem.h.
Referenced by BuildBilinearForms(), FormLegacySystem(), FormSystem(), and SetTimeStep().
|
protectedinherited |
Names of all coupled variables without a corresponding test variable.
Definition at line 121 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::EliminateCoupledVariables(), Moose::MFEM::EquationSystem::Init(), Moose::MFEM::EquationSystem::SetTrialVariableNames(), and SetTrialVariableNames().
|
protectedinherited |
Pointers to coupled variables not part of the reduced EquationSystem.
Definition at line 123 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::EliminateCoupledVariables(), FormLegacySystem(), FormSystem(), and Moose::MFEM::EquationSystem::Init().
|
inherited |
Definition at line 89 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::ApplyEssentialBCs(), Moose::MFEM::EquationSystem::FormLegacySystem(), FormLegacySystem(), Moose::MFEM::EquationSystem::FormSystem(), and FormSystem().
|
protectedinherited |
Arrays to store essential BCs to act on each component of weak form.
Named according to test variable.
Definition at line 188 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::AddEssentialBC(), and Moose::MFEM::EquationSystem::ApplyEssentialBCs().
|
protectedinherited |
Definition at line 175 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::DeleteAllBlocks(), Moose::MFEM::EquationSystem::FormLegacySystem(), and FormLegacySystem().
|
protectedinherited |
Arrays to store integrated BCs to act on each component of weak form.
Named according to test and trial variables.
Definition at line 185 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::AddIntegratedBC(), Moose::MFEM::EquationSystem::BuildBilinearForms(), BuildBilinearForms(), and Moose::MFEM::EquationSystem::BuildLinearForms().
|
mutableprotectedinherited |
Definition at line 190 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::BuildJacobian(), Moose::MFEM::EquationSystem::GetGradient(), and Moose::MFEM::EquationSystem::Mult().
|
protectedinherited |
Arrays to store kernels to act on each component of weak form.
Named according to test and trial variables.
Definition at line 180 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::AddKernel(), Moose::MFEM::EquationSystem::BuildBilinearForms(), Moose::MFEM::EquationSystem::BuildLinearForms(), and Moose::MFEM::EquationSystem::BuildMixedBilinearForms().
|
protectedinherited |
|
protectedinherited |
Definition at line 136 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::BuildMixedBilinearForms(), Moose::MFEM::EquationSystem::EliminateCoupledVariables(), and Moose::MFEM::EquationSystem::FormLegacySystem().
|
protectedinherited |
Definition at line 134 of file EquationSystem.h.
|
protected |
Container to store contributions to weak form of the form (F du/dt, v)
Definition at line 324 of file EquationSystem.h.
Referenced by BuildBilinearForms(), FormLegacySystem(), and FormSystem().
|
protected |
Definition at line 322 of file EquationSystem.h.
Referenced by AddKernel(), and BuildBilinearForms().
|
protectedinherited |
Pointers to finite element spaces associated with test variables.
Definition at line 127 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::ApplyEssentialBCs(), Moose::MFEM::EquationSystem::BuildBilinearForms(), BuildBilinearForms(), Moose::MFEM::EquationSystem::BuildLinearForms(), Moose::MFEM::EquationSystem::BuildMixedBilinearForms(), Moose::MFEM::EquationSystem::FormLegacySystem(), and Moose::MFEM::EquationSystem::Init().
|
protectedinherited |
Names of all test variables corresponding to linear forms in this equation system.
Definition at line 125 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::AddTestVariableNameIfMissing(), Moose::MFEM::EquationSystem::ApplyEssentialBCs(), Moose::MFEM::EquationSystem::BuildBilinearForms(), BuildBilinearForms(), Moose::MFEM::EquationSystem::BuildLinearForms(), Moose::MFEM::EquationSystem::BuildMixedBilinearForms(), Moose::MFEM::EquationSystem::EliminateCoupledVariables(), Moose::MFEM::EquationSystem::FormLegacySystem(), FormLegacySystem(), Moose::MFEM::EquationSystem::FormLinearSystem(), Moose::MFEM::EquationSystem::FormSystem(), FormSystem(), Moose::MFEM::EquationSystem::Init(), SetTimeStep(), Moose::MFEM::EquationSystem::SetTrialVariableNames(), SetTrialVariableNames(), and Moose::MFEM::EquationSystem::TestVarNames().
|
protectedinherited |
Subset of _coupled_var_names of all variables corresponding to gridfunctions with degrees of freedom that comprise the state vector of this EquationSystem.
This will differ from _coupled_var_names when time derivatives or other eliminated variables are present.
Definition at line 119 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::FormLegacySystem(), Moose::MFEM::EquationSystem::FormLinearSystem(), Moose::MFEM::EquationSystem::RecoverFEMSolution(), Moose::MFEM::EquationSystem::SetTrialVariableNames(), SetTrialVariableNames(), and Moose::MFEM::EquationSystem::TrialVarNames().
|
protectedinherited |
Gridfunctions holding essential constraints from Dirichlet BCs.
Definition at line 173 of file EquationSystem.h.
Referenced by Moose::MFEM::EquationSystem::ApplyEssentialBCs(), Moose::MFEM::EquationSystem::FormLegacySystem(), FormLegacySystem(), Moose::MFEM::EquationSystem::FormSystem(), FormSystem(), and Moose::MFEM::EquationSystem::Init().