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 MFEMConstraint;
19class MFEMKernel;
20
25{
26public:
28
30
34 std::shared_ptr<Moose::MFEM::EquationSystem> createEquationSystem();
35
36protected:
38 virtual std::shared_ptr<Moose::MFEM::EquationSystem> makeEquationSystem() = 0;
39
40 virtual void addBoundaryCondition(const std::string & name,
41 std::shared_ptr<MFEMBoundaryCondition> bc) = 0;
42
43 virtual void addKernel(const std::string & name, std::shared_ptr<MFEMKernel> kernel) = 0;
44
45 virtual void addConstraint(const std::string & name,
46 std::shared_ptr<MFEMConstraint> constraint) = 0;
47
49 void initEquationSystem();
50
51 std::vector<MFEMBoundaryConditionName> _bc_names;
52 std::vector<MFEMKernelName> _kernel_names;
53 std::vector<MFEMConstraintName> _constraint_names;
54
57 std::shared_ptr<Moose::MFEM::EquationSystem> _equation_system{nullptr};
58};
59
60#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for objects constraining the value an MFEM variable may take within one or more mesh subdo...
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< MFEMConstraintName > _constraint_names
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
virtual void addConstraint(const std::string &name, std::shared_ptr< MFEMConstraint > constraint)=0
static InputParameters validParams()
std::shared_ptr< Moose::MFEM::EquationSystem > createEquationSystem()
Constructs the EquationSystem, adds the requested kernels, boundary conditions and constraints 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