LifeV
BCInterfaceFunctionParserSolverSolid3D.cpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  * @file
29  * @brief File containing the BCInterfaceFunctionParserSolver class
30  *
31  * @date 24-08-2009
32  * @author Cristiano Malossi <cristiano.malossi@epfl.ch>
33  *
34  * @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
35  */
36 
37 // BCInterface includes
38 #include <lifev/bc_interface/3D/function/solid/BCInterfaceFunctionParserSolverSolid3D.hpp>
39 
40 namespace LifeV
41 {
42 
43 // ===================================================
44 // Methods
45 // ===================================================
46 template< >
47 void
49 {
50 
51 #ifdef HAVE_LIFEV_DEBUG
52  debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, StructuralOperator>::updatePhysicalSolverVariables" << "\n";
53 #endif
54 
55  // Create/Update variables
56  for ( std::set< physicalSolverList >::iterator j = M_list.begin(); j != M_list.end(); ++j )
57  switch ( *j )
58  {
59  // s_ -> SOLID
60  case s_density:
61 
62 #ifdef HAVE_LIFEV_DEBUG
63  debugStream ( 5023 ) << " s_density: " << M_physicalSolver->data()->rho() << "\n";
64 #endif
65 
66  setVariable ( "s_density", M_physicalSolver->data()->rho() );
67 
68  break;
69 
70  case s_poisson:
71 
72 #ifdef HAVE_LIFEV_DEBUG
73  debugStream ( 5023 ) << " s_poisson: " << M_physicalSolver->data()->poisson (1) << "\n";
74 #endif
75 
76  setVariable ( "s_poisson", M_physicalSolver->data()->poisson (1) );
77 
78  break;
79 
80  case s_thickness:
81 
82 #ifdef HAVE_LIFEV_DEBUG
83  debugStream ( 5023 ) << " s_thickness: " << M_physicalSolver->data()->thickness() << "\n";
84 #endif
85 
86  setVariable ( "s_thickness", M_physicalSolver->data()->thickness() );
87 
88  break;
89 
90  case s_young:
91 
92 #ifdef HAVE_LIFEV_DEBUG
93  debugStream ( 5023 ) << " s_young: " << M_physicalSolver->data()->young (1) << "\n";
94 #endif
95 
96  setVariable ( "s_young", M_physicalSolver->data()->young (1) );
97 
98  break;
99 
100  case s_externalPressure:
101 
102 #ifdef HAVE_LIFEV_DEBUG
103  debugStream ( 5023 ) << " s_externalPressure: " << M_physicalSolver->data()->externalPressure() << "\n";
104 #endif
105 
106  setVariable ( "s_externalPressure", M_physicalSolver->data()->externalPressure() );
107 
108  break;
109 
110  default:
111 
112  switchErrorMessage ( "StructuralOperator" );
113 
114  break;
115  }
116 }
117 
118 
119 
120 // ===================================================
121 // Protected Methods
122 // ===================================================
123 template< >
124 void
126 {
127 
128 #ifdef HAVE_LIFEV_DEBUG
129  debugStream ( 5023 ) << "BCInterfaceFunctionSolver<BCHandler, StructuralOperator>::createAccessList( data )" << "\n";
130 #endif
131 
132  std::map< std::string, physicalSolverList > mapList;
133 
134  createSolidMap ( mapList );
135  createList ( mapList, data );
136 
137  if ( M_physicalSolver.get() )
138  {
139  updatePhysicalSolverVariables();
140  }
141 }
142 
143 } // Namespace LifeV
void createAccessList(const std::shared_ptr< BCInterfaceData > &data)