https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AddMFEMComplexBCComponentAction.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
14registerMooseAction("MooseApp", AddMFEMComplexBCComponentAction, "add_mfem_complex_bc_components");
15
18{
21 "Add an MFEMIntegratedBC to serve as the real or imaginary component of "
22 "an MFEMComplexIntegratedBC.");
23 return params;
24}
25
30
31void
33{
34 std::vector<std::string> elements;
35 MooseUtils::tokenize<std::string>(_pars.blockFullpath(), elements);
36
37 if (_problem->feBackend() == Moose::FEBackend::MFEM && _name == "RealComponent")
38 static_cast<MFEMProblem &>(*_problem).addRealComponentToBC(
39 _type, elements[elements.size() - 2], _moose_object_pars);
40 else if (_problem->feBackend() == Moose::FEBackend::MFEM && _name == "ImagComponent")
41 static_cast<MFEMProblem &>(*_problem).addImagComponentToBC(
42 _type, elements[elements.size() - 2], _moose_object_pars);
43}
44
45#endif
registerMooseAction("MooseApp", AddMFEMComplexBCComponentAction, "add_mfem_complex_bc_components")
std::shared_ptr< FEProblemBase > & _problem
Convenience reference to a problem this action works on.
Definition Action.h:178
This class allows us to add the user objects that will be the real and imaginary components of MFEMCo...
AddMFEMComplexBCComponentAction(const InputParameters &parameters)
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
std::string blockFullpath() const
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
void addRealComponentToBC(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
Adds a real component BC to the parent MFEMComplexIntegratedBC.
void addImagComponentToBC(const std::string &kernel_name, const std::string &name, InputParameters &parameters)
Adds an imaginary component BC to the parent MFEMComplexIntegratedBC.
const InputParameters & _pars
The object's parameters.
Definition MooseBase.h:384
const std::string & _name
The name of this class.
Definition MooseBase.h:381
InputParameters _moose_object_pars
The parameters for the object to be created.
static InputParameters validParams()
std::string _type
The Object type that is being created.