LifeV
BCInterfaceFunctionParserSolverFSI3D.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
/
fsi
/
BCInterfaceFunctionParserSolverFSI3D
.
hpp
>
39
40
namespace
LifeV
41
{
42
43
// ===================================================
44
// Methods
45
// ===================================================
46
template
< >
47
void
48
BCInterfaceFunctionParserSolver
<
BCHandler
,
FSIOperator
>::
updatePhysicalSolverVariables
()
49
{
50
51
#
ifdef
HAVE_LIFEV_DEBUG
52
debugStream
( 5023 ) <<
"BCInterfaceFunctionSolver<BCHandler, FSIOperator>::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
// f_ -> FLUID
60
case
f_timeStep
:
61
62
#
ifdef
HAVE_LIFEV_DEBUG
63
debugStream
( 5023 ) <<
" f_timeStep(): "
<<
M_physicalSolver
->
data
().
dataFluid
()->
dataTime
()->
timeStep
() <<
"\n"
;
64
#
endif
65
setVariable
(
"f_timeStep"
,
M_physicalSolver
->
data
().
dataFluid
()->
dataTime
()->
timeStep
() );
66
67
break
;
68
69
case
f_area
:
70
71
#
ifdef
HAVE_LIFEV_DEBUG
72
debugStream
( 5023 ) <<
" f_area("
<<
static_cast
<
Real
> (
M_boundaryID
) <<
"): "
<<
M_physicalSolver
->
fluid
().
area
(
M_boundaryID
) <<
"\n"
;
73
#
endif
74
setVariable
(
"f_area"
,
M_physicalSolver
->
fluid
().
area
(
M_boundaryID
) );
75
76
break
;
77
78
case
f_density
:
79
80
#
ifdef
HAVE_LIFEV_DEBUG
81
debugStream
( 5023 ) <<
" f_density: "
<<
M_physicalSolver
->
fluid
().
density
() <<
"\n"
;
82
#
endif
83
setVariable
(
"f_density"
,
M_physicalSolver
->
fluid
().
density
() );
84
85
break
;
86
87
case
f_flux
:
88
89
if
(
M_physicalSolver
->
isFluid
() )
90
{
91
#
ifdef
HAVE_LIFEV_DEBUG
92
debugStream
( 5023 ) <<
"!!! Warning: fluid not initialized yet, setting flux = 0 in BCInterface !!!\n"
;
93
94
#
endif
95
setVariable
(
"f_flux"
, 0.0 );
96
}
97
else
98
{
99
#
ifdef
HAVE_LIFEV_DEBUG
100
debugStream
( 5023 ) <<
" f_flux("
<<
static_cast
<
Real
> (
M_boundaryID
) <<
"): "
<<
M_physicalSolver
->
fluid
().
flux
(
M_boundaryID
, *
M_physicalSolver
->
fluid
().
solution
() ) <<
"\n"
;
101
#
endif
102
setVariable
(
"f_flux"
,
M_physicalSolver
->
fluid
().
flux
(
M_boundaryID
, *
M_physicalSolver
->
fluid
().
solution
() ) );
103
}
104
105
break
;
106
107
case
f_pressure
:
108
109
#
ifdef
HAVE_LIFEV_DEBUG
110
debugStream
( 5023 ) <<
" f_pressure("
<<
static_cast
<
Real
> (
M_boundaryID
) <<
"): "
<<
M_physicalSolver
->
fluid
().
pressure
(
M_boundaryID
, *
M_physicalSolver
->
fluid
().
solution
() ) <<
"\n"
;
111
#
endif
112
113
setVariable
(
"f_pressure"
,
M_physicalSolver
->
fluid
().
pressure
(
M_boundaryID
, *
M_physicalSolver
->
fluid
().
solution
() ) );
114
115
break
;
116
117
case
f_viscosity
:
118
119
#
ifdef
HAVE_LIFEV_DEBUG
120
debugStream
( 5023 ) <<
" f_viscosity: "
<<
M_physicalSolver
->
fluid
().
viscosity
() <<
"\n"
;
121
#
endif
122
setVariable
(
"f_viscosity"
,
M_physicalSolver
->
fluid
().
viscosity
() );
123
124
break
;
125
126
// s_ -> SOLID
127
case
s_density
:
128
129
#
ifdef
HAVE_LIFEV_DEBUG
130
debugStream
( 5023 ) <<
" s_density: "
<<
M_physicalSolver
->
solid
().
rho
() <<
"\n"
;
131
#
endif
132
133
setVariable
(
"s_density"
,
M_physicalSolver
->
solid
().
rho
() );
134
135
break
;
136
137
case
s_poisson
:
138
139
#
ifdef
HAVE_LIFEV_DEBUG
140
debugStream
( 5023 ) <<
" s_poisson: "
<<
M_physicalSolver
->
solid
().
poisson
() <<
"\n"
;
141
#
endif
142
143
setVariable
(
"s_poisson"
,
M_physicalSolver
->
solid
().
poisson
(1) );
144
145
break
;
146
147
case
s_thickness
:
148
149
#
ifdef
HAVE_LIFEV_DEBUG
150
debugStream
( 5023 ) <<
" s_thickness: "
<<
M_physicalSolver
->
solid
().
thickness
() <<
"\n"
;
151
#
endif
152
153
setVariable
(
"s_thickness"
,
M_physicalSolver
->
solid
().
thickness
() );
154
155
break
;
156
157
case
s_young
:
158
159
#
ifdef
HAVE_LIFEV_DEBUG
160
debugStream
( 5023 ) <<
" s_young: "
<<
M_physicalSolver
->
solid
().
young
() <<
"\n"
;
161
#
endif
162
163
setVariable
(
"s_young"
,
M_physicalSolver
->
solid
().
young
(1) );
164
165
break
;
166
167
case
s_externalPressure
:
168
169
#
ifdef
HAVE_LIFEV_DEBUG
170
debugStream
( 5023 ) <<
" s_externalPressure: "
<<
M_physicalSolver
->
solid
().
data
()->
externalPressure
() <<
"\n"
;
171
#
endif
172
173
setVariable
(
"s_externalPressure"
,
M_physicalSolver
->
solid
().
data
()->
externalPressure
() );
174
175
break
;
176
177
default
:
178
179
switchErrorMessage
(
"FSIOperator"
);
180
181
break
;
182
}
183
}
184
185
186
187
// ===================================================
188
// Protected Methods
189
// ===================================================
190
template
< >
191
void
192
BCInterfaceFunctionParserSolver
<
BCHandler
,
FSIOperator
>::
createAccessList
(
const
std
::
shared_ptr
<
BCInterfaceData
>&
data
)
193
{
194
195
#
ifdef
HAVE_LIFEV_DEBUG
196
debugStream
( 5023 ) <<
"BCInterfaceFunctionSolver<BCHandler, FSIOperator>::createAccessList( data )"
<<
"\n"
;
197
#
endif
198
199
std
::
map
<
std
::
string
,
physicalSolverList
>
mapList
;
200
201
createFluidMap
(
mapList
);
202
createSolidMap
(
mapList
);
203
createList
(
mapList
,
data
);
204
205
if
(
M_physicalSolver
.
get
() )
206
{
207
updatePhysicalSolverVariables
();
208
}
209
}
210
211
}
// Namespace LifeV
LifeV::BCInterfaceFunctionUserDefined::assignFunction
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
lifev-release-doc
lifev
bc_interface
3D
function
fsi
BCInterfaceFunctionParserSolverFSI3D.cpp
Generated on Wed Mar 7 2018 19:40:35 for LifeV by
1.8.13