MFEM  v3.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
eltrans.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.org.
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_ELEMENTTRANSFORM
13 #define MFEM_ELEMENTTRANSFORM
14 
15 #include "../config/config.hpp"
16 #include "../linalg/linalg.hpp"
17 #include "intrules.hpp"
18 #include "fe.hpp"
19 
20 namespace mfem
21 {
22 
24 {
25 protected:
29 
30 public:
33  void SetIntPoint(const IntegrationPoint *ip)
35  const IntegrationPoint &GetIntPoint() { return *IntPoint; }
36 
37  virtual void Transform(const IntegrationPoint &, Vector &) = 0;
38  virtual void Transform(const IntegrationRule &, DenseMatrix &) = 0;
39 
41  virtual void Transform(const DenseMatrix &matrix, DenseMatrix &result) = 0;
42 
46  virtual const DenseMatrix & Jacobian() = 0;
47  virtual double Weight() = 0;
48 
49  virtual int Order() = 0;
50  virtual int OrderJ() = 0;
51  virtual int OrderW() = 0;
53  virtual int OrderGrad(const FiniteElement *fe) = 0;
54 
57  virtual int GetSpaceDim() = 0;
58 
63  virtual int TransformBack(const Vector &, IntegrationPoint &) = 0;
64 
65  virtual ~ElementTransformation() { }
66 };
67 
69 {
70 private:
71  DenseMatrix dshape, dFdx;
72  double Wght;
73  Vector shape;
74 
75  const FiniteElement *FElem;
76  DenseMatrix PointMat;
77 
78 public:
79  void SetFE(const FiniteElement *FE) { FElem = FE; }
80  DenseMatrix &GetPointMat () { return PointMat; }
81 
82  void SetIdentityTransformation(int GeomType);
83 
84  virtual void Transform(const IntegrationPoint &, Vector &);
85  virtual void Transform(const IntegrationRule &, DenseMatrix &);
86  virtual void Transform(const DenseMatrix &matrix, DenseMatrix &result);
87 
88  virtual const DenseMatrix & Jacobian();
89  virtual double Weight();
90 
91  virtual int Order() { return FElem->GetOrder(); }
92  virtual int OrderJ();
93  virtual int OrderW();
94  virtual int OrderGrad(const FiniteElement *fe);
95 
96  virtual int GetSpaceDim()
97  {
98  // this function should only be called after PointMat is initialized
99  return PointMat.Height();
100  }
101 
102  virtual int TransformBack(const Vector &, IntegrationPoint &);
103 
105 };
106 
108 {
109 public:
111  void Transform (const IntegrationPoint &, IntegrationPoint &);
112  void Transform (const IntegrationRule &, IntegrationRule &);
113 };
114 
116 {
117 public:
121 };
122 
123 }
124 
125 #endif
Abstract class for Finite Elements.
Definition: fe.hpp:44
virtual ~ElementTransformation()
Definition: eltrans.hpp:65
ElementTransformation * Face
Definition: eltrans.hpp:119
Class for integration rule.
Definition: intrules.hpp:83
const IntegrationPoint * IntPoint
Definition: eltrans.hpp:28
void SetIntPoint(const IntegrationPoint *ip)
Definition: eltrans.hpp:33
void SetIdentityTransformation(int GeomType)
Definition: eltrans.cpp:29
int GetOrder() const
Returns the order of the finite element.
Definition: fe.hpp:91
Data type dense matrix using column-major storage.
Definition: densemat.hpp:22
virtual int TransformBack(const Vector &, IntegrationPoint &)
Definition: eltrans.cpp:190
IntegrationPointTransformation Loc2
Definition: eltrans.hpp:120
virtual void Transform(const IntegrationPoint &, Vector &)
Definition: eltrans.cpp:129
const IntegrationPoint & GetIntPoint()
Definition: eltrans.hpp:35
ElementTransformation * Elem2
Definition: eltrans.hpp:119
virtual int TransformBack(const Vector &, IntegrationPoint &)=0
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows.
Definition: operator.hpp:35
IntegrationPointTransformation Loc1
Definition: eltrans.hpp:120
virtual int OrderGrad(const FiniteElement *fe)
order of adj(J)^t.grad(fi)
Definition: eltrans.cpp:110
virtual double Weight()=0
virtual const DenseMatrix & Jacobian()
Definition: eltrans.cpp:52
void Transform(const IntegrationPoint &, IntegrationPoint &)
Definition: eltrans.cpp:243
Class for integration point with weight.
Definition: intrules.hpp:25
virtual int OrderGrad(const FiniteElement *fe)=0
order of adj(J)^t.grad(fi)
void SetFE(const FiniteElement *FE)
Definition: eltrans.hpp:79
IsoparametricTransformation Transf
Definition: eltrans.hpp:110
ElementTransformation * Elem1
Definition: eltrans.hpp:119
Vector data type.
Definition: vector.hpp:33
virtual void Transform(const IntegrationPoint &, Vector &)=0
virtual int GetSpaceDim()=0
virtual const DenseMatrix & Jacobian()=0