/* $Id: triang3tr.h,v 1.1.1.1 1996/10/02 10:35:55 roitzsch Exp $ */

#ifndef TRIANG3TR_H
#define TRIANG3TR_H

#include "triang3.h"


//-------------------------------------------------------------------------


class TET3TR : public TET3
{
  public:

    PATCH* partner;

    TET3TR() { reset(); }
    virtual void reset() { partner = 0; TET3::reset(); }

    virtual PATCH* Partner() const { return partner; }
    virtual void setPartner(PATCH* pt) { partner = pt; }
};
//-------------------------------------------------------------------------


class MESH3Trans : public MESH3
{
  public:

    MESH3Trans(const char* inFileName, MESH3* prevMesh);

    const PATCH* findPatch(const Vector<Real>& x, Vector<Real>& xUnit,
			   const PATCH* newPatch) const;
    virtual void Refine();

  protected:

    MESH3* prevMesh;

    Allocator<TET3TR> tetTrAlloc;

    virtual TET3* getTET3() 	        { return tetTrAlloc.Get(); }
    virtual void  returnTET3(TET3* tet) { tetTrAlloc.Return((TET3TR*) tet); }

    int MemSpace();
};

#endif
