Line data Source code
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 : 15 : /** 16 : * Create a component with user-selected Physics active on it 17 : */ 18 : class FileMeshPhysicsComponent : public FileMeshComponent 19 : { 20 : public: 21 : static InputParameters validParams(); 22 : 23 : FileMeshPhysicsComponent(const InputParameters & parameters); 24 : 25 : virtual void addRelationshipManagers(Moose::RelationshipManagerType input_rm_type) override; 26 : // These objects are added by the Physics already 27 27 : virtual void addVariables() override{}; 28 27 : virtual void addMooseObjects() override{}; 29 : 30 : protected: 31 : virtual void init() override; 32 : 33 : /// Return the blocks this component defines (assuming the ids do not overlap with other components) 34 0 : virtual std::vector<SubdomainName> getBlocks() const { return getSubdomainNames(); } 35 0 : virtual Factory & getFactory() { return getMooseApp().getFactory(); } 36 0 : virtual FEProblemBase & getProblem() { return getMooseApp().feProblem(); } 37 : /// Returns the mesh, which also contains other components 38 0 : virtual const MooseMesh & getMesh() const { return constMesh(); } 39 : /// Returns a useful prefix for logs 40 0 : virtual std::string prefix() const { return name() + ":"; } 41 : 42 : private: 43 : /// Physics that creates the equations on this component 44 : std::vector<PhysicsBase *> _physics; 45 : };