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

#ifndef PROBLEM2_H
#define PROBLEM2_H

#include "problemstat.h"
#include "problemtr.h"
#include "problemnl.h"

class MESH;
class MESH2;

class Structure;
class Boxes;

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

   
class StaticHeatConduction2 : public StaticHeatConduction
{
  protected:

    MESH2* mesh;
    StaticHeatConduction2();

  public:

    StaticHeatConduction2(char* fileName);
    virtual ~StaticHeatConduction2();
  
    virtual MESH* Mesh() const;

    virtual void newMesh();
    virtual void newInterface();
    virtual void newErrorEstimator();
};
//-------------------------------------------------------------------------

   
class QuadStaticHeatConduction2 : public StaticHeatConduction2
{
  public:

    QuadStaticHeatConduction2(char* fileName);
  
    virtual void newInterface();
    virtual void newErrorEstimator();
};
//-------------------------------------------------------------------------


class SkinEquation : public Problem
{
  protected:

    MESH2* mesh;
    Real   omega;

  public:

    SkinEquation(char* fileName);
    virtual ~SkinEquation();
  
    virtual MESH* Mesh() const;

    virtual DirichletBCs* newDirichletBCs();
    virtual void newMaterial();
    virtual void newMesh();
    virtual void newInterface();
    virtual void newErrorEstimator();

    virtual void assemble(const Element& elem, const PATCH& t, 
			  const Jacobian& Jac, 
			  Matrix<Num>& A, Vector<Num>& b, 
			  const Matrix<Bool>* pattern,
			  Bool errorEstimator=False);

    void compEnergy(Vector<Num>& u, Real* eNorm, Num* fct);
};
//-------------------------------------------------------------------------


class TransientHeatConduction2 : public TransientHeatConduction
{
  protected:

    MESH2* mesh, *prevMesh;

    TransientHeatConduction2() : mesh(0), prevMesh(0) { }

  public:

    TransientHeatConduction2(char* fileName);
    virtual ~TransientHeatConduction2();

    virtual MESH* Mesh() const;
    virtual MESH* PrevMesh() const;

    virtual void shiftMesh();

    virtual void newMesh();
    virtual void newInterface();
    virtual void newErrorEstimator();
};
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------


class StaticNonLinearProblem2 : public StaticNonLinearProblem
{ 
  protected:

    MESH2* mesh;

  public:

    StaticNonLinearProblem2(char* fileName);
    virtual ~StaticNonLinearProblem2();
  
    virtual MESH* Mesh() const;

    virtual void newMesh();
    virtual void newInterface();
    virtual void newErrorEstimator();
};
//-------------------------------------------------------------------------


class TransientNonLinearProblem2 : public TransientNonLinearProblem
{ 
  protected:

    MESH2* mesh, *prevMesh;

  public:

    TransientNonLinearProblem2(char* fileName);
    virtual ~TransientNonLinearProblem2();
  
    virtual MESH* Mesh() const;
    virtual MESH* PrevMesh() const;
    virtual void shiftMesh();

    virtual void newMesh();
    virtual void newInterface();
    virtual void newErrorEstimator();
};
//-------------------------------------------------------------------------


// --  	      test example for multi-component field (MC)


class MCStaticHeatConduction2 : public StaticHeatConduction2
{
  protected:

    MCStaticHeatConduction2() { }   

  public:

    MCStaticHeatConduction2(char* fileName);
    virtual ~MCStaticHeatConduction2() { }

    virtual void newInterface();
    virtual void newErrorEstimator();
};
//-------------------------------------------------------------------------


// --  	      test example for multi-component field (MC)


class MCTransientHeatConduction2 : public TransientHeatConduction2
{
  protected:

    MCTransientHeatConduction2() { }

  public:

    MCTransientHeatConduction2(char* fileName);
    virtual ~MCTransientHeatConduction2() { }

    virtual void newInterface();
    virtual void newErrorEstimator();
};

#endif
