00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "ExponentialMaterialLaw.hpp"
00030
00031 template<unsigned DIM>
00032 ExponentialMaterialLaw<DIM>::ExponentialMaterialLaw(double a, double b)
00033 {
00034 assert(DIM==2 || DIM ==3);
00035 if (a<0.0)
00036 {
00037 EXCEPTION("a must be positive");
00038 }
00039
00040 mA = a;
00041 mB = b;
00042 }
00043
00044 template<unsigned DIM>
00045 double ExponentialMaterialLaw<DIM>::GetA()
00046 {
00047 return mA;
00048 }
00049
00050 template<unsigned DIM>
00051 double ExponentialMaterialLaw<DIM>::GetB()
00052 {
00053 return mB;
00054 }
00055
00056 template<unsigned DIM>
00057 double ExponentialMaterialLaw<DIM>::Get_dW_dI1(double I1, double I2)
00058 {
00059 return mA * mB * exp(mB*(I1-DIM));
00060 }
00061
00062 template<unsigned DIM>
00063 double ExponentialMaterialLaw<DIM>::Get_dW_dI2(double I1, double I2)
00064 {
00065
00066
00067 #define COVERAGE_IGNORE
00068 assert(DIM==3);
00069 #undef COVERAGE_IGNORE
00070
00071 return 0.0;
00072 }
00073
00074 template<unsigned DIM>
00075 double ExponentialMaterialLaw<DIM>::Get_d2W_dI1(double I1, double I2)
00076 {
00077 return mA * mB * mB * exp(mB*(I1-DIM));
00078 }
00079
00080 template<unsigned DIM>
00081 double ExponentialMaterialLaw<DIM>::Get_d2W_dI2(double I1, double I2)
00082 {
00083
00084
00085 #define COVERAGE_IGNORE
00086 assert(DIM==3);
00087 #undef COVERAGE_IGNORE
00088
00089 return 0.0;
00090 }
00091
00092 template<unsigned DIM>
00093 double ExponentialMaterialLaw<DIM>::Get_d2W_dI1I2(double I1, double I2)
00094 {
00095
00096
00097 #define COVERAGE_IGNORE
00098 assert(DIM==3);
00099 #undef COVERAGE_IGNORE
00100
00101 return 0.0;
00102 }
00103
00105
00107
00108 template class ExponentialMaterialLaw<2>;
00109 template class ExponentialMaterialLaw<3>;