GRINS-0.8.0
List of all members | Public Member Functions | Private Member Functions | Private Attributes
GRINS::ConstantConductivity Class Reference

#include <constant_conductivity.h>

Inheritance diagram for GRINS::ConstantConductivity:
Inheritance graph
[legend]
Collaboration diagram for GRINS::ConstantConductivity:
Collaboration graph
[legend]

Public Member Functions

 ConstantConductivity (const GetPot &input, const std::string &material)
 Constructor with specified material. More...
 
 ConstantConductivity (const GetPot &input)
 Deprecated constructor. More...
 
 ~ConstantConductivity ()
 
libMesh::Real operator() () const
 
libMesh::Real operator() (AssemblyContext &context, unsigned int qp) const
 
libMesh::Real operator() (const libMesh::Point &p, const libMesh::Real time)
 
libMesh::Real operator() (const libMesh::Real T) const
 
libMesh::Real operator() (const libMesh::Real mu, const libMesh::Real cp) const
 
libMesh::Real deriv (const libMesh::Real T) const
 
- Public Member Functions inherited from GRINS::ParameterUser
 ParameterUser (const std::string &user_name)
 
virtual ~ParameterUser ()
 
virtual void set_parameter (libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
 Each subclass can simultaneously read a parameter value from. More...
 
virtual void set_parameter (libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void set_parameter (libMesh::ParsedFEMFunction< libMesh::Number > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void move_parameter (const libMesh::Number &old_parameter, libMesh::Number &new_parameter)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &old_func, libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFEMFunction< libMesh::Number > &old_func, libMesh::ParsedFEMFunction< libMesh::Number > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void register_parameter (const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
 Each subclass will register its copy of an independent. More...
 

Private Member Functions

 ConstantConductivity ()
 

Private Attributes

libMesh::Real _k
 

Additional Inherited Members

- Static Public Attributes inherited from GRINS::ParameterUser
static std::string zero_vector_function = std::string("{0}")
 A parseable function string with LIBMESH_DIM components, all 0. More...
 

Detailed Description

Definition at line 40 of file constant_conductivity.h.

Constructor & Destructor Documentation

GRINS::ConstantConductivity::ConstantConductivity ( const GetPot &  input,
const std::string &  material 
)

Constructor with specified material.

Will look in the input file for [Materials/material/ThermalConductivity/value] for the value of viscosity.

Definition at line 65 of file constant_conductivity.C.

References _k, GRINS::MaterialsParsing::dep_input_warning(), GRINS::MaterialsParsing::duplicate_input_test(), and GRINS::ParameterUser::set_parameter().

66  : ParameterUser("ConstantConductivity"),
67  _k(0.0)
68  {
70  "Materials/"+material+"/ThermalConductivity/value",
71  "Materials/Conductivity/k");
72 
73  // If we have the "new" version, then parse it
74  if( input.have_variable("Materials/"+material+"/ThermalConductivity/value") )
75  {
76  this->set_parameter
77  (_k, input, "Materials/"+material+"/ThermalConductivity/value", _k);
78  }
79  // If instead we have the old version, use that.
80  else if( input.have_variable("Materials/Conductivity/k") )
81  {
82  MaterialsParsing::dep_input_warning( "Materials/Conductivity/k",
83  "ThermalConductivity/value" );
84 
85  this->set_parameter
86  (_k, input, "Materials/Conductivity/k", _k);
87  }
88 
89  }
virtual void set_parameter(libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
ParameterUser(const std::string &user_name)
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility.
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
GRINS::ConstantConductivity::ConstantConductivity ( const GetPot &  input)

Deprecated constructor.

Definition at line 40 of file constant_conductivity.C.

References _k, grins_warning, GRINS::PhysicsNaming::incompressible_navier_stokes(), and GRINS::ParameterUser::set_parameter().

41  : ParameterUser("ConstantConductivity"),
42  _k(0.0)
43  {
44  // Warning about this constructor being deprecated
45  {
46  std::string warning = "WARNING: Use of this constructor is DEPRECATED.\n";
47  warning += " Please update to use constructor with input material name.\n";
48  grins_warning(warning);
49  }
50 
51  if( !input.have_variable("Materials/Conductivity/k") )
52  {
53  libmesh_warning("No Materials/Conductivity/k specified!\n");
54 
55  // Try and get the conductivity from other specifications
56  this->set_parameter
57  (_k, input, "Physics/"+PhysicsNaming::incompressible_navier_stokes()+"/k", _k);
58  }
59  else
60  this->set_parameter
61  (_k, input, "Materials/Conductivity/k", _k);
62  return;
63  }
virtual void set_parameter(libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
#define grins_warning(message)
Definition: common.h:34
ParameterUser(const std::string &user_name)
static PhysicsName incompressible_navier_stokes()
GRINS::ConstantConductivity::~ConstantConductivity ( )

Definition at line 91 of file constant_conductivity.C.

92  {
93  return;
94  }
GRINS::ConstantConductivity::ConstantConductivity ( )
private

Member Function Documentation

libMesh::Real GRINS::ConstantConductivity::deriv ( const libMesh::Real  T) const
inline

Definition at line 106 of file constant_conductivity.h.

107  {
108  return 0.0;
109  }
libMesh::Real GRINS::ConstantConductivity::operator() ( ) const
inline

Definition at line 75 of file constant_conductivity.h.

References _k.

76  {
77  return _k;
78  }
libMesh::Real GRINS::ConstantConductivity::operator() ( AssemblyContext context,
unsigned int  qp 
) const
inline

Definition at line 81 of file constant_conductivity.h.

References _k.

82  {
83  return _k;
84  }
libMesh::Real GRINS::ConstantConductivity::operator() ( const libMesh::Point &  p,
const libMesh::Real  time 
)
inline

Definition at line 87 of file constant_conductivity.h.

References _k.

89  {
90  return _k;
91  }
libMesh::Real GRINS::ConstantConductivity::operator() ( const libMesh::Real  T) const
inline

Definition at line 94 of file constant_conductivity.h.

95  {
96  return (*this)();
97  }
libMesh::Real GRINS::ConstantConductivity::operator() ( const libMesh::Real  mu,
const libMesh::Real  cp 
) const
inline

Definition at line 100 of file constant_conductivity.h.

101  {
102  return (*this)();
103  }

Member Data Documentation

libMesh::Real GRINS::ConstantConductivity::_k
private

Definition at line 69 of file constant_conductivity.h.

Referenced by ConstantConductivity(), and operator()().


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

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