Skip to content

Commit

Permalink
update model size
Browse files Browse the repository at this point in the history
  • Loading branch information
icui committed Jan 27, 2025
1 parent 2e89e8c commit 92e93f8
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 31 deletions.
4 changes: 2 additions & 2 deletions benchmarks/data/CMakeFiles/Par_File.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ interfacesfile = @CMAKE_SOURCE_DIR@/benchmarks/data/topography.
# geometry of the model (origin lower-left corner = 0,0) and mesh description
xmin = 0.d0 # abscissa of left side of the model
xmax = 4000.d0 # abscissa of right side of the model
nx = 180 # number of elements along X
nx = 1800 # number of elements along X

STACEY_ABSORBING_CONDITIONS = .false.

Expand All @@ -141,7 +141,7 @@ absorbleft = .false.
# define the different regions of the model in the (nx,nz) spectral-element mesh
nbregions = 1 # then set below the different regions and model number for each region
# format of each line: nxmin nxmax nzmin nzmax material_number
1 180 1 60 1
1 1800 1 600 1

#-----------------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/data/topography.dat
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
#
# layer number 1 (bottom layer)
#
60
600
4 changes: 2 additions & 2 deletions benchmarks/data_aniso/CMakeFiles/Par_File.in
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ interfacesfile = @CMAKE_SOURCE_DIR@/benchmarks/data_aniso/topoa
# geometry of the model (origin lower-left corner = 0,0) and mesh description
xmin = 0.d0 # abscissa of left side of the model
xmax = 0.33 # abscissa of right side of the model
nx = 160 # number of elements along X
nx = 1200 # number of elements along X

# Stacey ABC
STACEY_ABSORBING_CONDITIONS = .false.
Expand All @@ -122,7 +122,7 @@ absorbleft = .false.
# define the different regions of the model in the (nx,nz) spectral-element mesh
nbregions = 1 # then set below the different regions and model number for each region
# format of each line: nxmin nxmax nzmin nzmax material_number
1 160 1 60 1
1 1200 1 400 1

#-----------------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/data_aniso/topoaniso.dat
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
#
# layer number 1 (bottom layer)
#
60
600
4 changes: 2 additions & 2 deletions benchmarks/data_iso/CMakeFiles/Par_File.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ interfacesfile = @CMAKE_SOURCE_DIR@/benchmarks/data_iso/topogra
# geometry of the model (origin lower-left corner = 0,0) and mesh description
xmin = 0.d0 # abscissa of left side of the model
xmax = 4000.d0 # abscissa of right side of the model
nx = 180 # number of elements along X
nx = 1800 # number of elements along X

STACEY_ABSORBING_CONDITIONS = .false.

Expand All @@ -141,7 +141,7 @@ absorbleft = .false.
# define the different regions of the model in the (nx,nz) spectral-element mesh
nbregions = 1 # then set below the different regions and model number for each region
# format of each line: nxmin nxmax nzmin nzmax material_number
1 180 1 60 1
1 1800 1 600 1

#-----------------------------------------------------------
#
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/data_iso/topography.dat
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
#
# layer number 1 (bottom layer)
#
60
600
15 changes: 3 additions & 12 deletions benchmarks/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,12 @@ namespace benchmarks {
template <specfem::element::medium_tag medium>
inline void update_wavefields(specfem::compute::assembly &assembly,
const int istep) {
constexpr static auto dimension = specfem::dimension::type::dim2;
constexpr static auto wavefield =
specfem::wavefield::simulation_field::forward;
constexpr static auto ngll = 5;

compute_stiffness_interaction<dimension, wavefield, ngll, medium,
specfem::element::property_tag::isotropic,
specfem::element::boundary_tag::none>(

compute_stiffness_interaction<medium, specfem::element::property_tag::isotropic>(
assembly, istep);

if constexpr (medium == specfem::element::medium_tag::elastic) {
compute_stiffness_interaction<
dimension, wavefield, ngll, medium,
specfem::element::property_tag::anisotropic,
specfem::element::boundary_tag::none>(assembly, istep);
compute_stiffness_interaction<medium, specfem::element::property_tag::anisotropic>(assembly, istep);
}

divide_mass_matrix<dimension, wavefield, medium>(assembly);
Expand Down
18 changes: 8 additions & 10 deletions benchmarks/stiffness.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,21 @@
namespace specfem {
namespace benchmarks {

template <specfem::dimension::type DimensionType,
specfem::wavefield::simulation_field WavefieldType, int NGLL,
specfem::element::medium_tag MediumTag,
specfem::element::property_tag PropertyTag,
specfem::element::boundary_tag BoundaryTag>
constexpr static auto dimension = specfem::dimension::type::dim2;
constexpr static auto wavefield =
specfem::wavefield::simulation_field::forward;
constexpr static auto ngll = 5;
constexpr static auto boundary_tag = specfem::element::boundary_tag::none;

template <specfem::element::medium_tag MediumTag, specfem::element::property_tag PropertyTag>
void compute_stiffness_interaction(
const specfem::compute::assembly &assembly, const int &istep) {

constexpr auto medium_tag = MediumTag;
constexpr auto property_tag = PropertyTag;
constexpr auto boundary_tag = BoundaryTag;
constexpr int ngll = NGLL;
constexpr auto wavefield = WavefieldType;
constexpr auto dimension = DimensionType;

const auto elements = assembly.element_types.get_elements_on_device(
MediumTag, PropertyTag, BoundaryTag);
MediumTag, PropertyTag, boundary_tag);

const int nelements = elements.extent(0);

Expand Down

0 comments on commit 92e93f8

Please sign in to comment.