Skip to content

Commit

Permalink
Merge branch 'main' into fix_stresses_elasticity
Browse files Browse the repository at this point in the history
  • Loading branch information
gassmoeller authored Oct 10, 2023
2 parents 824e2cb + bebbc74 commit 30df10c
Show file tree
Hide file tree
Showing 160 changed files with 96,932 additions and 867 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
8 changes: 4 additions & 4 deletions .github/workflows/build_tester_base_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ jobs:
if: github.repository == 'geodynamics/aspect'
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_LOGIN }}

- name: Build and push Docker image for main
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./contrib/docker/tester/
cache-from: type=registry,ref=ubuntu:20.04
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,30 @@ jobs:
if: github.repository == 'geodynamics/aspect'
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_LOGIN }}

- name: Build and push Docker image for main
if: contains(github.event_name, 'push')
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./contrib/docker/docker/
cache-from: type=registry,ref=ubuntu:22.04
Expand All @@ -61,7 +61,7 @@ jobs:
- name: Build and push Docker image for release
if: contains(github.event_name, 'release')
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./contrib/docker/docker/
cache-from: type=registry,ref=ubuntu:22.04
Expand All @@ -77,30 +77,30 @@ jobs:
if: github.repository == 'geodynamics/aspect'
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_LOGIN }}

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image for main
if: contains(github.event_name, 'push')
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./contrib/docker/docker_tacc/
cache-from: type=registry,ref=ubuntu:22.04
Expand All @@ -113,7 +113,7 @@ jobs:
- name: Build and push Docker image for release
if: contains(github.event_name, 'release')
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./contrib/docker/docker_tacc/
cache-from: type=registry,ref=ubuntu:22.04
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
runs-on: [ubuntu-20.04]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ginggs/deal.ii-9.4.0-backports
sudo add-apt-repository ppa:ginggs/deal.ii-9.5.1-backports
sudo apt-get update
sudo apt-get install -yq --no-install-recommends libdeal.ii-dev
- name: compile
Expand All @@ -48,12 +48,12 @@ jobs:
runs-on: [ubuntu-20.04]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: setup
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ginggs/deal.ii-9.4.0-backports
sudo add-apt-repository ppa:ginggs/deal.ii-9.5.1-backports
sudo apt-get update
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 python-setuptools libdeal.ii-dev doxygen latexmk biber inkscape
doxygen --version
Expand All @@ -70,7 +70,7 @@ jobs:
./contrib/utilities/indent
git diff > changes-astyle.diff
- name: archive indent results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: changes-astyle.diff
path: changes-astyle.diff
Expand Down Expand Up @@ -110,6 +110,11 @@ jobs:
compare-tests: "ON"
result-file: "changes-test-results-9.4.diff"
container-options: '--name container'
- image: "geodynamics/aspect-tester:focal-dealii-9.5-v1"
run-tests: "ON"
compare-tests: "OFF"
result-file: "changes-test-results-9.5.diff"
container-options: '--name container'
- image: "geodynamics/aspect-tester:focal-dealii-master"
run-tests: "ON"
compare-tests: "OFF"
Expand All @@ -121,7 +126,7 @@ jobs:
options: ${{ matrix.container-options }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: compile
run: |
mkdir build
Expand Down Expand Up @@ -158,15 +163,15 @@ jobs:
run: |
cd build
ninja generate_reference_output
git diff ../tests > changes-test-results.diff
git diff ../tests > ${{ matrix.result-file }}
- name: archive test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.result-file }}
path: build/changes-test-results.diff
path: build/${{ matrix.result-file }}}
- name: check test results
run: |
if [ -f build/test_run_failed ] || [ -s build/changes-test-results.diff ]; then
if [ -f build/test_run_failed ] || [ -s build/${{ matrix.result-file}} ]; then
exit 1
else
exit 0
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/annulus/plugin/annulus.cc
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ namespace aspect
const unsigned int n_components = this->introspection().n_components;

compute_density_error = (material_model.analytical_density() == false);
reference_solution.reset (new AnalyticSolutions::FunctionAnnulus<dim>(material_model.get_k(),
n_components,
material_model.use_transient_solution()));
reference_solution = std::make_unique<AnalyticSolutions::FunctionAnnulus<dim>>(material_model.get_k(),
n_components,
material_model.use_transient_solution());
}


Expand Down
2 changes: 1 addition & 1 deletion benchmarks/burstedde/burstedde.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ namespace aspect
material_model
= Plugins::get_plugin_as_type<const BursteddeMaterial<dim>>(this->get_material_model());

ref_func.reset (new AnalyticSolutions::FunctionBurstedde<dim>(material_model.get_beta()));
ref_func = std::make_unique<AnalyticSolutions::FunctionBurstedde<dim>>(material_model.get_beta());
}

const QGauss<dim> quadrature_formula (this->introspection().polynomial_degree.velocities+2);
Expand Down
7 changes: 2 additions & 5 deletions benchmarks/doneahuerta/doneahuerta.cc
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,8 @@ namespace aspect
std::pair<std::string,std::string>
DoneaHuertaPostprocessor<dim>::execute (TableHandler &)
{
std::unique_ptr<Function<dim>> ref_func;
{

ref_func.reset (new AnalyticSolutions::FunctionDoneaHuerta<dim>());
}
std::unique_ptr<Function<dim>> ref_func =
std::make_unique<AnalyticSolutions::FunctionDoneaHuerta<dim>>();

const QGauss<dim> quadrature_formula (this->introspection().polynomial_degree.velocities+2);

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/hollow_sphere/hollow_sphere.cc
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ namespace aspect
material_model
= Plugins::get_plugin_as_type<const HollowSphereMaterial<dim>>(this->get_material_model());

ref_func.reset (new AnalyticSolutions::FunctionHollowSphere<dim>(material_model.get_mmm()));
ref_func = std::make_unique<AnalyticSolutions::FunctionHollowSphere<dim>>(material_model.get_mmm());
}

const QGauss<dim> quadrature_formula (this->introspection().polynomial_degree.velocities+2);
Expand Down
9 changes: 4 additions & 5 deletions benchmarks/inclusion/inclusion.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,18 +278,17 @@ namespace aspect
std::pair<std::string,std::string>
execute (TableHandler &/*statistics*/) override
{
std::unique_ptr<Function<dim>> ref_func;

AssertThrow(Plugins::plugin_type_matches<const InclusionMaterial<dim>>(this->get_material_model()),
ExcMessage("Postprocessor only works with the inclusion material model."));

const InclusionMaterial<dim> &
material_model
= Plugins::get_plugin_as_type<const InclusionMaterial<dim>>(this->get_material_model());

ref_func.reset (new AnalyticSolutions::FunctionInclusion<dim>(
material_model.get_eta_B(),
this->n_compositional_fields()));
std::unique_ptr<Function<dim>> ref_func
= std::make_unique<AnalyticSolutions::FunctionInclusion<dim>>(
material_model.get_eta_B(),
this->n_compositional_fields());

const QGauss<dim> quadrature_formula (this->introspection().polynomial_degree.velocities+2);

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/layeredflow/layeredflow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ namespace aspect
material_model
= Plugins::get_plugin_as_type<const LayeredFlowMaterial<dim>>(this->get_material_model());

ref_func.reset (new AnalyticSolutions::FunctionLayeredFlow<dim>(material_model.get_beta(),
material_model.get_epsilon()));
ref_func = std::make_unique<AnalyticSolutions::FunctionLayeredFlow<dim>>(material_model.get_beta(),
material_model.get_epsilon());
}

const QGauss<dim> quadrature_formula (this->introspection().polynomial_degree.velocities+2);
Expand Down
9 changes: 5 additions & 4 deletions benchmarks/shear_bands/shear_bands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ namespace aspect
double noise_amplitude;
double background_porosity;
std::array<unsigned int,dim> grid_intervals;
Functions::InterpolatedUniformGridData<dim> *interpolate_noise;
std::unique_ptr<Functions::InterpolatedUniformGridData<dim>> interpolate_noise;
};


Expand Down Expand Up @@ -374,9 +374,10 @@ namespace aspect
}
}

interpolate_noise = new Functions::InterpolatedUniformGridData<dim> (grid_extents,
grid_intervals,
white_noise);
interpolate_noise
= std::make_unique<Functions::InterpolatedUniformGridData<dim>> (grid_extents,
grid_intervals,
white_noise);
}


Expand Down
8 changes: 4 additions & 4 deletions benchmarks/solcx/solcx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3115,7 +3115,6 @@ namespace aspect
std::pair<std::string,std::string>
execute (TableHandler &/*statistics*/) override
{
std::unique_ptr<Function<dim>> ref_func;

AssertThrow(Plugins::plugin_type_matches<const SolCxMaterial<dim>>(this->get_material_model()),
ExcMessage("Postprocessor DuretzEtAl only works with the material model SolCx, SolKz, and Inclusion."));
Expand All @@ -3124,9 +3123,10 @@ namespace aspect
material_model
= Plugins::get_plugin_as_type<const SolCxMaterial<dim>>(this->get_material_model());

ref_func.reset (new AnalyticSolutions::FunctionSolCx<dim>(material_model.get_eta_B(),
material_model.get_background_density(),
this->n_compositional_fields()));
std::unique_ptr<Function<dim>> ref_func
= std::make_unique<AnalyticSolutions::FunctionSolCx<dim>>(material_model.get_eta_B(),
material_model.get_background_density(),
this->n_compositional_fields());

const QGauss<dim> quadrature_formula (this->introspection().polynomial_degree.velocities + 2);

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/solitary_wave/solitary_wave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,8 @@ namespace aspect
if (this->get_timestep_number()==0)
{
store_initial_pressure();
ref_func.reset (new AnalyticSolutions::FunctionSolitaryWave<dim>(offset,0.0,initial_pressure,
this->get_geometry_model().maximal_depth(), this->introspection().n_components));
ref_func = std::make_unique<AnalyticSolutions::FunctionSolitaryWave<dim>>(offset,0.0,initial_pressure,
this->get_geometry_model().maximal_depth(), this->introspection().n_components);
}

double delta=0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ namespace aspect
{
prm.enter_subsection("Function");
{
density_function.reset(new Functions::ParsedFunction<dim>(1));
density_function = std::make_unique<Functions::ParsedFunction<dim>>(1);
density_function->parse_parameters(prm);
}
prm.leave_subsection();
Expand All @@ -220,7 +220,7 @@ namespace aspect
{
prm.enter_subsection("Function");
{
pressure_function.reset(new Functions::ParsedFunction<dim>(1));
pressure_function = std::make_unique<Functions::ParsedFunction<dim>>(1);
pressure_function->parse_parameters(prm);
}
prm.leave_subsection();
Expand All @@ -233,7 +233,7 @@ namespace aspect
{
try
{
velocity_function.reset (new Functions::ParsedFunction<dim>(dim));
velocity_function = std::make_unique<Functions::ParsedFunction<dim>>(dim);
velocity_function->parse_parameters (prm);
}
catch (...)
Expand Down Expand Up @@ -310,10 +310,10 @@ namespace aspect
const MaterialModel::TimeDependentAnnulus<dim> &material_model =
Plugins::get_plugin_as_type<const MaterialModel::TimeDependentAnnulus<dim>>(this->get_material_model());

ref_func.reset (new AnalyticSolutions::FunctionStreamline<dim>(material_model.get_pressure(),
material_model.get_velocity(),
material_model.get_density(),
1 + dim + 1 + this->n_compositional_fields()));
ref_func = std::make_unique<AnalyticSolutions::FunctionStreamline<dim>>(material_model.get_pressure(),
material_model.get_velocity(),
material_model.get_density(),
1 + dim + 1 + this->n_compositional_fields());
}

std::pair<std::string,std::string>
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/viscosity_grooves/viscosity_grooves.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ namespace aspect
std::shared_ptr<Function<dim>> ref_func;
{

ref_func.reset (new AnalyticSolutions::FunctionViscosityGrooves<dim>(this->get_geometry_model()));
ref_func = std::make_unique<AnalyticSolutions::FunctionViscosityGrooves<dim>>(this->get_geometry_model());
}

const QGauss<dim> quadrature_formula (this->introspection().polynomial_degree.velocities+2);
Expand Down
Loading

0 comments on commit 30df10c

Please sign in to comment.