First time here? Checkout the FAQ!
x
0 votes
by (200 points)
The case in which we want to generate a block with no thickness (size[2] = 0) the mesher fails in writing the header of the .lon file.

The error is in mesher.cc in the function Grid2D::build_mesh.

The solution might be to add these lines:

num_axes = f_def.withSheets()?2:1;

lon_os << num_axes << std::endl;

E.g. to reproduce error:

mesher   -size[0] 1.0   -size[1] 1.0   -size[2] 0.0   -bath[0] -0.0   -bath[1] -0.0   -bath[2] -0.0   -center[0] 0.5   -center[1] 0.5   -center[2] 0.0   -resolution[0] 300.0   -resolution[1] 300.0   -resolution[2] 300.0   -mesh meshes/2021-02-23_HglGPzWkBu/block   -Elem3D 0   -fibers.rotEndo 0.0   -fibers.rotEpi 0.0   -fibers.sheetEndo 90.0   -fibers.sheetEpi 90.0   -periodic 0   -periodic_tag 1234

Output:

1 0 0

1 0 0

...

1 Answer

0 votes
by (8.1k points)
This has a historic background. Older CARPentry versions would deal with .lon files without headers as well. We opted to keep format variations minimal in openCARP. Thanks for fixing the bug yourself :)  !
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], config: ["MMLorHTML.js"], jax: ["input/TeX"], processEscapes: true } }); MathJax.Hub.Config({ "HTML-CSS": { linebreaks: { automatic: true } } });
...