Commit f0cad67b authored by Alexander Nikolas Breuer's avatar Alexander Nikolas Breuer
Browse files

Updated 2D seismic convergence benchmark using plane waves.

parent 16501211
Configs for the 2D Plane Waves Setups
=====================================
Used commands:
.. code-block:: bash
./gen_configs.js
......@@ -5,6 +5,7 @@
* @author Alexander Breuer (breuer AT mytum.de)
*
* @section LICENSE
* Copyright (c) 2021, Friedrich Schiller University Jena
* Copyright (c) 2019, Alexander Breuer
* All rights reserved.
*
......@@ -28,7 +29,7 @@ var l_fs = require('fs-extra');
// minimum edge lengths
var l_cls = [25, 20, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
var l_base = ['lts', 'gts_on_lts', 'gts'];
var l_base = ['lts', 'gts'];
var l_parts = [1, 13];
for( var l_cl = 0; l_cl < l_cls.length; l_cl++ ) {
......@@ -36,21 +37,10 @@ for( var l_cl = 0; l_cl < l_cls.length; l_cl++ ) {
for( var l_pa = 0; l_pa < l_parts.length; l_pa++ ) {
console.log( 'generating config for char length / type / part:', l_cls[l_cl], '/', l_base[l_ty], '/', l_parts[l_pa] );
var l_meshBase = 'meshes/gen/ascii/' + l_base[l_ty] + '_' + l_cls[l_cl];
var l_meshBase = 'meshes/gen/edge_v/' + l_base[l_ty] + '_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa];
var l_meshExt = '.msh';
var l_config = 'gen/' + l_base[l_ty] + '_cl_' + l_cls[l_cl] + '_pa_1.xml';
if( l_base[l_ty] == 'lts' ) {
l_meshBase = 'meshes/gen/hdf5/' + l_base[l_ty] + '_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa];
l_meshExt = '.h5m';
l_config = 'gen/' + l_base[l_ty] + '_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa] + '.xml';
}
else if( l_base[l_ty] == 'gts_on_lts' ) {
l_meshBase = 'meshes/gen/ascii/lts_' + l_cls[l_cl];
if( l_parts[l_pa] != 1 ) continue;
}
else {
if( l_parts[l_pa] != 1 ) continue;
}
var l_config = 'gen/' + l_base[l_ty] + '_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa] + '.xml';
l_fs.outputFile(
l_config,
......
Meshes for the 2D Plane Waves Setups
====================================
Used commands:
.. code-block:: bash
./generate.sh
......@@ -5,6 +5,7 @@
@author Alexander Breuer (breuer AT mytum.de)
@section LICENSE
Copyright (c) 2021, Friedrich Schiller University Jena
Copyright (c) 2019, Alexander Breuer
All rights reserved.
......@@ -29,13 +30,10 @@
{%- endif %}
<files>
<in>{{i_meshIn}}</in>
<out>{{i_meshOut}}.h5m</out>
{%- if i_nParts > 1 %}
<out_by_partition>
<out>
<base>{{i_meshOut}}</base>
<extension>.h5m</extension>
</out_by_partition>
{%- endif %}
<extension>.msh</extension>
</out>
</files>
</mesh>
......
......@@ -5,6 +5,7 @@
* @author Alexander Breuer (breuer AT mytum.de)
*
* @section LICENSE
* Copyright (c) 2021, Friedrich Schiller University Jena
* Copyright (c) 2019, Alexander Breuer
* All rights reserved.
*
......@@ -48,22 +49,24 @@ for( var l_cl = 0; l_cl < l_cls.length; l_cl++ ) {
)
}
for( var l_ty = 0; l_ty < l_base.length; l_ty++ ) {
for( var l_pa = 0; l_pa < l_parts.length; l_pa++ ) {
console.log( 'generating EDGE-V config for char length / nParts:', l_cls[l_cl], '/', l_parts[l_pa] )
l_fs.outputFile(
'gen/configs/edge_v/lts_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa] + '.xml',
nunjucks.render(
'edge_v.njk', {
i_meshIn: 'gen/ascii/lts_' + l_cls[l_cl] + '.msh',
i_nParts: l_parts[l_pa],
i_meshOut: 'gen/hdf5/lts_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa],
i_statsOut: 'gen/stats/edge_v_' + l_cls[l_cl] + '.csv',
console.log( 'generating EDGE-V config for char length / nParts:', l_cls[l_cl], '/', l_parts[l_pa] )
l_fs.outputFile(
'gen/configs/edge_v/' + l_base[l_ty] + '_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa] + '.xml',
nunjucks.render(
'edge_v.njk', {
i_meshIn: 'gen/gmsh/' + l_base[l_ty] + '_' + l_cls[l_cl] + '.msh',
i_nParts: l_parts[l_pa],
i_meshOut: 'gen/edge_v/' + l_base[l_ty] + '_cl_' + l_cls[l_cl] + '_pa_' + l_parts[l_pa],
i_statsOut: 'gen/stats/edge_v_' + l_cls[l_cl] + '.csv',
}
),
function(l_err) {
if(l_err) return console.log( l_err );
}
),
function(l_err) {
if(l_err) return console.log( l_err );
}
)
)
}
}
}
console.log( 'done' )
......@@ -5,6 +5,7 @@
# @author Alexander Breuer (breuer AT mytum.de)
#
# @section LICENSE
# Copyright (c) 2021, Friedrich Schiller University Jena
# Copyright (c) 2019, Alexander Breuer
# All rights reserved.
#
......@@ -26,7 +27,7 @@ echo "gmsh-version:"
gmsh --version
rm -r gen 2> /dev/null
mkdir -p gen/ascii gen/hdf5 gen/logs
mkdir -p gen/gmsh gen/edge_v gen/logs
./gen_configs.js
......@@ -35,12 +36,12 @@ do
for l_ty in gts lts
do
echo "$(date) running gmsh char length ${l_cl} for type ${l_ty}"
gmsh -2 -format msh2 gen/configs/gmsh/${l_ty}_${l_cl}.geo -o gen/ascii/${l_ty}_${l_cl}.msh 2>&1 > gen/logs/${l_ty}_${l_cl}.msh.log
done
gmsh -2 -format msh2 gen/configs/gmsh/${l_ty}_${l_cl}.geo -o gen/gmsh/${l_ty}_${l_cl}.msh 2>&1 > gen/logs/${l_ty}_${l_cl}_gmsh.log
for l_pa in 1 13
do
echo "$(date) running EDGE-V for char length ${l_cl} for nParts ${l_pa}"
edge_v -x gen/configs/edge_v/lts_cl_${l_cl}_pa_${l_pa}.xml 2>&1 > gen/logs/lts_cl_${l_cl}_pa_${pa}.h5m.log
for l_pa in 1 13
do
echo "$(date) running EDGE-V for char length ${l_cl} for nParts ${l_pa}"
edge_v -x gen/configs/edge_v/${l_ty}_cl_${l_cl}_pa_${l_pa}.xml 2>&1 > gen/logs/${l_ty}_cl_${l_cl}_pa_${l_pa}_edge_v.log
done
done
done
../configs
\ No newline at end of file
../meshes
\ No newline at end of file
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (alex.breuer AT uni-jena.de)
#
# @section LICENSE
# Copyright (c) 2021, Friedrich Schiller University Jena
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Runs all 2D plane wave settings
##
help() {
cat << EOF
Usage: ${0##*/} [-h] [-e EDGE_PATH]
Runs all 2D plane wave settings.
-h This help message.
-e EDGE_PATH path to the EDGE-executable.
EOF
}
while getopts "he:" opt; do
case "$opt" in
h)
help
exit 0
;;
e)
EDGE_PATH=$OPTARG
;;
'?')
help >&2
exit 1
;;
esac
done
shift "$((OPTIND-1))"
if [[ ${EDGE_PATH:0:1} != "/" ]]
then
echo "Error patch is required or not absolute: ${EDGE_PATH}"
help >&2
exit 1
fi
mkdir logs
mkdir errors
for l_cl in 25 20 15 10 9 8 7 6 5 4 3 2 1
do
for l_ty in gts lts
do
for l_pa in 1 13
do
if [[ ${l_pa} == 1 ]]
then
echo "$(date) running EDGE for ${l_ty}, char length ${l_cl} and for nParts ${l_pa}"
${EDGE_PATH} -x configs/gen/${l_ty}_cl_${l_cl}_pa_${l_pa}.xml 2>&1 > logs/edge_${l_ty}_cl_${l_cl}_pa_${l_pa}.log
else
echo "$(date) running EDGE for ${l_ty}, char length ${l_cl} and for nParts ${l_pa}"
mpiexec --oversubscribe -n ${l_pa} ${EDGE_PATH} -x configs/gen/${l_ty}_cl_${l_cl}_pa_${l_pa}.xml 2>&1 > logs/edge_${l_ty}_cl_${l_cl}_pa_${l_pa}.log
fi
done
done
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment