From 5e5fc48efb4411ada35cefab9a79366efe1fbab7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 21 May 2020 16:16:09 +0000 Subject: [PATCH] [clang-format-command] fixes --- include/bout/region.hxx | 5 ++--- include/msg_stack.hxx | 11 ++++++----- src/bout++.cxx | 3 ++- src/fileio/impls/hdf5/h5_format.cxx | 1 - src/invert/lapack_routines.cxx | 1 - src/invert/laplacexz/impls/petsc/laplacexz-petsc.cxx | 2 +- src/mesh/difops.cxx | 2 +- src/solver/solver.cxx | 4 ++-- tests/unit/invert/laplace/test_laplace_petsc3damg.cxx | 1 - tests/unit/sys/test_options_netcdf.cxx | 1 - 10 files changed, 14 insertions(+), 17 deletions(-) diff --git a/include/bout/region.hxx b/include/bout/region.hxx index d43914e193..8dc8d81b59 100644 --- a/include/bout/region.hxx +++ b/include/bout/region.hxx @@ -123,13 +123,12 @@ #define BOUT_FOR_OMP(index, region, omp_pragmas) BOUT_FOR_SERIAL(index, region) #endif -#define BOUT_FOR(index, region) \ +#define BOUT_FOR(index, region) \ BOUT_FOR_OMP(index, region, parallel for schedule(BOUT_OPENMP_SCHEDULE)) -#define BOUT_FOR_INNER(index, region) \ +#define BOUT_FOR_INNER(index, region) \ BOUT_FOR_OMP(index, region, for schedule(BOUT_OPENMP_SCHEDULE) nowait) - enum class IND_TYPE { IND_3D = 0, IND_2D = 1, IND_PERP = 2 }; /// Indices base class for Fields -- Regions are dereferenced into these diff --git a/include/msg_stack.hxx b/include/msg_stack.hxx index cff9ebcc29..917feedfe8 100644 --- a/include/msg_stack.hxx +++ b/include/msg_stack.hxx @@ -41,11 +41,12 @@ class MsgStack; #include #include -/// The __PRETTY_FUNCTION__ variable is defined by GCC (and some other families) but is not a part -/// of the standard. The __func__ variable *is* a part of the c++11 standard so we'd like to fall back -/// to this if possible. However as these are variables/constants and not macros we can't just -/// check if __PRETTY_FUNCITON__ is defined or not. Instead we need to say if we support this -/// or not by defining BOUT_HAS_PRETTY_FUNCTION (to be implemented in configure) +/// The __PRETTY_FUNCTION__ variable is defined by GCC (and some other families) but is +/// not a part of the standard. The __func__ variable *is* a part of the c++11 standard so +/// we'd like to fall back to this if possible. However as these are variables/constants +/// and not macros we can't just check if __PRETTY_FUNCITON__ is defined or not. Instead +/// we need to say if we support this or not by defining BOUT_HAS_PRETTY_FUNCTION (to be +/// implemented in configure) #if BOUT_HAS_PRETTY_FUNCTION #define __thefunc__ __PRETTY_FUNCTION__ #else diff --git a/src/bout++.cxx b/src/bout++.cxx index a1f5f477f3..a24aaaa65b 100644 --- a/src/bout++.cxx +++ b/src/bout++.cxx @@ -655,7 +655,8 @@ Datafile setupDumpFile(Options& options, Mesh& mesh, const std::string& data_dir dump_file.addOnce(const_cast(bout::build::has_lapack), "has_lapack"); dump_file.addOnce(const_cast(bout::build::has_netcdf), "has_netcdf"); dump_file.addOnce(const_cast(bout::build::has_petsc), "has_petsc"); - dump_file.addOnce(const_cast(bout::build::has_pretty_function), "has_pretty_function"); + dump_file.addOnce(const_cast(bout::build::has_pretty_function), + "has_pretty_function"); dump_file.addOnce(const_cast(bout::build::has_pvode), "has_pvode"); dump_file.addOnce(const_cast(bout::build::has_scorep), "has_scorep"); dump_file.addOnce(const_cast(bout::build::has_slepc), "has_slepc"); diff --git a/src/fileio/impls/hdf5/h5_format.cxx b/src/fileio/impls/hdf5/h5_format.cxx index 323b322ad6..5d274fcae9 100644 --- a/src/fileio/impls/hdf5/h5_format.cxx +++ b/src/fileio/impls/hdf5/h5_format.cxx @@ -1419,4 +1419,3 @@ bool H5Format::getAttribute(const hid_t &dataSet, const std::string &attrname, B } #endif // BOUT_HAS_HDF5 - diff --git a/src/invert/lapack_routines.cxx b/src/invert/lapack_routines.cxx index fc19167a96..05d722e897 100644 --- a/src/invert/lapack_routines.cxx +++ b/src/invert/lapack_routines.cxx @@ -34,7 +34,6 @@ * */ - #include "bout/build_config.hxx" #include diff --git a/src/invert/laplacexz/impls/petsc/laplacexz-petsc.cxx b/src/invert/laplacexz/impls/petsc/laplacexz-petsc.cxx index 4ccb49ccde..b12e0f573a 100644 --- a/src/invert/laplacexz/impls/petsc/laplacexz-petsc.cxx +++ b/src/invert/laplacexz/impls/petsc/laplacexz-petsc.cxx @@ -12,7 +12,7 @@ #include "laplacexz-petsc.hxx" -#if BOUT_HAS_PETSC // Requires PETSc +#if BOUT_HAS_PETSC // Requires PETSc #include #include diff --git a/src/mesh/difops.cxx b/src/mesh/difops.cxx index e6c2525dd2..5aae80783b 100644 --- a/src/mesh/difops.cxx +++ b/src/mesh/difops.cxx @@ -491,7 +491,7 @@ const Field3D b0xGrad_dot_Grad(const Field3D &p, const Field2D &A, CELL_LOC outl Field3D result = VDDX(vx, A, outloc) + VDDY(vy, A, outloc); result /= (metric->J*sqrt(metric->g_22)); - + #if BOUT_USE_TRACK result.name = "b0xGrad_dot_Grad("+p.name+","+A.name+")"; #endif diff --git a/src/solver/solver.cxx b/src/solver/solver.cxx index 561c8fed86..bc6346b008 100644 --- a/src/solver/solver.cxx +++ b/src/solver/solver.cxx @@ -121,7 +121,7 @@ void Solver::add(Field2D& v, const std::string& name) { d.F_var = &ddt(v); d.location = v.getLocation(); d.name = name; - + #if BOUT_USE_TRACK v.name = name; #endif @@ -185,7 +185,7 @@ void Solver::add(Field3D& v, const std::string& name) { d.F_var = &ddt(v); d.location = v.getLocation(); d.name = name; - + #if BOUT_USE_TRACK v.name = name; #endif diff --git a/tests/unit/invert/laplace/test_laplace_petsc3damg.cxx b/tests/unit/invert/laplace/test_laplace_petsc3damg.cxx index a69f7a5d67..9f6956e887 100644 --- a/tests/unit/invert/laplace/test_laplace_petsc3damg.cxx +++ b/tests/unit/invert/laplace/test_laplace_petsc3damg.cxx @@ -18,7 +18,6 @@ #include "vecops.hxx" #include "bout/petsc_interface.hxx" - #if BOUT_HAS_PETSC /// Global mesh diff --git a/tests/unit/sys/test_options_netcdf.cxx b/tests/unit/sys/test_options_netcdf.cxx index ec09e18684..3dd9ff16fb 100644 --- a/tests/unit/sys/test_options_netcdf.cxx +++ b/tests/unit/sys/test_options_netcdf.cxx @@ -219,5 +219,4 @@ TEST_F(OptionsNetCDFTest, Field3DWriteCellYLow) { EXPECT_EQ(data["f3d"].attributes["cell_location"].as(), toString(CELL_YLOW)); } - #endif // BOUT_HAS_NETCDF