74 #include <boost/timer.hpp> 76 #include <Epetra_ConfigDefs.h> 79 #include <Epetra_MpiComm.h> 81 #include <Epetra_SerialComm.h> 86 #include <lifev/core/fem/FESpace.hpp> 87 #include <lifev/core/array/MapEpetra.hpp> 88 #include <lifev/core/fem/BCHandler.hpp> 89 #include <lifev/core/LifeV.hpp> 91 #include <lifev/core/algorithm/PreconditionerIfpack.hpp> 92 #include <lifev/core/algorithm/PreconditionerML.hpp> 94 #include <lifev/core/algorithm/PreconditionerPCD.hpp> 97 #include <lifev/fsi/solver/FSISolver.hpp> 98 #include <lifev/structure/solver/StructuralOperator.hpp> 99 #include <lifev/fsi/solver/FSIMonolithicGI.hpp> 101 #include <lifev/core/filter/ExporterEnsight.hpp> 102 #include <lifev/core/filter/ExporterEmpty.hpp> 104 #include <lifev/core/filter/ExporterHDF5.hpp> 113 typedef std::shared_ptr<LifeV::FSISolver> FSISolverPtr_Type;
115 typedef LifeV::FSIOperator::data_Type data_Type;
116 typedef LifeV::FSIOperator::dataPtr_Type dataPtr_Type;
118 typedef LifeV::FSIOperator::vector_Type vector_Type;
119 typedef LifeV::FSIOperator::vectorPtr_Type vectorPtr_Type;
121 typedef std::shared_ptr< LifeV::Exporter<LifeV::RegionMesh<LifeV::LinearTetra> > > filterPtr_Type;
123 typedef LifeV::ExporterEnsight<LifeV::FSIOperator::mesh_Type> ensightFilter_Type;
124 typedef std::shared_ptr<ensightFilter_Type> ensightFilterPtr_Type;
126 typedef LifeV::ExporterHDF5<LifeV::FSIOperator::mesh_Type> hdf5Filter_Type;
127 typedef std::shared_ptr<hdf5Filter_Type> hdf5FilterPtr_Type;
129 typedef LifeV::FactorySingleton<LifeV::Factory<LifeV::FSIOperator, std::string> > FSIFactory_Type;
130 typedef LifeV::RegionMesh<LifeV::LinearTetra> mesh_Type;
131 typedef LifeV::MapEpetra map_Type;
132 typedef LifeV::FESpace<mesh_Type, map_Type> fespace_Type;
142 Problem ( GetPot
const& data_file ) :
146 using namespace LifeV;
148 FSIOperator::solid_Type::material_Type::isotropicLaw_Type::StructureIsotropicMaterialFactory::instance().registerProduct (
"linearVenantKirchhoff", &FSIOperator::createVenantKirchhoffLinear );
149 FSIOperator::solid_Type::material_Type::isotropicLaw_Type::StructureIsotropicMaterialFactory::instance().registerProduct (
"exponential", &FSIOperator::createExponentialMaterialNonLinear );
150 FSIOperator::solid_Type::material_Type::isotropicLaw_Type::StructureIsotropicMaterialFactory::instance().registerProduct (
"neoHookean", &FSIOperator::createNeoHookeanMaterialNonLinear );
151 FSIOperator::solid_Type::material_Type::isotropicLaw_Type::StructureIsotropicMaterialFactory::instance().registerProduct (
"nonLinearVenantKirchhoff", &FSIOperator::createVenantKirchhoffNonLinear );
153 std::cout <<
"register MonolithicGE : " << FSIMonolithicGE::S_register << std::endl;
154 std::cout <<
"register MonolithicGI : " << FSIMonolithicGI::S_register << std::endl;
156 std::cout <<
"register PCD : " << PreconditionerPCD::S_register << std::endl;
161 M_data = dataPtr_Type (
new data_Type() );
162 M_data->setup ( data_file );
164 M_fsi = FSISolverPtr_Type (
new FSISolver( ) );
165 MPI_Barrier ( MPI_COMM_WORLD );
167 M_fsi->setData ( M_data );
168 M_fsi->FSIOper()->setDataFile ( data_file );
172 std::string fluidMeshPartitioned = data_file (
"problem/fluidMeshPartitioned",
"none" );
173 std::string solidMeshPartitioned = data_file (
"problem/solidMeshPartitioned",
"none" );
175 if ( fluidMeshPartitioned.compare (
"none" ) )
177 FSIOperator::meshFilter_Type fluidMeshFilter ( data_file, fluidMeshPartitioned );
178 fluidMeshFilter.setComm ( M_fsi->FSIOper()->worldComm() );
179 FSIOperator::meshFilter_Type solidMeshFilter ( data_file, solidMeshPartitioned );
180 solidMeshFilter.setComm ( M_fsi->FSIOper( )->worldComm( ) );
181 M_fsi->FSIOper( )->partitionMeshes ( fluidMeshFilter, solidMeshFilter );
182 M_fsi->FSIOper( )->setupFEspace( );
183 M_fsi->FSIOper( )->setupDOF ( fluidMeshFilter );
184 fluidMeshFilter.closeFile( );
185 solidMeshFilter.closeFile( );
190 M_fsi->FSIOper( )->partitionMeshes( );
191 M_fsi->FSIOper( )->setupFEspace( );
192 M_fsi->FSIOper( )->setupDOF( );
195 MPI_Barrier ( MPI_COMM_WORLD );
197 M_fsi->setFluidBC ( BCh_monolithicFlux (
true ) );
198 M_fsi->setSolidBC ( BCh_monolithicSolid ( *M_fsi->FSIOper( ) ) );
202 M_fsi->setFluidBC ( BCh_monolithicFluid ( *M_fsi->FSIOper( ) ) );
203 M_fsi->setHarmonicExtensionBC ( BCh_harmonicExtension ( *M_fsi->FSIOper( ) ) );
205 dynamic_cast<LifeV::FSIMonolithic*> (M_fsi->FSIOper().get() )->mergeBCHandlers();
207 std::string
const exporterType = data_file (
"exporter/type",
"ensight" );
208 std::string
const fluidName = data_file (
"exporter/fluid/filename",
"fluid" );
209 std::string
const solidName = data_file (
"exporter/solid/filename",
"solid" );
212 if (exporterType.compare (
"hdf5") == 0)
214 M_exporterFluid.reset (
new hdf5Filter_Type ( data_file, fluidName) );
215 M_exporterSolid.reset (
new hdf5Filter_Type ( data_file, solidName) );
220 if (exporterType.compare (
"none") == 0)
222 M_exporterFluid.reset (
new ExporterEmpty<RegionMesh<LinearTetra> > ( data_file, M_fsi->FSIOper()->uFESpace().mesh(), fluidName, M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
223 M_exporterSolid.reset (
new ExporterEmpty<RegionMesh<LinearTetra> > ( data_file, M_fsi->FSIOper()->dFESpace().mesh(), solidName, M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
227 M_exporterFluid.reset (
new ensightFilter_Type ( data_file, fluidName) );
228 M_exporterSolid.reset (
new ensightFilter_Type ( data_file, solidName) );
234 M_saveEvery = data_file (
"exporter/saveEvery", 1);
237 std::string restartType (data_file (
"importer/restartType",
"newSimulation") );
238 std::cout <<
"The load state is: " << restartType << std::endl;
240 if (!restartType.compare (
"Stokes") )
242 initializeStokes (data_file);
244 else if (!restartType.compare (
"restartFSI") )
246 restartFSI (data_file);
252 M_velAndPressure.reset (
new vector_Type ( M_fsi->FSIOper()->fluid().getMap(), M_exporterFluid->mapType() ) );
254 M_fluidDisp.reset (
new vector_Type ( M_fsi->FSIOper()->mmFESpace().map(), M_exporterFluid->mapType() ) );
256 M_solidDisp.reset (
new vector_Type ( M_fsi->FSIOper()->dFESpace().map(), M_exporterSolid->mapType() ) );
260 M_exporterFluid->setMeshProcId (M_fsi->FSIOper()->uFESpace().mesh(), M_fsi->FSIOper()->uFESpace().map().comm().MyPID() );
261 M_exporterSolid->setMeshProcId (M_fsi->FSIOper()->dFESpace().mesh(), M_fsi->FSIOper()->dFESpace().map().comm().MyPID() );
262 M_exporterFluid->addVariable ( ExporterData<FSIOperator::mesh_Type>::VectorField,
"f-velocity",
263 M_fsi->FSIOper()->uFESpacePtr(), M_velAndPressure, UInt (0) );
264 M_exporterFluid->addVariable ( ExporterData<FSIOperator::mesh_Type>::ScalarField,
"f-pressure",
265 M_fsi->FSIOper()->pFESpacePtr(), M_velAndPressure,
266 UInt (3 * M_fsi->FSIOper()->uFESpace().dof().numTotalDof() ) );
268 M_exporterFluid->addVariable ( ExporterData<FSIOperator::mesh_Type>::VectorField,
"f-displacement",
269 M_fsi->FSIOper()->mmFESpacePtr(), M_fluidDisp, UInt (0) );
276 M_exporterSolid->addVariable ( ExporterData<FSIOperator::mesh_Type>::VectorField,
"s-displacement",
277 M_fsi->FSIOper()->dFESpacePtr(), M_solidDisp, UInt (0) );
285 M_data->dataFluid()->dataTime()->setInitialTime ( M_Tstart );
286 M_data->dataFluid()->dataTime()->setTime ( M_data->dataFluid()->dataTime()->initialTime() );
287 M_data->dataSolid()->dataTime()->setInitialTime ( M_Tstart );
288 M_data->dataSolid()->dataTime()->setTime ( M_data->dataFluid()->dataTime()->initialTime() );
289 M_data->timeDataALE()->setInitialTime ( M_Tstart );
290 M_data->timeDataALE()->setTime ( M_data->dataFluid()->dataTime()->initialTime() );
299 boost::timer _overall_timer;
301 LifeV::UInt iter = 1;
304 dynamic_cast<LifeV::FSIMonolithic*> (M_fsi->FSIOper().get() )->enableStressComputation (1);
314 for ( ; M_data->dataFluid()->dataTime()->canAdvance(); M_data->dataFluid()->dataTime()->updateTime(), M_data->dataSolid()->dataTime()->updateTime(), ++iter)
318 if (iter % M_saveEvery == 0)
320 M_fsi->FSIOper()->exportSolidDisplacement (*M_solidDisp);
323 M_fsi->FSIOper()->exportFluidVelocityAndPressure (*M_velAndPressure);
324 M_exporterSolid->postProcess ( M_data->dataFluid()->dataTime()->time() );
328 *M_fluidDisp = M_fsi->FSIOper()->meshDisp();
329 M_exporterFluid->postProcess ( M_data->dataFluid()->dataTime()->time() );
335 M_fsi->FSIOper()->displayer().leaderPrintMax (
"[fsi_run] Iteration ", iter);
336 M_fsi->FSIOper()->displayer().leaderPrintMax (
" was done in : ", _timer.elapsed() );
354 std::cout <<
"Total computation time = " 355 << _overall_timer.elapsed() <<
"s" <<
"\n";
361 void initializeStokes ( GetPot
const& data_file);
362 void restartFSI ( GetPot
const& data_file);
364 FSISolverPtr_Type M_fsi;
367 filterPtr_Type M_exporterSolid;
368 filterPtr_Type M_exporterFluid;
369 filterPtr_Type M_importerSolid;
370 filterPtr_Type M_importerFluid;
371 vectorPtr_Type M_velAndPressure;
372 vectorPtr_Type M_fluidDisp;
373 vectorPtr_Type M_solidDisp;
375 std::vector<vectorPtr_Type> M_solidStencil;
376 std::vector<vectorPtr_Type> M_fluidStencil;
377 std::vector<vectorPtr_Type> M_ALEStencil;
380 LifeV::Real M_Tstart;
382 LifeV::UInt M_saveEvery;
384 struct RESULT_CHANGED_EXCEPTION
387 RESULT_CHANGED_EXCEPTION (LifeV::Real time)
389 std::cout <<
"Some modifications led to changes in the l2 norm of the solution at time" << time << std::endl;
402 std::shared_ptr<Problem> fsip;
406 fsip = std::shared_ptr<Problem> (
new Problem ( data_file ) );
410 catch ( std::exception
const& _ex )
412 std::cout <<
"caught exception : " << _ex.what() <<
"\n";
433 int main (
int argc,
char** argv)
436 MPI_Init (&argc, &argv);
438 std::cout <<
"% using serial Version" << std::endl;
442 const bool check = command_line
.search (2
, "-c", "--check");
461 const std::string data_file_name = command_line
.follow ("data", 2
, "-f", "--file");
474 void Problem::restartFSI ( GetPot
const& data_file)
477 using namespace LifeV;
479 typedef FSIOperator::mesh_Type mesh_Type;
482 std::string
const importerType = data_file (
"importer/type",
"ensight");
483 std::string
const fluidName = data_file (
"importer/fluid/filename",
"fluid");
484 std::string
const solidName = data_file (
"importer/solid/filename",
"solid");
486 std::string
const loadInitSol = data_file (
"importer/initSol",
"00000");
487 std::string
const loadInitSolFD = data_file (
"importer/initSolFD",
"-1");
488 std::string iterationString;
490 M_Tstart = data_file (
"fluid/time_discretization/initialtime", 0.);
492 std::cout <<
"The file for fluid is : " << fluidName << std::endl;
493 std::cout <<
"The file for solid is : " << solidName << std::endl;
494 std::cout <<
"The importerType is : " << importerType << std::endl;
495 std::cout <<
"The iteration is : " << loadInitSol << std::endl;
496 std::cout <<
"For the fluid disp is : " << loadInitSolFD << std::endl;
497 std::cout <<
"Starting time : " << M_Tstart << std::endl;
500 if (importerType.compare (
"hdf5") == 0)
502 M_importerFluid.reset (
new hdf5Filter_Type ( data_file, fluidName) );
503 M_importerSolid.reset (
new hdf5Filter_Type ( data_file, solidName) );
508 if (importerType.compare (
"none") == 0)
510 M_importerFluid.reset (
new ExporterEmpty<mesh_Type > ( data_file, M_fsi->FSIOper()->uFESpace().mesh(),
"fluid", M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
511 M_importerSolid.reset (
new ExporterEmpty<mesh_Type > ( data_file, M_fsi->FSIOper()->dFESpace().mesh(),
"solid", M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
515 M_importerFluid.reset (
new ensightFilter_Type ( data_file, fluidName) );
516 M_importerSolid.reset (
new ensightFilter_Type ( data_file, solidName) );
520 M_importerFluid->setMeshProcId (M_fsi->FSIOper()->uFESpace().mesh(), M_fsi->FSIOper()->uFESpace().map().comm().MyPID() );
521 M_importerSolid->setMeshProcId (M_fsi->FSIOper()->dFESpace().mesh(), M_fsi->FSIOper()->dFESpace().map().comm().MyPID() );
531 vectorPtr_Type fluidSol (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique) );
532 vectorPtr_Type initFluid (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
533 vectorPtr_Type HarmonicSol (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
534 vectorPtr_Type structureSol (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
535 vectorPtr_Type temporarySol (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
537 vectorPtr_Type vel (
new vector_Type (M_fsi->FSIOper()->uFESpace().map(), M_importerFluid->mapType() ) );
538 vectorPtr_Type pressure (
new vector_Type (M_fsi->FSIOper()->pFESpace().map(), M_importerFluid->mapType() ) );
539 vectorPtr_Type solidDisp (
new vector_Type (M_fsi->FSIOper()->dFESpace().map(), M_importerSolid->mapType() ) );
540 vectorPtr_Type fluidDisp (
new vector_Type (M_fsi->FSIOper()->mmFESpace().map(), M_importerFluid->mapType() ) );
542 vectorPtr_Type firstFluidDisp (
new vector_Type (M_fsi->FSIOper()->mmFESpace().map(), M_importerFluid->mapType() ) );
544 UInt offset =
dynamic_cast<LifeV::FSIMonolithic*> (M_fsi->FSIOper().get() )->offset();
546 iterationString = loadInitSol;
547 std::cout <<
"Fluid size TimeAdvance:" << M_fsi->FSIOper()->fluidTimeAdvance()->size() << std::endl;
548 for (UInt iterInit = 0; iterInit < M_fsi->FSIOper()->fluidTimeAdvance()->size(); iterInit++ )
554 temporarySol.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
555 fluidSol.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique) );
556 initFluid.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
559 LifeV::ExporterData<mesh_Type> initSolFluidVel (LifeV::ExporterData<mesh_Type>::VectorField, std::string (
"f-velocity." + iterationString), M_fsi->FSIOper()->uFESpacePtr(), vel, UInt (0), LifeV::ExporterData<mesh_Type>::UnsteadyRegime );
560 LifeV::ExporterData<mesh_Type> initSolFluidPress (LifeV::ExporterData<mesh_Type>::ScalarField, std::string (
"f-pressure." + iterationString), M_fsi->FSIOper()->pFESpacePtr(), pressure, UInt (0), LifeV::ExporterData<mesh_Type>::UnsteadyRegime );
563 M_importerFluid->readVariable (initSolFluidVel);
564 M_importerFluid->readVariable (initSolFluidPress);
566 fluidSol.reset (
new vector_Type (*pressure, Unique, Zero) );
567 initFluid->subset (*fluidSol, fluidSol->map(), UInt (0), (UInt) 3 * M_fsi->FSIOper()->uFESpace().dof().numTotalDof() );
568 vector_Type tmpVec (*initFluid);
570 fluidSol.reset (
new vector_Type (*vel, Unique, Zero) );
572 *initFluid += tmpVec;
577 std::cout <<
"Norm of first Fluid sol: " << initFluid->norm2() << std::endl;
578 *temporarySol = *initFluid;
585 M_fluidStencil.push_back (temporarySol);
587 int iterations = std::atoi (iterationString.c_str() );
590 std::ostringstream iter;
592 iter << std::setw (5) << ( iterations );
593 iterationString = iter.str();
597 iterationString = loadInitSol;
598 for (UInt iterInit = 0; iterInit < M_fsi->FSIOper()->solidTimeAdvance()->size(); iterInit++ )
603 temporarySol.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
604 structureSol.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
608 LifeV::ExporterData<mesh_Type> initSolSolidDisp (LifeV::ExporterData<mesh_Type>::VectorField,
"s-displacement." + iterationString, M_fsi->FSIOper()->dFESpacePtr(), solidDisp, UInt (0) , LifeV::ExporterData<mesh_Type>::UnsteadyRegime );
611 M_importerSolid->readVariable (initSolSolidDisp);
613 structureSol->subset (*solidDisp, solidDisp->map(), (UInt) 0, offset);
615 *temporarySol = *structureSol / (M_fsi->FSIOper()->solid().rescaleFactor() );
617 M_solidStencil.push_back (temporarySol);
620 UInt iterations = std::atoi (iterationString.c_str() );
623 std::ostringstream iter;
625 iter << std::setw (5) << ( iterations );
626 iterationString = iter.str();
630 Int convectiveTerm = 0;
631 if (!M_data->dataFluid()->domainVelImplicit() )
635 HarmonicSol.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique, Zero) );
637 iterationString = loadInitSolFD;
639 for (UInt iterInit = 0; iterInit < M_fsi->FSIOper()->ALETimeAdvance()->size() + convectiveTerm + 1; iterInit++ )
641 temporarySol.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV:: Unique, Zero) );
646 LifeV::ExporterData<mesh_Type> initSolFluidDisp (LifeV::ExporterData<mesh_Type>::VectorField,
"f-displacement." + iterationString, M_fsi->FSIOper()->mmFESpacePtr(), fluidDisp, UInt (0), LifeV::ExporterData<mesh_Type>::UnsteadyRegime );
649 M_importerFluid->readVariable (initSolFluidDisp);
651 std::cout <<
"Reloaded Harmonic sol norm: " << fluidDisp->norm2() << std::endl;
654 HarmonicSol->subset (*fluidDisp, fluidDisp->map(), (UInt) 0,
dynamic_cast<LifeV::FSIMonolithicGI*> (M_fsi->FSIOper().get() )->mapWithoutMesh().map (Unique)->NumGlobalElements() );
657 *firstFluidDisp = *fluidDisp;
660 else if (convectiveTerm && iterInit == 1)
662 *firstFluidDisp = *fluidDisp;
666 M_ALEStencil.push_back (fluidDisp);
669 int iterations = std::atoi (iterationString.c_str() );
672 std::ostringstream iter;
674 iter << std::setw (5) << ( iterations );
675 iterationString = iter.str();
678 *M_fluidStencil[0] += *M_solidStencil[0];
679 *M_fluidStencil[0] += *HarmonicSol;
682 M_fsi->initialize (M_fluidStencil, M_solidStencil, M_ALEStencil);
684 if (!M_data->dataFluid()->domainVelImplicit() )
687 M_fsi->FSIOper()->ALETimeAdvance()->updateRHSFirstDerivative ( M_data->dataSolid()->dataTime()->timeStep() );
688 M_fsi->FSIOper()->ALETimeAdvance()->shiftRight (*firstFluidDisp);
691 M_velAndPressure.reset (
new vector_Type ( M_fsi->FSIOper()->fluid().getMap(), M_importerFluid->mapType() ) );
692 M_velAndPressure->subset (*pressure, pressure->map(), UInt (0), (UInt) 3 * M_fsi->FSIOper()->uFESpace().dof().numTotalDof() );
693 *M_velAndPressure += *vel;
695 M_fluidDisp.reset (
new vector_Type ( *fluidDisp, M_importerFluid->mapType() ) );
697 M_solidDisp.reset (
new vector_Type ( *solidDisp, M_importerSolid->mapType() ) );
699 M_data->dataFluid()->dataTime()->updateTime(), M_data->dataSolid()->dataTime()->updateTime();
703 void Problem::initializeStokes ( GetPot
const& data_file)
706 using namespace LifeV;
708 typedef FSIOperator::mesh_Type mesh_Type;
712 filterPtr_Type importer;
713 std::string
const importerType = data_file (
"importer/type",
"hdf5");
714 std::string
const filename = data_file (
"importer/fluid/filename",
"fluid");
716 std::string
const loadInitSol = data_file (
"importer/initSol",
"00000");
717 std::string
const loadInitSolFD = data_file (
"importer/initSolFD",
"-1");
718 std::string iterationString;
720 std::cout <<
"The filename is : " << filename << std::endl;
721 std::cout <<
"The importerType is: " << importerType << std::endl;
724 if (importerType.compare (
"hdf5") == 0)
726 importer.reset (
new hdf5Filter_Type ( data_file, filename) );
731 if (importerType.compare (
"none") == 0)
733 importer.reset (
new ExporterEmpty<RegionMesh<LinearTetra> > ( data_file, M_fsi->FSIOper()->uFESpace().mesh(),
"fluid", M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
737 importer.reset (
new ensightFilter_Type ( data_file, filename) );
741 importer->setMeshProcId (M_fsi->FSIOper()->uFESpace().mesh(), M_fsi->FSIOper()->uFESpace().map().comm().MyPID() );
744 std::vector<vectorPtr_Type> fluidStencil;;
746 vectorPtr_Type temporarySol (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), LifeV::Unique) );
750 iterationString = loadInitSol;
751 for (UInt iterInit = 0; iterInit < M_fsi->FSIOper()->fluidTimeAdvance()->size(); ++iterInit )
757 temporarySol.reset (
new vector_Type (*M_fsi->FSIOper()->couplingVariableMap(), Unique) );
759 vectorPtr_Type vel (
new vector_Type (M_fsi->FSIOper()->uFESpace().map(), M_importerFluid->mapType() ) );
760 vectorPtr_Type pressure (
new vector_Type (M_fsi->FSIOper()->pFESpace().map(), M_importerFluid->mapType() ) );
765 LifeV::ExporterData<mesh_Type> initSolFluidVel (LifeV::ExporterData<mesh_Type>::VectorField, std::string (
"f-velocity." + iterationString), M_fsi->FSIOper()->uFESpacePtr(), vel, UInt (0), LifeV::ExporterData<mesh_Type>::UnsteadyRegime );
766 LifeV::ExporterData<mesh_Type> initSolFluidPress (LifeV::ExporterData<mesh_Type>::ScalarField, std::string (
"f-pressure." + iterationString), M_fsi->FSIOper()->pFESpacePtr(), pressure, UInt (0), LifeV::ExporterData<mesh_Type>::UnsteadyRegime );
769 importer->readVariable (initSolFluidVel);
770 importer->readVariable (initSolFluidPress);
772 int iterations = std::atoi (iterationString.c_str() );
775 std::ostringstream iter;
777 iter << std::setw (5) << ( iterations );
778 iterationString = iter.str();
780 *temporarySol = *vel + *pressure;
781 fluidStencil.push_back (temporarySol);
int main(int argc, char **argv)
GetPot(const int argc_, char **argv_, const char *FieldSeparator=0x0)
static const LifeV::UInt elm_nodes_num[]
FSIChecker(GetPot const &_data_file)
GetPot(const char *FileName, const char *CommentStart=0x0, const char *CommentEnd=0x0, const char *FieldSeparator=0x0)
bool search(unsigned No, const char *P,...)
GetPot(const STRING_VECTOR &FileNameList)
const std::string follow(const char *Default, unsigned No, const char *Option,...)