10#ifdef MOOSE_MFEM_ENABLED
18 MFEMProblem & problem,
const std::string & weak_form_name)
21 problem.getEquationSystem(weak_form_name))}
24 mooseError(
"The weak form supplying this operator does not provide a ComplexEquationSystem, "
25 "which is required by ComplexEquationSystemProblemOperator.");
70 TIME_SECTION(
"ComplexEquationSystemProblemOperator::FormSystem", 2,
"Assembling MFEM System");
75 TIME_SECTION(
"ComplexEquationSystemProblemOperator::SolveSystem", 2,
"Solving MFEM System");
79 es->SetTrialVariablesFromTrueVectors(
_true_x);
std::unique_ptr< T_DEST, T_DELETER > dynamic_pointer_cast(std::unique_ptr< T_SRC, T_DELETER > &src)
These are reworked from https://stackoverflow.com/a/11003103.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
std::vector< mfem::ParComplexGridFunction * > _cmplx_trial_variables
std::shared_ptr< Moose::MFEM::ComplexEquationSystem > _equation_system
ComplexEquationSystemProblemOperator(MFEMProblem &problem, const std::string &weak_form_name="")
virtual void Solve() override
virtual Moose::MFEM::ComplexEquationSystem * GetEquationSystem() const override
Returns a pointer to the operator's equation system.
virtual void SetGridFunctions() override
std::vector< mfem::ParComplexGridFunction * > _cmplx_test_variables
Class to store weak form components (bilinear and linear forms, and optionally mixed and nonlinear fo...
Steady-state ProblemOperator that prepares and solves a single EquationSystem.
void FormEquationSystemOperator()
Form equation-system state used by Solve().
const std::vector< std::string > & GetTrialVarNames() const
const std::vector< std::string > & GetTestVarNames() const
T * Get(const std::string &field_name) const
Returns a non-owning pointer to the field. This is guaranteed to return a non-null pointer.
void SolveWithOperator(mfem::Operator &system_operator, mfem::Operator &linear_operator, const mfem::Vector &rhs, mfem::Vector &x)
Solve the current system operator using the configured nonlinear and linear solvers.
mfem::Array< int > _block_true_offsets_trial
mfem::Array< int > _block_true_offsets_test
MFEMProblemData & _problem_data
mfem::BlockVector _true_rhs
std::vector< std::string > _trial_var_names
Vector of names of state gridfunctions used in formulation, ordered by appearance in block vector dur...
std::vector< std::string > _test_var_names
mfem::BlockVector _true_x
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
Moose::MFEM::ComplexGridFunctions cmplx_gridfunctions