Commit f9edaa23 authored by Alex Breuer's avatar Alex Breuer

Added input and output for 3D Gaussian Hill test case.

parent 3e847b86
......@@ -77,3 +77,6 @@
# bz2 archives
*.tar.bz2 filter=lfs diff=lfs merge=lfs -text
# xz archives
*.tar.xz filter=lfs diff=lfs merge=lfs -text
# 3D Gaussian Hill test case
This directory contains input and output for a three-dimensional test case with a Gaussian hill as topography.
The synthetic topography was sampled first and then meshed through EDGEcut as any other digital elevation model.
The velocity is homogeneous.
The sources is a double-couple point source (Ricker) at the origin.
* Contact: Alex Breuer
<?xml version="1.0" encoding="UTF-8"?>
<!--
@file This file is part of EDGE.
@author Alexander Breuer (breuer AT mytum.de)
@section LICENSE
Copyright (c) 2019, Alexander Breuer
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
EDGE configuration for the Gaussian Hill test case.
-->
<edge>
<cfr>
<mesh>
<files>
<in>meshes/gen/ghill.msh</in>
</files>
<options>
<!-- no read options: single MPI rank, ASCII input -->
<read>;</read>
</options>
<boundary>
<free_surface>101</free_surface>
<outflow>105</outflow>
</boundary>
</mesh>
<velocity_model>
<!-- homogeneous velocity model -->
<domain>
<half_space>
<origin>
<x>0</x>
<y>0</y>
<z>9999</z>
</origin>
<normal>
<x>0</x>
<y>0</y>
<z>-1</z>
</normal>
</half_space>
<!-- converted from: vp: 6km/s, vs: 3.5km/s, rho: 2.5g/cm3 -->
<rho>2500</rho>
<lambda>2.875E10</lambda>
<mu>3.0625E10</mu>
</domain>
</velocity_model>
<setups>
<point_sources>
<file>sources/ricker.h5</file>
</point_sources>
<end_time>5.0</end_time>
</setups>
<output>
<!-- 20Hz sampling at 5x5 grid at the surface -->
<receivers>
<path_to_dir>ghill</path_to_dir>
<freq>0.05</freq>
<receiver>
<name>recv_-2000_-2000</name>
<coords>
<x>-2000</x>
<y>-2000</y>
<z>0.335462627903</z>
</coords>
</receiver>
<receiver>
<name>recv_-1000_-2000</name>
<coords>
<x>-1000</x>
<y>-2000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_0_-2000</name>
<coords>
<x>0</x>
<y>-2000</y>
<z>18.3156388887</z>
</coords>
</receiver>
<receiver>
<name>recv_1000_-2000</name>
<coords>
<x>1000</x>
<y>-2000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_2000_-2000</name>
<coords>
<x>2000</x>
<y>-2000</y>
<z>0.335462627903</z>
</coords>
</receiver>
<receiver>
<name>recv_-2000_-1000</name>
<coords>
<x>-2000</x>
<y>-1000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_-1000_-1000</name>
<coords>
<x>-1000</x>
<y>-1000</y>
<z>135.335283237</z>
</coords>
</receiver>
<receiver>
<name>recv_0_-1000</name>
<coords>
<x>0</x>
<y>-1000</y>
<z>367.879441171</z>
</coords>
</receiver>
<receiver>
<name>recv_1000_-1000</name>
<coords>
<x>1000</x>
<y>-1000</y>
<z>135.335283237</z>
</coords>
</receiver>
<receiver>
<name>recv_2000_-1000</name>
<coords>
<x>2000</x>
<y>-1000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_-2000_0</name>
<coords>
<x>-2000</x>
<y>0</y>
<z>18.3156388887</z>
</coords>
</receiver>
<receiver>
<name>recv_-1000_0</name>
<coords>
<x>-1000</x>
<y>0</y>
<z>367.879441171</z>
</coords>
</receiver>
<receiver>
<name>recv_0_0</name>
<coords>
<x>0</x>
<y>0</y>
<z>1000.0</z>
</coords>
</receiver>
<receiver>
<name>recv_1000_0</name>
<coords>
<x>1000</x>
<y>0</y>
<z>367.879441171</z>
</coords>
</receiver>
<receiver>
<name>recv_2000_0</name>
<coords>
<x>2000</x>
<y>0</y>
<z>18.3156388887</z>
</coords>
</receiver>
<receiver>
<name>recv_-2000_1000</name>
<coords>
<x>-2000</x>
<y>1000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_-1000_1000</name>
<coords>
<x>-1000</x>
<y>1000</y>
<z>135.335283237</z>
</coords>
</receiver>
<receiver>
<name>recv_0_1000</name>
<coords>
<x>0</x>
<y>1000</y>
<z>367.879441171</z>
</coords>
</receiver>
<receiver>
<name>recv_1000_1000</name>
<coords>
<x>1000</x>
<y>1000</y>
<z>135.335283237</z>
</coords>
</receiver>
<receiver>
<name>recv_2000_1000</name>
<coords>
<x>2000</x>
<y>1000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_-2000_2000</name>
<coords>
<x>-2000</x>
<y>2000</y>
<z>0.335462627903</z>
</coords>
</receiver>
<receiver>
<name>recv_-1000_2000</name>
<coords>
<x>-1000</x>
<y>2000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_0_2000</name>
<coords>
<x>0</x>
<y>2000</y>
<z>18.3156388887</z>
</coords>
</receiver>
<receiver>
<name>recv_1000_2000</name>
<coords>
<x>1000</x>
<y>2000</y>
<z>6.73794699909</z>
</coords>
</receiver>
<receiver>
<name>recv_2000_2000</name>
<coords>
<x>2000</x>
<y>2000</y>
<z>0.335462627903</z>
</coords>
</receiver>
</receivers>
<!-- plot wave field at the free surface -->
<wave_field>
<type>vtk_binary</type>
<file>ghill/wf</file>
<sparse_type>101</sparse_type>
<int>0.25</int>
</wave_field>
</output>
</cfr>
</edge>
\ No newline at end of file
# Meshes for the Gaussian Hill Test Case
This directory contains the meshes for the Gaussian Hill test case.
The Gaussian Hill is symmetric with an elevation of 1000m.
EDGEcut version: a56de1218c2db47ee9fe31b43702e7d26313f472
## Used Commands
```
bash generate.sh 2>&1 | tee generate.sh.log
```
* Contact: Alex Breuer
\ No newline at end of file
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (breuer AT mytum.de)
#
# @section LICENSE
# Copyright (c) 2019, Alexander Breuer
# 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
# Generates synthetic, space-separated topo files for the Gaussian Hill test case.
##
import math
import numpy as np
import argparse
def ghill( i_a, i_x, i_y ):
l_x2 = i_x * i_x
l_y2 = i_y * i_y
l_a2Inv = 1.0 / ( i_a * i_a )
return i_a * math.exp( -l_x2*l_a2Inv - l_y2*l_a2Inv )
l_parser = argparse.ArgumentParser(description='Generates the synthetic topography data.')
l_parser.add_argument( '--bnd',
type = float,
required = True,
help = 'x-y-boundaries of the topo-domain, will span [ -bnd, bnd ]x[ -bnd, bnd ].')
l_parser.add_argument( '--npts',
type = int,
required = True,
help = 'number of sampling points per dimension.')
l_parser.add_argument( '--out',
type = str,
required = True,
help = 'path of the out-file to which the space-separated topo-data is written. will be overwritten if it exists.')
l_args = l_parser.parse_args()
print( 'generating synthetic topo' )
print( 'bnd: ' + str( l_args.bnd ) )
print( 'npts: ' + str( l_args.npts ) )
print( 'out: ' + str( l_args.out ) )
with open( l_args.out, 'w' ) as l_file:
for l_x in np.linspace( -l_args.bnd, l_args.bnd, l_args.npts ):
for l_y in np.linspace( -l_args.bnd, l_args.bnd, l_args.npts ):
l_z = ghill( 1000, l_x, l_y )
l_file.write( str(l_x) + ' ' + str(l_y) + ' ' + str( l_z ) + '\n' )
\ No newline at end of file
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (breuer AT mytum.de)
#
# @section LICENSE
# Copyright (c) 2019, Alexander Breuer
# 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
# Generates the meshes for the Gaussian Hill test case.
##
date
gmsh --version
mkdir gen
# create regular topo mesh (50m spacing)
python gen_topo.py --bnd 20000 --npts 801 --out gen/topo.xyz
# generate surface mesh
edge_cut surface.xml
# convert to STL
pipenv run pip install meshio
pipenv run meshio-convert gen/surf.off gen/surf.stl
pipenv run meshio-convert gen/outflow.off gen/outflow.stl
# generate the volume mesh
gmsh -3 volume.geo -format msh2 -o gen/ghill.msh
gmsh -3 gen/ghill.msh -o gen/ghill.vtk
date
\ No newline at end of file
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!--
@file This file is part of EDGE.
@author Alexander Breuer (breuer AT mytum.de)
@section LICENSE
Copyright (c) 2019, Alexander Breuer
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
EDGEcut configuration of the surface mesh.
-->
<edge_cut>
<io>
<topography>
<in>gen/topo.xyz</in>
<out>gen/surf.off</out>
</topography>
<boundary>
<out>gen/outflow.off</out>
</boundary>
</io>
<bounding_box>
<xMin>-20000</xMin>
<xMax>20000</xMax>
<yMin>-20000</yMin>
<yMax>20000</yMax>
<zMin>-20000</zMin>
<zMax>2000</zMax>
</bounding_box>
<refine>
<edge>100</edge>
<facet>100</facet>
<approx>50</approx>
<angle>30</angle>
</refine>
<region>
<!-- sponge zone, starting 2km source distance -->
<circular>
<inner_radius>2000</inner_radius>
<outer_radius>10000</outer_radius>
<center>
<x>0</x>
<y>0</y>
<z>0</z>
</center>
<scale>8</scale>
</circular>
</region>
<optimize>
<!-- lloyd throws CGAl assertations, therefore disabled -->
<lloyd>no</lloyd>
<time_limit>0</time_limit>
</optimize>
</edge_cut>
\ No newline at end of file
/**
* @file This file is part of EDGE.
*
* @author Alexander Breuer (breuer AT mytum.de)
*
* @section LICENSE
* Copyright (c) 2019, Alexander Breuer
* 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
* Volume mesh for the Gaussian Hill test case.
**/
Mesh.Optimize = 2;
// read topo mesh
Merge "gen/surf.stl";
Surface Loop(1) = {1};
Physical Surface(101) = {1};
// read surrounding box
Merge "gen/outflow.stl";
Surface Loop(2) = {2};
Physical Surface(105) = {2};
// create volume
Coherence Mesh;
Volume(1) = {1,2};
Physical Volume(1) = {1};
// set characteristic length
Mesh.CharacteristicLengthExtendFromBoundary = 0;
cl1 = 100;
cl2 = 800;
// high res topo
Point(100) = {0, 0, 0};
Field[1] = Attractor;
Field[1].NodesList = {100};
Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = cl1;
Field[2].LcMax = cl2;
Field[2].DistMin = 2000;
Field[2].DistMax = 10000;
Background Field = 2;
\ No newline at end of file
ghill.e3868613 filter=lfs diff=lfs merge=lfs -text
ghill.o3868613 filter=lfs diff=lfs merge=lfs -text
EDGE-version: a56de1218c2db47ee9fe31b43702e7d26313f472
# Build on Stampede 2
```
git clone --recursive https://github.com/3343/edge.git
cd edge
cd submodules/libxsmm; PREFIX=../../libs make FORTRAN=0 BLAS=0 install
cd ../..
wget http://zlib.net/zlib-1.2.11.tar.gz -O zlib.tar.gz
mkdir zlib; tar -xzf zlib.tar.gz -C zlib --strip-components=1
cd zlib; ./configure --static --prefix=$(pwd)/../libs
make install
cd ..
wget https://www.hdfgroup.org/package/gzip/?wpdmdl=13048 -O hdf5.tar.gz
mkdir hdf5; tar -xzf hdf5.tar.gz -C hdf5 --strip-components=1
cd hdf5; ./configure --enable-shared=no --enable-parallel --with-zlib=$(pwd)/../libs --prefix=$(pwd)/../libs
make -j4
make install
cd ..
cd submodules/moab; autoreconf -fi
CXXFLAGS="-DEIGEN_DONT_VECTORIZE -fPIC" LIBS="$(pwd)/../../libs/lib/libz.a" CC=mpiicc CXX=mpiicpc ./configure --disable-debug --disable-optimize --enable-shared=no --enable-static=yes --with-pic=yes --disable-fortran --enable-tools --disable-blaslapack --with-eigen3=$(pwd)/../eigen --with-zlib=$(pwd)/../../libs --with-hdf5=$(pwd)/../../libs --with-netcdf=no --with-pnetcdf=no --with-metis=yes --download-metis --with-mpi --prefix=$(pwd)/../../libs
make -j4
make install
cd ../..
CXX=mpicxx scons cfr=1 order=5 arch=skx parallel=mpi+omp xsmm=libs zlib=libs hdf5=libs moab=libs -j 8
```
# Job Submission
sbatch ghill.slurm
../configs/
\ No newline at end of file
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (breuer AT mytum.de)
#
# @section LICENSE
# Copyright (c) 2019, Regents of the University of California
# 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
# Job-script for the Gaussian Hill test case.
##
#SBATCH -J ghill
#SBATCH -o ghill.o%j
#SBATCH -e ghill.e%j
#SBATCH -p skx-dev
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 02:00:00
#SBATCH -A TG-MCA03S012
export OMP_NUM_THREADS=47
export KMP_AFFINITY=verbose,proclist=[1-47],granularity=thread,explicit
date
ibrun ../edge/build/edge -x configs/ghill.xml
date
../meshes/
\ No newline at end of file
../sources/
\ No newline at end of file
[![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)
To the extent possible under law, [Alexander Nikolas Breuer](http://dial3343.org) has waived all copyright and related or neighboring rights to the following work:
* `ricker.h5`
* `ricker.pdf`
This work is published from: Germany.
# Sources
This directory contains the source input for the Gaussian hill runs.
Used commands:
```
python ./generate.py -t ricker -s -1.5 -e 1.5 -d 1E-5 -c 1.4 -m 2E18 -p ricker.pdf -o ricker.ascii 2>&1 | tee generate.py.log
bash generate_hdf5.sh
```
* Contact: Alex Breuer
\ No newline at end of file
#!/usr/bin/python3
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer AT ucsd.edu)
#
# @section LICENSE
# Copyright (c) 2018, Regents of the University of California
# 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
# Generates the source time histories.
##
import logging
import argparse
import math
def ricker( i_t1,
i_t2,
i_dt,
i_f=1.0,
i_M0=1.0):
"""Generates slip rate samples as given by the Ricker wavelet.
Source: Geophysical Journal International 166.2 (2006): 855-877.
An arbitrary high-order discontinuous Galerkin method for
elastic waves on unstructured meshes I. The two-dimensional isotropic case with external source terms
Eq. (64)
Moment rate time history: a*(0.5+b(t-T)^2)*exp(b*(t-T)^2) )
Arguments:
i_t1 {float} -- start time of the sampling.
i_t2 {float} -- end time of the sampling.
i_dt {float} -- time step of the sampling.
i_f {float} -- central frequency of the wavelet.
i_M0 {float} -- scaling used for the moment-rate time history.
Returns:
[array of float] -- sampled slip rates.
"""
# set parameters as used in the equation above
l_a = i_M0
l_b = -(math.pi * i_f)**2
# slip rate samples
l_sr = []
# local time
l_t = i_t1
while( l_t < i_t2 ):
l_sr.append( l_a * ( 0.5 + l_b * l_t**2 ) * math.exp( l_b * l_t**2 ) )
l_t = l_t + i_dt