https://mooseframework.inl.gov
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 
14 registerMooseAction("MooseApp", AddMFEMComplexBCComponentAction, "add_mfem_complex_bc_components");
15 
18 {
20  params.addClassDescription(
21  "Add an MFEMIntegratedBC to serve as the real or imaginary component of "
22  "an MFEMComplexIntegratedBC.");
23  return params;
24 }
25 
27  : MooseObjectAction(parameters)
28 {
29 }
30 
31 void
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
const InputParameters & _pars
The object&#39;s parameters.
Definition: MooseBase.h:394
const std::string & _name
The name of this class.
Definition: MooseBase.h:391
static InputParameters validParams()
registerMooseAction("MooseApp", AddMFEMComplexBCComponentAction, "add_mfem_complex_bc_components")
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual void act() override
Method to add objects to the simulation or perform other setup tasks.
AddMFEMComplexBCComponentAction(const InputParameters &parameters)
std::string _type
The Object type that is being created.
InputParameters _moose_object_pars
The parameters for the object to be created.
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...
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...