https://mooseframework.inl.gov
ProblemOperatorBase.h
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 
12 #pragma once
13 
14 #include "MFEMProblem.h"
15 
16 namespace Moose::MFEM
17 {
20 {
21 public:
23  virtual ~ProblemOperatorBase() = default;
24 
25  virtual void SetGridFunctions();
26  virtual void SetTrialVariablesFromTrueVectors();
27  virtual void Init(mfem::BlockVector & X);
28  virtual void Solve() = 0;
29 
30  mfem::Array<int> _block_true_offsets_test;
31  mfem::Array<int> _block_true_offsets_trial;
32 
33  mfem::BlockVector _true_x, _true_rhs;
34 
35 protected:
39 
42  std::vector<std::string> _trial_var_names;
43  std::vector<std::string> _test_var_names;
44  std::vector<mfem::ParGridFunction *> _trial_variables;
45  std::vector<mfem::ParGridFunction *> _test_variables;
46  mfem::Vector * _trial_true_vector = nullptr;
47 };
48 }
49 
50 #endif
std::vector< std::string > _test_var_names
Base problem data struct.
std::vector< std::string > _trial_var_names
Vector of names of state gridfunctions used in formulation, ordered by appearance in block vector dur...
ProblemOperatorBase(MFEMProblem &problem)
mfem::Array< int > _block_true_offsets_test
std::vector< mfem::ParGridFunction * > _test_variables
mfem::Array< int > _block_true_offsets_trial
Interface inherited by ProblemOperator and TimeDependentProblemOperator. Removes duplicated code in b...
std::vector< mfem::ParGridFunction * > _trial_variables
virtual ~ProblemOperatorBase()=default
MFEMProblem & _problem
Reference to the current problem.
virtual void Init(mfem::BlockVector &X)
Utilities for converting between vector(s) of libMesh Points and MFEM Vector(s).