#ifndef BIOPROBLEM_H
#define BIOPROBLEM_H

#include <dolfin.h>
#include "TissueParameters.h"

using namespace dolfin;

#warning "put in common defs"
typedef std::vector<std::pair<SubDomain*,Function*> > DirichletBCList;

class BioProblem
{
public:
    BioProblem(
            Mesh& mesh,
            std::vector<SubDomain*> subdomains,
            Function* velocity,
            Function* Phi,
            Function* TInitial,
            DirichletBCList dirichletBcs,
            TissueParameters& tissueParameters
            ) :
        mesh(mesh),
        subdomains(subdomains),
        velocity(velocity),
        Phi(Phi),
        TInitial(TInitial),
        dirichletBcs(dirichletBcs)
    {
        density_t = new Function(mesh,tissueParameters.getDensity());
        specificHeat0_t = new Function(mesh,tissueParameters.getSpecificHeat0());
        specificHeat1_t = new Function(mesh,tissueParameters.getSpecificHeat1());
        kappa0_t = new Function(mesh,tissueParameters.getKappa0());
        kappa1_t = new Function(mesh,tissueParameters.getKappa1());
        sigma0_t = new Function(mesh,tissueParameters.getSigma0());
        sigma1_t = new Function(mesh,tissueParameters.getSigma1());
    };

    virtual ~BioProblem ()
    {
        delete density_t;
        delete specificHeat0_t;
        delete specificHeat1_t;
        delete kappa0_t;
        delete kappa1_t;
        delete sigma0_t;
        delete sigma1_t;
    };

    Mesh& getMesh() const {return mesh;}
    std::vector<SubDomain*> getSubdomains() const {return subdomains;}
    DirichletBCList getDirichletBCs() const {return dirichletBcs;}
    Function* getVelocity() const {return velocity;}
    Function* getPhi() const {return Phi;};
    Function* getTInitial() const {return TInitial;}
    Function* getTissueSigma0() const {return sigma0_t;}
    Function* getTissueSigma1() const {return sigma1_t;}
    Function* getTissueKappa0() const {return kappa0_t;}
    Function* getTissueKappa1() const {return kappa1_t;}
    Function* getTissueSpecificHeat0() const {return specificHeat0_t;}
    Function* getTissueSpecificHeat1() const {return specificHeat1_t;}
    Function* getTissueDensity() const {return density_t;}

private:
    Mesh& mesh;
    std::vector<SubDomain*> subdomains;
    Function* velocity;
    Function* Phi;
    Function* TInitial;
    Function* density_t;
    Function* specificHeat0_t;
    Function* specificHeat1_t;
    Function* kappa0_t;
    Function* kappa1_t;
    Function* sigma0_t;
    Function* sigma1_t;
    DirichletBCList dirichletBcs;
};


#endif /* end of include guard: BIOPROBLEM_H */
