Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
3f311e0
Docs: Fix some double-backtick issues
ZedThree Jan 22, 2024
0bc5206
Docs: Update code layout
ZedThree Jan 22, 2024
297b284
Docs: Fix underline too short
ZedThree Jan 22, 2024
e6bc5c5
Docs: Don't include boutdata/boututils in docs
ZedThree Jan 22, 2024
41da8a8
Docs: Fix reference link
ZedThree Jan 22, 2024
96723d0
Docs: Fix bullet points (require blank line before start)
ZedThree Jan 22, 2024
82c0708
Docs: Fix wrong start of literal block
ZedThree Jan 22, 2024
e1591bc
Docs: Fix snippet for Scorep
ZedThree Jan 22, 2024
dcb33f4
Docs: Fix unknown role
ZedThree Jan 22, 2024
aa4a655
Docs: Fix syntax for footnote
ZedThree Jan 22, 2024
6640e94
Fix a couple of "most vexing parse" that doxygen doesn't like
ZedThree Jan 22, 2024
534fe4d
Docs: Don't keep separate doxygen config for readthedocs
ZedThree Jan 22, 2024
87ec9b0
Remove unused `#define` from petsc/slepc solvers
ZedThree Jan 22, 2024
1eb0c4f
Remove duplicate function pointer alias
ZedThree Jan 22, 2024
f47847c
Remove unnecessary type alias
ZedThree Jan 22, 2024
3ee4153
Docs: Add a couple of macros that doxygen should ignore
ZedThree Jan 22, 2024
bc43456
Docs: Don't process .cxx files
ZedThree Jan 22, 2024
37fea91
Docs: Fix some latex equations in docstrings
ZedThree Jan 23, 2024
f616515
Tweak `HypreLib` docs
ZedThree Jan 24, 2024
de2599d
Docs: Always set breathe config even if not generating files
ZedThree Jan 24, 2024
e30da8c
Docs: Don't show header to include in docs
ZedThree Jan 24, 2024
8e6c93d
Docs: Don't run doxygen on python files
ZedThree Jan 24, 2024
709de64
Docs: Fix some egregiously outdated solver docs
ZedThree Jan 24, 2024
3ed4c7c
Docs: Fix some broken links now `.cxx` files aren't included
ZedThree Jan 24, 2024
d4559e3
Docs: Fix file-level docstrings not rendering correctly
ZedThree Jan 25, 2024
8feddbb
Docs: Fix a bunch of LaTeX/codeblock rendering issues
ZedThree Jan 25, 2024
678b41e
Apply clang-format changes
ZedThree Jan 25, 2024
4be06d2
Merge branch 'next' of github.com:boutproject/BOUT-dev into fix-docs-…
dschwoerer Mar 1, 2024
f6ae060
Add MIT License text
dschwoerer Mar 1, 2024
54ee04e
Merge pull request #2875 from boutproject/fix-docs-warnings-db
bendudson Mar 11, 2024
d344f42
Revert "Docs: Don't include boutdata/boututils in docs"
dschwoerer Mar 14, 2024
f665c24
Merge pull request #2881 from boutproject/fix-docs-warnings-db
bendudson Mar 21, 2024
2e23e33
Merge branch 'next' into fix-docs-warnings
ZedThree Feb 14, 2025
5bcdd6d
Fix docstring and argument name for `Div_a_Grad_perp`
ZedThree Feb 14, 2025
c1b4837
docs: Fix some links to python docs
ZedThree Feb 14, 2025
54535bd
docs: Fix a couple of links to no longer included `.cxx` files
ZedThree Feb 14, 2025
6ea22a0
Apply black changes
ZedThree Feb 14, 2025
99b39c6
Merge remote-tracking branch 'origin/next' into fix-docs-warnings
dschwoerer Jun 29, 2026
3e1c2cb
Fix formatting
dschwoerer Jun 29, 2026
71b4525
Remove tabs from rst
dschwoerer Jun 29, 2026
47a4c13
Fir formatting and whitespace
dschwoerer Jun 29, 2026
6d08e29
Revert googletest changes
dschwoerer Jun 29, 2026
040650e
Merge pull request #3412 from boutproject/fix-docs-warnings-update
dschwoerer Jul 1, 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: 19 additions & 0 deletions LICENSE.MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion include/bout/adios_object.hxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!************************************************************************
/*!\file*******************************************************************
* Provides access to the ADIOS library, handling initialisation and
* finalisation.
*
Expand Down
2 changes: 1 addition & 1 deletion include/bout/assert.hxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
/*!\file
* Defines a macro ASSERT which throws a BoutException if a given
* condition is false. Whether the assertion is tested depends on
* the checking level, so assetions can be removed for optimised runs.
Expand Down
7 changes: 7 additions & 0 deletions include/bout/bout.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@
* either by including boutmain.hxx or by including bout/physicsmodel.hxx
* and using the BOUTMAIN macro.
*
* Outputs
* -------
*
* Any non-zero return value should halt the simulation. If the return value is
* less than zero, the exit status from BOUT++ is 0, otherwise it is the return
* value of BoutInitialise.
*
*/
int BoutInitialise(int& argc, char**& argv);

Expand Down
10 changes: 6 additions & 4 deletions include/bout/dcomplex.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
*
* 2015-03-09 Ben Dudson <bd512@york.ac.uk>
* o Removed, redefined in terms of std::complex
*
*
**************************************************************************
* Copyright 2010 B.D.Dudson, S.Farley, M.V.Umansky, X.Q.Xu
*
* Contact: Ben Dudson, bd512@york.ac.uk
*
*
* This file is part of BOUT++.
*
* BOUT++ is free software: you can redistribute it and/or modify
Expand All @@ -27,7 +27,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with BOUT++. If not, see <http://www.gnu.org/licenses/>.
*
*
*/
#ifndef BOUT_DCOMPLEX_H
#define BOUT_DCOMPLEX_H
Expand All @@ -37,7 +37,9 @@

using dcomplex = std::complex<BoutReal>;

const dcomplex Im(0, 1); // 1i
/// Imaginary unit, ``1i``
//NOLINTNEXTLINE(readability-identifier-length)
constexpr dcomplex Im{0, 1};

/// Complex type for passing data to/from FORTRAN
struct fcmplx {
Expand Down
32 changes: 16 additions & 16 deletions include/bout/difops.hxx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!******************************************************************************
* \file difops.hxx
*
*
* Differential operators
*
* Changelog:
*
* 2009-01 Ben Dudson <bd512@york.ac.uk>
* 2009-01 Ben Dudson <bd512@york.ac.uk>
* * Added two optional parameters which can be put in any order
* These determine the method to use (DIFF_METHOD)
* and CELL_LOC location of the result.
Expand All @@ -15,7 +15,7 @@
* Copyright 2010 B.D.Dudson, S.Farley, M.V.Umansky, X.Q.Xu
*
* Contact: Ben Dudson, bd512@york.ac.uk
*
*
* This file is part of BOUT++.
*
* BOUT++ is free software: you can redistribute it and/or modify
Expand All @@ -30,7 +30,7 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with BOUT++. If not, see <http://www.gnu.org/licenses/>.
*
*
*******************************************************************************/

#ifndef BOUT_DIFOPS_H
Expand Down Expand Up @@ -81,7 +81,7 @@ Field3D Grad_parP(const Field3D& apar, const Field3D& f);
* \f[
* v\mathbf{b}_0 \cdot \nabla f
* \f]
*
*
*
* @param[in] v The velocity in y direction
* @param[in] f The scalar field to be differentiated
Expand Down Expand Up @@ -150,9 +150,9 @@ inline Field3D Div_par_flux(const Field3D& v, const Field3D& f, CELL_LOC outloc,
}

/*!
* second parallel derivative
* Second parallel derivative:
* \f[
* (\mathbf{b} dot \nabla)(\mathbf{b} dot \nabla)
* (\mathbf{b} \cdot \nabla)(\mathbf{b} \cdot \nabla)
* \f]
*
* Note: For parallel Laplacian use LaplacePar
Expand All @@ -175,7 +175,7 @@ inline Field3D Grad2_par2(const Field3D& f, CELL_LOC outloc, DIFF_METHOD method)

/*!
* Parallel divergence of diffusive flux, K*Grad_par
*
*
* \f[
* \nabla \cdot ( \mathbf{b}_0 kY (\mathbf{b}_0 \cdot \nabla) f )
* \f]
Expand All @@ -199,8 +199,8 @@ Field3D Div_par_K_Grad_par(const Field3D& kY, const Field3D& f,
* Perpendicular Laplacian operator
*
* This version only includes terms in X and Z, dropping
* derivatives in Y. This is the inverse operation to
* the Laplacian inversion class.
* derivatives in Y. This is the inverse operation to
* the Laplacian inversion class.
*
* For the full perpendicular Laplacian, use Laplace_perp
*/
Expand All @@ -212,7 +212,7 @@ FieldPerp Delp2(const FieldPerp& f, CELL_LOC outloc = CELL_DEFAULT, bool useFFT
/*!
* Perpendicular Laplacian, keeping y derivatives
*
*
*
*/
Coordinates::FieldMetric
Laplace_perp(const Field2D& f, CELL_LOC outloc = CELL_DEFAULT,
Expand Down Expand Up @@ -246,18 +246,18 @@ Field2D Laplace_perpXY(const Field2D& A, const Field2D& f);

/*!
* Terms of form b0 x Grad(phi) dot Grad(A)
*
*
*/
Coordinates::FieldMetric b0xGrad_dot_Grad(const Field2D& phi, const Field2D& A,
CELL_LOC outloc = CELL_DEFAULT);

/*!
* Terms of form
* Terms of form
*
* \f[
* \mathbf{b}_0 \times \nabla \phi \cdot \nabla A
* \f]
*
*
* @param[in] phi The scalar potential
* @param[in] A The field being advected
* @param[in] outloc The cell location where the result is defined. By default the same as A.
Expand Down Expand Up @@ -291,13 +291,13 @@ constexpr BRACKET_METHOD BRACKET_CTU = BRACKET_METHOD::ctu;
* \f[
* [f, g] = (1/B) \mathbf{b}_0 \times \nabla f \cdot \nabla g
* \f]
*
*
* @param[in] f The potential
* @param[in] g The field being advected
* @param[in] method The method to use
* @param[in] outloc The cell location where the result is defined. Default is the same as g
* @param[in] solver Pointer to the time integration solver
*
*
*/
Coordinates::FieldMetric bracket(const Field2D& f, const Field2D& g,
BRACKET_METHOD method = BRACKET_STD,
Expand Down
2 changes: 1 addition & 1 deletion include/bout/field.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ FIELD_FUNC(exp, ::exp)
/// Natural logarithm of \p f over region \p rgn, inverse of
/// exponential
///
/// \f$\ln(\exp(f)) = f\f$
/// \f[\ln(\exp(f)) = f\f]
///
/// This loops over the entire domain, including guard/boundary cells by
/// default (can be changed using the rgn argument)
Expand Down
7 changes: 4 additions & 3 deletions include/bout/field_accessor.hxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/// \file
///
/// FieldAccessor
///
/// Provides quick but unsafe access to field and coordinate system data
///

#pragma once
#ifndef FIELD_ACCESSOR_H__
Expand Down Expand Up @@ -133,9 +134,9 @@ using Field3DAccessor = FieldAccessor<location, Field3D>;
///
/// Usage:
///
/// ddt(fa)[i] =
/// ddt(fa)[i] = /* expression */
///
/// where fa is a FieldAccessor, and i is an int
/// where ``fa`` is a FieldAccessor, and ``i`` is an int
///
template <CELL_LOC location, class FieldType>
BOUT_HOST_DEVICE inline BoutRealArray& ddt(const FieldAccessor<location, FieldType>& fa) {
Expand Down
96 changes: 51 additions & 45 deletions include/bout/fv_ops.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,71 +19,77 @@
#include <bout/mesh.hxx>

namespace FV {
/*!
* Div ( a Grad_perp(f) ) -- ∇⊥ ( a ⋅ ∇⊥ f) -- Vorticity
*/
Field3D Div_a_Grad_perp(const Field3D& a, const Field3D& x);
/// Vorticity:
/// \f[
/// \nabla (a \cdot \nabla_\perp(f))
/// \f]
Field3D Div_a_Grad_perp(const Field3D& a, const Field3D& f);

[[deprecated("Please use Div_a_Grad_perp instead")]] inline Field3D
Div_a_Laplace_perp(const Field3D& a, const Field3D& x) {
return Div_a_Grad_perp(a, x);
}

/*!
* Divergence of a parallel diffusion Div( k * Grad_par(f) )
*/
/// Divergence of a parallel diffusion
/// \f[
/// \nabla_\parallel(k \cdot \nabla_\parallel(f) )
/// \f]
const Field3D Div_par_K_Grad_par(const Field3D& k, const Field3D& f,
bool bndry_flux = true);

/*!
* 4th-order derivative in Y, using derivatives
* on cell boundaries.
*
* A one-sided 3rd-order derivative, given a value
* at a boundary is:
*
* d3f/dx3 ~= 16/5 f_b - 6 f_0 + 4 f_1 - 6/5 f_2
*
* where f_b is the value on the boundary; f_0 is the cell
* to the left of the boundary; f_1 to the left of f_0 and f_2
* to the left of f_1
*
* f_2 | f_1 | f_0 |
* f_b
*
* NB: Uses to/from FieldAligned coordinates
*
* No fluxes through domain boundaries
*/
/// 4th-order derivative in Y, using derivatives
/// on cell boundaries.
///
/// A one-sided 3rd-order derivative, given a value
/// at a boundary is:
///
/// \f[
/// \frac{d^3f}{dx^3} \simeq \tfrac{16}{5} f_b - 6 f_0 + 4 f_1 - \tfrac{6}{5} f_2
/// \f]
///
/// where:
///
/// - \f$f_b\f$ is the value on the boundary,
/// - \f$f_0\f$ is the cell to the left of the boundary,
/// - \f$f_1\f$ to the left of \f$f_0\f$, and
/// - \f$f_2\f$ to the left of f_1:
///
/// .. code:: text
/// f_2 | f_1 | f_0 |
/// f_b
///
/// NB: Uses to/from FieldAligned coordinates
///
/// No fluxes through domain boundaries
const Field3D D4DY4(const Field3D& d, const Field3D& f);

/*!
* 4th-order dissipation term
*
*
* A one-sided 3rd-order derivative, given a value
* at a boundary is:
*
* d3f/dx3 ~= 16/5 f_b - 6 f_0 + 4 f_1 - 6/5 f_2
*
* where f_b is the value on the boundary; f_0 is the cell
* to the left of the boundary; f_1 to the left of f_0 and f_2
* to the left of f_1
*
* f_2 | f_1 | f_0 |
* f_b
*/
/// 4th-order dissipation term
///
/// \f[
/// \frac{d^3f}{dx^3} \simeq \tfrac{16}{5} f_b - 6 f_0 + 4 f_1 - \tfrac{6}{5} f_2
/// \f]
///
/// where:
///
/// - \f$f_b\f$ is the value on the boundary,
/// - \f$f_0\f$ is the cell to the left of the boundary,
/// - \f$f_1\f$ to the left of \f$f_0\f$, and
/// - \f$f_2\f$ to the left of f_1:
///
/// .. code:: text
/// f_2 | f_1 | f_0 |
/// f_b
const Field3D D4DY4_Index(const Field3D& f, bool bndry_flux = true);

/*!
* Stencil used for Finite Volume calculations
* which includes cell face values L and R
*/
struct Stencil1D {
// Cell centre values
/// Cell centre values
BoutReal c, m, p, mm, pp;

// Left and right cell face values
/// Left and right cell face values
BoutReal L, R;
};

Expand Down
12 changes: 12 additions & 0 deletions include/bout/generic_factory.hxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/// \file
/// Base type for factories

// Copyright 2018-2022 Peter Hill, BOUT++ Team
// SPDX-License-Identifier: MIT
Comment thread
ZedThree marked this conversation as resolved.

#pragma once
#ifndef BOUT_GENERIC_FACTORY_H
#define BOUT_GENERIC_FACTORY_H
Expand Down Expand Up @@ -48,6 +52,14 @@
/// RegisterInFactory<Base, Derived, MyFactory, Options*> register("derived_type");
/// auto foo = MyFactory::getInstance().create("derived_type");
///
/// In a .cxx file the static members should be declared:
///
/// constexpr decltype(MyFactory::type_name) MyFactory::type_name;
/// constexpr decltype(MyFactory::section_name) MyFactory::section_name;
/// constexpr decltype(MyFactory::option_name) MyFactory::option_name;
/// constexpr decltype(MyFactory::default_type) MyFactory::default_type;
///
///
/// @tparam BaseType The base class that this factory creates
/// @tparam DerivedFactory The derived factory inheriting from this class
/// @tparam TypeCreator The function signature for creating a new BaseType
Expand Down
Loading
Loading