Add PUMLcube#49
Conversation
sebwolf-de
left a comment
There was a problem hiding this comment.
Hi,
good work! From a user perspective: I don't understand how the bmin/bmax and the bper interact: Why can't I just provide bmaxx = bminx = periodic? And throw an error if bmaxx=periodic bminx != periodic?
Also an xdmf file would be nice to visualize the mesh with paraview.
* add a slim Xdmf and XML writer * add HDF5 error checking functions * update boundary format info
|
Sorry for the very late update; I've finally gotten to addressing the review. |
gabriellemhobson
left a comment
There was a problem hiding this comment.
Hi, I have tested these changes on supermucNG and they appear to me to be working as expected. I tested using Examples/convergence_elastic:
- I modified
static_files/generateCubes.shto callMeshing/pumlcube/pumlcubeto create the meshes, using a call like so:
~/Meshing/pumlcube/pumlcube --bminx 6 --bmaxx 6 --bminy 6 --bmaxy 6 --bminz 6 --bmaxz 6 -x 4 -y 4 -z 4 -o cube_4.puml.h5 --sx $S --sy $S --sz $S --tx -1 --ty -1 --tz -1 - I modified the
elastic_convergence_runner/template/parameters.tmplso that it does not use the built-in CubeGenerator, but instead uses the created mesh files:
&MeshNml meshgenerator = 'PUML' meshfile = 'static_files/cube_{{ size }}.puml.h5' - I ran like so:
PYTHONPATH=$PWD python3 \
./elastic_convergence_runner \
--executable ../../seissol_install_manual/SeisSol/build/SeisSol_Release_dhsw_6_elastic \
--tmp-dir tmp_new \
--sizes 4 8 16 \
--expected-errors 1e-2 1e-4 5e-5 \
--norm-type LInf \
--end-time 0.1
And obtained the following output:
num_nodes: 1 ntasks: 1
sizes errors
0 4 9.235550e-04
1 8 1.917230e-05
2 16 3.123120e-07
If that test seems reasonable and looks as expected, then I think this is all good on my end.
|
Thanks for the review. IMO maybe it's worth upstreaming these changes to the SeisSol/Examples repo for now as well. Reason being (despite the "internal" cube generator maybe being more convenient in the long run): it currently doesn't work e.g. for multiple ranks and it's code is pretty convoluted to be honest (i.e. overly convoluted). |
This PR adds PUMLcube, a replica of
cube_cfor the PUML format, as used by PUML2. With maybe a slightly different tetrahedron decomposition for the cubes.And no, it does not make PUML2 support periodic boundary conditions automatically. :)It only adds an
identifydataset to the HDF5 file. That is, periodic boundary conditions are implemented by identifying vertices with each other, i.e. we group the connectivity of the vertices, but they still have different coordinates. The identify array then lets all grouped vertices point to one head vertex by ID (and the head vertex points to itself). Of course, each unique (non-grouped) vertex is its own head vertex.Coincidentally, that's sort of the same idea like the gmsh format also supports (in the
$Periodicsection).However, for all of this to work, we'll need to extend PUML2 still. Somehow. We'll see.SeisSol/SeisSol#1395 adds support to PUML2 and SeisSol.