MFEM  v3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
geom.hpp
Go to the documentation of this file.
1 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
2 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
3 // reserved. See file COPYRIGHT for details.
4 //
5 // This file is part of the MFEM library. For more information and source code
6 // availability see http://mfem.googlecode.com.
7 //
8 // MFEM is free software; you can redistribute it and/or modify it under the
9 // terms of the GNU Lesser General Public License (as published by the Free
10 // Software Foundation) version 2.1 dated February 1999.
11 
12 #ifndef MFEM_GEOM
13 #define MFEM_GEOM
14 
15 #include "../config/config.hpp"
16 #include "../linalg/densemat.hpp"
17 #include "intrules.hpp"
18 
19 namespace mfem
20 {
21 
29 class Geometry
30 {
31 public:
33 
34  static const int NumGeom = 6;
35  static const int NumBdrArray[];
36  static const char *Name[NumGeom];
37  static const double Volume[NumGeom];
38 
39 private:
40  IntegrationRule *GeomVert[NumGeom];
41  IntegrationPoint GeomCenter[NumGeom];
42  DenseMatrix *PerfGeomToGeomJac[NumGeom];
43 
44 public:
45 
46  Geometry();
47 
48  ~Geometry();
49 
50  const IntegrationRule *GetVertices(int GeomType);
51  const IntegrationPoint &GetCenter(int GeomType)
52  { return GeomCenter[GeomType]; }
53 
55  { return PerfGeomToGeomJac[GeomType]; }
56  void GetPerfPointMat(int GeomType, DenseMatrix &pm);
57  void JacToPerfJac(int GeomType, const DenseMatrix &J,
58  DenseMatrix &PJ) const;
59 
60  int NumBdr (int GeomType) { return NumBdrArray[GeomType]; }
61 };
62 
63 extern Geometry Geometries;
64 
66 {
67 public:
68  int Times, ETimes;
71 
72  RefinedGeometry (int NPts, int NRefG, int NRefE) :
73  RefPts (NPts), RefGeoms (NRefG), RefEdges (NRefE) { }
74 };
75 
77 {
78 private:
79  int type; // 0 - uniform points, otherwise - poly1d.ClosedPoints
82 public:
84 
85  void SetType(const int t) { type = t; }
86  RefinedGeometry *Refine (int Geom, int Times, int ETimes = 1);
87  const IntegrationRule *RefineInterior(int Geom, int Times);
88 
90 };
91 
92 extern GeometryRefiner GlobGeometryRefiner;
93 
94 }
95 
96 #endif
Class for integration rule.
Definition: intrules.hpp:63
RefinedGeometry(int NPts, int NRefG, int NRefE)
Definition: geom.hpp:72
static const int NumGeom
Definition: geom.hpp:34
void JacToPerfJac(int GeomType, const DenseMatrix &J, DenseMatrix &PJ) const
Definition: geom.cpp:250
RefinedGeometry * Refine(int Geom, int Times, int ETimes=1)
Definition: geom.cpp:289
Data type dense matrix.
Definition: densemat.hpp:22
static const double Volume[NumGeom]
Definition: geom.hpp:37
static const int NumBdrArray[]
Definition: geom.hpp:35
Array< int > RefEdges
Definition: geom.hpp:70
const IntegrationPoint & GetCenter(int GeomType)
Definition: geom.hpp:51
const IntegrationRule * GetVertices(int GeomType)
Definition: geom.cpp:172
Geometry Geometries
Definition: geom.cpp:267
void SetType(const int t)
Definition: geom.hpp:85
const IntegrationRule * RefineInterior(int Geom, int Times)
Definition: geom.cpp:634
GeometryRefiner GlobGeometryRefiner
Definition: geom.cpp:706
IntegrationRule RefPts
Definition: geom.hpp:69
static const char * Name[NumGeom]
Definition: geom.hpp:36
void GetPerfPointMat(int GeomType, DenseMatrix &pm)
Definition: geom.cpp:189
int NumBdr(int GeomType)
Definition: geom.hpp:60
DenseMatrix * GetPerfGeomToGeomJac(int GeomType)
Definition: geom.hpp:54
Class for integration point with weight.
Definition: intrules.hpp:25
Array< int > RefGeoms
Definition: geom.hpp:70