2 #error test_reorder cannot be compiled in 2D
6 #include <lifev/core/mesh/InternalEntitySelector.hpp> 7 #include <Epetra_ConfigDefs.h> 10 #include <Epetra_MpiComm.h> 12 #include <Epetra_SerialComm.h> 15 #include <lifev/core/mesh/MeshData.hpp> 17 #include <lifev/core/filter/GetPot.hpp> 18 #include <lifev/core/filter/MeshWriter.hpp> 21 #include <lifev/core/fem/DOFInterface3Dto3D.hpp> 22 #include <lifev/core/fem/FESpace.hpp> 52 int main (
int argc,
char** argv)
55 MPI_Init (&argc, &argv);
56 using namespace LifeV;
57 GetPot command_line (argc, argv);
58 std::string data_file_name = command_line.follow (
"data", 2,
"-f",
"--file");
59 GetPot data_file (data_file_name);
62 mesh_data.setup (data_file,
"space_discretization");
64 std::shared_ptr<Epetra_Comm> uselessComm (
new Epetra_MpiComm (MPI_COMM_WORLD) );
65 std::shared_ptr<RegionMesh<LinearTetra> > mesh (
new RegionMesh<LinearTetra> ( uselessComm) );
67 readMesh (*mesh, mesh_data);
72 const std::string mesh_output = command_line.follow ( (data_file (
"space_discretization/output_mesh_file",
"mesh").c_str() ), 2,
"-o",
"--output");
73 bool ordering = data_file (
"space_discretization/ordering",
false);
74 bool create_edge = data_file (
"interface/create_edge",
true);
75 UInt TimeAdvanceNewmarker = data_file (
"interface/edgeMarker", 20);
81 MPI_Comm_rank (MPI_COMM_WORLD, &me);
82 MPI_Comm_size (MPI_COMM_WORLD, &numtasks);
84 MPI_Group originGroup, newGroup;
85 MPI_Comm_group (MPI_COMM_WORLD, &originGroup);
86 std::vector<Int> members (numtasks);
87 for (Int i = 0; i < numtasks; ++i)
91 MPI_Group_incl (originGroup, 1, &members[0], &newGroup);
93 MPI_Comm_create (MPI_COMM_WORLD, newGroup, &MPIcomm);
100 MeshWriter::writeMeshMedit<RegionMesh<LinearTetra> > ( mesh_output , *mesh);
105 else if (create_edge)
107 UInt FluidInterfaceFlag = data_file (
"interface/fluidInterfaceFlag", 2 );
108 UInt SolidInterfaceFlag = data_file (
"interface/solidInterfaceFlag", 2 );
109 Int
const edgeFlag (data_file (
"interface/edgeFlag", 2 ) );
112 mesh_data2.setup (data_file,
"second_mesh/space_discretization");
114 std::shared_ptr<RegionMesh<LinearTetra> > mesh2;
115 mesh2.reset (
new RegionMesh<LinearTetra> (uselessComm) );
117 readMesh (*mesh2, mesh_data2);
119 std::shared_ptr<FESpace<RegionMesh<LinearTetra>, MapEpetra> > firstFESpace;
120 firstFESpace.reset (
new FESpace<RegionMesh<LinearTetra>, MapEpetra> (mesh,
"P1", 3, uselessComm) );
122 std::shared_ptr<FESpace<RegionMesh<LinearTetra>, MapEpetra> > secondFESpace;
123 secondFESpace.reset (
new FESpace<RegionMesh<LinearTetra>, MapEpetra> (mesh2,
"P1", 3, uselessComm) );
126 std::shared_ptr<DOFInterface3Dto3D> dofEdgeFluidToEdgeSolid (
new DOFInterface3Dto3D );
128 dofEdgeFluidToEdgeSolid->setup (firstFESpace->refFE(), firstFESpace->dof(),
129 secondFESpace->refFE(), secondFESpace->dof()
132 dofEdgeFluidToEdgeSolid->update (
133 *mesh, FluidInterfaceFlag,
134 *mesh, SolidInterfaceFlag,
137 ChangeMarkersAccordingToMap (mesh2->pointList,
138 dofEdgeFluidToEdgeSolid->localDofMap(),
139 TimeAdvanceNewmarker);
141 MeshWriter::writeMeshMedit<RegionMesh<LinearTetra> > ( mesh_output , *mesh2);
int main(int argc, char **argv)