https://mooseframework.inl.gov
Loading...
Searching...
No Matches
FileMeshPhysicsComponent.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
11#include "PhysicsBase.h"
12
14
17{
19
21 "Component using a mesh from a file with one or more Physics active on it.");
22 params.addParam<std::vector<PhysicsName>>("physics", "Physics object(s) active on the Component");
23 return params;
24}
25
30
31void
33{
34 // TODO: We ll just add late relationship managers
35 // At this point in the setup, we do not have a problem, so we cannot retrieve a Physics. We can
36 // send the default ghosting for the physics, but that's it.
38}
39
40void
42{
44
45 // Before this point, we did not have a problem, so we could not retrieve the physics
46 for (const auto & physics_name : getParam<std::vector<PhysicsName>>("physics"))
47 _physics.push_back(_app.actionWarehouse().getPhysics<PhysicsBase>(physics_name));
48
49 for (auto physics : _physics)
50 physics->addBlocks(getSubdomainNames());
51}
registerMooseObject("ThermalHydraulicsApp", FileMeshPhysicsComponent)
T * getPhysics(const std::string &name) const
virtual void init()
Initializes the component.
Definition Component.h:405
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition Component.C:345
void addRelationshipManagersFromParameters(const InputParameters &moose_object_pars)
Method to add a relationship manager for the objects being added to the system.
Definition Component.C:148
Loads a mesh from an ExodusII file without adding physics.
static InputParameters validParams()
Create a component with user-selected Physics active on it.
virtual void init() override
Initializes the component.
FileMeshPhysicsComponent(const InputParameters &parameters)
virtual void addRelationshipManagers(Moose::RelationshipManagerType input_rm_type) override
Adds relationship managers for the component.
std::vector< PhysicsBase * > _physics
Physics that creates the equations on this component.
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
ActionWarehouse & actionWarehouse()
MooseApp & _app
static InputParameters validParams()
RelationshipManagerType