GRINS-0.8.0
List of all members | Public Member Functions | Protected Member Functions
GRINS::ViscosityBase Class Reference

Base class for viscosity models. More...

#include <viscosity_base.h>

Inheritance diagram for GRINS::ViscosityBase:
Inheritance graph
[legend]

Public Member Functions

 ViscosityBase ()
 
virtual ~ViscosityBase ()
 

Protected Member Functions

void check_input_consistency (const GetPot &input, const std::string &material) const
 
void old_mu_warning () const
 

Detailed Description

Base class for viscosity models.

Any commonality for all viscosity models goes here.

Definition at line 39 of file viscosity_base.h.

Constructor & Destructor Documentation

GRINS::ViscosityBase::ViscosityBase ( )
inline

Definition at line 42 of file viscosity_base.h.

42 {};
virtual GRINS::ViscosityBase::~ViscosityBase ( )
inlinevirtual

Definition at line 43 of file viscosity_base.h.

43 {};

Member Function Documentation

void GRINS::ViscosityBase::check_input_consistency ( const GetPot &  input,
const std::string &  material 
) const
protected

Definition at line 37 of file viscosity_base.C.

References GRINS::MaterialsParsing::duplicate_input_test().

Referenced by GRINS::ConstantViscosity::ConstantViscosity(), and GRINS::ParsedViscosity::ParsedViscosity().

38  {
39  // We can't have both the materials version and the old versions
41  "Materials/"+material+"/Viscosity/value",
42  "Materials/Viscosity/mu" );
43 
44  // If the material section exists, but not the variable, this is an error
45  if( input.have_section("Materials/"+material+"/Viscosity") &&
46  !input.have_variable("Materials/"+material+"/Viscosity/value") )
47  {
48  libmesh_error_msg("Error: Found section Materials/"+material+"/Viscosity, but not variable value.");
49  }
50 
51  return;
52  }
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
void GRINS::ViscosityBase::old_mu_warning ( ) const
protected

Definition at line 54 of file viscosity_base.C.

References grins_warning.

Referenced by GRINS::ConstantViscosity::ConstantViscosity(), and GRINS::ParsedViscosity::ParsedViscosity().

55  {
56  std::string warning = "WARNING: Use of Materials/Viscosity/mu is DEPRECATED.\n";
57  warning += " Please update to use Materials/MATERIAL_NAME/Viscosity/value,\n";
58  warning += " where MATERIAL_NAME is given by Physics/PHYSICS_CLASS/material.\n";
59  grins_warning(warning);
60 
61  return;
62  }
#define grins_warning(message)
Definition: common.h:34

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

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