https://mooseframework.inl.gov
Loading...
Searching...
No Matches
EquationSystemProblemOperator.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#ifdef MOOSE_MFEM_ENABLED
11
13#include "MFEMProblem.h"
14
15namespace Moose::MFEM
16{
18 const std::string & weak_form_name)
19 : ProblemOperator(problem), _equation_system(problem.getEquationSystem(weak_form_name))
20{
21}
22
23void
30
31void
33{
34 auto * const es = GetEquationSystem();
35
36 {
37 TIME_SECTION("EquationSystemProblemOperator::FormSystem", 2, "Assembling MFEM System");
39 }
40
41 {
42 TIME_SECTION("EquationSystemProblemOperator::SolveSystem", 2, "Solving MFEM System");
44 }
45
46 es->SetTrialVariablesFromTrueVectors(_true_x);
47}
48
49void
54
55} // namespace Moose::MFEM
56
57#endif
void FormEquationSystemOperator()
Form equation-system state used by Solve().
virtual EquationSystem * GetEquationSystem() const override
Returns a pointer to the operator's equation system.
EquationSystemProblemOperator(MFEMProblem &problem, const std::string &weak_form_name="")
const std::vector< std::string > & GetTrialVarNames() const
const std::vector< std::string > & GetTestVarNames() const
void FormSystem(mfem::BlockVector &trueX, mfem::BlockVector &trueRHS)
Build all weak-form components via BuildEquationSystem(), form the constrained linear part of the sys...
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.
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
Steady-state problem operator with no equation system.
virtual void SetGridFunctions() override
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).