Skip to content

Commit

Permalink
Merge pull request #5221 from jdannberg/merged_boxes_origin
Browse files Browse the repository at this point in the history
correctly set up two merged boxes for nonzero Y origin
  • Loading branch information
gassmoeller committed Jul 9, 2023
2 parents 3abda9c + 317e7fd commit 037908e
Show file tree
Hide file tree
Showing 6 changed files with 14,412 additions and 3 deletions.
5 changes: 5 additions & 0 deletions doc/modules/changes/20230708_dannberg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fixed: The computation of the upper box origin in the 'box
with lithosphere boundary indicators' geometry model did not
take into account a nonzero origin. This is fixed now.
<br>
(Juliane Dannberg, 2023/07/08)
6 changes: 3 additions & 3 deletions source/geometry_model/two_merged_boxes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ namespace aspect
{
lower_extents[1] = extents[1] - thickness_lith;
upper_extents[1] = thickness_lith;
upper_box_origin[1] = lower_extents[1];
upper_box_origin[1] = lower_box_origin[1] + lower_extents[1];
upper_repetitions[1] = prm.get_integer ("Y repetitions lithosphere");
}

Expand All @@ -524,13 +524,13 @@ namespace aspect
lower_extents[2] = extents[2] - thickness_lith;
upper_extents[2] = thickness_lith;
lower_box_origin[2] = prm.get_double ("Box origin Z coordinate");
upper_box_origin[2] = lower_extents[2];
upper_box_origin[2] = lower_box_origin[2] + lower_extents[2];
periodic[2] = prm.get_bool ("Z periodic");
lower_repetitions[2] = prm.get_integer ("Z repetitions");
upper_repetitions[2] = prm.get_integer ("Z repetitions lithosphere");
}

height_lith = extents[dim-1] - thickness_lith;
height_lith = upper_box_origin[dim-1];
use_merged_grids = prm.get_bool ("Use merged grids");
}
prm.leave_subsection();
Expand Down
14 changes: 14 additions & 0 deletions tests/lithosphere_boundary_indicator_origin.prm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# With this geometry model we add 2 additional boundary
# indicators to the lithospheric part of the left and right
# boundary.
# This test is for a nonzero box Y origin.

include $ASPECT_SOURCE_DIR/tests/lithosphere_boundary_indicator.prm

subsection Geometry model
set Model name = box with lithosphere boundary indicators

subsection Box with lithosphere boundary indicators
set Box origin Y coordinate = 300000
end
end
28 changes: 28 additions & 0 deletions tests/lithosphere_boundary_indicator_origin/screen-output
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Number of active cells: 2,048 (on 6 levels)
Number of degrees of freedom: 35,685 (16,770+2,145+8,385+8,385)

*** Timestep 0: t=0 years, dt=0 years
Skipping temperature solve because RHS is zero.
Solving C_1 system ... 0 iterations.
Rebuilding Stokes preconditioner...
Solving Stokes system... 200+2 iterations.

Postprocessing:
RMS, max velocity: 0.00375 m/year, 0.01 m/year
Pressure min/avg/max: -1.724e+06 Pa, 9.771e+09 Pa, 1.961e+10 Pa
Writing graphical output: output-lithosphere_boundary_indicator_origin/solution/solution-00000

Termination requested by criterion: end time


+----------------------------------------------+------------+------------+
+----------------------------------+-----------+------------+------------+
+----------------------------------+-----------+------------+------------+

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

0 comments on commit 037908e

Please sign in to comment.