GRINS-0.7.0
physics_factory_one_d_stress_solids.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
27 
28 // GRINS
30 #include "grins/hookes_law_1d.h"
31 
32 // Physics whose factories we're instantiating
33 #include "grins/elastic_cable.h"
35 
36 namespace GRINS
37 {
38  template<template<typename> class DerivedPhysics>
39  libMesh::UniquePtr<Physics> PhysicsFactoryOneDStressSolids<DerivedPhysics>::build_physics( const GetPot& input,
40  const std::string& physics_name )
41  {
42  std::string core_physics = this->find_core_physics_name(physics_name);
43 
44  std::string model = "none";
45  std::string strain_energy = "none";
46 
48  core_physics,
49  model,
50  strain_energy );
51 
52  libMesh::UniquePtr<Physics> new_physics;
53 
54  if( model == std::string("hookes_law") )
55  {
56  new_physics.reset( new DerivedPhysics<HookesLaw1D>
57  (physics_name,input, false /*is_compressible*/) );
58  }
59  else
60  {
61  std::string error = "Error: Invalid stress-strain model: "+model+"!\n";
62  error += " Valid values are: hookes_law\n";
63  libmesh_error_msg(error);
64  }
65 
66  libmesh_assert(new_physics);
67 
68  return new_physics;
69  }
70 
71  // Instantiate all the "variable density flow" Physics factories.
74 
77 
78 } // end namespace GRINS
static PhysicsName elastic_cable_rayleigh_damping()
PhysicsFactoryOneDStressSolids< ElasticCable > grins_factory_elastic_cable(PhysicsNaming::elastic_cable(), PhysicsNaming::elastic_cable())
static PhysicsName elastic_cable()
PhysicsFactoryOneDStressSolids< ElasticCableRayleighDamping > grins_factory_elastic_cable_rayleigh_damping(PhysicsNaming::elastic_cable_rayleigh_damping(), PhysicsNaming::elastic_cable())
GRINS namespace.
virtual libMesh::UniquePtr< Physics > build_physics(const GetPot &input, const std::string &physics_name)
static void parse_stress_strain_model(const GetPot &input, const std::string &physics, std::string &model, std::string &strain_energy)
Determine stress-strain law used by solid mechanics classes.

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