https://mooseframework.inl.gov
FileMeshPhysicsComponent.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 #pragma once
11 
12 #include "FileMeshComponent.h"
13 #include "THMMesh.h"
14 
19 {
20 public:
22 
24 
25  virtual void addRelationshipManagers(Moose::RelationshipManagerType input_rm_type) override;
26  // These objects are added by the Physics already
27  virtual void addVariables() override{};
28  virtual void addMooseObjects() override{};
29 
30 protected:
31  virtual void init() override;
32 
34  virtual std::vector<SubdomainName> getBlocks() const { return getSubdomainNames(); }
35  virtual Factory & getFactory() { return getMooseApp().getFactory(); }
36  virtual FEProblemBase & getProblem() { return getMooseApp().feProblem(); }
38  virtual const MooseMesh & getMesh() const { return constMesh(); }
40  virtual std::string prefix() const { return name() + ":"; }
41 
42 private:
44  std::vector<PhysicsBase *> _physics;
45 };
std::vector< PhysicsBase * > _physics
Physics that creates the equations on this component.
RelationshipManagerType
Create a component with user-selected Physics active on it.
static InputParameters validParams()
virtual const MooseMesh & getMesh() const
Returns the mesh, which also contains other components.
virtual void addRelationshipManagers(Moose::RelationshipManagerType input_rm_type) override
Adds relationship managers for the component.
virtual std::vector< SubdomainName > getBlocks() const
Return the blocks this component defines (assuming the ids do not overlap with other components) ...
virtual const std::string & name() const
MooseApp & getMooseApp() const
FEProblemBase & feProblem() const
Factory & getFactory()
Loads a mesh from an ExodusII file without adding physics.
virtual void init() override
Initializes the component.
const THMMesh & constMesh() const
Const reference to mesh, which can be called at any point.
Definition: Component.h:62
virtual void addVariables() override
virtual void addMooseObjects() override
virtual FEProblemBase & getProblem()
const InputParameters & parameters() const
virtual const std::vector< SubdomainName > & getSubdomainNames() const
Gets the subdomain names for this component.
Definition: Component.C:307
virtual std::string prefix() const
Returns a useful prefix for logs.
FileMeshPhysicsComponent(const InputParameters &parameters)