Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMullowney committed Dec 13, 2024
1 parent fa1dff4 commit 8d3321c
Show file tree
Hide file tree
Showing 27 changed files with 68 additions and 92 deletions.
2 changes: 1 addition & 1 deletion include/LinearSolverConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class HypreLinearSolverConfig : public LinearSolverConfig
public:
HypreLinearSolverConfig();

virtual ~HypreLinearSolverConfig() {};
virtual ~HypreLinearSolverConfig(){};

//! Process and validate the user inputs and register calls to appropriate
//! Hypre functions to configure the solver and preconditioner.
Expand Down
16 changes: 8 additions & 8 deletions include/NaluParsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,19 @@ struct NonConformalUserData : public UserData

struct WallBoundaryConditionData : public BoundaryCondition
{
WallBoundaryConditionData() {};
WallBoundaryConditionData(){};
WallUserData userData_;
};

struct InflowBoundaryConditionData : public BoundaryCondition
{
InflowBoundaryConditionData() {};
InflowBoundaryConditionData(){};
InflowUserData userData_;
};

struct OpenBoundaryConditionData : public BoundaryCondition
{
OpenBoundaryConditionData() {};
OpenBoundaryConditionData(){};
OpenUserData userData_;
};

Expand All @@ -297,34 +297,34 @@ struct OversetBoundaryConditionData : public BoundaryCondition
OVERSET_NONE = 1 ///< Guard for error messages
};

OversetBoundaryConditionData() {};
OversetBoundaryConditionData(){};
OversetUserData userData_;
OversetAPI oversetConnectivityType_;
};

struct SymmetryBoundaryConditionData : public BoundaryCondition
{
SymmetryBoundaryConditionData() {};
SymmetryBoundaryConditionData(){};
SymmetryUserData userData_;
};

struct ABLTopBoundaryConditionData : public BoundaryCondition
{
ABLTopBoundaryConditionData() {};
ABLTopBoundaryConditionData(){};
ABLTopUserData userData_;
SymmetryUserData symmetryUserData_;
};

struct PeriodicBoundaryConditionData : public BoundaryCondition
{
PeriodicBoundaryConditionData() {};
PeriodicBoundaryConditionData(){};
MasterSlave masterSlave_;
PeriodicUserData userData_;
};

struct NonConformalBoundaryConditionData : public BoundaryCondition
{
NonConformalBoundaryConditionData() {};
NonConformalBoundaryConditionData(){};
std::vector<std::string> currentPartNameVec_;
std::vector<std::string> opposingPartNameVec_;
NonConformalUserData userData_;
Expand Down
2 changes: 1 addition & 1 deletion include/Realm.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ class Realm
bool doBalanceNodes_;
struct BalanceNodeOptions
{
BalanceNodeOptions() : target(1.0), numIters(5) {};
BalanceNodeOptions() : target(1.0), numIters(5){};

double target;
int numIters;
Expand Down
2 changes: 1 addition & 1 deletion include/TpetraLinearSystemHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace nalu {

class LocalGraphArrays;

#define GID_(gid, ndof, idof) ((ndof) * ((gid) - 1) + (idof) + 1)
#define GID_(gid, ndof, idof) ((ndof) * ((gid)-1) + (idof) + 1)

enum DOFStatus {
DS_NotSet = 0,
Expand Down
2 changes: 1 addition & 1 deletion include/aero/actuator/ActuatorExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ActuatorExecutor
public:
ActuatorExecutor(const ActuatorMeta& actMeta, ActuatorBulk& actBulk);
ActuatorExecutor() = delete;
virtual ~ActuatorExecutor() {};
virtual ~ActuatorExecutor(){};
virtual void operator()() = 0;
void compute_fllc();
void apply_fllc(ActuatorBulk& actBulk);
Expand Down
4 changes: 2 additions & 2 deletions include/aero/actuator/ActuatorExecutorsFASTNgp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ActuatorLineFastNGP : public ActuatorExecutor
ActuatorBulkFAST& actBulk,
stk::mesh::BulkData& stkBulk);

virtual ~ActuatorLineFastNGP() {};
virtual ~ActuatorLineFastNGP(){};

void operator()() final;

Expand All @@ -45,7 +45,7 @@ class ActuatorDiskFastNGP : public ActuatorExecutor
ActuatorBulkDiskFAST& actBulk,
stk::mesh::BulkData& stkBulk);

virtual ~ActuatorDiskFastNGP() {};
virtual ~ActuatorDiskFastNGP(){};

void operator()() final;

Expand Down
2 changes: 1 addition & 1 deletion include/aero/actuator/ActuatorExecutorsSimpleNgp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ActuatorLineSimpleNGP : public ActuatorExecutor
ActuatorBulkSimple& actBulk,
stk::mesh::BulkData& stkBulk);

virtual ~ActuatorLineSimpleNGP() {};
virtual ~ActuatorLineSimpleNGP(){};
void operator()() final;

private:
Expand Down
2 changes: 1 addition & 1 deletion include/aero/actuator/ActuatorFLLC.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FilteredLiftingLineCorrection
const ActuatorMeta& actMeta, ActuatorBulk& actBulk);
FilteredLiftingLineCorrection() = delete;

virtual ~FilteredLiftingLineCorrection() {};
virtual ~FilteredLiftingLineCorrection(){};

/**
* @brief Compute the lift force distribution (G)
Expand Down
2 changes: 1 addition & 1 deletion include/aero/actuator/ActuatorModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct ActuatorModel
std::shared_ptr<ActuatorExecutor> actExec_;

ActuatorModel() = default;
virtual ~ActuatorModel() {};
virtual ~ActuatorModel(){};

void parse(const YAML::Node& actuatorNode);
void setup(double timeStep, stk::mesh::BulkData& stkBulk);
Expand Down
6 changes: 3 additions & 3 deletions include/tabular_props/Converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class Converter;
class ConverterFactory
{
public:
ConverterFactory() {};
~ConverterFactory() {};
ConverterFactory(){};
~ConverterFactory(){};

Converter* create(const std::string& converterType) const;
};
Expand All @@ -44,7 +44,7 @@ class Converter
public:
explicit Converter(const std::string& converterType);

virtual ~Converter() {};
virtual ~Converter(){};

/** Get the name of the variable returned by this Converter */
const std::string& name() const { return name_; }
Expand Down
6 changes: 3 additions & 3 deletions include/tabular_props/Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ double F_chi(const double Z);
class FChi
{
public:
FChi() {};
~FChi() {};
FChi(){};
~FChi(){};

double query(const double Z);
};
Expand All @@ -81,7 +81,7 @@ class FGamma
{
public:
explicit FGamma(const int nMixFrac) { zBuf_.resize(nMixFrac, 0.0); }
~FGamma() {};
~FGamma(){};

void setZStoich(const std::vector<std::vector<double>>& zStoich)
{
Expand Down
2 changes: 1 addition & 1 deletion include/xfer/FromMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class FromMesh
// nothing to do
}

~FromMesh() {};
~FromMesh(){};

struct BoundingBoxCompare
{
Expand Down
2 changes: 1 addition & 1 deletion include/xfer/ToMesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class ToMesh
// nothing to do
}

~ToMesh() {};
~ToMesh(){};

struct BoundingBoxCompare
{
Expand Down
6 changes: 3 additions & 3 deletions src/DataProbePostProcessing.C
Original file line number Diff line number Diff line change
Expand Up @@ -963,9 +963,9 @@ DataProbePostProcessing::execute()
const double t3 = enablePerfTiming_ ? NaluEnv::self().nalu_time() : 0.0;
if (enablePerfTiming_)
NaluEnv::self().naluOutputP0()
<< "DataProbePostProcessing::execute "
<< " transfer_time: " << t2 - t1 << " output_time: " << t3 - t2
<< " total_time: " << t3 - t1 << std::endl;
<< "DataProbePostProcessing::execute " << " transfer_time: " << t2 - t1
<< " output_time: " << t3 - t2 << " total_time: " << t3 - t1
<< std::endl;
}
}

Expand Down
33 changes: 13 additions & 20 deletions src/EquationSystem.C
Original file line number Diff line number Diff line change
Expand Up @@ -221,34 +221,27 @@ EquationSystem::dump_eq_time()

// output
NaluEnv::self().naluOutputP0()
<< " init -- "
<< " \tavg: " << g_sum[4] / double(nprocs) << " \tmin: " << g_min[4]
<< " \tmax: " << g_max[4] << std::endl;
<< " init -- " << " \tavg: " << g_sum[4] / double(nprocs)
<< " \tmin: " << g_min[4] << " \tmax: " << g_max[4] << std::endl;
NaluEnv::self().naluOutputP0()
<< " assemble -- "
<< " \tavg: " << g_sum[0] / double(nprocs) << " \tmin: " << g_min[0]
<< " \tmax: " << g_max[0] << std::endl;
<< " assemble -- " << " \tavg: " << g_sum[0] / double(nprocs)
<< " \tmin: " << g_min[0] << " \tmax: " << g_max[0] << std::endl;
NaluEnv::self().naluOutputP0()
<< " load_complete -- "
<< " \tavg: " << g_sum[1] / double(nprocs) << " \tmin: " << g_min[1]
<< " \tmax: " << g_max[1] << std::endl;
<< " load_complete -- " << " \tavg: " << g_sum[1] / double(nprocs)
<< " \tmin: " << g_min[1] << " \tmax: " << g_max[1] << std::endl;
NaluEnv::self().naluOutputP0()
<< " solve -- "
<< " \tavg: " << g_sum[2] / double(nprocs) << " \tmin: " << g_min[2]
<< " \tmax: " << g_max[2] << std::endl;
<< " solve -- " << " \tavg: " << g_sum[2] / double(nprocs)
<< " \tmin: " << g_min[2] << " \tmax: " << g_max[2] << std::endl;
NaluEnv::self().naluOutputP0()
<< " precond setup -- "
<< " \tavg: " << g_sum[5] / double(nprocs) << " \tmin: " << g_min[5]
<< " \tmax: " << g_max[5] << std::endl;
<< " precond setup -- " << " \tavg: " << g_sum[5] / double(nprocs)
<< " \tmin: " << g_min[5] << " \tmax: " << g_max[5] << std::endl;
NaluEnv::self().naluOutputP0()
<< " misc -- "
<< " \tavg: " << g_sum[3] / double(nprocs) << " \tmin: " << g_min[3]
<< " \tmax: " << g_max[3] << std::endl;
<< " misc -- " << " \tavg: " << g_sum[3] / double(nprocs)
<< " \tmin: " << g_min[3] << " \tmax: " << g_max[3] << std::endl;

if (reportLinearIterations_)
NaluEnv::self().naluOutputP0()
<< "linear iterations -- "
<< " \tavg: " << avgLinearIterations_
<< "linear iterations -- " << " \tavg: " << avgLinearIterations_
<< " \tmin: " << minLinearIterations_
<< " \tmax: " << maxLinearIterations_ << std::endl;

Expand Down
10 changes: 2 additions & 8 deletions src/HypreLinearSystem.C
Original file line number Diff line number Diff line change
Expand Up @@ -1757,14 +1757,8 @@ HypreLinearSystem::dumpMatrixStats()

std::ofstream myfile;
myfile.open(fname);
myfile << "rank"
<< ",lower"
<< ",upper"
<< ",num_rows"
<< ",nnz"
<< ",nnz_owned"
<< ",nnz_send"
<< ",nnz_recv" << std::endl;
myfile << "rank" << ",lower" << ",upper" << ",num_rows" << ",nnz"
<< ",nnz_owned" << ",nnz_send" << ",nnz_recv" << std::endl;
for (int i = 0; i < nprocs; ++i) {
myfile << i << "," << realm_.hypreOffsets_[i] << ","
<< realm_.hypreOffsets_[i + 1] << "," << nrows[i] << ","
Expand Down
19 changes: 8 additions & 11 deletions src/Realm.C
Original file line number Diff line number Diff line change
Expand Up @@ -1781,8 +1781,8 @@ Realm::extract_universal_constant(
// not found
if (useDefault) {
NaluEnv::self().naluOutputP0()
<< "WARNING: Reference value for " << name << " not found "
<< " using " << value << std::endl;
<< "WARNING: Reference value for " << name << " not found " << " using "
<< value << std::endl;
} else {
throw std::runtime_error(
"Realm::setup_property: reference value not found: " + name);
Expand Down Expand Up @@ -3900,9 +3900,8 @@ Realm::dump_simulation_time()

NaluEnv::self().naluOutputP0() << "Timing for Edge: " << std::endl;
NaluEnv::self().naluOutputP0()
<< " edge creation -- "
<< " \tavg: " << g_total_edge / double(nprocs) << " \tmin: " << g_min_edge
<< " \tmax: " << g_max_edge << std::endl;
<< " edge creation -- " << " \tavg: " << g_total_edge / double(nprocs)
<< " \tmin: " << g_min_edge << " \tmax: " << g_max_edge << std::endl;
}

// periodic
Expand Down Expand Up @@ -4002,9 +4001,8 @@ Realm::dump_simulation_time()

NaluEnv::self().naluOutputP0() << "Timing for skin_mesh : " << std::endl;
NaluEnv::self().naluOutputP0()
<< " skin_mesh -- "
<< " \tavg: " << g_totalSkin / double(nprocs) << " \tmin: " << g_minSkin
<< " \tmax: " << g_maxSkin << std::endl;
<< " skin_mesh -- " << " \tavg: " << g_totalSkin / double(nprocs)
<< " \tmin: " << g_minSkin << " \tmax: " << g_maxSkin << std::endl;
}

// promotion
Expand Down Expand Up @@ -4088,9 +4086,8 @@ Realm::dump_simulation_time()

NaluEnv::self().naluOutputP0() << "Timing for sort_mesh: " << std::endl;
NaluEnv::self().naluOutputP0()
<< " sort_mesh -- "
<< " \tavg: " << g_totalSort / double(nprocs) << " \tmin: " << g_minSort
<< " \tmax: " << g_maxSort << std::endl;
<< " sort_mesh -- " << " \tavg: " << g_totalSort / double(nprocs)
<< " \tmin: " << g_minSort << " \tmax: " << g_maxSort << std::endl;
}

NaluEnv::self().naluOutputP0() << std::endl;
Expand Down
6 changes: 2 additions & 4 deletions src/Simulation.C
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ Simulation::Simulation(const YAML::Node& root_node)
cudaDeviceGetLimit(&default_stack_size, cudaLimitStackSize);
cudaDeviceSetLimit(cudaLimitStackSize, nalu_stack_size);
#elif defined(KOKKOS_ENABLE_HIP)
hipError_t err =
hipDeviceGetLimit(&default_stack_size, hipLimitStackSize);
hipError_t err = hipDeviceGetLimit(&default_stack_size, hipLimitStackSize);
if (err != hipSuccess) {
/*
This might be useful at some point so keeping it and commenting out.
Expand Down Expand Up @@ -82,8 +81,7 @@ Simulation::~Simulation()
#if defined(KOKKOS_ENABLE_CUDA)
cudaDeviceSetLimit(cudaLimitStackSize, default_stack_size);
#elif defined(KOKKOS_ENABLE_HIP)
hipError_t err =
hipDeviceSetLimit(hipLimitStackSize, default_stack_size);
hipError_t err = hipDeviceSetLimit(hipLimitStackSize, default_stack_size);
if (err != hipSuccess) {
/*
This might be useful at some point so keeping it and commenting out.
Expand Down
5 changes: 2 additions & 3 deletions src/TpetraLinearSystem.C
Original file line number Diff line number Diff line change
Expand Up @@ -2148,9 +2148,8 @@ TpetraLinearSystem::writeSolutionToFile(
if (1) {
std::ostringstream osSln;

osSln << base_filename << "-"
<< "O-" << currentCount << ".sln." << p_size << "."
<< p_rank; // A little hacky but whatever
osSln << base_filename << "-" << "O-" << currentCount << ".sln." << p_size
<< "." << p_rank; // A little hacky but whatever

#define DUMP(A) \
do { \
Expand Down
5 changes: 2 additions & 3 deletions src/TpetraSegregatedLinearSystem.C
Original file line number Diff line number Diff line change
Expand Up @@ -1928,9 +1928,8 @@ TpetraSegregatedLinearSystem::writeSolutionToFile(
if (1) {
std::ostringstream osSln;

osSln << base_filename << "-"
<< "O-" << currentCount << ".sln." << p_size << "."
<< p_rank; // A little hacky but whatever
osSln << base_filename << "-" << "O-" << currentCount << ".sln." << p_size
<< "." << p_rank; // A little hacky but whatever

#define DUMP(A) \
do { \
Expand Down
5 changes: 2 additions & 3 deletions src/aero/actuator/ActuatorFunctorsSimple.C
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ ActSimpleComputeForce(
<< "Blade " << turbId // LCCOUT
<< " pointId: " << localId << std::setprecision(5)
<< " alpha: " << alpha(index) << " ws2D: " << ws2d(0) << " "
<< ws2d(1) << " " << ws2d(2) << " "
<< " Cl, Cd: " << cl << " " << cd << " lift, drag = " << lift << " "
<< drag << std::endl;
<< ws2d(1) << " " << ws2d(2) << " " << " Cl, Cd: " << cl << " " << cd
<< " lift, drag = " << lift << " " << drag << std::endl;
if (actMeta.has_output_file_) {
std::ostringstream stream;
stream << localId << ", " << alpha(index) << ", " << cl << ", " << cd
Expand Down
4 changes: 2 additions & 2 deletions src/ngp_algorithms/MdotAlgDriver.C
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ MdotAlgDriver::provide_output()
const double totalMassClosure = (rhoAccum_ + mdotInflow_ + mdotOpen_);

NaluEnv::self().naluOutputP0()
<< "Mass Balance Review:"
<< "\nDensity accumulation: " << std::setprecision(16) << rhoAccum_
<< "Mass Balance Review:" << "\nDensity accumulation: "
<< std::setprecision(16) << rhoAccum_
<< "\nIntegrated inflow: " << std::setprecision(16) << mdotInflow_
<< "\nIntegrated open: " << std::setprecision(16) << mdotOpen_
<< "\nTotal mass closure: " << std::setprecision(16) << totalMassClosure
Expand Down
Loading

0 comments on commit 8d3321c

Please sign in to comment.