triangle_scaffold_mesh.h
Go to the documentation of this file.
1 // LIC// ====================================================================
2 // LIC// This file forms part of oomph-lib, the object-oriented,
3 // LIC// multi-physics finite-element library, available
4 // LIC// at http://www.oomph-lib.org.
5 // LIC//
6 // LIC// Copyright (C) 2006-2022 Matthias Heil and Andrew Hazel
7 // LIC//
8 // LIC// This library is free software; you can redistribute it and/or
9 // LIC// modify it under the terms of the GNU Lesser General Public
10 // LIC// License as published by the Free Software Foundation; either
11 // LIC// version 2.1 of the License, or (at your option) any later version.
12 // LIC//
13 // LIC// This library is distributed in the hope that it will be useful,
14 // LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // LIC// Lesser General Public License for more details.
17 // LIC//
18 // LIC// You should have received a copy of the GNU Lesser General Public
19 // LIC// License along with this library; if not, write to the Free Software
20 // LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 // LIC// 02110-1301 USA.
22 // LIC//
23 // LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 // LIC//
25 // LIC//====================================================================
26 #ifndef OOMPH_TRIANGLE_SCAFFOLD_MESH_HEADER
27 #define OOMPH_TRIANGLE_SCAFFOLD_MESH_HEADER
28 
29 // Config header generated by autoconfig
30 #ifdef HAVE_CONFIG_H
31 #include <oomph-lib-config.h>
32 #endif
33 
34 #ifdef OOMPH_HAS_MPI
35 // mpi headers
36 #include "mpi.h"
37 #endif
38 
39 
40 #include "triangle_mesh.h"
41 #include "Telements.h"
42 
43 
44 namespace oomph
45 {
46  //=====================================================================
49  //=====================================================================
50  class TriangleScaffoldMesh : public virtual Mesh
51  {
52  public:
55 
57  TriangleScaffoldMesh(const std::string& node_file_name,
58  const std::string& element_file_name,
59  const std::string& poly_file_name);
60 
61 #ifdef OOMPH_HAS_TRIANGLE_LIB
62 
64  TriangleScaffoldMesh(TriangulateIO& triangle_data);
65 
66 #endif
67 
70 
72  void operator=(const TriangleScaffoldMesh&) = delete;
73 
76 
80  unsigned global_node_number(const unsigned& i)
81  {
82  return Global_node[i];
83  }
84 
89  unsigned edge_boundary(const unsigned& e, const unsigned& i) const
90  {
91  return Edge_boundary[e][i];
92  }
93 
95  unsigned nglobal_edge()
96  {
97  return Nglobal_edge;
98  }
99 
102  unsigned edge_index(const unsigned& e, const unsigned& i) const
103  {
104  return Edge_index[e][i];
105  }
106 
108  double element_attribute(const unsigned& e) const
109  {
110  return Element_attribute[e];
111  }
112 
115  {
116  return Hole_centre;
117  }
118 
119  protected:
122  void check_mesh_integrity();
123 
125  unsigned Nglobal_edge;
126 
129 
133 
135  // the elements' edges
137 
140 
143  };
144 
145 } // namespace oomph
146 
147 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Definition: mesh.h:67
Definition: triangle_scaffold_mesh.h:51
unsigned global_node_number(const unsigned &i)
Definition: triangle_scaffold_mesh.h:80
TriangleScaffoldMesh(const TriangleScaffoldMesh &)=delete
Broken copy constructor.
Vector< unsigned > Global_node
Storage for global node numbers listed element-by-element.
Definition: triangle_scaffold_mesh.h:128
unsigned edge_index(const unsigned &e, const unsigned &i) const
Definition: triangle_scaffold_mesh.h:102
void operator=(const TriangleScaffoldMesh &)=delete
Broken assignment operator.
void check_mesh_integrity()
Definition: triangle_scaffold_mesh.cc:35
unsigned Nglobal_edge
Number of internal edges.
Definition: triangle_scaffold_mesh.h:125
Vector< double > Element_attribute
Vector of double attributes for each element.
Definition: triangle_scaffold_mesh.h:139
Vector< Vector< double > > & internal_point()
Vectors of hole centre coordinates.
Definition: triangle_scaffold_mesh.h:114
TriangleScaffoldMesh()
Empty constructor.
Definition: triangle_scaffold_mesh.h:54
double element_attribute(const unsigned &e) const
Return the attribute of the element e.
Definition: triangle_scaffold_mesh.h:108
Vector< Vector< unsigned > > Edge_boundary
Definition: triangle_scaffold_mesh.h:132
unsigned edge_boundary(const unsigned &e, const unsigned &i) const
Definition: triangle_scaffold_mesh.h:89
unsigned nglobal_edge()
Return the number of internal edges.
Definition: triangle_scaffold_mesh.h:95
~TriangleScaffoldMesh()
Empty destructor.
Definition: triangle_scaffold_mesh.h:75
Vector< Vector< double > > Hole_centre
Vectors of hole centre coordinates.
Definition: triangle_scaffold_mesh.h:142
Vector< Vector< unsigned > > Edge_index
Vector of vectors containing the global edge index of.
Definition: triangle_scaffold_mesh.h:136
Definition: oomph-lib/src/generic/Vector.h:58
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10