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

#include <physics_factory_incompressible_turb_flow.h>

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

Public Member Functions

 PhysicsFactoryIncompressibleTurbFlow (const std::string &physics_name, const std::string &core_physics_name)
 
 ~PhysicsFactoryIncompressibleTurbFlow ()
 
- 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 visc_error_msg (const std::string &physics, const std::string &viscosity) 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 > class DerivedPhysics>
class GRINS::PhysicsFactoryIncompressibleTurbFlow< DerivedPhysics >

Definition at line 36 of file physics_factory_incompressible_turb_flow.h.

Constructor & Destructor Documentation

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

Definition at line 39 of file physics_factory_incompressible_turb_flow.h.

41  : PhysicsFactoryWithCore(physics_name,core_physics_name)
42  {}
PhysicsFactoryWithCore(const std::string &physics_name, const std::string &core_physics_name)
template<template< typename > class DerivedPhysics>
GRINS::PhysicsFactoryIncompressibleTurbFlow< DerivedPhysics >::~PhysicsFactoryIncompressibleTurbFlow ( )
inline

Definition at line 44 of file physics_factory_incompressible_turb_flow.h.

44 {};

Member Function Documentation

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

Implements GRINS::PhysicsFactoryBase.

Definition at line 57 of file physics_factory_incompressible_turb_flow.h.

References GRINS::PhysicsFactoryHelper::parse_turb_viscosity_model().

59  {
60  std::string core_physics = this->find_core_physics_name(physics_name);
61 
62  std::string viscosity;
63  PhysicsFactoryHelper::parse_turb_viscosity_model(input,core_physics,viscosity);
64 
65  libMesh::UniquePtr<Physics> new_physics;
66 
67  if( viscosity == "constant" )
68  new_physics.reset( new DerivedPhysics<ConstantViscosity>(physics_name,input) );
69 
70  else
71  this->visc_error_msg(physics_name, viscosity);
72 
73  libmesh_assert(new_physics);
74 
75  return new_physics;
76  }
void visc_error_msg(const std::string &physics, const std::string &viscosity) const
std::string find_core_physics_name(const std::string &physics_name)
static void parse_turb_viscosity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine viscosity model used by turblence classes.
template<template< typename > class DerivedPhysics>
void GRINS::PhysicsFactoryIncompressibleTurbFlow< DerivedPhysics >::visc_error_msg ( const std::string &  physics,
const std::string &  viscosity 
) const
inlineprotected

Definition at line 80 of file physics_factory_incompressible_turb_flow.h.

82  {
83  std::string error = "================================================================\n";
84  error += "Invalid turblence viscosity model for "+physics+"\n";
85  error += "Viscosity model = "+viscosity+"\n";
86  error += "================================================================\n";
87 
88  libmesh_error_msg(error);
89  }

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