MFEM v2.0
tetrahedron.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_TETRAHEDRON
00013 #define MFEM_TETRAHEDRON
00014 
00016 class Tetrahedron : public Element
00017 {
00018 protected:
00019    int indices[4];
00020    static const int edges[6][2];
00021 
00030    int refinement_flag;
00031 
00032 public:
00033 
00035    enum { TYPE_PU=0, TYPE_A=1, TYPE_PF=2, TYPE_O=3, TYPE_M=4 };
00036 
00037    Tetrahedron() : Element(Geometry::TETRAHEDRON) { refinement_flag = 0; }
00038 
00040    Tetrahedron(int *ind, int attr = 1);
00041 
00043    Tetrahedron(int ind1, int ind2, int ind3, int ind4, int attr = 1);
00044 
00045    void  ParseRefinementFlag(int refinement_edges[2], int &type, int &flag);
00046    void CreateRefinementFlag(int refinement_edges[2], int  type, int  flag = 0);
00047 
00048    virtual int GetRefinementFlag() { return refinement_flag; }
00049 
00050    void SetRefinementFlag(int rf) { refinement_flag = rf; }
00051 
00053    virtual int NeedRefinement(DSTable &v_to_v, int *middle) const;
00054 
00056    virtual void SetVertices(const int *ind);
00057 
00059    virtual void MarkEdge(DenseMatrix &pmat) { }
00060 
00064    virtual void MarkEdge(const DSTable &v_to_v, const int *length);
00065 
00067    virtual int GetType() const { return Element::TETRAHEDRON; }
00068 
00070    virtual void GetVertices(Array<int> &v) const;
00071 
00072    virtual int *GetVertices() { return indices; }
00073 
00074    virtual int GetNVertices() const { return 4; }
00075 
00076    virtual int GetNEdges() const { return(6); }
00077 
00078    virtual const int *GetEdgeVertices(int ei) const { return(edges[ei]); }
00079 
00080    virtual Element *Duplicate(Mesh *m) const;
00081 
00082    virtual ~Tetrahedron() { }
00083 };
00084 
00085 extern Linear3DFiniteElement TetrahedronFE;
00086 
00087 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines