GRINS-0.8.0
List of all members | Public Member Functions | Protected Member Functions
GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics > Class Template Reference

#include <physics_factory_variable_density_flow.h>

Inheritance diagram for GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >:
Inheritance graph
[legend]
Collaboration diagram for GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >:
Collaboration graph
[legend]

Public Member Functions

 PhysicsFactoryVariableDensityFlow (const std::string &physics_name, const std::string &core_physics_name)
 
 ~PhysicsFactoryVariableDensityFlow ()
 
- Public Member Functions inherited from GRINS::PhysicsFactoryWithCore
 PhysicsFactoryWithCore (const std::string &physics_name, const std::string &core_physics_name)
 
 ~PhysicsFactoryWithCore ()
 
- Public Member Functions inherited from GRINS::PhysicsFactoryBase
 PhysicsFactoryBase (const std::string &physics_name)
 
 ~PhysicsFactoryBase ()
 
- Public Member Functions inherited from GRINS::FactoryWithGetPotPhysicsName< Physics >
 FactoryWithGetPotPhysicsName (const std::string &name)
 
 ~FactoryWithGetPotPhysicsName ()
 
- Public Member Functions inherited from GRINS::FactoryWithGetPot< Physics >
 FactoryWithGetPot (const std::string &name)
 
 ~FactoryWithGetPot ()
 
- Public Member Functions inherited from GRINS::FactoryAbstract< Physics >
virtual ~FactoryAbstract ()
 

Protected Member Functions

virtual libMesh::UniquePtr< Physicsbuild_physics (const GetPot &input, const std::string &physics_name)
 
void prop_error_msg (const std::string &physics, const std::string &conductivity, const std::string &viscosity, const std::string &specific_heat) const
 
- Protected Member Functions inherited from GRINS::PhysicsFactoryWithCore
std::string find_core_physics_name (const std::string &physics_name)
 
- Protected Member Functions inherited from GRINS::FactoryAbstract< Physics >
 FactoryAbstract (const std::string &name)
 Constructor is protected. Use the build() method to construct Base objects. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GRINS::FactoryWithGetPotPhysicsName< Physics >
static void set_physics_name (const std::string &physics_name)
 Setter for physics name. More...
 
- Static Public Member Functions inherited from GRINS::FactoryWithGetPot< Physics >
static void set_getpot (const GetPot &input)
 
- Static Public Member Functions inherited from GRINS::FactoryAbstract< Physics >
static libMesh::UniquePtr< Physicsbuild (const std::string &name)
 Use this method to build objects of type Base. More...
 
- Static Protected Member Functions inherited from GRINS::PhysicsFactoryWithCore
static std::map< std::string, std::string > & core_physics_names ()
 Cache for "core" physics names. More...
 
- Static Protected Member Functions inherited from GRINS::FactoryAbstract< Physics >
static FactoryAbstract< Physics > & get_factory (const std::string &name)
 Helper method that looks up the factory and returns it if present, or error if it's not. More...
 
static DerivedType & get_factory_subclass (const std::string &name)
 Like get_factory, but will downcast to DerivedType. More...
 
static std::map< std::string, FactoryAbstract< Physics > * > & factory_map ()
 
- Static Protected Attributes inherited from GRINS::FactoryWithGetPotPhysicsName< Physics >
static std::string _physics_name
 
- Static Protected Attributes inherited from GRINS::FactoryWithGetPot< Physics >
static const GetPot * _input
 We store only a raw pointer here because we can't make a copy. More...
 

Detailed Description

template<template< typename, typename, typename > class DerivedPhysics>
class GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >

Definition at line 38 of file physics_factory_variable_density_flow.h.

Constructor & Destructor Documentation

template<template< typename, typename, typename > class DerivedPhysics>
GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >::PhysicsFactoryVariableDensityFlow ( const std::string &  physics_name,
const std::string &  core_physics_name 
)
inline

Definition at line 41 of file physics_factory_variable_density_flow.h.

43  : PhysicsFactoryWithCore(physics_name,core_physics_name)
44  {}
PhysicsFactoryWithCore(const std::string &physics_name, const std::string &core_physics_name)
template<template< typename, typename, typename > class DerivedPhysics>
GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >::~PhysicsFactoryVariableDensityFlow ( )
inline

Definition at line 46 of file physics_factory_variable_density_flow.h.

46 {};

Member Function Documentation

template<template< typename, typename, typename > class DerivedPhysics>
libMesh::UniquePtr< Physics > GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >::build_physics ( const GetPot &  input,
const std::string &  physics_name 
)
inlineprotectedvirtual

Implements GRINS::PhysicsFactoryBase.

Definition at line 62 of file physics_factory_variable_density_flow.h.

References GRINS::PhysicsFactoryHelper::parse_conductivity_model(), GRINS::PhysicsFactoryHelper::parse_specific_heat_model(), and GRINS::PhysicsFactoryHelper::parse_viscosity_model().

64  {
65  std::string core_physics = this->find_core_physics_name(physics_name);
66 
67  std::string conductivity;
68  PhysicsFactoryHelper::parse_conductivity_model(input,core_physics,conductivity);
69 
70  std::string viscosity;
71  PhysicsFactoryHelper::parse_viscosity_model(input,core_physics,viscosity);
72 
73  std::string specific_heat;
74  PhysicsFactoryHelper::parse_specific_heat_model(input,core_physics,specific_heat);
75 
76  libMesh::UniquePtr<Physics> new_physics;
77 
78  if( conductivity == "constant" && viscosity == "constant" && specific_heat == "constant" )
79  new_physics.reset( new DerivedPhysics<ConstantViscosity,ConstantSpecificHeat,ConstantConductivity>
80  (physics_name,input) );
81 
82  else
83  this->prop_error_msg(physics_name, conductivity, viscosity, specific_heat);
84 
85  libmesh_assert(new_physics);
86 
87  return new_physics;
88  }
static void parse_viscosity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine viscosity model based on given physics name.
void prop_error_msg(const std::string &physics, const std::string &conductivity, const std::string &viscosity, const std::string &specific_heat) const
static void parse_conductivity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine conductivity model based on given physics name.
std::string find_core_physics_name(const std::string &physics_name)
static void parse_specific_heat_model(const GetPot &input, const std::string &physics, std::string &model)
Determine specific heat model based on given physics name.
template<template< typename, typename, typename > class DerivedPhysics>
void GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >::prop_error_msg ( const std::string &  physics,
const std::string &  conductivity,
const std::string &  viscosity,
const std::string &  specific_heat 
) const
inlineprotected

Definition at line 92 of file physics_factory_variable_density_flow.h.

96  {
97  std::string error = "================================================================\n";
98  error += "Invalid combination of models for "+physics+"\n";
99  error += "Viscosity model = "+viscosity+"\n";
100  error += "Conductivity model = "+conductivity+"\n";
101  error += "Specific heat model = "+specific_heat+"\n";
102  error += "================================================================\n";
103 
104  libmesh_error_msg(error);
105  }

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

Generated on Tue Dec 19 2017 12:47:31 for GRINS-0.8.0 by  doxygen 1.8.9.1