00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <iostream>
00023 #include <cmath>
00024
00025 #include "tensors/tensors.h"
00026 #include "tensors/tijtensor.h"
00027
00028 using Tensors::Tensor2;
00029 using Tensors::TijTensor;
00030 using namespace std;
00031
00032 int main(int argc, char **argv) try
00033 {
00034
00035 Tensor2 Sig; Sig = 10, 20, 30, sqrt(2.0), 2.0*sqrt(2.0), 3.0*sqrt(2);
00036
00037 REAL tn;
00038 REAL ts;
00039 REAL Is[3];
00040 REAL sqrt_rz;
00041 Tensor2 Tau;
00042 Tensor2 inv_Tau;
00043 Tensor2 a;
00044 Tensor2 t;
00045 Tensor2 dtn_ds;
00046 Tensor2 dts_ds;
00047 Tensor2 dts_dt;
00048
00049 TijTensor Tij(0.00001);
00050
00051 Tij.Derivs(Sig,
00052 tn,
00053 ts,
00054 Is,
00055 sqrt_rz,
00056 Tau,
00057 inv_Tau,
00058 a,
00059 t,
00060 dtn_ds,
00061 dts_ds,
00062 dts_dt);
00063
00064 cout << "Sig = " << Sig << endl;
00065 cout << "tn = " << tn << endl;
00066 cout << "ts = " << ts << endl;
00067 cout << "Is[0] = " << Is[0] << endl;
00068 cout << "Is[1] = " << Is[1] << endl;
00069 cout << "Is[2] = " << Is[2] << endl;
00070 cout << "sqrt_rz = " << sqrt_rz << endl;
00071 cout << "Tau = " << Tau << endl;
00072 cout << "inv_Tau = " << inv_Tau << endl;
00073 cout << "a = " << a << endl;
00074 cout << "t = " << t << endl;
00075 cout << "dtn_ds = " << dtn_ds << endl;
00076 cout << "dts_ds = " << dts_ds << endl;
00077 cout << "dts_dt = " << dts_dt << endl;
00078
00079 return 0;
00080 }
00081 catch (Exception * e)
00082 {
00083 e->Cout();
00084 if (e->IsFatal()) exit(1);
00085 delete e;
00086 }