geompack_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// Version 1.0; svn revision $LastChangedRevision$
7 //LIC//
8 //LIC// $LastChangedDate$
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 #ifndef OOMPH_GEOMPACK_MESH_HEADER
31 #define OOMPH_GEOMPACK_MESH_HEADER
32 
33 #include "../generic/geompack_scaffold_mesh.h"
34 
35 namespace oomph
36 {
37 
38 //=========start_of_geompackquadmesh_class================================
39 /// Quadrilateral mesh generator; Uses input from Geompack++.
40 /// See: http://members.shaw.ca/bjoe/
41 /// Currently only for four-noded quads -- extension to higher-order
42 /// quads should be trivial (see the corresponding classes for
43 /// triangular meshes).
44 //========================================================================
45 template <class ELEMENT>
46 class GeompackQuadMesh : public Mesh
47 {
48 
49 public:
50 
51  /// \short Constructor with the input files
52  GeompackQuadMesh(const std::string& mesh_file_name,
53  const std::string& curve_file_name,
54  TimeStepper* time_stepper_pt=
56  {
57  // Mesh can only be built with four-noded 2D Qelements.
58  MeshChecker::assert_geometric_element<QElementGeometricBase,ELEMENT>(2,2);
59 
60  // Build scaffold
61  Tmp_mesh_pt= new
62  GeompackQuadScaffoldMesh(mesh_file_name,curve_file_name);
63 
64  // Convert mesh from scaffold to actual mesh
65  build_from_scaffold(time_stepper_pt);
66 
67  // Kill the scaffold
68  delete Tmp_mesh_pt;
69  Tmp_mesh_pt=0;
70  }
71 
72  /// Empty destructor
74 
75  private:
76 
77  /// Temporary scaffold mesh
79 
80  /// Build mesh from scaffold
81  void build_from_scaffold(TimeStepper* time_stepper_pt);
82 
83 };
84 
85 }
86 
87 #endif
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
Definition: mesh.h:85
void build_from_scaffold(TimeStepper *time_stepper_pt)
Build mesh from scaffold.
Mesh that is based on input files generated by the quadrilateral mesh generator Geompack.
GeompackQuadScaffoldMesh * Tmp_mesh_pt
Temporary scaffold mesh.
~GeompackQuadMesh()
Empty destructor.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn&#39;t been defined.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
Definition: timesteppers.h:219
GeompackQuadMesh(const std::string &mesh_file_name, const std::string &curve_file_name, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor with the input files.
A general mesh class.
Definition: mesh.h:74