LifeV
BCInterfaceFunctionParserSolver1D.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/1D/function/BCInterfaceFunctionParserSolver1D.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<FSI>::updatePhysicalSolverVariables" << "\n";
53 #endif
54 
56  // Create/Update variables
57  for ( std::set< physicalSolverList >::iterator j = M_list.begin(); j != M_list.end(); ++j )
58  switch ( *j )
59  {
60  // f_ -> FLUID
61  case f_timeStep:
62 
63 #ifdef HAVE_LIFEV_DEBUG
64  debugStream ( 5023 ) << " f_timeStep(): " << M_physicalSolver->physics()->data()->dataTime()->timeStep() << "\n";
65 #endif
66  setVariable ( "f_timeStep", M_physicalSolver->physics()->data()->dataTime()->timeStep() );
67 
68  break;
69 
70  case f_area:
71 
72 #ifdef HAVE_LIFEV_DEBUG
73  debugStream ( 5023 ) << " f_area(" << static_cast<Real> (side) << "): " << M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::A, side ) << "\n";
74 #endif
76 
77  break;
78 
79  case f_density:
80 
81 #ifdef HAVE_LIFEV_DEBUG
82  debugStream ( 5023 ) << " f_density: " << M_physicalSolver->physics()->data()->densityRho() << "\n";
83 #endif
84  setVariable ( "f_density", M_physicalSolver->physics()->data()->densityRho() );
85 
86  break;
87 
88  case f_flux:
89 
90 #ifdef HAVE_LIFEV_DEBUG
91  debugStream ( 5023 ) << " f_flux(" << static_cast<Real> (side) << "): " << M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::Q, side ) << "\n";
92 #endif
93 
95 
96  break;
97 
98  case f_pressure:
99 
100 #ifdef HAVE_LIFEV_DEBUG
101  debugStream ( 5023 ) << " f_pressure(" << static_cast<Real> (side) << "): " << M_physicalSolver->boundaryValue ( *M_solution, OneDFSI::P, side ) << "\n";
102 #endif
103 
105 
106  break;
107 
108  case f_viscosity:
109 
110 #ifdef HAVE_LIFEV_DEBUG
111  debugStream ( 5023 ) << " f_viscosity: " << M_physicalSolver->physics()->data()->viscosity() << "\n";
112 #endif
113  setVariable ( "f_viscosity", M_physicalSolver->physics()->data()->viscosity() );
114 
115  break;
116 
117  case f_venousPressure:
118 
119 #ifdef HAVE_LIFEV_DEBUG
120  debugStream ( 5023 ) << " f_venousPressure: " << M_physicalSolver->physics()->data()->venousPressure() << "\n";
121 #endif
122  setVariable ( "f_venousPressure", M_physicalSolver->physics()->data()->venousPressure() );
123 
124  break;
125 
126  // s_ -> SOLID
127  case s_density:
128 
129 #ifdef HAVE_LIFEV_DEBUG
130  debugStream ( 5023 ) << " s_density: " << M_physicalSolver->physics()->data()->densityWall() << "\n";
131 #endif
132 
133  setVariable ( "s_density", M_physicalSolver->physics()->data()->densityWall() );
134 
135  break;
136 
137  case s_poisson:
138 
139 #ifdef HAVE_LIFEV_DEBUG
140  debugStream ( 5023 ) << " s_poisson: " << M_physicalSolver->physics()->data()->poisson() << "\n";
141 #endif
142 
143  setVariable ( "s_poisson", M_physicalSolver->physics()->data()->poisson() );
144 
145  break;
146 
147  case s_thickness:
148 
149 #ifdef HAVE_LIFEV_DEBUG
150  debugStream ( 5023 ) << " s_thickness: " << M_physicalSolver->physics()->data()->thickness ( M_physicalSolver->boundaryDOF ( side ) ) << "\n";
151 #endif
152 
154 
155  break;
156 
157  case s_young:
158 
159 #ifdef HAVE_LIFEV_DEBUG
160  debugStream ( 5023 ) << " s_young: " << M_physicalSolver->physics()->data()->young() << "\n";
161 #endif
162 
163  setVariable ( "s_young", M_physicalSolver->physics()->data()->young() );
164 
165  break;
166 
167  case s_externalPressure:
168 
169 #ifdef HAVE_LIFEV_DEBUG
170  debugStream ( 5023 ) << " s_externalPressure: " << M_physicalSolver->physics()->data()->externalPressure() << "\n";
171 #endif
172 
173  setVariable ( "s_externalPressure", M_physicalSolver->physics()->data()->externalPressure() );
174 
175  break;
176 
177  default:
178  switchErrorMessage ( "OneDFSIModel_Solver" );
179 
180  break;
181  }
182 }
183 
184 
185 
186 // ===================================================
187 // Protected Methods
188 // ===================================================
189 template< >
190 void
192 {
193 
194 #ifdef HAVE_LIFEV_DEBUG
195  debugStream ( 5023 ) << "BCInterfaceFunctionSolver<OneDimensionaSolver>::createAccessList( data )" << "\n";
196 #endif
197 
199 
202  createList ( mapList, data );
203 
204  if ( M_physicalSolver.get() )
205  {
207  }
208 }
209 
210 } // Namespace LifeV
void updateInverseJacobian(const UInt &iQuadPt)