38 #include <lifev/core/LifeV.hpp> 45 #pragma GCC diagnostic ignored "-Wunused-variable" 46 #pragma GCC diagnostic ignored "-Wunused-parameter" 48 #include "Epetra_config.h" 54 #include <Epetra_MpiComm.h> 57 #pragma GCC diagnostic warning "-Wunused-variable" 58 #pragma GCC diagnostic warning "-Wunused-parameter" 60 #include <lifev/core/filter/GetPot.hpp> 61 #include <lifev/core/filter/PartitionIO.hpp> 62 #include <lifev/core/mesh/RegionMesh.hpp> 64 #include <lifev/fsi_blocks/filter/DOFInterfaceIO.hpp> 67 using namespace LifeV;
69 typedef RegionMesh<LinearTetra> mesh_Type;
75 main (
int argc,
char** argv )
80 MPI_Init (&argc, &argv);
81 std::shared_ptr<Epetra_MpiComm> comm (
new Epetra_MpiComm (MPI_COMM_WORLD) );
83 const bool verbose (comm->MyPID() == 0);
89 std::cout <<
" -- Reading the data ... " << std::flush;
91 GetPot dataFile (
"data" );
93 const std::string fluidHdf5File (dataFile (
"test/fluid_hdf5_file_name",
95 const std::string solidHdf5File (dataFile (
"test/solid_hdf5_file_name",
97 const std::string interfaceHdf5File (dataFile (
"test/interface_hdf5_file_name",
101 std::cout <<
" done ! " << std::endl;
104 std::shared_ptr<mesh_Type> fluidMesh;
105 std::shared_ptr<mesh_Type> solidMesh;
106 std::shared_ptr<std::map<UInt, UInt> > interfaceMap;
112 std::cout <<
" -- Reading the fluid mesh part ... " << std::endl;
113 std::cout << fluidHdf5File << std::endl;
115 PartitionIO<RegionMesh<LinearTetra> > partitionIO (fluidHdf5File, comm);
116 partitionIO.read (fluidMesh);
122 std::cout <<
" done ! " << std::endl;
129 std::cout <<
" -- Reading the solid mesh part ... " << std::endl;
130 std::cout << solidHdf5File << std::endl;
132 PartitionIO<RegionMesh<LinearTetra> > partitionIO (solidHdf5File, comm);
133 partitionIO.read (solidMesh);
139 std::cout <<
" done ! " << std::endl;
146 std::cout <<
" -- Reading the interface ... " << std::endl;
147 std::cout << fluidHdf5File << std::endl;
149 DOFInterfaceIO interfaceIO (interfaceHdf5File, comm);
150 interfaceIO.read (interfaceMap);
152 std::cout <<
"Interface " << comm->MyPID()
153 <<
" size: " << interfaceMap->size() << std::endl;
157 std::cout <<
" done ! " << std::endl;
164 std::cout <<
"This test needs MPI to run. Aborting." << std::endl;
165 return (EXIT_FAILURE);
168 std::cout <<
"This test needs HDF5 to run. Aborting." << std::endl;
169 return (EXIT_FAILURE);
172 return ( EXIT_SUCCESS );
int main(int argc, char **argv)