75 #include <boost/timer.hpp> 77 #include <Epetra_ConfigDefs.h> 80 #include <Epetra_MpiComm.h> 82 #include <Epetra_SerialComm.h> 88 #include <lifev/core/LifeV.hpp> 90 #include <lifev/core/algorithm/PreconditionerIfpack.hpp> 91 #include <lifev/core/algorithm/PreconditionerML.hpp> 95 #include <lifev/fsi/solver/FSISolver.hpp> 97 #include <lifev/structure/solver/StructuralOperator.hpp> 98 #include <lifev/fsi/solver/FSIMonolithicGI.hpp> 100 #include <lifev/core/filter/ExporterEnsight.hpp> 101 #include <lifev/core/filter/ExporterEmpty.hpp> 103 #include <lifev/core/filter/ExporterHDF5.hpp> 106 #include <lifev/fsi/examples/example_SmoothAneurysm/flowConditions.hpp> 107 #include <lifev/fsi/examples/example_SmoothAneurysm/ud_functions.hpp> 108 #include <lifev/fsi/examples/example_SmoothAneurysm/resistance.hpp> 109 #include <lifev/fsi/examples/example_SmoothAneurysm/boundaryConditions.hpp> 119 typedef LifeV::FSIOperator::data_Type data_Type;
120 typedef LifeV::FSIOperator::dataPtr_Type dataPtr_Type;
122 typedef LifeV::FSIOperator::vector_Type vector_Type;
123 typedef LifeV::FSIOperator::vectorPtr_Type vectorPtr_Type;
138 #ifdef ENABLE_ANISOTROPIC_LAW 166 using namespace LifeV;
171 M_data = dataPtr_Type (
new data_Type() );
172 M_data->setup ( data_file );
177 debugStream ( 10000 ) <<
"creating FSISolver with operator : " << method <<
"\n";
179 M_fsi = fsi_solver_ptr (
new FSISolver( ) );
180 MPI_Barrier ( MPI_COMM_WORLD );
183 debugStream ( 10000 ) <<
"Setting up data from GetPot \n";
185 M_fsi->setData ( M_data );
186 M_fsi->FSIOper()->setDataFile ( data_file );
187 MPI_Barrier ( MPI_COMM_WORLD );
191 std::string fluidMeshPartitioned = data_file (
"problem/fluidMeshPartitioned",
"none" );
192 std::string solidMeshPartitioned = data_file (
"problem/solidMeshPartitioned",
"none" );
194 if ( fluidMeshPartitioned.compare (
"none" ) )
196 FSIOperator::meshFilter_Type fluidMeshFilter ( data_file, fluidMeshPartitioned );
197 fluidMeshFilter.setComm ( M_fsi->FSIOper()->worldComm() );
198 FSIOperator::meshFilter_Type solidMeshFilter ( data_file, solidMeshPartitioned );
199 solidMeshFilter.setComm ( M_fsi->FSIOper( )->worldComm( ) );
200 M_fsi->FSIOper( )->partitionMeshes ( fluidMeshFilter, solidMeshFilter );
201 M_fsi->FSIOper( )->setupFEspace( );
202 M_fsi->FSIOper( )->setupDOF ( fluidMeshFilter );
203 fluidMeshFilter.closeFile( );
204 solidMeshFilter.closeFile( );
209 M_fsi->FSIOper( )->partitionMeshes( );
210 M_fsi->FSIOper( )->setupFEspace( );
211 M_fsi->FSIOper( )->setupDOF( );
214 std::cout <<
"register MonolithicGI : " << FSIMonolithicGI::S_register << std::endl;
216 debugStream ( 10000
) <<
"Setting up the FESpace and DOF \n";
218 MPI_Barrier ( MPI_COMM_WORLD );
220 Real resistance = data_file
("fluid/physics/resistance", 0.0
);
221 IR1.setQuantities( *(M_fsi->FSIOper()), resistance );
224 debugStream ( 10000 ) <<
"Setting up the BC \n";
226 M_fsi->setFluidBC ( BCh_monolithicFlux (
true ) );
227 M_fsi->setSolidBC ( BCh_monolithicSolid ( *M_fsi->FSIOper( ) ) );
232 FSIOperator::fluidBchandlerPtr_Type BCh_fluidM (
new FSIOperator::fluidBchandler_Type );
234 BCFunctionBase bcf (fZero);
235 BCFunctionBase pressureEpsilon (epsilon);
237 BCFunctionBase InletVect (aneurismFluxInVectorial);
240 BCh_fluidM->addBC (
"InFlow" ,
INLET, EssentialVertices, Full, InletVect, 3);
241 BCh_fluidM->addBC (
"InFlow" , 20, EssentialVertices, Full, bcf, 3);
244 BCh_fluidM->addBC (
"out3",
OUTLET, Resistance, Full, IR1.vector() , 3);
246 M_fsi->setFluidBC ( BCh_fluidM );
247 M_fsi->setHarmonicExtensionBC ( BCh_harmonicExtension ( *M_fsi->FSIOper( ) ) );
249 dynamic_cast<LifeV::FSIMonolithic*> (M_fsi->FSIOper().get() )->mergeBCHandlers();
252 debugStream ( 10000 ) <<
"BC set\n";
255 std::string
const exporterType = data_file (
"exporter/type",
"ensight" );
256 std::string
const fluidName = data_file (
"exporter/fluid/filename",
"fluid" );
257 std::string
const solidName = data_file (
"exporter/solid/filename",
"solid" );
260 if (exporterType.compare (
"hdf5") == 0)
262 M_exporterFluid.reset (
new hdf5Filter_Type ( data_file, fluidName) );
263 M_exporterSolid.reset (
new hdf5Filter_Type ( data_file, solidName) );
268 if (exporterType.compare (
"none") == 0)
270 M_exporterFluid.reset (
new ExporterEmpty<RegionMesh<LinearTetra> > ( data_file, M_fsi->FSIOper()->uFESpace().mesh(), fluidName, M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
271 M_exporterSolid.reset (
new ExporterEmpty<RegionMesh<LinearTetra> > ( data_file, M_fsi->FSIOper()->dFESpace().mesh(), solidName, M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
275 M_exporterFluid.reset (
new ensightFilter_Type ( data_file, fluidName) );
276 M_exporterSolid.reset (
new ensightFilter_Type ( data_file, solidName) );
280 #ifdef ENABLE_ANISOTROPIC_LAW 281 vectorFiberFunctionPtr_Type pointerToVectorOfFamilies;
282 listOfFiberDirections_Type fiberDirections;
283 fibersDirectionList setOfFiberFunctions;
285 if( !M_fsi->FSIOper()->dataSolid()->constitutiveLaw().compare(
"anisotropic") )
288 pointerToVectorOfFamilies.reset(
new vectorFiberFunction_Type( ) );
289 (*pointerToVectorOfFamilies).resize( M_fsi->FSIOper()->dataSolid()->numberFibersFamilies( ) );
291 fiberDirections.resize( M_fsi->FSIOper()->dataSolid()->numberFibersFamilies( ) );
293 setOfFiberFunctions.setupFiberDefinitions( M_fsi->FSIOper()->dataSolid()->numberFibersFamilies( ) );
299 M_saveEvery = data_file (
"exporter/saveEvery", 1);
300 M_tolSave = data_file (
"exporter/tolSave", 1);
303 std::string restartType (data_file (
"importer/restartFSI",
"false") );
305 if (!restartType.compare (
"true") )
309 else if ( !restartType.compare (
"vectors") )
313 M_velAndPressure.reset (
new vector_Type ( M_fsi->FSIOper()->fluid().getMap(), LifeV::Unique ) );
314 M_fluidDisp.reset (
new vector_Type ( M_fsi->FSIOper()->mmFESpace().map(), LifeV::Unique ) );
315 M_solidDisp.reset (
new vector_Type ( M_fsi->FSIOper()->dFESpace().map(), LifeV::Unique ) );
317 M_WS.reset (
new vector_Type ( M_fsi->FSIOper()->dFESpace().map(), LifeV::Unique ) );
322 M_fsi->initializeMonolithicOperator();
324 M_velAndPressure.reset (
new vector_Type ( M_fsi->FSIOper()->fluid().getMap(), LifeV::Unique ) );
325 M_fluidDisp.reset (
new vector_Type ( M_fsi->FSIOper()->mmFESpace().map(), LifeV::Unique ) );
326 M_solidDisp.reset (
new vector_Type ( M_fsi->FSIOper()->dFESpace().map(), LifeV::Unique ) );
328 M_WS.reset (
new vector_Type ( M_fsi->FSIOper()->dFESpace().map(), LifeV::Unique ) );
332 M_exporterFluid->setMeshProcId (M_fsi->FSIOper()->uFESpace().mesh(), M_fsi->FSIOper()->uFESpace().map().comm().MyPID() );
333 M_exporterSolid->setMeshProcId (M_fsi->FSIOper()->dFESpace().mesh(), M_fsi->FSIOper()->dFESpace().map().comm().MyPID() );
334 M_exporterFluid->addVariable ( ExporterData<FSIOperator::mesh_Type>::VectorField,
"f-velocity",
335 M_fsi->FSIOper()->uFESpacePtr(), M_velAndPressure, UInt (0) );
336 M_exporterFluid->addVariable ( ExporterData<FSIOperator::mesh_Type>::ScalarField,
"f-pressure",
337 M_fsi->FSIOper()->pFESpacePtr(), M_velAndPressure,
338 UInt (3 * M_fsi->FSIOper()->uFESpace().dof().numTotalDof() ) );
340 M_exporterFluid->addVariable ( ExporterData<FSIOperator::mesh_Type>::VectorField,
"f-displacement",
341 M_fsi->FSIOper()->mmFESpacePtr(), M_fluidDisp, UInt (0) );
344 M_exporterSolid->addVariable ( ExporterData<FSIOperator::mesh_Type>::VectorField,
"s-displacement",
345 M_fsi->FSIOper()->dFESpacePtr(), M_solidDisp, UInt (0) );
347 #ifdef ENABLE_ANISOTROPIC_LAW 348 if( !M_fsi->FSIOper()->dataSolid()->constitutiveLaw().compare(
"anisotropic") )
353 for( UInt k(1); k <= pointerToVectorOfFamilies->size( ); k++ )
356 std::string family=
"Family";
358 std::string familyNumber;
359 std::ostringstream number;
361 familyNumber = number.str();
364 std::string creationString = family + familyNumber;
365 (*pointerToVectorOfFamilies)[ k-1 ].reset(
new fiberFunction_Type() );
366 (*pointerToVectorOfFamilies)[ k-1 ] = setOfFiberFunctions.fiberDefinition( creationString );
368 fiberDirections[ k-1 ].reset(
new vector_Type( M_fsi->FSIOper()->dFESpacePtr()->map() , Unique) );
372 M_fsi->FSIOper()->solid().material()->anisotropicLaw()->setupFiberDirections( pointerToVectorOfFamilies );
376 for( UInt k(1); k <= pointerToVectorOfFamilies->size( ); k++ )
379 std::string family=
"Family-";
381 std::string familyNumber;
382 std::ostringstream number;
384 familyNumber = number.str();
387 std::string creationString = family + familyNumber;
388 M_exporterSolid->addVariable ( ExporterData<RegionMesh<LinearTetra> >::VectorField, creationString, M_fsi->FSIOper()->dFESpacePtr(), fiberDirections[ k-1 ], UInt (0) );
391 *(fiberDirections[ k-1 ]) = M_fsi->FSIOper()->solid().material()->anisotropicLaw()->ithFiberVector( k );
400 M_fsi->FSIOper()->fluid().setupPostProc();
405 Real hydrostatic = data_file
("fluid/physics/hydrostatic", 0.0
);
411 M_data->dataFluid()->dataTime()->setInitialTime ( M_data->dataFluid()->dataTime()->initialTime() );
412 M_data->dataFluid()->dataTime()->setTime ( M_data->dataFluid()->dataTime()->initialTime() );
413 M_data->dataSolid()->dataTime()->setInitialTime ( M_data->dataFluid()->dataTime()->initialTime() );
414 M_data->dataSolid()->dataTime()->setTime ( M_data->dataFluid()->dataTime()->initialTime() );
415 M_data->timeDataALE()->setInitialTime ( M_data->dataFluid()->dataTime()->initialTime() );
416 M_data->timeDataALE()->setTime ( M_data->dataFluid()->dataTime()->initialTime() );
437 boost::timer _overall_timer;
439 LifeV::UInt iter = 0;
442 dynamic_cast<LifeV::FSIMonolithic*> (M_fsi->FSIOper().get() )->enableStressComputation (1);
445 *M_fluidDisp = M_fsi->FSIOper()->meshDisp();
446 M_fsi->FSIOper()->exportSolidDisplacement (*M_solidDisp);
448 M_fsi->FSIOper()->exportFluidVelocityAndPressure (*M_velAndPressure);
449 M_exporterSolid->postProcess ( M_data->dataFluid()->dataTime()->time() );
450 M_exporterFluid->postProcess ( M_data->dataFluid()->dataTime()->time() );
457 LifeV::UInt tol ( M_fsi->FSIOper()->solidTimeAdvance()->size() );
459 vectorPtr_Type solution (
new vector_Type ( (*M_fsi->FSIOper()->couplingVariableMap() ) ) );
460 vector_Type fluidSolution ( M_fsi->FSIOper()->fluid().getMap(), LifeV::Unique );
461 fluidSolution *= 0.0;
463 M_fsi->FSIOper()->extrapolation ( *solution );
465 for ( ; M_data->dataFluid()->dataTime()->canAdvance();)
467 M_data->dataFluid()->dataTime()->updateTime();
468 M_data->dataSolid()->dataTime()->updateTime();
469 M_data->timeDataALE()->updateTime();
471 fluidSolution = *M_velAndPressure;
480 M_fsi->FSIOper()->extrapolation ( *solution );
482 M_fsi->iterate ( solution );
485 M_fsi->FSIOper()->updateSolution ( *solution );
489 r = iter % M_saveEvery;
492 if ( (iter - d) <= tol || ( (std::floor (d / M_saveEvery) + 1) *M_saveEvery - iter ) <= tol )
494 *M_fluidDisp = M_fsi->FSIOper()->meshDisp();
495 M_fsi->FSIOper()->exportSolidDisplacement (*M_solidDisp);
497 M_fsi->FSIOper()->exportFluidVelocityAndPressure (*M_velAndPressure);
499 M_exporterSolid->postProcess ( M_data->dataFluid()->dataTime()->time() );
500 M_exporterFluid->postProcess ( M_data->dataFluid()->dataTime()->time() );
519 filterPtr_Type M_importerSolid;
520 filterPtr_Type M_importerFluid;
521 vectorPtr_Type M_velAndPressure;
522 vectorPtr_Type M_fluidDisp;
523 vectorPtr_Type M_solidDisp;
526 std::vector<vectorPtr_Type> M_solidStencil;
527 std::vector<vectorPtr_Type> M_fluidStencil;
528 std::vector<vectorPtr_Type> M_ALEStencil;
537 LifeV::UInt M_saveEvery;
547 std::shared_ptr<Epetra_Comm> comm ) :
554 std::shared_ptr<Problem> fsip;
558 fsip = std::shared_ptr<Problem> (
new Problem ( data_file, communicator ) );
562 catch ( std::exception
const& _ex )
564 std::cout <<
"caught exception : " << _ex.what() <<
"\n";
587 int main (
int argc,
char** argv)
591 MPI_Init (&argc, &argv);
592 std::shared_ptr<Epetra_MpiComm> Comm (
new Epetra_MpiComm ( MPI_COMM_WORLD ) );
593 if ( Comm->MyPID() == 0 )
595 std::cout <<
"% using MPI" << std::endl;
598 std::shared_ptr<Epetra_SerialComm> Comm (
new Epetra_SerialComm() );
599 std::cout <<
"% using serial Version" << std::endl;
603 const bool check = command_line
.search (2
, "-c", "--check");
608 FSIChecker _GCE_check ( data_fileGCE, Comm );
612 FSIChecker _CE_check (data_fileCE, Comm);
622 const std::string data_file_name = command_line.follow (
"data", 2,
"-f",
"--file");
623 GetPot data_file (data_file_name);
624 FSIChecker _sp_check ( data_file, Comm );
638 using namespace LifeV;
640 typedef FSIOperator::mesh_Type mesh_Type;
643 std::string
const importerType = data_file (
"importer/type",
"ensight");
644 std::string
const fluidName = data_file (
"importer/fluid/filename",
"fluid");
645 std::string
const solidName = data_file (
"importer/solid/filename",
"solid");
647 std::string
const loadInitSol = data_file (
"importer/initSol",
"00000");
648 std::string
const loadInitSolFD = data_file (
"importer/initSolFD",
"-1");
649 std::string iterationString;
651 M_Tstart = data_file (
"fluid/time_discretization/initialtime", 0.);
663 std::string methodFluid = data_file (
"fluid/time_discretization/method",
"Newmark");
664 std::string methodSolid = data_file (
"solid/time_discretization/method",
"Newmark");
665 std::string methodALE = data_file (
"mesh_motion/time_discretization/method",
"Newmark");
668 if (importerType.compare (
"hdf5") == 0)
670 M_importerFluid.reset (
new hdf5Filter_Type ( data_file, fluidName) );
671 M_importerSolid.reset (
new hdf5Filter_Type ( data_file, solidName) );
676 if (importerType.compare (
"none") == 0)
678 M_importerFluid.reset (
new ExporterEmpty<mesh_Type > ( data_file, M_fsi->FSIOper()->uFESpace().mesh(),
"fluid", M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
679 M_importerSolid.reset (
new ExporterEmpty<mesh_Type > ( data_file, M_fsi->FSIOper()->dFESpace().mesh(),
"solid", M_fsi->FSIOper()->uFESpace().map().comm().MyPID() ) );
683 M_importerFluid.reset (
new ensightFilter_Type ( data_file, fluidName) );
684 M_importerSolid.reset (
new ensightFilter_Type ( data_file, solidName) );
688 M_importerFluid->setMeshProcId (M_fsi->FSIOper()->uFESpace().mesh(), M_fsi->FSIOper()->uFESpace().map().comm().MyPID() );
689 M_importerSolid->setMeshProcId (M_fsi->FSIOper()->dFESpace().mesh(), M_fsi->FSIOper()->dFESpace().map().comm().MyPID() );
696 iterationString = loadInitSol;
701 vectorPtr_Type pressure;
702 vectorPtr_Type solidDisp;
703 vectorPtr_Type fluidDisp;
705 for (iterInit = 0; iterInit < M_fsi->FSIOper()->fluidTimeAdvance()->size(); iterInit++ )
710 vel.reset (
new vector_Type (M_fsi->FSIOper()->uFESpace().map(), LifeV::Unique) );
711 pressure.reset (
new vector_Type (M_fsi->FSIOper()->pFESpace().map(), LifeV::Unique) );
712 solidDisp.reset (
new vector_Type (M_fsi->FSIOper()->dFESpace().map(), LifeV::Unique) );
717 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 );
718 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 );
721 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 );
729 M_importerFluid->readVariable (initSolFluidVel);
730 M_importerFluid->readVariable (initSolFluidPress);
731 M_importerSolid->readVariable (initSolSolidDisp);
738 M_fsi->FSIOper()->setVectorInStencils (vel, pressure, solidDisp, iterInit );
741 int iterations = std::atoi (iterationString.c_str() );
744 std::ostringstream iter;
746 iter << std::setw (5) << ( iterations );
747 iterationString = iter.str();
750 readLastVectorSolidTimeAdvance ( solidDisp, iterInit, iterationString );
755 iterationString = loadInitSol;
756 int iterationStartALE = std::atoi (iterationString.c_str() );
759 std::ostringstream iter;
761 iter << std::setw (5) << ( iterationStartALE );
762 iterationString = iter.str();
767 for (iterInit = 0; iterInit < M_fsi->FSIOper()->ALETimeAdvance()->size(); iterInit++ )
770 fluidDisp.reset (
new vector_Type (M_fsi->FSIOper()->mmFESpace().map(), LifeV::Unique) );
773 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 );
779 M_importerFluid->readVariable (initSolFluidDisp);
785 M_fsi->FSIOper()->setALEVectorInStencil ( fluidDisp, iterInit,
false );
788 int iterations = std::atoi (iterationString.c_str() );
791 std::ostringstream iter;
793 iter << std::setw (5) << ( iterations );
794 iterationString = iter.str();
798 M_fsi->FSIOper()->finalizeRestart();
801 readLastVectorALETimeAdvance ( fluidDisp, loadInitSol);
804 vel.reset (
new vector_Type (M_fsi->FSIOper()->uFESpace().map(), LifeV::Unique) );
805 pressure.reset (
new vector_Type (M_fsi->FSIOper()->pFESpace().map(), LifeV::Unique) );
806 fluidDisp.reset (
new vector_Type (M_fsi->FSIOper()->mmFESpace().map(), LifeV::Unique) );
807 M_velAndPressure.reset (
new vector_Type ( M_fsi->FSIOper()->fluid().getMap(), M_importerFluid->mapType() ) );
808 M_velAndPressure->subset (*pressure, pressure->map(), UInt (0), (UInt) 3 * M_fsi->FSIOper()->uFESpace().dof().numTotalDof() );
809 *M_velAndPressure += *vel;
811 M_fluidDisp.reset (
new vector_Type ( *fluidDisp, M_importerFluid->mapType() ) );
813 M_solidDisp.reset (
new vector_Type ( *solidDisp, M_importerSolid->mapType() ) );
817 void Problem::readLastVectorSolidTimeAdvance ( vectorPtr_Type solidDisp,
818 LifeV::UInt iterInit,
819 std::string iterationString)
821 using namespace LifeV;
823 typedef FSIOperator::mesh_Type mesh_Type;
829 solidDisp.reset (
new vector_Type (M_fsi->FSIOper()->dFESpace().map(), LifeV::Unique) );
831 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 );
833 M_importerSolid->readVariable (initSolSolidDisp);
835 M_fsi->FSIOper()->setSolidVectorInStencil ( solidDisp, iterInit );
840 const std::string loadInitSol)
842 using namespace LifeV;
843 typedef FSIOperator::mesh_Type mesh_Type;
846 std::string iterationString = loadInitSol;
847 fluidDisp.reset (
new vector_Type (M_fsi->FSIOper()->mmFESpace().map(), LifeV::Unique) );
850 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 );
856 M_importerFluid->readVariable (initSolFluidDisp);
862 if ( M_data->method().compare (
"monolithicGI") == 0 )
865 M_fsi->FSIOper()->setALEVectorInStencil ( fluidDisp, 10,
true );
869 M_fsi->FSIOper()->ALETimeAdvance()->shiftRight ( *fluidDisp );
875 using namespace LifeV;
878 vectorPtr_Type pressure;
879 vectorPtr_Type solidDisp;
880 vectorPtr_Type fluidDisp;
882 vel.reset (
new vector_Type (M_fsi->FSIOper()->uFESpace().map(), LifeV::Unique) );
883 pressure.reset (
new vector_Type (M_fsi->FSIOper()->pFESpace().map(), LifeV::Unique) );
884 solidDisp.reset (
new vector_Type (M_fsi->FSIOper()->dFESpace().map(), LifeV::Unique) );
885 fluidDisp.reset (
new vector_Type (M_fsi->FSIOper()->mmFESpace().map(), LifeV::Unique) );
888 M_fsi->FSIOper()->pFESpacePtr()->interpolate (
static_cast<FESpace<RegionMesh<LinearTetra>, MapEpetra> ::function_Type> ( pressureInitial ), *pressure, 0.0 );
897 for (iterInit = 0; iterInit < M_fsi->FSIOper()->fluidTimeAdvance()->size(); iterInit++ )
900 M_fsi->FSIOper()->setVectorInStencils (vel, pressure, solidDisp, iterInit );
904 M_fsi->FSIOper()->setSolidVectorInStencil ( solidDisp, iterInit );
907 for (iterInit = 0; iterInit < M_fsi->FSIOper()->ALETimeAdvance()->size(); iterInit++ )
910 M_fsi->FSIOper()->setALEVectorInStencil ( fluidDisp, iterInit,
false );
914 M_fsi->FSIOper()->finalizeRestart();
918 if ( M_data->method().compare (
"monolithicGI") == 0 )
921 M_fsi->FSIOper()->setALEVectorInStencil ( fluidDisp, 10,
true );
925 M_fsi->FSIOper()->ALETimeAdvance()->shiftRight ( *fluidDisp );
std::shared_ptr< Epetra_Comm > M_comm
vectorPtr_Type M_solidVel
void assignFunction(bcBase_Type &base)
Assign the function to the base of the BCHandler.
Problem(GetPot const &data_file, std::shared_ptr< Epetra_Comm > comm)
double operator()(const char *VarName, const double &Default) const
LifeV::FactorySingleton< LifeV::Factory< LifeV::FSIOperator, std::string > > FSIFactory_Type
int main(int argc, char **argv)
filter_ptrtype M_exporterFluid
GetPot(const int argc_, char **argv_, const char *FieldSeparator=0x0)
LifeV::ImplicitResistance implicitResistance_Type
std::shared_ptr< FSISolver > fsi_solver_ptr
static const LifeV::UInt elm_nodes_num[]
FSIChecker(GetPot const &_data_file, std::shared_ptr< Epetra_Comm > comm)
implicitResistance_Type IR1
void readLastVectorALETimeAdvance(vectorPtr_Type fluidDisp, const std::string loadInitSol)
void readLastVectorSolidTimeAdvance(vectorPtr_Type fluidDisp, const LifeV::UInt iterInit, std::string iterationString)
LifeV::ResistanceBCs resistanceBCs_Type
filter_ptrtype M_exporterSolid
fsi_solver_ptr fsiSolver()
double Real
Generic real data.
GetPot(const char *FileName, const char *CommentStart=0x0, const char *CommentEnd=0x0, const char *FieldSeparator=0x0)
void restartFSI(GetPot const &data_file)
NdebugStream noDebugStream(int=0, NdebugStream::stprintf=&printf)
bool search(unsigned No, const char *P,...)
std::shared_ptr< Epetra_Comm > communicator
std::shared_ptr< ensightFilter_Type > ensightFilterPtr_Type
LifeV::ExporterEnsight< LifeV::FSIOperator::mesh_Type > ensightFilter_Type
void initializeWithVectors(void)
uint32_type UInt
generic unsigned integer (used mainly for addressing)