GRINS-0.6.0
mooney_rivlin.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2015 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/mooney_rivlin.h"
27 
28 // libMesh
29 #include "libmesh/getpot.h"
30 
31 namespace GRINS
32 {
33  MooneyRivlin::MooneyRivlin( const GetPot& input )
35  ParameterUser("MooneyRivlin"),
36  _C1(-1),
37  _C2(-1)
38  {
39  //Force the user to specify C1 and C2
40  if( !input.have_variable("Physics/MooneyRivlin/C1") ||
41  !input.have_variable("Physics/MooneyRivlin/C2") )
42  {
43  std::cerr << "Error: Must specify both C1 and C2 for Mooney-Rivlin material." << std::endl
44  << " They can be specified in Physics/MooneyRivlin/C1 and Physics/MooneyRivlin/C2" << std::endl;
45  libmesh_error();
46  }
47 
48  this->set_parameter
49  (_C1, input, "Physics/MooneyRivlin/C1", _C1);
50 
51  this->set_parameter
52  (_C2, input, "Physics/MooneyRivlin/C2", _C2);
53  return;
54  }
55 
57  {
58  return;
59  }
60 
61 } // end namespace GRINS
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.
GRINS namespace.
virtual ~MooneyRivlin()
Definition: mooney_rivlin.C:56
ParameterUser base class. Utility methods for subclasses.
libMesh::Real _C2
Definition: mooney_rivlin.h:57
libMesh::Real _C1
Definition: mooney_rivlin.h:56

Generated on Mon Jun 22 2015 21:32:20 for GRINS-0.6.0 by  doxygen 1.8.9.1