Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
56b3283
div_ops: Compile with METRIC_3D
bendudson Jun 10, 2026
7ad4fe3
integrated tests: Remove geometry extraction calls
bendudson Jun 11, 2026
5ef65bf
Update BOUT++ to include more fci bits
dschwoerer Jun 18, 2026
f99fc41
Fix hermes-3.cxx for 3D compilation
dschwoerer Jun 22, 2026
224caf1
Fix BraginskiiIonViscosity for 3D compilation
dschwoerer Jun 22, 2026
5b76db7
Fix ClassicalDiffusion for 3D compilation
dschwoerer Jun 22, 2026
fef76a0
Fix DiamagneticDrift for 3D compilation
dschwoerer Jun 22, 2026
cd0afa1
Div_par_mod has been moved to BOUT++
dschwoerer Jun 22, 2026
3c93c2d
Div_par_fvv has been moved to BOUT++
dschwoerer Jun 22, 2026
b544b6d
Div_par_K_Grad_par_mod has been moved to BOUT++
dschwoerer Jun 22, 2026
d986559
FV::Superbee has been moved to BOUT++
dschwoerer Jun 22, 2026
52ec710
CI: Add 3D metric build
dschwoerer Jun 23, 2026
5290823
Fix div_ops.hxx for 3D compilation
dschwoerer Jun 22, 2026
ebc484e
Fix div_ops for 3D compilation
dschwoerer Jun 23, 2026
00907b4
Disable full neutral model for 3D metrics
dschwoerer Jun 23, 2026
8de567b
Fix PolarisationDrift for 3D compilation
dschwoerer Jun 23, 2026
e5a530e
Fix RelaxPotential for 3D compilation
dschwoerer Jun 23, 2026
3e11b80
Fix ScaleTimederivs for 3D compilation
dschwoerer Jun 23, 2026
0318c5c
Fix Vorticity for 3D compilation
dschwoerer Jun 23, 2026
9e6a10c
Fix Electromagnetic for 3D compilation
dschwoerer Jun 23, 2026
0a94913
Fix Recycling for 3D compilation
dschwoerer Jun 23, 2026
566fce0
Fix SNBConduction for 3D compilation
dschwoerer Jun 23, 2026
715964b
Fix tests for 3D compilation
dschwoerer Jun 23, 2026
181c937
Fixup for 2D metrics
dschwoerer Jun 23, 2026
9784bd1
CI: use configure_options from build_type section
dschwoerer Jun 23, 2026
8ddace8
CI: Fix typo
dschwoerer Jun 23, 2026
ac8d337
Merge remote-tracking branch 'origin/master' into compile-3dmetric-clean
dschwoerer Jun 26, 2026
04c3fec
Update BOUT++
dschwoerer Jul 2, 2026
016fa83
Merge branch 'master' of https://github.com/boutproject/hermes-3 into…
dschwoerer Jul 2, 2026
173c948
Merge remote-tracking branch 'origin/bout-lazy-expressions' into comp…
dschwoerer Jul 2, 2026
9837d67
Update BOUT++
dschwoerer Jul 2, 2026
9dcd9b7
Ensure we cast to Field
dschwoerer Jul 2, 2026
77a4b0b
Operators have moved to BOUT++
dschwoerer Jul 2, 2026
150ad15
Stencil1D was moved to fv_ops_impl.hxx
dschwoerer Jul 2, 2026
672ed87
Allow to use already downloaded zip file
dschwoerer Jul 3, 2026
ecb6705
Update reference data
dschwoerer Jul 3, 2026
2687d1a
Merge pull request #586 from boutproject/compile-3dmetric-clean
bendudson Jul 3, 2026
92f20d8
Merge branch 'master' into compile-3dmetric
bendudson Jul 3, 2026
a18fa1f
CI: Fix names for CI runs
dschwoerer Jul 6, 2026
56757c8
Merge remote-tracking branch 'origin/master' into compile-3dmetric
dschwoerer Jul 8, 2026
0ec83e8
Update BOUT++
dschwoerer Jul 8, 2026
4dbe2d6
Update fake_mesh for BOUT++ changes
dschwoerer Jul 8, 2026
44d8126
Do return non-const Field3D
dschwoerer Jul 8, 2026
da802c3
Fix comment
dschwoerer Jul 8, 2026
4c128ef
prefer `if constexpr`
dschwoerer Jul 8, 2026
0164955
Do not split control flow with preprocessor guards
dschwoerer Jul 8, 2026
bc9fe2f
Remove duplicate zstart/zend definitions
dschwoerer Jul 9, 2026
de3f995
Fix typo
dschwoerer Jul 9, 2026
cfc8313
Merge remote-tracking branch 'origin/master' into compile-3dmetric
dschwoerer Jul 9, 2026
c6f1eae
Fixup bad merge
dschwoerer Jul 9, 2026
bf415ae
Update BOUT++ to next branch
dschwoerer Jul 9, 2026
4a5154f
add RegisterUnavailableComponent
dschwoerer Jul 9, 2026
7076c48
Register not available command only if not available
dschwoerer Aug 7, 2026
1759944
Fix sign of z iteration termination
dschwoerer Aug 7, 2026
e542d8d
Merge branch 'master' of https://github.com/boutproject/hermes-3 into…
dschwoerer Aug 7, 2026
2501793
Fix compilation with 3D metrics of fieldline_geometry
dschwoerer Aug 7, 2026
16cfe8a
Update BOUT++ to latest next
dschwoerer Aug 7, 2026
8f1a250
Fix compilation of unit test for 3D metrics
dschwoerer Aug 7, 2026
bd09c76
Fix compilation of unit test for 3D metrics
dschwoerer Aug 7, 2026
3ea93b8
Fix compile 2D failures
dschwoerer Aug 7, 2026
aab4778
Remove Div_par_K_Grad_par_mod
dschwoerer Aug 10, 2026
d963d3f
Update BOUT++
dschwoerer Aug 10, 2026
60f5b42
Expose conduction_method to users
dschwoerer Aug 10, 2026
781c31b
Fix typo
dschwoerer Aug 10, 2026
d48f46d
Merge remote-tracking branch 'origin/update-bout++' into compile-3dme…
dschwoerer Aug 10, 2026
dba2bb1
Remove stale bits
dschwoerer Aug 10, 2026
aca5f45
Remove stale CONDUCTION_METHOD
dschwoerer Aug 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,44 @@ defaults:

jobs:
cmake_tests:
name: ${{ matrix.build_type.test_type }} tests, ${{ matrix.config.name }}
name: ${{ matrix.build_type.test_type }} tests, ${{ matrix.build_type.name }}
runs-on: ${{ matrix.config.os }}
env:
OMP_NUM_THREADS: ${{ matrix.config.omp_num_threads }}
PYTHONPATH: ${{ github.workspace }}/tools/pylib
OMPI_MCA_rmaps_base_oversubscribe: yes
MPIRUN: mpiexec -np
LD_LIBRARY_PATH: /home/runner/local/lib:$LD_LIBRARY_PATH
BOUT_CONFIGURE_OPTIONS: ${{ matrix.config.configure_options }} -DHERMES_COVERAGE=${{ matrix.build_type.coverage }}
BOUT_CONFIGURE_OPTIONS: ${{ matrix.build_type.configure_options }} -DHERMES_COVERAGE=${{ matrix.build_type.coverage }}
BUILD_TYPE: ${{ matrix.build_type.cmake_build_type }}
TEST_TYPE: ${{ matrix.build_type.test_type }}
strategy:
fail-fast: false
matrix:
config:
- name: "CMake default options"
os: ubuntu-latest
configure_options: "-DPACKAGE_TESTS=OFF -DHERMES_ERROR_ON_WARNINGS=ON"
- os: ubuntu-latest
build_type:
- cmake_build_type: Debug
test_type: unit
coverage: ON
name: "CMake default options"
configure_options: "-DPACKAGE_TESTS=OFF -DHERMES_ERROR_ON_WARNINGS=ON"
- cmake_build_type: Release
test_type: integration
coverage: OFF
name: "CMake default options"
configure_options: "-DPACKAGE_TESTS=OFF -DHERMES_ERROR_ON_WARNINGS=ON"
- cmake_build_type: Debug
test_type: None
name: "3D metrics (compile only)"
configure_options: "-DPACKAGE_TESTS=OFF -DHERMES_ERROR_ON_WARNINGS=ON -DBOUT_ENABLE_METRIC_3D=ON"
coverage: OFF

steps:
- name: Job information
run: |
echo Build: ${{ matrix.config.name }}, ${{ matrix.config.os }}
echo Configure options: ${{ matrix.config.configure_options }}
echo Configure options: ${{ matrix.build_type.configure_options }}
echo Build type: ${{ matrix.build_type.cmake_build_type }}
echo Coverage: ${{ matrix.build_type.coverage }}
echo Tests to run: ${{ matrix.build_type.test_type }}
Expand Down
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,6 @@ set(HERMES_SLOPE_LIMITER
set_property(CACHE HERMES_SLOPE_LIMITER PROPERTY STRINGS ${SLOPE_LIMITERS})
message(STATUS "Slope limiter: ${HERMES_SLOPE_LIMITER}")

set(CONDUCTION_METHODS Original ProductJK Harmonic)
set(HERMES_CONDUCTION_METHOD
Original
CACHE STRING "Parallel conduction method")
set_property(CACHE HERMES_CONDUCTION_METHOD PROPERTY STRINGS
${CONDUCTION_METHODS})
message(STATUS "Conduction method: ${HERMES_CONDUCTION_METHOD}")

# Generate the build config header

if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include/hermes_build_config.hxx")
Expand Down
11 changes: 6 additions & 5 deletions docs/sphinx/solver_numerics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -230,21 +230,22 @@ The divergence of the flux, and so the rate of change of :math:`f` in cell
Selecting slope limiter and conduction method
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hermes-3 selects both the parallel advection slope limiter and the
``Div_par_K_Grad_par_mod`` conduction discretisation at compile time
Hermes-3 selects the parallel advection slope limiter at compile time
through CMake cache options:

.. code-block:: bash

cmake -S . -B build \
-DHERMES_SLOPE_LIMITER=MC \
-DHERMES_CONDUCTION_METHOD=Original
-DHERMES_SLOPE_LIMITER=MC

``HERMES_SLOPE_LIMITER``
Available values are ``MC``, ``VanAlbada``, ``WENO3``, ``MinMod``,
``Upwind``, and ``Superbee``.

``HERMES_CONDUCTION_METHOD``

The
``Div_par_K_Grad_par_mod`` conduction discretisation can be choosen at run time with:
``conduction_method``
Selects the parallel heat conduction discretisation used in
:cpp:func:`Div_par_K_Grad_par_mod`. Available values are:

Expand Down
2 changes: 1 addition & 1 deletion external/BOUT-dev
Submodule BOUT-dev updated 298 files
16 changes: 7 additions & 9 deletions hermes-3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ class DecayLengthBoundary : public BoundaryOp {

// Get cell radial length
Coordinates* coord = mesh->getCoordinates();
Field2D dx = coord->dx;
Field2D g11 = coord->g11;
Field2D dr =
auto dx = coord->dx;
auto g11 = coord->g11;
Coordinates::FieldMetric dr =
Comment thread
ZedThree marked this conversation as resolved.
dx / sqrt(g11); // cell radial length. dr = dx/(Bpol * R) and g11 = (Bpol*R)**2

// Only implemented for cell centre quantities
Expand All @@ -149,9 +149,10 @@ class DecayLengthBoundary : public BoundaryOp {
// (0, -1) Y lower boundary (inner lower target)

// Distance between final cell centre and inner guard cell centre in normalised units
BoutReal distance =
0.5
* (dr(bndry->x, bndry->y) + dr(bndry->x - bndry->bx, bndry->y - bndry->by));

BoutReal distance = 0.5
* (dr(bndry->x, bndry->y, zk)
+ dr(bndry->x - bndry->bx, bndry->y - bndry->by, zk));

// Exponential decay
f(bndry->x, bndry->y, zk) = f(bndry->x - bndry->bx, bndry->y - bndry->by, zk)
Expand Down Expand Up @@ -186,9 +187,6 @@ int Hermes::init(bool restarting) {
output.write("Slope limiter: {}\n", hermes::limiter_typename);
options["slope_limiter"] = hermes::limiter_typename;
options["slope_limiter"].setConditionallyUsed();
output.write("Conduction method: {}\n", hermes::conduction_typename);
options["conduction_method"] = hermes::conduction_typename;
options["conduction_method"].setConditionallyUsed();

// Choose normalisations
Tnorm = options["Tnorm"].doc("Reference temperature [eV]").withDefault(100.);
Expand Down
2 changes: 2 additions & 0 deletions include/braginskii_conduction.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ private:
/// - energy_flow_ylow Energy flow diagnostics.
///
void transform_impl(GuardedOptions& state) override;

std::string conduction_method{"orginal"};
};

namespace {
Expand Down
4 changes: 2 additions & 2 deletions include/braginskii_ion_viscosity.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <bout/bout_types.hxx>
#include <bout/options.hxx>
#include <bout/vector2d.hxx>
#include <bout/vectormetric.hxx>

#include "component.hxx"

Expand Down Expand Up @@ -56,7 +56,7 @@ private:
std::string viscosity_collisions_mode; ///< Collision selection, either multispecies or
///< braginskii
Field3D nu; ///< Collision frequency for conduction
Vector2D Curlb_B; ///< Curvature vector Curl(b/B)
VectorMetric Curlb_B; ///< Curvature vector Curl(b/B)
bool bounce_frequency; ///< Modify the collision time with the bounce frequency?
BoutReal bounce_frequency_q95; ///< Input q95 for when including bounce frequency change
BoutReal bounce_frequency_epsilon; ///< Input inverse aspect ratio for including bounce
Expand Down
4 changes: 3 additions & 1 deletion include/classical_diffusion.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#ifndef CLASSICAL_DIFFUSION_H
#define CLASSICAL_DIFFUSION_H

#include <bout/coordinates.hxx>

#include "component.hxx"

struct ClassicalDiffusion : public NamedComponent<ClassicalDiffusion> {
Expand All @@ -12,7 +14,7 @@ struct ClassicalDiffusion : public NamedComponent<ClassicalDiffusion> {
static constexpr auto type = "classical_diffusion";

private:
Field2D Bsq; // Magnetic field squared
Coordinates::FieldMetric Bsq; // Magnetic field squared

bool diagnose; ///< Output additional diagnostics?
Field3D Dn; ///< Particle diffusion coefficient
Expand Down
1 change: 1 addition & 0 deletions include/component.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ struct RegisterComponent : public ComponentFactory::RegisterInFactory<DerivedTyp
: ComponentFactory::RegisterInFactory<DerivedType>(std::string(DerivedType::type)) {
}
};
using RegisterUnavailableComponent = ComponentFactory::RegisterUnavailableInFactory;

/// Faster non-printing getter for Options
/// If this fails, it will throw BoutException
Expand Down
6 changes: 4 additions & 2 deletions include/diamagnetic_drift.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#ifndef DIAMAGNETIC_DRIFT_H
#define DIAMAGNETIC_DRIFT_H

#include <bout/vectormetric.hxx>

#include "component.hxx"

/// Calculate diamagnetic flows
Expand All @@ -12,9 +14,9 @@ struct DiamagneticDrift : public NamedComponent<DiamagneticDrift> {
static constexpr auto type = "diamagnetic_drift";

private:
Vector2D Curlb_B;
VectorMetric Curlb_B;
bool bndry_flux;
Field2D diamag_form;
Coordinates::FieldMetric diamag_form;

/// For every species, if it has:
/// - temperature
Expand Down
Loading
Loading