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

#ifndef TRIANG1TR_H
#define TRIANG1TR_H

#include "triang1.h"

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


class EDG1TR : public EDG1
{
  public:

    PATCH* partner;

    EDG1TR() { partner = 0; }
    virtual void reset() { partner = 0; EDG1::reset(); }

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


class MESH1Trans : public MESH1
{
  public:

    MESH1Trans(const char* inFileName, MESH1* prevMesh);

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

  protected:

    MESH1* prevMesh;

    Allocator<EDG1TR> edgTrAlloc;

    virtual EDG1* getEDG1() 	       { return edgTrAlloc.Get(); }
    virtual void  returnEDG1(EDG1* ed) { edgTrAlloc.Return((EDG1TR*) ed); }
};

#endif
