https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMWeakFormBase.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 "MFEMObject.h"
15#include "EquationSystem.h"
16
18class MFEMKernel;
19
24{
25public:
27
29
32 std::shared_ptr<Moose::MFEM::EquationSystem> createEquationSystem();
33
34protected:
36 virtual std::shared_ptr<Moose::MFEM::EquationSystem> makeEquationSystem() = 0;
37
38 virtual void addBoundaryCondition(const std::string & name,
39 std::shared_ptr<MFEMBoundaryCondition> bc) = 0;
40
41 virtual void addKernel(const std::string & name, std::shared_ptr<MFEMKernel> kernel) = 0;
42
44 void initEquationSystem();
45
46 std::vector<MFEMBoundaryConditionName> _bc_names;
47 std::vector<MFEMKernelName> _kernel_names;
48
51 std::shared_ptr<Moose::MFEM::EquationSystem> _equation_system{nullptr};
52};
53
54#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Class to construct an MFEM integrator to apply to the equation system.
Definition MFEMKernel.h:22
Thin base for MFEM objects backed directly by MooseObject instead of UserObject.
Definition MFEMObject.h:30
Base class for MOOSE objects that construct objects derived from Moose::MFEM::EquationSystem.
std::vector< MFEMKernelName > _kernel_names
virtual std::shared_ptr< Moose::MFEM::EquationSystem > makeEquationSystem()=0
Constructs the empty EquationSystem of the type this weak form builds.
std::shared_ptr< Moose::MFEM::EquationSystem > _equation_system
Stores the constructed EquationSystem.
virtual void addBoundaryCondition(const std::string &name, std::shared_ptr< MFEMBoundaryCondition > bc)=0
void initEquationSystem()
Initialise the equation system. TODO: move all setup into EquationSystem constructors.
virtual void addKernel(const std::string &name, std::shared_ptr< MFEMKernel > kernel)=0
static InputParameters validParams()
std::shared_ptr< Moose::MFEM::EquationSystem > createEquationSystem()
Constructs the EquationSystem, adds the requested kernels and boundary conditions to it,...
std::vector< MFEMBoundaryConditionName > _bc_names
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103