xda_tet_mesh.template.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_XDA_TET_MESH_HEADER
27 #define OOMPH_XDA_TET_MESH_HEADER
28 
29 // Config header generated by autoconfig
30 #ifdef HAVE_CONFIG_H
31 #include <oomph-lib-config.h>
32 #endif
33 
34 
35 #ifdef OOMPH_HAS_MPI
36 // mpi headers
37 #include "mpi.h"
38 #endif
39 
40 #include <string>
41 #include <iterator>
42 #include <algorithm>
43 
44 #include "../generic/mesh.h"
45 #include "../generic/tet_mesh.h"
46 
47 namespace oomph
48 {
49  //========================================================================
51  //========================================================================
52  template<class ELEMENT>
53  class XdaTetMesh : public virtual TetMeshBase
54  {
55  public:
63  XdaTetMesh(const std::string xda_file_name,
64  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper);
65 
75  void setup_boundary_coordinates(const unsigned& b,
76  const bool& switch_normal)
77  {
78  std::ofstream outfile;
79  setup_boundary_coordinates(b, switch_normal, outfile);
80  }
81 
82 
92  void setup_boundary_coordinates(const unsigned& b,
93  const bool& switch_normal,
94  std::ofstream& outfile);
95 
98  unsigned nxda_boundary()
99  {
100  return Boundary_id.size();
101  }
102 
105  Vector<unsigned> oomph_lib_boundary_ids(const unsigned& xda_boundary_id)
106  {
107  return Boundary_id[xda_boundary_id];
108  }
109 
110  private:
114  };
115 
116 
120 
121 
122  //==========================================================================
124  //=========================================================================
125  template<class ELEMENT>
126  class SolidXdaTetMesh : public virtual XdaTetMesh<ELEMENT>,
127  public virtual SolidMesh
128  {
129  public:
132  SolidXdaTetMesh(const std::string xda_file_name,
133  TimeStepper* time_stepper_pt = &Mesh::Default_TimeStepper)
134  : XdaTetMesh<ELEMENT>(xda_file_name, time_stepper_pt)
135  {
136  // Assign the Lagrangian coordinates
138  }
139 
140 
142  virtual ~SolidXdaTetMesh() {}
143  };
144 
145 
149 
150 
151 } // namespace oomph
152 
153 #endif
Scalar * b
Definition: benchVecAdd.cpp:17
static Steady< 0 > Default_TimeStepper
The Steady Timestepper.
Definition: mesh.h:75
Definition: mesh.h:2562
void set_lagrangian_nodal_coordinates()
Definition: mesh.cc:9564
Xda-based tet mesh upgraded to become a solid mesh.
Definition: xda_tet_mesh.template.h:128
SolidXdaTetMesh(const std::string xda_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: xda_tet_mesh.template.h:132
virtual ~SolidXdaTetMesh()
Empty Destructor.
Definition: xda_tet_mesh.template.h:142
Base class for tet meshes (meshes made of 3D tet elements).
Definition: tet_mesh.h:661
Definition: timesteppers.h:231
Tet mesh made of quadratic (ten node) tets built from xda input file.
Definition: xda_tet_mesh.template.h:54
Vector< Vector< unsigned > > Boundary_id
Definition: xda_tet_mesh.template.h:113
void setup_boundary_coordinates(const unsigned &b, const bool &switch_normal)
Definition: xda_tet_mesh.template.h:75
XdaTetMesh(const std::string xda_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Definition: xda_tet_mesh.template.cc:46
Vector< unsigned > oomph_lib_boundary_ids(const unsigned &xda_boundary_id)
Definition: xda_tet_mesh.template.h:105
unsigned nxda_boundary()
Definition: xda_tet_mesh.template.h:98
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