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

#ifndef DIRICHLETA_H
#define DIRICHLETA_H

#include "dirichlet.h"

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

// 	piecewise constant Dirichlet BCs, identifiers and values are read
//	from .mat - file


class ConstDirichletBCs : public DirichletBCs
{
  public:

    ConstDirichletBCs(char* fileName);
    virtual Bool constant() const { return True; }
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);

  protected:

    Vector<float> inputValues;

    void readValues(const char* fileName);
};
//-------------------------------------------------------------------------

class ConstMCDirichletBCs : public ConstDirichletBCs
{
  public:    
    ConstMCDirichletBCs(char* fileName) :  ConstDirichletBCs(fileName) { }
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);
};
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------


class VarDirichletBCs : public DirichletBCs
{
  public:

    VarDirichletBCs();
    virtual Bool constant() const { return False; }
};
//-------------------------------------------------------------------------


class LinDirichletBCs : public VarDirichletBCs
{
  public:

    LinDirichletBCs();
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);
};

class UserDirichletBCs : public VarDirichletBCs
{
  public:

    UserDirichletBCs();
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);

  protected:

    virtual Real userBC1d(Real x);
    virtual Real userBC2d(Real x, Real y);
    virtual Real userBC3d(Real x, Real y, Real z);
};
//-------------------------------------------------------------------------

class CylDirichletBCs : public UserDirichletBCs
{
  public:

    CylDirichletBCs();
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);

  protected:

    virtual Real userBC1d(Real x);
    virtual Real userBC2d(Real x, Real y);
    virtual Real userBC3d(Real x, Real y, Real z);
};

class QuadDirichletBCs : public VarDirichletBCs
{
  public:

    QuadDirichletBCs();
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);
};
//-------------------------------------------------------------------------


class RootOfRBCs : public VarDirichletBCs
{
  public:

    RootOfRBCs();
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);
};
//-------------------------------------------------------------------------

class LayerBCs : public VarDirichletBCs
{
  public:

    LayerBCs();
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);
};

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

class SlitBCs : public VarDirichletBCs
{
  public:

    SlitBCs();
    virtual void setBC(int node, int id, Vector<Real>& x, int comp, Real time);
};

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

#endif

