... | @@ -4,89 +4,56 @@ |
... | @@ -4,89 +4,56 @@ |
|
## main.cc
|
|
## main.cc
|
|
|
|
|
|
| **command**| **description**|
|
|
| **command**| **description**|
|
|
|:-------------------------------------------------------------|:-------------------------------|
|
|
|:--------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|
|
|
| ` int main(int argc, char *argv[]){
|
|
| ` int main(int argc, char *argv[]){ ` | main() |
|
|
|
|
| ` DamageTestParam test_param; ` | ... |
|
|
|
|
| ` init context object (driver of the test) `
|
|
|
|
| ` DamageTestContext<DamageTestMesh> driver(argc,argv,test_param); ` | ... |
|
|
// init parameter object
|
|
| ` xParseData & damageinfo = test_param.getDamParam(); ` | ... |
|
|
DamageTestParam test_param;
|
|
| `// dimention of the beam ` | ... |
|
|
//================================================================================================================================================================================================
|
|
| ` double distance_L = 0.6; ` | ... |
|
|
//=Test case description ========= To be modified to create a new test case ======================================================================================================================
|
|
| ` double distance_h = 0.15; ` | ... |
|
|
//================================================================================================================================================================================================
|
|
| `double xmid = distance_L/2.; ` | ... |
|
|
//
|
|
| `// extra parameter ` | ... |
|
|
// init context object (driver of the test)
|
|
| `double ouverture_damage= driver.getDamageOpening(); ` | ... |
|
|
DamageTestContext<DamageTestMesh> driver(argc,argv,test_param);
|
|
| `double lc = damageinfo.getDouble("lc"); ` | ... |
|
|
xParseData & damageinfo = test_param.getDamParam();
|
|
| `double distance_a = ouverture_damage; ` | ... |
|
|
|
|
| `double distance_b = lc; ` | ... |
|
|
// dimention of the beam
|
|
| `double distance_c = 0.01; ` | ... |
|
|
double distance_L = 0.6;
|
|
| `// filter for measuring displacement ` | ... |
|
|
double distance_h = 0.15;
|
|
| `double epsilon = 1.e-14; ` | ... |
|
|
double xmid = distance_L/2.;
|
|
| `xAcceptRangeXY filterF(xmid-distance_c/2.,xmid+distance_c/2.,distance_h+distance_c-epsilon,distance_h+distance_c+epsilon); ` | ... |
|
|
// extra parameter
|
|
| `// set reference load factor correction and curve writer ` | ... |
|
|
double ouverture_damage= driver.getDamageOpening();
|
|
| `double specimen_thickness = 0.1; ` | ... |
|
|
double lc = damageinfo.getDouble("lc");
|
|
| `test_param.setRefLoadFactor(distance_c * specimen_thickness); ` | ... |
|
|
double distance_a = ouverture_damage;
|
|
| `curveWriter effdep(filterF); ` | ... |
|
|
double distance_b = lc;
|
|
| `// test_param.setCurveWriter(effdep); ` | ... |
|
|
double distance_c = 0.01;
|
|
| ` // ls in definition ` | ... |
|
|
|
|
| ` xPointToDouble initial_crack=xOppositeP2Double(xSphere(mPoint(xmid , 0.,0.), ouverture_damage)); ` | ... |
|
|
// filter for measuring displacement
|
|
| `// xPointToDouble initial_crack=xOppositeP2Double(xGrownSegment(mPoint(xmid , 0.,0.), mPoint(xmid , distance_h/2.,0.) , lc*1.01)); ` | ...
|
|
double epsilon = 1.e-14;
|
|
| `test_param.setLsInDef(initial_crack); ` | ... |
|
|
xAcceptRangeXY filterF(xmid-distance_c/2.,xmid+distance_c/2.,distance_h+distance_c-epsilon,distance_h+distance_c+epsilon);
|
|
| ` // 2 points on both side of the crack at the botom ` | ... |
|
|
|
|
| ` mPoint point1(xmid-distance_a/2.,0.,0.); ` | ... |
|
|
// set reference load factor correction and curve writer
|
|
| ` mPoint point2(xmid+distance_a/2.,0.,0.); ` | ... |
|
|
double specimen_thickness = 0.1;
|
|
| ` std::map < int, Trellis_Util::mPoint > points; ` | ... |
|
|
test_param.setRefLoadFactor(distance_c * specimen_thickness);
|
|
| ` points[0] = point1; ` | ... |
|
|
curveWriter effdep(filterF);
|
|
| ` points[1] = point2; ` | ... |
|
|
// test_param.setCurveWriter(effdep);
|
|
| ` xeExportSensors sensors(0, points); ` | ... |
|
|
|
|
| ` // test_param.setSensors(sensors); ` | ... |
|
|
// ls in definition
|
|
| | ... |
|
|
xPointToDouble initial_crack=xOppositeP2Double(xSphere(mPoint(xmid , 0.,0.), ouverture_damage));
|
|
| ` double young_modulus = 0.; ` | ... |
|
|
// xPointToDouble initial_crack=xOppositeP2Double(xGrownSegment(mPoint(xmid , 0.,0.), mPoint(xmid , distance_h/2.,0.) , lc*1.01));
|
|
| ` double poisson = 0.; ` | ... |
|
|
|
|
| ` readYoungPoisson("data/matrix.mat", young_modulus, poisson); `
|
|
test_param.setLsInDef(initial_crack);
|
|
| ` // evals young and Yc ` | ... |
|
|
|
|
| ` xEvalConstant < double > eval_Yc(damageinfo.getDouble("Yc")); ` | ... |
|
|
// sensors definition
|
|
| ` xEvalYoungModulus eval_young(young_modulus); ` | ... |
|
|
// 2 points on both side of the crack at the botom
|
|
| ` xEvalConstant < double > eval_poisson(poisson); ` | ... |
|
|
mPoint point1(xmid-distance_a/2.,0.,0.);
|
|
| ` test_param.setCaractEval(eval_young,eval_poisson,eval_Yc); | ... |
|
|
mPoint point2(xmid+distance_a/2.,0.,0.);
|
|
| ` driver.init_test(); ` | ... | | ... |
|
|
std::map < int, Trellis_Util::mPoint > points;
|
|
| `driver.run_test(); ` | ... |
|
|
points[0] = point1;
|
|
| `driver.end_test(); `
|
|
points[1] = point2;
|
|
|
|
xeExportSensors sensors(0, points);
|
|
|
|
// test_param.setSensors(sensors);
|
|
| } | ... |
|
|
|
|
|
|
// reading young modulus and poisson
|
|
|
|
double young_modulus = 0.;
|
|
|
|
double poisson = 0.;
|
|
|
|
readYoungPoisson("data/matrix.mat", young_modulus, poisson);
|
|
|
|
// evals young and Yc
|
|
|
|
xEvalConstant < double > eval_Yc(damageinfo.getDouble("Yc"));
|
|
|
|
xEvalYoungModulus eval_young(young_modulus);
|
|
|
|
xEvalConstant < double > eval_poisson(poisson);
|
|
|
|
test_param.setCaractEval(eval_young,eval_poisson,eval_Yc);
|
|
|
|
|
|
|
|
//================================================================================================================================================================================================
|
|
|
|
//=End test case description =====================================================================================================================================================================
|
|
|
|
//================================================================================================================================================================================================
|
|
|
|
//
|
|
|
|
// init test
|
|
|
|
driver.init_test();
|
|
|
|
|
|
|
|
// run test
|
|
|
|
driver.run_test();
|
|
|
|
|
|
|
|
// end test
|
|
|
|
driver.end_test();
|
|
|
|
#ifdef DAMAGE_BAND_PARA
|
|
|
|
}
|
|
|
|
return( mpi_instance->finalize());
|
|
|
|
#else
|
|
|
|
return 0;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
`
|
|
|
|
| ... |
|
|
|
|
|
|
|
|
|
|
|