38 #include <boost/archive/binary_iarchive.hpp>
39 #include <boost/archive/binary_oarchive.hpp>
41 #include <boost/shared_ptr.hpp>
42 #include <boost/foreach.hpp>
43 #include <boost/multi_array.hpp>
44 #include <boost/multi_index_container.hpp>
45 #include <boost/multi_index/member.hpp>
46 #include <boost/multi_index/mem_fun.hpp>
47 #include <boost/multi_index/ordered_index.hpp>
48 #include <boost/numeric/ublas/io.hpp>
52 #include <feel/feelcore/feel.hpp>
57 #include <feel/feelmesh/geoelement.hpp>
80 template<
typename Shape>
83 public VisitableBase<>,
85 public Elements<Shape>,
86 public Points<Shape::nRealDim>,
87 public Faces<typename Shape::template shape<0,Shape::nOrder,Shape::nRealDim>::type,
88 typename Elements<Shape>::element_type>
91 BOOST_STATIC_ASSERT( Shape::nDim == 1 );
100 static const uint16_type nDim = Shape::nRealDim;
101 static const uint16_type nRealDim = Shape::nRealDim;
103 typedef typename VisitableBase<>::return_type return_type;
105 typedef VisitableBase<> super_visitable;
108 typedef Elements<Shape> super_elements;
109 typedef typename super_elements::elements_type elements_type;
110 typedef typename super_elements::element_type element_type;
111 typedef typename super_elements::element_iterator element_iterator;
112 typedef typename super_elements::element_const_iterator element_const_iterator;
113 typedef typename super_elements::update_element_neighbor_type update_element_neighbor_type;
115 typedef Points<nRealDim> super_points;
116 typedef typename super_points::points_type points_type;
117 typedef typename super_points::point_type point_type;
119 typedef Faces<typename Shape::template shape<0,Shape::nOrder,Shape::nRealDim>::type,
typename super_elements::element_type> super_faces;
120 typedef typename super_faces::face_iterator face_iterator;
121 typedef typename super_faces::face_const_iterator face_const_iterator;
122 typedef typename super_faces::faces_type faces_type;
123 typedef typename super_faces::face_type face_type;
124 typedef face_type edge_type;
126 typedef super_faces super_edges;
127 typedef typename super_edges::marker_face_iterator marker_edge_iterator;
128 typedef typename super_edges::marker_face_const_iterator marker_edge_const_iterator;
129 typedef typename super_edges::location_face_iterator location_edge_iterator;
130 typedef typename super_edges::location_face_const_iterator location_edge_const_iterator;
133 typedef boost::shared_ptr<self_type> self_ptrtype;
135 typedef typename element_type::vertex_permutation_type vertex_permutation_type;
136 typedef typename element_type::edge_permutation_type edge_permutation_type;
227 return super_elements::element_type::numLocalFaces;
235 return super_elements::element_type::numLocalVertices;
243 return this->
faces().size();
252 return this->
points().size();
268 virtual void setWorldComm( WorldComm
const& _worldComm )
270 this->setWorldCommMeshBase( _worldComm );
271 this->setWorldCommElements( _worldComm );
272 this->setWorldCommFaces( _worldComm );
273 this->setWorldCommPoints( _worldComm );
284 this->
faces().clear();
285 FEELPP_ASSERT(
isEmpty() ).error(
"all mesh containers should be empty after a clear." );
290 FEELPP_DEFINE_VISITABLE();
303 FEELPP_ASSERT( 0 ).error(
"invalid call" );
325 friend class boost::serialization::access;
326 template<
class Archive>
327 void serialize( Archive & ar,
const unsigned int version )
329 ar & boost::serialization::base_object<super>( *this );
330 DVLOG(2) <<
"Serializing points\n";
331 ar & boost::serialization::base_object<super_points>( *this );
332 DVLOG(2) <<
"Serializing faces\n";
333 ar & boost::serialization::base_object<super_faces>( *this );
334 DVLOG(2) <<
"Serializing elements\n";
335 ar & boost::serialization::base_object<super_elements>( *this );
elements_type const & elements() const
Definition: elements.hpp:355
MeshBase & operator=(MeshBase const &m)
Definition: meshbase.cpp:60
base mesh class
Definition: meshbase.hpp:67
void updateEntitiesCoDimensionOnePermutation()
Definition: mesh1d.hpp:310
boost::tuple< size_type, size_type > face_processor_type
Definition: meshbase.hpp:83
void renumber()
Definition: mesh1d.hpp:301
boost::tuple< mpl::size_t< MESH_POINTS >, typename MeshTraits< MeshType >::point_const_iterator, typename MeshTraits< MeshType >::point_const_iterator > points(MeshType const &mesh)
Definition: filters.hpp:1296
~Mesh1D()
Definition: mesh1d.hpp:174
Mesh1D(Mesh1D const &m)
Definition: mesh1d.hpp:162
void updateEntitiesCoDimensionTwo()
Definition: mesh1d.hpp:318
size_type numPoints() const
Definition: mesh1d.hpp:250
boost::tuple< mpl::size_t< MESH_FACES >, typename MeshTraits< MeshType >::pid_face_const_iterator, typename MeshTraits< MeshType >::pid_face_const_iterator > faces(MeshType const &mesh)
Definition: filters.hpp:933
virtual bool isEmpty() const
Definition: elements.hpp:371
size_type numLocalFaces() const
Definition: mesh1d.hpp:225
virtual void clear()
Definition: mesh1d.hpp:280
size_type numFaces() const
Definition: mesh1d.hpp:241
size_t size_type
Indices (starting from 0)
Definition: feelcore/feel.hpp:319
size_type numElements() const
Definition: mesh1d.hpp:217
size_type numLocalVertices() const
Definition: mesh1d.hpp:233
Elements & operator=(Elements const &e)
Definition: elements.hpp:335
bool isEmpty() const
Definition: mesh1d.hpp:206
1D mesh class
Definition: mesh1d.hpp:81
WorldComm const & worldComm() const
Definition: meshbase.hpp:277