https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
MappingInterface Class Reference

An interface class that helps getting access to Mapping objects. More...

#include <MappingInterface.h>

Inheritance diagram for MappingInterface:
[legend]

Public Member Functions

 MappingInterface (const MooseObject *moose_object)
 Construct using a moose object (usually the object which inherits from the interface)
 
VariableMappingBasegetMapping (const std::string &name) const
 Get the mapping using the parameters of the moose object.
 
VariableMappingBasegetMappingByName (const UserObjectName &name) const
 Get the mapping by supplying the name of the object in the warehouse.
 

Static Public Member Functions

static InputParameters validParams ()
 

Private Attributes

const InputParameters_smi_params
 Parameters of the object with this interface.
 
FEProblemBase_smi_feproblem
 Reference to FEProblemBase instance.
 

Detailed Description

An interface class that helps getting access to Mapping objects.

Definition at line 19 of file MappingInterface.h.

Constructor & Destructor Documentation

◆ MappingInterface()

MappingInterface::MappingInterface ( const MooseObject moose_object)

Construct using a moose object (usually the object which inherits from the interface)

Definition at line 19 of file MappingInterface.C.

20 : _smi_params(moose_object->parameters()),
21 _smi_feproblem(*_smi_params.get<FEProblemBase *>("_fe_problem_base"))
22{
23}
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
FEProblemBase & _smi_feproblem
Reference to FEProblemBase instance.
const InputParameters & _smi_params
Parameters of the object with this interface.
const InputParameters & parameters() const

Member Function Documentation

◆ getMapping()

VariableMappingBase & MappingInterface::getMapping ( const std::string &  name) const

Get the mapping using the parameters of the moose object.

Parameters
nameThe parameter name

Definition at line 40 of file MappingInterface.C.

41{
42 return getMappingByName(_smi_params.get<UserObjectName>(name));
43}
const std::string name
Definition Setup.h:21
VariableMappingBase & getMappingByName(const UserObjectName &name) const
Get the mapping by supplying the name of the object in the warehouse.

Referenced by SingularTripletReporter::initialSetup(), and InverseMapping::initialSetup().

◆ getMappingByName()

VariableMappingBase & MappingInterface::getMappingByName ( const UserObjectName &  name) const

Get the mapping by supplying the name of the object in the warehouse.

Parameters
nameThe name of the mapping object

Definition at line 26 of file MappingInterface.C.

27{
28 std::vector<VariableMappingBase *> models;
30 .query()
31 .condition<AttribName>(name)
32 .condition<AttribSystem>("VariableMappingBase")
33 .queryInto(models);
34 if (models.empty())
35 mooseError("Unable to find a Mapping object with the name '" + name + "'");
36 return *(models[0]);
37}
void mooseError(Args &&... args)
TheWarehouse & theWarehouse() const
Query query()

Referenced by getMapping(), MappingReporter::initialSetup(), and MappingOutput::output().

◆ validParams()

InputParameters MappingInterface::validParams ( )
static

Definition at line 14 of file MappingInterface.C.

15{
16 return emptyInputParameters();
17}
InputParameters emptyInputParameters()

Referenced by MappingReporter::validParams(), and SingularTripletReporter::validParams().

Member Data Documentation

◆ _smi_feproblem

FEProblemBase& MappingInterface::_smi_feproblem
private

Reference to FEProblemBase instance.

Definition at line 44 of file MappingInterface.h.

Referenced by getMappingByName().

◆ _smi_params

const InputParameters& MappingInterface::_smi_params
private

Parameters of the object with this interface.

Definition at line 41 of file MappingInterface.h.

Referenced by getMapping().


The documentation for this class was generated from the following files: