Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
d008434
Implemented class to handle access permissions for options
cmacmackin Oct 27, 2025
03087f1
Add wrapper class to control access to Options
cmacmackin Oct 28, 2025
d54c5d0
Apply proper formatting
cmacmackin Oct 28, 2025
9b776c1
Switch transform method to using GuardedOptions
cmacmackin Oct 31, 2025
69515b9
Got everything compiling and linking. Tests still fail.
cmacmackin Nov 5, 2025
b0b444e
Reverted a bunch of uses of IS_SET()
cmacmackin Nov 5, 2025
eab3fb3
Added support for a permission to only read variable if already set
cmacmackin Oct 31, 2025
c9d08b5
Add convenience functions for setting permissions on components
cmacmackin Oct 31, 2025
9746891
Fixed broken tests
cmacmackin Oct 31, 2025
8cd32fb
Specify which variables are read/written for reaction components
cmacmackin Nov 4, 2025
93942c3
Made convenience functions more flexible
cmacmackin Nov 4, 2025
7649fbc
Substitute for all_species
cmacmackin Nov 4, 2025
06becad
Fix access permissions in more components and update tests
cmacmackin Nov 5, 2025
4e5a273
Add access permissions for Braginskii closure
cmacmackin Nov 6, 2025
cfaac45
Add access permissions for remaining unit-tested components
cmacmackin Nov 7, 2025
ee6d218
Add permission information to components for time-evolution
cmacmackin Nov 10, 2025
7355219
Added access permissions for remaining components
cmacmackin Nov 12, 2025
e508b4f
Only perform access permission checks if CHECKLEVEL >= 1
cmacmackin Nov 12, 2025
1e584f9
Added finer-grained control for which species are read/written
cmacmackin Nov 12, 2025
06aa4fb
Substitute for electrons in permission data
cmacmackin Nov 13, 2025
2b3c2a3
Updated all components to use more precise permissions
cmacmackin Nov 14, 2025
1b11009
Try to pass GuardedOptions by value in more places
cmacmackin Nov 14, 2025
aed7fa7
Switched to using class enums for permission information
cmacmackin Nov 14, 2025
6102685
Fixed various issues flagged in review
cmacmackin Nov 17, 2025
fbb0b6b
Fixed some permissions in components
cmacmackin Nov 27, 2025
b0a6c8d
Updated docs to describe Permissions/GuardedOptions
cmacmackin Dec 2, 2025
884f8c6
Apply suggestions from code review
cmacmackin Dec 8, 2025
76fc9a8
Make component variable access permissions private
cmacmackin Dec 8, 2025
ced1eaa
Various minor fixes requested by @ZedThree
cmacmackin Dec 8, 2025
e021b15
Simplified checking for nullptr
cmacmackin Dec 8, 2025
35f694e
Rename Component::setAccess
cmacmackin Dec 9, 2025
14c9329
Set names of variables with read-permission
cmacmackin Dec 9, 2025
2001ae7
Allow permission objects to be streamed and stored in Options
cmacmackin Nov 26, 2025
d1ba771
Fixed parsing of Permissions for variables containing colons
cmacmackin Nov 26, 2025
8b789b5
Provide formatter to handle writing of Permissions
cmacmackin Dec 9, 2025
d387115
Fixed various compiler warnings
cmacmackin Dec 9, 2025
13134ab
Applied recommendations from clang-tidy
cmacmackin Dec 9, 2025
7c760c5
Check for missed substitutions in variable permissions
cmacmackin Dec 12, 2025
eddbbdc
Fixed typo
cmacmackin Dec 12, 2025
982df7a
Address issues raised by @mikekryjak in review
cmacmackin Dec 16, 2025
c754df7
Use some template black magic to avoid duplication
ZedThree Dec 15, 2025
b45e289
Merge pull request #447 from boutproject/access-control-template-magic
cmacmackin Dec 16, 2025
e8f17df
Reordered/changed heading of docs so reads better as introduction
cmacmackin Jan 5, 2026
a2ac1e8
Fix issues when compiling with CHECKLEVEL 0
cmacmackin Jan 6, 2026
7ef0f04
Switch transform method to using GuardedOptions
cmacmackin Oct 31, 2025
25d45a8
Added unit test for topological sorting of components
cmacmackin Nov 26, 2025
e7a883c
Add ability to order components automatically
cmacmackin Nov 26, 2025
ea1b97e
Ensure ordering of components accounts for pre-set state variables
cmacmackin Nov 26, 2025
231e1fa
Added support for sorting components based on section permissions
cmacmackin Nov 27, 2025
d1af962
Mention new sorting and remove references to component ordering
cmacmackin Dec 2, 2025
9145fae
Check results are the same regardless of component order
cmacmackin Dec 2, 2025
9c55bfd
Check only one component can make final write
cmacmackin Dec 2, 2025
daa7c69
Fixed some incorrect access controls causing errors
cmacmackin Dec 3, 2025
3c57861
Add better comments explaining component sorting process
cmacmackin Dec 15, 2025
b1dfb25
Responded to some comments by @ZedThree
cmacmackin Jan 2, 2026
04a8977
Add missed variable permission
cmacmackin Jan 5, 2026
bec7513
Add ability for components to request additional components
cmacmackin Dec 11, 2025
cb1d7a5
Add Braginskii meta-component to activate all parts of closure
cmacmackin Dec 11, 2025
685ccde
Add documentation for creating sub-components.
cmacmackin Dec 15, 2025
c5bd589
Allow integration tests to be run in parallel in CI
cmacmackin Jan 6, 2026
736052b
Ensure reactions do not depend on order in which they are built
cmacmackin Jan 6, 2026
2485378
Revert "Allow integration tests to be run in parallel in CI"
cmacmackin Jan 6, 2026
d4e11f4
Add ability to print component order and deactivate sorting
cmacmackin Jan 9, 2026
d6cabb9
Fixed some minor permission issues
cmacmackin Jan 9, 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
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ set(HERMES_SOURCES
src/evolve_energy.cxx
src/evolve_pressure.cxx
src/evolve_momentum.cxx
src/guarded_options.cxx
src/isothermal.cxx
src/quasineutral.cxx
src/diamagnetic_drift.cxx
Expand All @@ -93,6 +94,7 @@ set(HERMES_SOURCES
src/noflow_boundary.cxx
src/neutral_parallel_diffusion.cxx
src/neutral_boundary.cxx
src/permissions.cxx
src/polarisation_drift.cxx
src/solkit_neutral_parallel_diffusion.cxx
src/hydrogen_charge_exchange.cxx
Expand All @@ -113,6 +115,7 @@ set(HERMES_SOURCES
include/anomalous_diffusion.hxx
include/classical_diffusion.hxx
include/binormal_stpm.hxx
include/braginskii_closure.hxx
include/braginskii_collisions.hxx
include/braginskii_conduction.hxx
include/braginskii_electron_viscosity.hxx
Expand All @@ -133,6 +136,7 @@ set(HERMES_SOURCES
include/fixed_density.hxx
include/fixed_fraction_ions.hxx
include/fixed_velocity.hxx
include/guarded_options.hxx
include/neutral_full_velocity.hxx
include/hermes_utils.hxx
include/hydrogen_charge_exchange.hxx
Expand All @@ -144,6 +148,7 @@ set(HERMES_SOURCES
include/neutral_parallel_diffusion.hxx
include/solkit_neutral_parallel_diffusion.hxx
include/noflow_boundary.hxx
include/permissions.hxx
include/polarisation_drift.hxx
include/quasineutral.hxx
include/reaction.hxx
Expand Down Expand Up @@ -279,6 +284,7 @@ if(HERMES_TESTS)
hermes_add_integrated_test(alfven-wave)
hermes_add_integrated_test(collfreq-braginskii-afn)
hermes_add_integrated_test(collfreq-multispecies)
hermes_add_integrated_test(component-order)

# Unit tests
option(HERMES_UNIT_TESTS "Build the unit tests" ON)
Expand Down
4 changes: 2 additions & 2 deletions docs/sphinx/boundary_conditions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ The boundary fluxes might be set by sheath boundary conditions,
which potentially depend on the density and temperature of all species.
Recycling therefore can't be calculated until all species boundary conditions
have been set. It is therefore expected that this component is a top-level
component (i.e. in the `Hermes` section) which comes after boundary conditions are set.
component (i.e. in the `Hermes` section).

Recycling has been implemented at the target, the SOL edge and the PFR edge.
Each is off by default and must be activated with a separate flag. Each can be
Expand Down Expand Up @@ -620,4 +620,4 @@ Note that if you have the density controller enabled, it will work to counteract
function = 0.01
source = Pe:source
source_time_dependent = true
source_prefactor = Pe:source_prefactor
source_prefactor = Pe:source_prefactor
14 changes: 9 additions & 5 deletions docs/sphinx/closure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ The parallel projection of diffusion from the wall in 1D
is captured in the :ref:`neutral_parallel_diffusion` top-level component, while
both parallel Braginskii transport and perpendicular pressure-diffusion for 2D/3D
are captured in the :ref:`neutral_mixed` species-level component.


A user can automatically activate all of these components at once
using the `BraginskiiClosure` component.

.. doxygenclass:: BraginskiiClosure
:members:


Collision frequency selection
Expand Down Expand Up @@ -262,8 +267,7 @@ Input

This top-level component calculates the frictional forces between each
pair of species for which collisional frequencies have been calculated
(see :ref:`Braginskii Collisions`). As such, it must be run after
`braginskii_collisions`. If the option `frictional_heating` is
(see `Braginskii Collisions component`_). If the option `frictional_heating` is
enabled then it will also calculate the energy source arising from
friction.

Expand Down Expand Up @@ -346,8 +350,8 @@ Braginskii Heat Exchange
Input
-----
This top-level component calculates the heat exchange between species
due to collisions (see :ref:`Braginskii Collisions`). As such, it must be run after
`braginskii_collisions`. There are no configurations for this component.
due to collisions (see `Braginskii Collisions component`_). There are no
configurations for this component.

Theory
------
Expand Down
Loading
Loading