MFEM  v3.0
 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.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_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;
42  virtual const DenseMatrix & Jacobian() = 0;
43  virtual double Weight() = 0;
44  virtual int Order() = 0;
45  virtual int OrderJ() = 0;
46  virtual int OrderW() = 0;
48  virtual int OrderGrad(const FiniteElement *fe) = 0;
51  virtual int GetSpaceDim() = 0;
52 
53  virtual ~ElementTransformation() { }
54 };
55 
57 {
58 private:
59  DenseMatrix dshape, dFdx;
60  double Wght;
61  Vector shape;
62 
63  const FiniteElement *FElem;
64  DenseMatrix PointMat;
65 
66 public:
67  void SetFE(const FiniteElement *FE) { FElem = FE; };
68  DenseMatrix &GetPointMat () { return PointMat; };
69 
70  void SetIdentityTransformation(int GeomType);
71 
72  virtual void Transform(const IntegrationPoint &, Vector &);
73  virtual void Transform(const IntegrationRule &, DenseMatrix &);
74  virtual const DenseMatrix & Jacobian();
75  virtual double Weight();
76  virtual int Order() { return FElem->GetOrder(); }
77  virtual int OrderJ();
78  virtual int OrderW();
79  virtual int OrderGrad(const FiniteElement *fe);
80  virtual int GetSpaceDim()
81  {
82  // this function should only be called after PointMat is initialised
83  return PointMat.Height();
84  }
85 
87 };
88 
90 {
91 public:
94  void Transform (const IntegrationRule &, IntegrationRule &);
95 };
96 
98 {
99 public:
103 };
104 
105 }
106 
107 #endif
Abstract class for Finite Elements.
Definition: fe.hpp:42
virtual ~ElementTransformation()
Definition: eltrans.hpp:53
ElementTransformation * Face
Definition: eltrans.hpp:101
Class for integration rule.
Definition: intrules.hpp:63
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:89
Data type dense matrix.
Definition: densemat.hpp:22
IntegrationPointTransformation Loc2
Definition: eltrans.hpp:102
virtual void Transform(const IntegrationPoint &, Vector &)
Definition: eltrans.cpp:123
const IntegrationPoint & GetIntPoint()
Definition: eltrans.hpp:35
ElementTransformation * Elem2
Definition: eltrans.hpp:101
int Height() const
Get the height (size of output) of the Operator. Synonym with NumRows.
Definition: operator.hpp:35
IntegrationPointTransformation Loc1
Definition: eltrans.hpp:102
virtual int OrderGrad(const FiniteElement *fe)
order of adj(J)^t.grad(fi)
Definition: eltrans.cpp:104
virtual double Weight()=0
virtual const DenseMatrix & Jacobian()
Definition: eltrans.cpp:50
void Transform(const IntegrationPoint &, IntegrationPoint &)
Definition: eltrans.cpp:157
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:67
IsoparametricTransformation Transf
Definition: eltrans.hpp:92
ElementTransformation * Elem1
Definition: eltrans.hpp:101
Vector data type.
Definition: vector.hpp:29
virtual void Transform(const IntegrationPoint &, Vector &)=0
virtual int GetSpaceDim()=0
virtual const DenseMatrix & Jacobian()=0