Skip to content

Commit b09f8fa

Browse files
authored
Merge pull request #10 from tjhei/lla-sync
pull from upstream
2 parents c76b5ba + fc556ea commit b09f8fa

File tree

22 files changed

+299
-285
lines changed

22 files changed

+299
-285
lines changed

.github/workflows/linux.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
sudo apt-get update
3535
sudo apt-get install -y software-properties-common
36-
sudo add-apt-repository ppa:ginggs/deal.ii-9.5.1-backports
36+
sudo add-apt-repository ppa:ginggs/deal.ii-9.6.0-backports
3737
sudo apt-get update
3838
sudo apt-get install -yq --no-install-recommends libdeal.ii-dev
3939
- name: compile
@@ -53,6 +53,9 @@ jobs:
5353
- uses: actions/checkout@v4
5454
- name: setup
5555
run: |
56+
sudo apt-get update
57+
sudo apt-get install -y software-properties-common
58+
sudo add-apt-repository ppa:ginggs/deal.ii-9.6.0-backports
5659
sudo apt-get update
5760
sudo apt-get install -yq --no-install-recommends texlive-plain-generic texlive-base texlive-latex-recommended texlive-latex-base texlive-fonts-recommended texlive-bibtex-extra lmodern texlive-latex-extra texlive-science graphviz python3-pip libdeal.ii-dev doxygen latexmk biber inkscape
5861
doxygen --version
File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Fixed: On Mac systems, ASPECT sometimes crashed at the very end of the
2+
program run with an exception triggered by the CGAL library that was
3+
caused by the settings for floating point exceptions. This is now
4+
fixed.
5+
<br>
6+
(Timo Heister, Wolfgang Bangerth, 2025/08/04)

source/main.cc

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <deal.II/base/mpi.h>
2727
#include <deal.II/base/multithread_info.h>
2828
#include <deal.II/base/revision.h>
29+
#include <deal.II/base/scope_exit.h>
2930
#include <csignal>
3031
#include <string>
3132
#include <thread>
@@ -677,6 +678,16 @@ int main (int argc, char *argv[])
677678

678679
// enable floating point exceptions
679680
feenableexcept(FE_DIVBYZERO|FE_INVALID);
681+
682+
// Make sure that at the end of the program run, we
683+
// disable floating exceptions again. This fixes an issue
684+
// of CGAL checking floating points exceptions during
685+
// finalization and throwing an error:
686+
ScopeExit fp_except_cleanup(
687+
[]()
688+
{
689+
fedisableexcept(FE_DIVBYZERO|FE_INVALID);
690+
});
680691
#endif
681692
#endif
682693

@@ -685,6 +696,12 @@ int main (int argc, char *argv[])
685696
// required for Numpy interop
686697
if (_import_array() < 0)
687698
AssertThrow(false, ExcMessage("Numpy init failed!"));
699+
700+
ScopeExit python_cleanup(
701+
[]()
702+
{
703+
Py_FinalizeEx();
704+
});
688705
#endif
689706

690707
std::string prm_name = "";
@@ -936,10 +953,5 @@ int main (int argc, char *argv[])
936953
return 1;
937954
}
938955

939-
940-
#ifdef ASPECT_WITH_PYTHON
941-
Py_FinalizeEx();
942-
#endif
943-
944956
return 0;
945957
}

source/mesh_deformation/interface.cc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -627,14 +627,8 @@ namespace aspect
627627
// For the moment add constraints from all plugins into one object, then
628628
// merge that object with the existing constraints (respecting the existing
629629
// constraints as more important).
630-
//
631-
// We initialize the constraints object with the locally
632-
// relevant DoF indices as the set of constraints to store (also
633-
// using the locally relevant indices for the "locally owned"
634-
// DoFs). This way, plugins can fill information for all locally
635-
// relevant DoFs and we do not need to communicate.
636630
#if DEAL_II_VERSION_GTE(9,7,0)
637-
AffineConstraints<double> plugin_constraints(mesh_vertex_constraints.get_local_lines(),
631+
AffineConstraints<double> plugin_constraints(mesh_deformation_dof_handler.locally_owned_dofs(),
638632
mesh_vertex_constraints.get_local_lines());
639633
#else
640634
AffineConstraints<double> plugin_constraints(mesh_vertex_constraints.get_local_lines());
@@ -647,7 +641,7 @@ namespace aspect
647641
for (const auto &model : boundary_id.second)
648642
{
649643
#if DEAL_II_VERSION_GTE(9,7,0)
650-
AffineConstraints<double> current_plugin_constraints(mesh_vertex_constraints.get_local_lines(),
644+
AffineConstraints<double> current_plugin_constraints(mesh_deformation_dof_handler.locally_owned_dofs(),
651645
mesh_vertex_constraints.get_local_lines());
652646
#else
653647
AffineConstraints<double> current_plugin_constraints(mesh_vertex_constraints.get_local_lines());
@@ -656,7 +650,7 @@ namespace aspect
656650
model->compute_velocity_constraints_on_boundary(mesh_deformation_dof_handler,
657651
current_plugin_constraints,
658652
boundary_id_set);
659-
if ((this->is_stokes_matrix_free()))
653+
if (this->is_stokes_matrix_free())
660654
{
661655
mg_constrained_dofs.make_zero_boundary_constraints(mesh_deformation_dof_handler,
662656
boundary_id_set);

source/postprocess/particles.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,8 @@ namespace aspect
190190

191191

192192
template <int dim>
193-
// We need to pass the arguments by value, as this function can be called on a separate thread:
194-
void Particles<dim>::writer (const std::string &filename, //NOLINT(performance-unnecessary-value-param)
195-
const std::string &temporary_output_location, //NOLINT(performance-unnecessary-value-param)
193+
void Particles<dim>::writer (const std::string &filename,
194+
const std::string &temporary_output_location,
196195
const std::string &file_contents)
197196
{
198197
std::string tmp_filename = filename;

tests/adiabatic_conditions.prm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ subsection Material model
5252
set Reference temperature = 1613
5353
set Thermal conductivity = 1e-6
5454
set Thermal expansion coefficient = 2e-5
55-
set Viscosity = 1
55+
set Viscosity = 1e21
5656
end
5757
end
5858

tests/adiabatic_conditions/depth_average.gnuplot

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/adiabatic_conditions/screen-output

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ Number of degrees of freedom: 40,836 (25,090+3,201+12,545)
1818
Reference thermal expansion coefficient (1/K): 2e-05
1919
Reference specific heat capacity (J/(K*kg)): 1250
2020
Reference thermal conductivity (W/(m*K)): 1e-06
21-
Reference viscosity (Pa*s): 1
21+
Reference viscosity (Pa*s): 1e+21
2222
Reference thermal diffusivity (m^2/s): 2.42424e-13
2323
Rayleigh number: 0
2424

2525
Writing graphical output: output-adiabatic_conditions/solution/solution-00000
26-
RMS, max velocity: 2.81e+04 m/s, 1.12e+05 m/s
26+
RMS, max velocity: 2.69e-17 m/s, 1.11e-16 m/s
2727
Temperature min/avg/max: 1613 K, 1613 K, 1613 K
28-
Heat fluxes through boundary parts: 6721 W, -99.27 W, 0 W, 0 W
28+
Heat fluxes through boundary parts: 9.544e-18 W, 8.936e-19 W, 0 W, 0 W
2929
Writing depth average: output-adiabatic_conditions/depth_average
3030

3131
Termination requested by criterion: end time

tests/adiabatic_conditions/statistics

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
# 18: Outward heat flux through boundary with indicator 1 ("top") (W)
1919
# 19: Outward heat flux through boundary with indicator 2 ("left") (W)
2020
# 20: Outward heat flux through boundary with indicator 3 ("right") (W)
21-
0 0.000000000000e+00 0.000000000000e+00 3072 28291 12545 0 14 15 15 output-adiabatic_conditions/solution/solution-00000 2.81189741e+04 1.12336096e+05 1.61300000e+03 1.61300000e+03 1.61300000e+03 6.72093540e+03 -9.92725149e+01 0.00000000e+00 0.00000000e+00
21+
0 0.000000000000e+00 0.000000000000e+00 3072 28291 12545 0 14 15 15 output-adiabatic_conditions/solution/solution-00000 2.68839569e-17 1.10748720e-16 1.61300000e+03 1.61300000e+03 1.61300000e+03 9.54446020e-18 8.93580077e-19 0.00000000e+00 0.00000000e+00

0 commit comments

Comments
 (0)