|
|
v |
|
|
\ No newline at end of file |
|
|
## main.h
|
|
|
|
|
|
|
|
|
## main.cc
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]){
|
|
|
|
|
|
|
|
|
// init parameter object
|
|
|
DamageTestParam test_param;
|
|
|
//================================================================================================================================================================================================
|
|
|
//=Test case description ========= To be modified to create a new test case ======================================================================================================================
|
|
|
//================================================================================================================================================================================================
|
|
|
//
|
|
|
// init context object (driver of the test)
|
|
|
DamageTestContext<DamageTestMesh> driver(argc,argv,test_param);
|
|
|
xParseData & damageinfo = test_param.getDamParam();
|
|
|
|
|
|
// dimention of the beam
|
|
|
double distance_L = 0.6;
|
|
|
double distance_h = 0.15;
|
|
|
double xmid = distance_L/2.;
|
|
|
// extra parameter
|
|
|
double ouverture_damage= driver.getDamageOpening();
|
|
|
double lc = damageinfo.getDouble("lc");
|
|
|
double distance_a = ouverture_damage;
|
|
|
double distance_b = lc;
|
|
|
double distance_c = 0.01;
|
|
|
|
|
|
// filter for measuring displacement
|
|
|
double epsilon = 1.e-14;
|
|
|
xAcceptRangeXY filterF(xmid-distance_c/2.,xmid+distance_c/2.,distance_h+distance_c-epsilon,distance_h+distance_c+epsilon);
|
|
|
|
|
|
// set reference load factor correction and curve writer
|
|
|
double specimen_thickness = 0.1;
|
|
|
test_param.setRefLoadFactor(distance_c * specimen_thickness);
|
|
|
curveWriter effdep(filterF);
|
|
|
// test_param.setCurveWriter(effdep);
|
|
|
|
|
|
// ls in definition
|
|
|
xPointToDouble initial_crack=xOppositeP2Double(xSphere(mPoint(xmid , 0.,0.), ouverture_damage));
|
|
|
// xPointToDouble initial_crack=xOppositeP2Double(xGrownSegment(mPoint(xmid , 0.,0.), mPoint(xmid , distance_h/2.,0.) , lc*1.01));
|
|
|
|
|
|
test_param.setLsInDef(initial_crack);
|
|
|
|
|
|
// sensors definition
|
|
|
// 2 points on both side of the crack at the botom
|
|
|
mPoint point1(xmid-distance_a/2.,0.,0.);
|
|
|
mPoint point2(xmid+distance_a/2.,0.,0.);
|
|
|
std::map < int, Trellis_Util::mPoint > points;
|
|
|
points[0] = point1;
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
|