... | ... | @@ -5,27 +5,17 @@ |
|
|
|
|
|
| **command**| **description**|
|
|
|
|:--------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|
|
|
|
| ` int main(int argc, char *argv[]){ ` | main function |
|
|
|
| `DamageTestParam test_param; ` | ... |
|
|
|
| `init context object (driver of the test) ` | ... |
|
|
|
| `DamageTestContext<DamageTestMesh> driver(argc,argv,test_param); ` | ... |
|
|
|
| `xParseData & damageinfo = test_param.getDamParam(); ` | ... |
|
|
|
| ` 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); ` | ... |
|
|
|
| ` int main(int argc, char *argv[]){ ` | main function. |
|
|
|
| `DamageTestParam test_param; ` | a object to dispatch parameters. |
|
|
|
| `DamageTestContext<DamageTestMesh> driver(argc,argv,test_param); ` | a object to drive the TLS problem. |
|
|
|
| `xParseData & damageinfo = test_param.getDamParam(); ` | parse the file *damageinfo.dat * . |
|
|
|
| ` double distance_L = 0.6; ` | some geometrical parameters (dimension of the model) that can not be evaluated easily automatically. |
|
|
|
`double ouverture_damage= driver.getDamageOpening(); ` | an initial opening must be evaluated, even if the part is virgin. |
|
|
|
| `double lc = damageinfo.getDouble("lc"); ` | return a parameter read by the parser. |
|
|
|
| (...) | ... |
|
|
|
| `xAcceptRangeXY filterF(xmid-distance_c/2.,xmid+distance_c/2.,distance_h+distance_c-epsilon,distance_h+distance_c+epsilon); ` | create a filter to evaluate a mean displacement on a physical zone (given to `curveWriter` below. |
|
|
|
| `test_param.setRefLoadFactor(distance_c * specimen_thickness); ` | resize the reference load factor, here for 2D problem : pressure has to be converted to force. |
|
|
|
| `curveWriter effdep(filterF); ` | declaration of an output curve: the definition is given in the *main.h*. |
|
|
|
| `// test_param.setCurveWriter(effdep); ` | ... |
|
|
|
| ` // ls in definition ` | ... |
|
|
|
| ` xPointToDouble initial_crack=xOppositeP2Double(xSphere(mPoint(xmid , 0.,0.), ouverture_damage)); ` | ... |
|
... | ... | |