46 #include <Epetra_ConfigDefs.h> 49 #include <Epetra_MpiComm.h> 51 #include <Epetra_SerialComm.h> 55 #include <lifev/core/mesh/RegionMesh2DStructured.hpp> 56 #include <lifev/core/mesh/MeshUtility.hpp> 59 #include <lifev/core/filter/ExporterHDF5.hpp> 61 #include <lifev/core/filter/ExporterEmpty.hpp> 64 using namespace LifeV;
68 if ( barycentre
[0
] < 0.5 && barycentre
[1
] < 0.5 )
75 int main (
int argc,
char* argv[])
78 MPI_Init (&argc, &argv);
79 std::shared_ptr<Epetra_Comm> comm (
new Epetra_MpiComm ( MPI_COMM_WORLD ) );
81 std::shared_ptr<Epetra_Comm> comm (
new Epetra_SerialComm );
84 typedef RegionMesh<LinearTriangle> mesh_Type;
85 typedef std::shared_ptr< mesh_Type > meshPtr_Type;
88 meshPtr_Type mesh (
new mesh_Type ( comm ) );
91 regularMesh2D ( *mesh, 0, 8, 11 );
94 MeshUtility::assignRegionMarkerID ( *mesh, colour_fun );
97 const UInt colourElements = mesh->elementList().countElementsWithMarkerID ( 2, std::equal_to<markerID_Type>() );
100 const UInt exactNumber = 44;
107 ExporterHDF5< mesh_Type > exporter;
109 ExporterEmpty< mesh_Type > exporter;
113 exporter.setMeshProcId ( mesh, comm->MyPID() );
116 exporter.exportRegionMarkerID ( mesh, comm );
119 exporter.postProcess ( 0 );
127 if ( colourElements == exactNumber )
129 return ( EXIT_SUCCESS );
133 return ( EXIT_FAILURE );
Real const & operator[](UInt const &i) const
Operator [].
UInt colour_fun(const Vector3D &barycentre)
VectorSmall< 3 > Vector3D
int main(int argc, char **argv)
uint32_type UInt
generic unsigned integer (used mainly for addressing)