MFEM v2.0
eltrans.hpp
Go to the documentation of this file.
00001 // Copyright (c) 2010, Lawrence Livermore National Security, LLC. Produced at
00002 // the Lawrence Livermore National Laboratory. LLNL-CODE-443211. All Rights
00003 // reserved. See file COPYRIGHT for details.
00004 //
00005 // This file is part of the MFEM library. For more information and source code
00006 // availability see http://mfem.googlecode.com.
00007 //
00008 // MFEM is free software; you can redistribute it and/or modify it under the
00009 // terms of the GNU Lesser General Public License (as published by the Free
00010 // Software Foundation) version 2.1 dated February 1999.
00011 
00012 #ifndef MFEM_ELEMENTTRANSFORM
00013 #define MFEM_ELEMENTTRANSFORM
00014 
00015 class ElementTransformation
00016 {
00017 protected:
00018    int JacobianIsEvaluated;
00019    int WeightIsEvaluated;
00020    const IntegrationPoint *IntPoint;
00021 
00022 public:
00023    int Attribute, ElementNo;
00024    void SetIntPoint(const IntegrationPoint *ip)
00025    { IntPoint = ip; WeightIsEvaluated = JacobianIsEvaluated = 0; }
00026    const IntegrationPoint &GetIntPoint() { return *IntPoint; }
00027 
00028    virtual void Transform(const IntegrationPoint &, Vector &) = 0;
00029    virtual void Transform(const IntegrationRule &, DenseMatrix &) = 0;
00033    virtual const DenseMatrix & Jacobian() = 0;
00034    virtual double Weight() = 0;
00035    virtual int OrderJ() = 0;
00036    virtual int OrderW() = 0;
00038    virtual int OrderGrad(const FiniteElement *fe) = 0;
00039 
00040    virtual ~ElementTransformation() { }
00041 };
00042 
00043 class IsoparametricTransformation : public ElementTransformation
00044 {
00045 private:
00046    DenseMatrix dshape, dFdx;
00047    double Wght;
00048    Vector shape;
00049 
00050    const FiniteElement *FElem;
00051    DenseMatrix PointMat;
00052 
00053 public:
00054    void SetFE(const FiniteElement *FE) { FElem = FE; };
00055    DenseMatrix &GetPointMat () { return PointMat; };
00056 
00057    virtual void Transform(const IntegrationPoint &, Vector &);
00058    virtual void Transform(const IntegrationRule &, DenseMatrix &);
00059    virtual const DenseMatrix & Jacobian();
00060    virtual double Weight();
00061    virtual int OrderJ();
00062    virtual int OrderW();
00063    virtual int OrderGrad(const FiniteElement *fe);
00064 
00065    virtual ~IsoparametricTransformation() { }
00066 };
00067 
00068 class IntegrationPointTransformation
00069 {
00070 public:
00071    IsoparametricTransformation Transf;
00072    void Transform (const IntegrationPoint &, IntegrationPoint &);
00073    void Transform (const IntegrationRule  &, IntegrationRule  &);
00074 };
00075 
00076 class FaceElementTransformations
00077 {
00078 public:
00079    int Elem1No, Elem2No, FaceGeom;
00080    ElementTransformation *Elem1, *Elem2, *Face;
00081    IntegrationPointTransformation Loc1, Loc2;
00082 };
00083 
00084 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines