27 #include <Epetra_ConfigDefs.h> 30 #include <Epetra_MpiComm.h> 32 #include <Epetra_SerialComm.h> 35 #include <boost/shared_ptr.hpp> 37 #include <lifev/core/LifeV.cpp> 38 #include <lifev/core/mesh/MeshPartitioner.hpp> 39 #include <lifev/core/filter/ParserGmsh.hpp> 40 #include <lifev/core/mesh/ConvertBareMesh.hpp> 53 mesh_p->updateElementFacets (
true,
true);
54 mesh_p->updateElementRidges (
true,
true);
56 LifeV::MeshPartitioner<M> part (mesh_p, comm);
90 static bool test (std::string& filename,
comm_t comm,
bool part =
true)
94 if (!LifeV::MeshIO::ReadGmshFile (filename, baremesh, 1,
true) )
100 std::shared_ptr<mesh_t> mesh (
new mesh_t (comm) );
101 LifeV::convertBareMesh (baremesh, *mesh,
true);
106 partitioner<S::S_nDimensions>::dopartition (mesh, comm);
113 int main (
int argc,
char* argv[])
117 MPI_Init (&argc, &argv);
118 std::shared_ptr<Epetra_Comm> comm (
new Epetra_MpiComm (MPI_COMM_WORLD) );
120 std::shared_ptr<Epetra_Comm> comm (
new Epetra_SerialComm);
123 bool ilead = (comm->MyPID() == 0);
128 std::cout <<
"Usage: " << argv[0] <<
" [mesh_1D_P1] [mesh_2D_Q2] [mesh_3D_P1] [mesh_3D_Q2]" << std::endl;
133 std::vector<std::string> files;
134 std::copy (argv + 1, argv + 5, std::back_inserter (files) );
138 std::cout <<
"\n [[ LINEAR LINE ]] \n\n";
140 tester<LifeV::LinearLine>::test (files[0], comm);
144 std::cout <<
"\n [[ QUADRATIC QUAD ]] \n\n";
146 tester<LifeV::QuadraticQuad>::test (files[1], comm);
150 std::cout <<
"\n [[ LINEAR TETRA ]] \n\n";
152 tester<LifeV::LinearTetra>::test (files[2], comm);
156 std::cout <<
"\n [[ QUADRATIC HEXA ]] \n\n";
159 tester<LifeV::QuadraticHexa>::test (files[3], comm,
false);
static void dopartition(std::shared_ptr< M > &mesh_p, comm_t comm)
std::shared_ptr< Epetra_Comm > comm_t
static bool test(std::string &filename, comm_t comm, bool part=true)
static void dopartition(std::shared_ptr< M > &, comm_t)
int main(int argc, char **argv)
static void dopartition(std::shared_ptr< M > &, comm_t)
elms_t::const_iterator elms_citer