25 #ifndef GRINS_PHYSICS_FACTORY_HEAT_TRANSFER_H
26 #define GRINS_PHYSICS_FACTORY_HEAT_TRANSFER_H
36 template<
template<
typename>
class DerivedPhysics>
41 const std::string& core_physics_name )
49 virtual libMesh::UniquePtr<Physics>
build_physics(
const GetPot& input,
50 const std::string& physics_name );
52 void cond_error_msg(
const std::string& physics,
const std::string& conductivity )
const;
56 template<
template<
typename>
class DerivedPhysics>
58 libMesh::UniquePtr<Physics>
60 (
const GetPot& input,
const std::string& physics_name )
62 std::string core_physics = this->find_core_physics_name(physics_name);
64 std::string conductivity;
67 libMesh::UniquePtr<Physics> new_physics;
69 if( conductivity ==
"constant" )
70 new_physics.reset(
new DerivedPhysics<ConstantConductivity>(physics_name,input) );
72 else if( conductivity ==
"parsed" )
73 new_physics.reset(
new DerivedPhysics<ParsedConductivity>(physics_name,input) );
76 this->cond_error_msg(physics_name, conductivity);
78 libmesh_assert(new_physics);
83 template<
template<
typename>
class DerivedPhysics>
86 const std::string& conductivity )
const
88 std::string error =
"================================================================\n";
89 error +=
"Invalid conductivity model for "+physics+
"\n";
90 error +=
"Conductivity model = "+conductivity+
"\n";
91 error +=
"================================================================\n";
93 libmesh_error_msg(error);
98 #endif // GRINS_PHYSICS_FACTORY_HEAT_TRANSFER_H
PhysicsFactoryHeatTransfer(const std::string &physics_name, const std::string &core_physics_name)
virtual libMesh::UniquePtr< Physics > build_physics(const GetPot &input, const std::string &physics_name)
~PhysicsFactoryHeatTransfer()
void cond_error_msg(const std::string &physics, const std::string &conductivity) const
PhysicsFactory base class for Physics that may have a related "core" Physics.
static void parse_conductivity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine conductivity model based on given physics name.