10 #ifdef MOOSE_MFEM_ENABLED 21 : _problem(problem), _problem_data(problem.getProblemData())
74 trial_var->SetFromTrueVector();
80 const mfem::Vector & rhs,
83 const bool nonlinear = equation_system.
Nonlinear();
91 mooseError(
"A nonlinear MFEM solve requires a nonlinear solver, but none was provided.");
94 if (nonlinear_solver.RequiresExternalLinearSolver())
97 mooseError(
"The configured MFEM nonlinear solver requires an external linear solver, but " 98 "none was provided.");
101 nonlinear_solver.SetLinearSolver(linear_solver.GetSolver());
104 nonlinear_solver.SetOperator(equation_system);
105 nonlinear_solver.Mult(rhs, x);
115 mooseError(
"A linear MFEM solve requires a linear solver, but none was provided.");
119 linear_solver.GetSolver().Mult(rhs, x);
std::vector< std::string > _test_var_names
MFEMProblemData & _problem_data
void PrepareLinearSolver(LinearSolverBase &solver)
Prepare the provided linear solver.
std::vector< std::string > _trial_var_names
Vector of names of state gridfunctions used in formulation, ordered by appearance in block vector dur...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
ProblemOperatorBase(MFEMProblem &problem)
virtual void SetTrialVariablesFromTrueVectors()
virtual void SetGridFunctions()
mfem::Array< int > _block_true_offsets_test
std::shared_ptr< Moose::MFEM::LinearSolverBase > jacobian_solver
Class to store weak form components (bilinear and linear forms, and optionally mixed and nonlinear fo...
std::vector< mfem::ParGridFunction * > _test_variables
mfem::Array< int > _block_true_offsets_trial
mfem::Vector * _trial_true_vector
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...
mfem::BlockVector _true_x
std::vector< mfem::ParGridFunction * > _trial_variables
std::shared_ptr< Moose::MFEM::NonlinearSolverBase > nonlinear_solver
mfem::BlockVector _true_rhs
virtual void Init(mfem::BlockVector &X)
void SolveWithOperator(EquationSystem &equation_system, const mfem::Vector &rhs, mfem::Vector &x)
Solve the current equation system/operator using the configured nonlinear solver or linear solver for...
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).
Moose::MFEM::GridFunctions gridfunctions
auto index_range(const T &sizable)