LifeV
BCInterfaceFunctionParserFSI3D.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
/
BCInterfaceFunctionParserFSI3D
.
hpp
>
39
40
namespace
LifeV
41
{
42
43
// ===================================================
44
// Methods
45
// ===================================================
46
template
< >
47
void
48
BCInterfaceFunctionParser
<
BCHandler
,
FSIOperator
>::
assignFunction
(
bcBase_Type
&
base
)
49
{
50
base
.
setFunction
(
functionSelectorTimeSpaceID
() );
51
}
52
53
// ===================================================
54
// Set Methods
55
// ===================================================
56
template
< >
57
void
58
BCInterfaceFunctionParser
<
BCHandler
,
FSIOperator
>::
setData
(
const
std
::
shared_ptr
<
BCInterfaceData
>&
data
)
59
{
60
61
#
ifdef
HAVE_LIFEV_DEBUG
62
debugStream
( 5022 ) <<
"BCInterfaceFunction::setData"
<<
"\n"
;
63
#
endif
64
65
setupParser
(
data
);
66
67
std
::
shared_ptr
<
BCInterfaceData3D
>
castedData
=
std
::
dynamic_pointer_cast
<
BCInterfaceData3D
> (
data
);
68
69
if
(
castedData
!= 0 )
70
{
71
72
/*
73
* MODE COMPONENT FUNCTION | COMV.SIZE ARGUMENTS INTERFACEFUNCTION
74
* ------------------------------------------|---------------------------------------------------
75
* |
76
* COMPONENT 2 x*y*z | 1 1 function
77
* FULL 3 x*y*z | 1 1 function
78
* FULL 1 x*y*z | 1 1 function
79
* FULL 3 (y*z,x*z,x*y) | 1 3 functionID
80
* FULL 2 (x,y) | 1 2 functionID
81
* COMPONENT '1 3' (x,y) | 2 2 functionID
82
*/
83
84
#
ifdef
HAVE_LIFEV_DEBUG
85
debugStream
( 5021 ) <<
"BCInterfaceFunction::setData arguments: "
<<
M_parser
->
countSubstring
(
","
) <<
"\n"
;
86
#
endif
87
88
// Note: the map ID is used only for 3D handler.
89
if
(
M_parser
->
countSubstring
(
","
) )
90
{
91
//Create the ID map
92
if
(
castedData
->
componentsVector
().
size
() > 1 )
// Component
93
for
(
ID
i
( 0 );
i
<
static_cast
<
ID
> (
castedData
->
componentsVector
().
size
() ); ++
i
)
94
{
95
M_mapID
[
castedData
->
componentsVector
() [
i
]] =
i
+ 1;
96
}
97
else
98
// if ( castedData->componentsVector().front() == arguments ) Full
99
for
(
ID
i
( 0 );
i
<
castedData
->
componentsVector
().
front
(); ++
i
)
100
{
101
M_mapID
[
i
+ 1] =
i
+ 1;
102
}
103
}
104
}
105
else
106
{
107
std
::
cerr
<<
"!!! ERROR: BCInterface wrong data cast !!!"
<<
std
::
endl
;
108
}
109
}
110
111
}
// 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
BCInterfaceFunctionParserFSI3D.cpp
Generated on Wed Mar 7 2018 19:40:26 for LifeV by
1.8.13