LifeV
BareMesh.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  @file BareMesh.hpp
29  @brief Contains utility for importing meshes
30 
31  @date 16 Aug 2011
32  @author: luca formaggia
33 */
34 
35 #ifndef BAREMESH_HPP_
36 #define BAREMESH_HPP_
37 
38 #include <lifev/core/LifeV.hpp>
39 
40 #include <lifev/core/mesh/ElementShapes.hpp>
41 #include <lifev/core/array/ArraySimple.hpp>
42 
43 namespace LifeV
44 {
45 
46 //! A struct for a bare mesh
47 /**
48  * A very simple struct which stores an mesh as read from a file, ready to be imported in
49  * a regionmesh
50  * All SimpleArray have the first dimension the "shortest" one
51  */
52 template <typename GeoShapeType>
53 struct BareMesh
54 {
63  ArraySimple<Real> points;
66  ArraySimple<UInt> ridges;
70  ArraySimple<UInt> facets;
73  ArraySimple<UInt> elements;
76 
77  BareMesh();
78  void clear();
79 };
80 
81 template <typename GeoShapeType>
82 BareMesh<GeoShapeType>::BareMesh() : isPartitioned (false) {}
83 
84 template <typename GeoShapeType>
85 void BareMesh<GeoShapeType>::clear()
86 {
87  clearVector ( points );
88  clearVector ( pointMarkers );
89  clearVector ( pointIDs );
90  clearVector ( ridges );
91  clearVector ( ridgeMarkers );
92  clearVector ( ridgeIDs );
93  clearVector ( facets );
94  clearVector ( facetMarkers );
95  clearVector ( facetIDs );
96  clearVector ( elements );
97  clearVector ( elementMarkers );
98  clearVector ( elementIDs );
99 }
100 
101 }
102 
103 #endif /* BAREMESH_HPP_ */
UInt numBoundaryPoints
Definition: BareMesh.hpp:59
std::vector< ID > facetIDs
Definition: BareMesh.hpp:72
UInt numBoundaryFacets
Definition: BareMesh.hpp:69
ReferenceShapes bRefShape
Definition: BareMesh.hpp:58
std::vector< ID > facetMarkers
Definition: BareMesh.hpp:71
UInt numBoundaryVertices
Definition: BareMesh.hpp:61
ArraySimple< UInt > ridges
Definition: BareMesh.hpp:66
ArraySimple< UInt > facets
Definition: BareMesh.hpp:70
std::vector< ID > ridgeMarkers
Definition: BareMesh.hpp:67
std::vector< ID > elementMarkers
Definition: BareMesh.hpp:74
ReferenceShapes refShape
Definition: BareMesh.hpp:57
std::vector< ID > elementIDs
Definition: BareMesh.hpp:75
ArraySimple< Real > points
Definition: BareMesh.hpp:63
uint32_type ID
IDs.
Definition: LifeV.hpp:194
bool isPartitioned
Definition: BareMesh.hpp:62
std::vector< ID > ridgeIDs
Definition: BareMesh.hpp:68
double Real
Generic real data.
Definition: LifeV.hpp:175
std::vector< ID > pointMarkers
Definition: BareMesh.hpp:64
A struct for a bare mesh.
Definition: BareMesh.hpp:53
ArraySimple< UInt > elements
Definition: BareMesh.hpp:73
std::vector< ID > pointIDs
Definition: BareMesh.hpp:65
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191