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

#ifndef INTB_H
#define INTB_H

#include "intA.h"

class MLMatrix;
class NodeCoordinates;

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


// --			single-grid interface


class SGInt : virtual public Interface
{
  public:

    SGInt() { }
    virtual void updateLevel0(Vector<Num>& u);
    virtual void refine(Vector<Num>& u);
};
//-------------------------------------------------------------------------


// --			multi-grid interface

class MGInt : virtual public SGInt
{
  public:

    MGInt();
    virtual void refine(Vector<Num>& u);
};
//-------------------------------------------------------------------------


// --			multi-level interface

class MLInt : virtual public Interface
{

  public:

    MLInt();
    virtual void updateLevel0(Vector<Num>& u);
    virtual void refine(Vector<Num>& u);

  protected:

    Stack<MLMatrix*>    Al;
    int			maxDepth, maxDepthM1;
    Bool		localSmooth, localTop;
    int			localExtend;

    enum                { targetDepth = 10 };	    // default node-stack-size

    virtual void removeGreenNodes() { } 	// !!!
    virtual void setDirichletFlags();
    virtual void setSmoothingFlags();
    virtual void extendLocalSmoothingPattern();
};
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------


class LinElemSG : virtual public LinElemInt, virtual public SGInt
{
  public:

    LinElemSG(MESH* mesh, const Element* element, DirichletBCs* dirichletBCs, 
	      LinSystem* Ab, Preconditioner* precond, int spaceDim, int nComp);
};
//-------------------------------------------------------------------------


class LinElemML : virtual public LinElemInt, virtual public MLInt
{
  public:

    LinElemML(MESH* mesh, const Element* element, DirichletBCs* dirichletBCs,
	      LinSystem* Ab, Preconditioner* precond, int spaceDim, int nComp);
};
//-------------------------------------------------------------------------


class LinElemMG : virtual public LinElemInt, virtual public MGInt
{
  public:

    LinElemMG(MESH* mesh, const Element* element, DirichletBCs* dirichletBCs, 
	      LinSystem* Ab, Preconditioner* precond, int spaceDim, int nComp);
};
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------


class LQuadElemSG : virtual public LQuadElemInt, virtual public SGInt
{
  public:

    LQuadElemSG(MESH* mesh, const Element* element, DirichletBCs* dirichletBCs, 
		LinSystem* Ab, Preconditioner* precond, int spaceDim, int nComp);
};
//-------------------------------------------------------------------------


class HQuadElemSG : virtual public HQuadElemInt, virtual public SGInt
{
  public:

    HQuadElemSG(MESH* mesh, const Element* element, DirichletBCs* dirichletBCs,
		LinSystem* Ab, Preconditioner* precond, int spaceDim, int nComp);
};
//-------------------------------------------------------------------------


class EFTetraSG : virtual public EFTetraInt, virtual public SGInt
{
  public:

    EFTetraSG(MESH* mesh, const Element* element, DirichletBCs* dirichletBCs,
	      LinSystem* Ab, Preconditioner* precond, int spaceDim, int nComp);
};

#endif
