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 "MooneyRivlinMaterialLaw.hpp"
00030
00031 template<unsigned DIM>
00032 double MooneyRivlinMaterialLaw<DIM>::Get_dW_dI1(double I1, double I2)
00033 {
00034 return mC1;
00035 }
00036
00037 template<unsigned DIM>
00038 double MooneyRivlinMaterialLaw<DIM>::Get_dW_dI2(double I1, double I2)
00039 {
00040
00041
00042 #define COVERAGE_IGNORE
00043 assert(DIM==3);
00044 #undef COVERAGE_IGNORE
00045 return mC2;
00046 }
00047
00048 template<unsigned DIM>
00049 double MooneyRivlinMaterialLaw<DIM>::Get_d2W_dI1(double I1, double I2)
00050 {
00051 return 0.0;
00052 }
00053
00054 template<unsigned DIM>
00055 double MooneyRivlinMaterialLaw<DIM>::Get_d2W_dI2(double I1, double I2)
00056 {
00057
00058
00059 #define COVERAGE_IGNORE
00060 assert(DIM==3);
00061 #undef COVERAGE_IGNORE
00062 return 0.0;
00063 }
00064
00065 template<unsigned DIM>
00066 double MooneyRivlinMaterialLaw<DIM>::Get_d2W_dI1I2(double I1, double I2)
00067 {
00068
00069
00070 #define COVERAGE_IGNORE
00071 assert(DIM==3);
00072 #undef COVERAGE_IGNORE
00073 return 0.0;
00074 }
00075
00076 template<unsigned DIM>
00077 double MooneyRivlinMaterialLaw<DIM>::GetC1()
00078 {
00079 return mC1;
00080 }
00081
00082 template<unsigned DIM>
00083 double MooneyRivlinMaterialLaw<DIM>::GetC2()
00084 {
00085 assert(DIM==3);
00086 return mC2;
00087 }
00088
00089 template<unsigned DIM>
00090 MooneyRivlinMaterialLaw<DIM>::MooneyRivlinMaterialLaw(double c1, double c2)
00091 {
00092 assert(DIM==2 || DIM ==3);
00093
00094
00095 if ((DIM==3) && (c2<MINUS_LARGE+1))
00096 {
00097 EXCEPTION("Two parameters needed for 3d Mooney-Rivlin");
00098 }
00099
00100 if (c1 < 0.0)
00101 {
00102 EXCEPTION("c1 must be positive in mooney-rivlin");
00103 }
00104
00105 mC1 = c1;
00106 mC2 = c2;
00107 }
00108
00109 template<unsigned DIM>
00110 void MooneyRivlinMaterialLaw<DIM>::ScaleMaterialParameters(double scaleFactor)
00111 {
00112 assert(scaleFactor > 0.0);
00113 mC1 /= scaleFactor;
00114 mC2 /= scaleFactor;
00115 }
00116
00117
00119
00121
00122 template class MooneyRivlinMaterialLaw<2>;
00123 template class MooneyRivlinMaterialLaw<3>;