Skip to content

Commit

Permalink
[clang-format-command] fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 21, 2020
1 parent 73d3175 commit 5e5fc48
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 17 deletions.
5 changes: 2 additions & 3 deletions include/bout/region.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions include/msg_stack.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ class MsgStack;
#include <string>
#include <vector>

/// 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
Expand Down
3 changes: 2 additions & 1 deletion src/bout++.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,8 @@ Datafile setupDumpFile(Options& options, Mesh& mesh, const std::string& data_dir
dump_file.addOnce(const_cast<bool&>(bout::build::has_lapack), "has_lapack");
dump_file.addOnce(const_cast<bool&>(bout::build::has_netcdf), "has_netcdf");
dump_file.addOnce(const_cast<bool&>(bout::build::has_petsc), "has_petsc");
dump_file.addOnce(const_cast<bool&>(bout::build::has_pretty_function), "has_pretty_function");
dump_file.addOnce(const_cast<bool&>(bout::build::has_pretty_function),
"has_pretty_function");
dump_file.addOnce(const_cast<bool&>(bout::build::has_pvode), "has_pvode");
dump_file.addOnce(const_cast<bool&>(bout::build::has_scorep), "has_scorep");
dump_file.addOnce(const_cast<bool&>(bout::build::has_slepc), "has_slepc");
Expand Down
1 change: 0 additions & 1 deletion src/fileio/impls/hdf5/h5_format.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1419,4 +1419,3 @@ bool H5Format::getAttribute(const hid_t &dataSet, const std::string &attrname, B
}

#endif // BOUT_HAS_HDF5

1 change: 0 additions & 1 deletion src/invert/lapack_routines.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
*
*/


#include "bout/build_config.hxx"

#include <globals.hxx>
Expand Down
2 changes: 1 addition & 1 deletion src/invert/laplacexz/impls/petsc/laplacexz-petsc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "laplacexz-petsc.hxx"

#if BOUT_HAS_PETSC // Requires PETSc
#if BOUT_HAS_PETSC // Requires PETSc

#include <bout/assert.hxx>
#include <bout/sys/timer.hxx>
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/difops.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/solver/solver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion tests/unit/invert/laplace/test_laplace_petsc3damg.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "vecops.hxx"
#include "bout/petsc_interface.hxx"


#if BOUT_HAS_PETSC

/// Global mesh
Expand Down
1 change: 0 additions & 1 deletion tests/unit/sys/test_options_netcdf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,4 @@ TEST_F(OptionsNetCDFTest, Field3DWriteCellYLow) {
EXPECT_EQ(data["f3d"].attributes["cell_location"].as<std::string>(), toString(CELL_YLOW));
}


#endif // BOUT_HAS_NETCDF

0 comments on commit 5e5fc48

Please sign in to comment.