//#####################################################################
// Copyright 2003-2007, Ron Fedkiw, Geoffrey Irving, Igor Neverov, Eftychios Sifakis, Joseph Teran.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
// Class ANISOTROPIC_CONSTITUTIVE_MODEL
//##################################################################### 
#ifndef __ANISOTROPIC_CONSTITUTIVE_MODEL__
#define __ANISOTROPIC_CONSTITUTIVE_MODEL__

#include <Deformables/Constitutive_Models/CONSTITUTIVE_MODEL.h>
namespace PhysBAM{

template<class T,int d> class DIAGONALIZED_STRESS_DERIVATIVE;
template<class T,int d>
class ANISOTROPIC_CONSTITUTIVE_MODEL:public CONSTITUTIVE_MODEL<T,d>
{
    typedef VECTOR<T,d> TV;
public:
    bool use_isotropic_component_of_stress_derivative_only;

    ANISOTROPIC_CONSTITUTIVE_MODEL();
    virtual ~ANISOTROPIC_CONSTITUTIVE_MODEL();

//#####################################################################
    virtual MATRIX<T,d> dP_From_dF(const MATRIX<T,d>& dF,const DIAGONAL_MATRIX<T,d>& F,const MATRIX<T,d>& V,const DIAGONALIZED_ISOTROPIC_STRESS_DERIVATIVE<TV>& dPi_dF,
        const int id) const;
    virtual MATRIX<T,d> dP_From_dF(const MATRIX<T,d>& dF,const DIAGONAL_MATRIX<T,d>& F,const MATRIX<T,d>& V,const DIAGONALIZED_STRESS_DERIVATIVE<T,d>& dP_dF,
        const int id) const;
    virtual MATRIX<T,d> P_From_Strain(const DIAGONAL_MATRIX<T,d>& F,const MATRIX<T,d>& V,const int id) const=0;
    virtual void Stress_Derivative(const DIAGONAL_MATRIX<T,d>& F,const MATRIX<T,d>& V,DIAGONALIZED_STRESS_DERIVATIVE<T,d>& dP_dF,const int id) const=0;
//#####################################################################
};
}
#endif
