[Dune] Reference hexahedron

Peter Bastian Peter.Bastian at iwr.uni-heidelberg.de
Wed May 4 10:57:53 CEST 2005


Adrian Burri schrieb:
> Hi everyone!
> 
> I've got a question regarding the reference element for a hexahedron: is 
> there a convention for the local numbering of the vertices on the faces 
> of the hexahedron? (Say, I want to write something like 
> hexa.myvertex(hexaFaceIndex, vertexIndex), hexaFaceIndex \in {0, 5}, 
> vertexIndex \in {0, 3}, which is the corresponding index hexaVertexIndex 
> \in {0, 7} of the hexahedron?)
> 
> Another question: is the face numbering of the hexahedron on the Dune 
> homepage indeed correct? (Shouldn't be 2 at the front and 4 at the bottom?)
> 
I have written an interface for reference elements that includes also 
the numbering of all subentities and it is algorithmically generated:

   //! This is the abstract base class for reference elements
   template<typename ctype, int dim>
   class ReferenceElement
   {
   public:

	// compile time sizes
	enum { d=dim };    // maps from R^d

	// export types
	typedef ctype CoordType;

	//! number of entities of codim c
	virtual int size (int c) const = 0;
	
	//! number of subentities of codim cc of entitity (i,c)
	virtual int size (int i, int c, int cc) const = 0;
	
	//! number of ii'th subentity with codim cc of (i,c)
	virtual int subentity (int i, int c, int ii, int cc) const = 0;

	//! position of entity (i,c)
	virtual const FieldVector<ctype,dim>& position (int i, int c) const = 0;

	//! type of (i,c)
	virtual GeometryType type (int i, int c) const = 0;

	//! volume of the reference element
	virtual double volume () const = 0;

	//! virtual destructor
	virtual ~ReferenceElement ()
	{}
   };



You can look at it by checking out dune-dd. It is implemented for cubes 
of all dimensions and Sreejith is currently doing the simplices, the 
pyramid and the prism. With this class I wrote P2 shape functions 
without any implicit knowledge about the local numbering of the entities.

I could check in all that we did. Whats the opinion of the others?

Cheers,

-- Peter
------------------------------------------------------------------
Peter Bastian, IWR,Uni Heidelberg, INF 348,R 020, 69120 Heidelberg
email: Peter.Bastian at iwr.uni-heidelberg.de   Tel: +49 6221 54 4984
WWW: http://www.iwr.uni-heidelberg.de/~Peter.Bastian Fax: ... 8860





More information about the Dune mailing list