40 #include <lifev/fsi/solver/FSIData.hpp> 49 M_dataFluid (
new dataFluid_Type() ),
50 M_dataSolid (
new dataSolid_Type() ),
51 M_maxSubIterationNumber (),
52 M_absoluteTolerance (),
53 M_relativeTolerance (),
55 M_NonLinearLineSearch (),
61 M_fluidInterfaceFlag (),
62 M_structureInterfaceFlag (),
63 M_fluidInterfaceVertexFlag (),
64 M_structureInterfaceVertexFlag (),
65 M_interfaceTolerance ()
69 FSIData::FSIData (
const FSIData& FSIData ) :
70 M_dataFluid ( FSIData.M_dataFluid ),
71 M_dataSolid ( FSIData.M_dataSolid ),
72 M_maxSubIterationNumber ( FSIData.M_maxSubIterationNumber ),
73 M_absoluteTolerance ( FSIData.M_absoluteTolerance ),
74 M_relativeTolerance ( FSIData.M_relativeTolerance ),
75 M_errorTolerance ( FSIData.M_errorTolerance ),
76 M_NonLinearLineSearch ( FSIData.M_NonLinearLineSearch ),
77 M_method ( FSIData.M_method ),
78 M_algorithm ( FSIData.M_algorithm ),
79 M_defaultOmega ( FSIData.M_defaultOmega ),
80 M_rangeOmega ( FSIData.M_rangeOmega ),
81 M_updateEvery ( FSIData.M_updateEvery ),
82 M_fluidInterfaceFlag ( FSIData.M_fluidInterfaceFlag ),
83 M_structureInterfaceFlag ( FSIData.M_structureInterfaceFlag ),
84 M_fluidInterfaceVertexFlag (
new Int
const ( *FSIData.M_fluidInterfaceVertexFlag ) ),
85 M_structureInterfaceVertexFlag (
new Int
const ( *FSIData.M_structureInterfaceVertexFlag ) ),
86 M_interfaceTolerance ( FSIData.M_interfaceTolerance ),
87 M_restartTimeStep ( 0. )
96 FSIData::operator= (
const FSIData& FSIData )
98 if (
this != &FSIData )
100 M_dataFluid = FSIData.M_dataFluid;
101 M_dataSolid = FSIData.M_dataSolid;
102 M_maxSubIterationNumber = FSIData.M_maxSubIterationNumber;
103 M_absoluteTolerance = FSIData.M_absoluteTolerance;
104 M_relativeTolerance = FSIData.M_relativeTolerance;
105 M_errorTolerance = FSIData.M_errorTolerance;
106 M_NonLinearLineSearch = FSIData.M_NonLinearLineSearch;
107 M_method = FSIData.M_method;
108 M_algorithm = FSIData.M_algorithm;
109 M_defaultOmega = FSIData.M_defaultOmega;
110 M_rangeOmega = FSIData.M_rangeOmega;
111 M_updateEvery = FSIData.M_updateEvery;
112 M_fluidInterfaceFlag = FSIData.M_fluidInterfaceFlag;
113 M_structureInterfaceFlag = FSIData.M_structureInterfaceFlag;
115 M_fluidInterfaceVertexFlag.reset (
new Int
const ( *FSIData.M_fluidInterfaceVertexFlag ) );
116 M_structureInterfaceVertexFlag.reset (
new Int
const ( *FSIData.M_structureInterfaceVertexFlag ) );
118 M_interfaceTolerance = FSIData.M_interfaceTolerance;
125 FSIData::setup (
const GetPot& dataFile,
const std::string& section )
127 if ( !M_timeALE.get() )
129 M_timeALE.reset (
new time_Type ( dataFile,
"mesh_motion/time_discretization" ) );
132 if ( !M_timeAdvanceALE.get() )
134 M_timeAdvanceALE.reset (
new timeAdvance_Type ( dataFile,
"mesh_motion/time_discretization" ) );
137 M_dataFluid->setup ( dataFile );
138 M_dataSolid->setup ( dataFile );
141 M_maxSubIterationNumber = dataFile ( ( section +
"/maxSubIter" ).data(), 300 );
142 M_absoluteTolerance = dataFile ( ( section +
"/abstol" ).data(), 1.e-07 );
143 M_relativeTolerance = dataFile ( ( section +
"/reltol" ).data(), 1.e-04 );
144 M_errorTolerance = dataFile ( ( section +
"/etamax" ).data(), 1.e-03 );
145 M_NonLinearLineSearch =
static_cast<Int> ( dataFile ( ( section +
"/NonLinearLineSearch" ).data(), 0 ) );
148 M_method = dataFile ( ( section +
"/method" ).data(),
"steklovPoincare" );
149 M_algorithm = dataFile ( ( section +
"/algorithm" ).data(),
"DirichletNeumann" );
152 M_defaultOmega = dataFile ( ( section +
"/defOmega" ).data(), 0.001);
153 M_rangeOmega[0] = dataFile ( ( section +
"/defOmega" ).data(), std::fabs ( M_defaultOmega ) , 0);
154 M_rangeOmega[1] = dataFile ( ( section +
"/defOmega" ).data(), std::fabs ( M_defaultOmega ) , 1);
155 M_updateEvery = dataFile ( ( section +
"/updateEvery" ).data(), 1);
158 M_fluidInterfaceFlag = dataFile
( "interface/fluid_flag", 1
);
162 vertexFlag = dataFile
( "interface/edgeFlag", -1
);
163 vertexFlag = dataFile
( "interface/fluid_vertex_flag", vertexFlag );
167 M_fluidInterfaceVertexFlag.reset (
new Int
const ( vertexFlag ) );
170 vertexFlag = dataFile
( "interface/structure_vertex_flag", -1
);
173 M_structureInterfaceVertexFlag.reset (
new Int
const ( vertexFlag ) );
176 M_interfaceTolerance = dataFile
( "interface/tolerance", 0.
);
178 M_restartTimeStep = dataFile
( "importer/restart_timestep", 0.
);
182 FSIData::isMonolithic()
184 return ! ( M_method.compare (
"monolithicGE" ) && M_method.compare (
"monolithicGI" ) );
188 FSIData::showMe ( std::ostream& output )
190 output <<
"\n*** Values for data fluid\n\n";
191 M_dataFluid->showMe();
193 output <<
"\n*** Values for data solid\n\n";
194 M_dataSolid->showMe();
196 output <<
"\n*** Values for problem\n\n";
197 output <<
"Max subiteration number = " << M_maxSubIterationNumber << std::endl;
198 output <<
"Absolute tolerance = " << M_absoluteTolerance << std::endl;
199 output <<
"Relative tolerance = " << M_relativeTolerance << std::endl;
200 output <<
"Max error tolerance = " << M_errorTolerance << std::endl;
201 output <<
"NonLinearLineSearch = " << M_NonLinearLineSearch << std::endl;
203 output <<
"Method = " << M_method << std::endl;
204 output <<
"Algorithm = " << M_algorithm << std::endl;
206 output <<
"Default Omega = " << M_defaultOmega << std::endl;
207 output <<
"Omega range = " <<
"(" << M_rangeOmega[0] <<
" " << M_rangeOmega[1] <<
")" << std::endl;
208 output <<
"Update every = " << M_updateEvery << std::endl;
210 output <<
"\n*** Values for interface\n\n";
211 output <<
"Interface fluid = " << M_fluidInterfaceFlag << std::endl;
212 output <<
"Interface structure = " << M_structureInterfaceFlag << std::endl;
213 if (M_fluidInterfaceVertexFlag.get() != 0)
215 output <<
"Interface fluid vertices = " << *M_fluidInterfaceVertexFlag << std::endl;
217 if (M_structureInterfaceVertexFlag.get() != 0)
219 output <<
"Interface structure vertices = " << *M_structureInterfaceVertexFlag << std::endl;
221 output <<
"Interface tolerance = " << M_interfaceTolerance << std::endl;
double operator()(const char *VarName, const double &Default) const
int32_type Int
Generic integer data.
void updateInverseJacobian(const UInt &iQuadPt)
int operator()(const char *VarName, int Default) const