GRINS-0.6.0
parsed_conductivity.C
Go to the documentation of this file.
1 // Public License as published by the Free Software Foundation.
2 //
3 // This library is distributed in the hope that it will be useful,
4 // but WITHOUT ANY WARRANTY; without even the implied warranty of
5 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6 // Lesser General Public License for more details.
7 //
8 // You should have received a copy of the GNU Lesser General Public
9 // License along with this library; if not, write to the Free Software
10 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
11 // Boston, MA 02110-1301 USA
12 //
13 //-----------------------------------------------------------------------el-
14 
15 
16 // This class
18 
19 //GRINS
21 
22 // libMesh
23 #include "libmesh/getpot.h"
24 #include "libmesh/parsed_function.h"
25 
26 namespace GRINS
27 {
28 
29  ParsedConductivity::ParsedConductivity( const GetPot& input ) :
30  ParameterUser("ParsedConductivity")
31  {
32  if( !input.have_variable("Materials/Conductivity/k") )
33  {
34  std::cerr<<"No conductivity has been specified."<<std::endl;
35 
36  libmesh_error();
37  }
38  else
39  {
40  std::string conductivity_function = input("Materials/Conductivity/k",std::string("0"));
41 
42  k.reset(new libMesh::ParsedFunction<libMesh::Number>(conductivity_function));
43 
44  if (conductivity_function == "0")
45  {
46  std::cerr << "Warning! Zero Conductivity specified!" << std::endl;
47 
48  libmesh_error();
49  }
50  }
51 
52  return;
53  }
54 
56  {
57  return;
58  }
59 
60 } // namespace GRINS
libMesh::AutoPtr< libMesh::FunctionBase< libMesh::Number > > k
GRINS namespace.
ParameterUser base class. Utility methods for subclasses.

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