GRINS-0.7.0
viscosity_base.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 // This class
26 #include "grins/viscosity_base.h"
27 
28 // GRINS
29 #include "grins/common.h"
31 
32 // libMesh
33 #include "libmesh/getpot.h"
34 
35 namespace GRINS
36 {
37  void ViscosityBase::check_input_consistency( const GetPot& input, const std::string& material ) const
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  }
53 
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  }
63 
64 } // end namespace GRINS
void old_mu_warning() const
#define grins_warning(message)
Definition: common.h:34
GRINS namespace.
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
void check_input_consistency(const GetPot &input, const std::string &material) const

Generated on Thu Jun 2 2016 21:52:28 for GRINS-0.7.0 by  doxygen 1.8.10