From 84e36e2ecff37ebe172d8115a35d451f53961cc5 Mon Sep 17 00:00:00 2001 From: zy69guqi <richard.angersbach@fau.de> Date: Mon, 21 Aug 2023 19:26:56 +0200 Subject: [PATCH] Fix warnings in PostProcessingUtilities.h --- .../ChargedParticles/PostProcessingUtilities.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/showcases/ChargedParticles/PostProcessingUtilities.h b/apps/showcases/ChargedParticles/PostProcessingUtilities.h index 338f0aa8d..c633cd3bb 100644 --- a/apps/showcases/ChargedParticles/PostProcessingUtilities.h +++ b/apps/showcases/ChargedParticles/PostProcessingUtilities.h @@ -3,7 +3,7 @@ #pragma once #include <vector> -#include <math.h> +#include <cmath> #include "core/DataTypes.h" #include "lbm_mesapd_coupling/DataTypes.h" #include "lbm/field/AddToStorage.h" @@ -66,7 +66,7 @@ class ComputeSolidVolumeFraction math::GenericAABB< real_t > simulationDomain_; std::vector< real_t > z_SolidVolumeFraction_; - void printToSeparateFile(std::string filename) + void printToSeparateFile(const std::string& filename) { WALBERLA_ROOT_SECTION() { @@ -105,7 +105,7 @@ template<typename ParticleAccessor_T > void ComputeParticleProperties(const shared_ptr< ParticleAccessor_T >& ac, uint_t currentTimeStep) { - std::string filename = "ParticleProperties_" + std::to_string(currentTimeStep) + ".txt"; + std::string const filename = "ParticleProperties_" + std::to_string(currentTimeStep) + ".txt"; const std::string directoryName = "ParticleData"; // Create the directory if it doesn't exist @@ -157,7 +157,7 @@ void ComputeParticleStresses(const shared_ptr< ParticleAccessor_T >& ac, std::vector< real_t >& hydroForceGlobal, std::vector< real_t >& collisionForceGlobal, std::vector< real_t >& binCount, Vector3<real_t> gravitationForce) { - real_t diameter = 20; + real_t const diameter = real_c(20); for (uint_t i = 0; i < ac->size(); ++i) @@ -180,7 +180,7 @@ void ComputeParticleStresses(const shared_ptr< ParticleAccessor_T >& ac, template<typename ParticleAccessor_T > void ComputeCollisionFrequency(const shared_ptr< ParticleAccessor_T >& ac, uint_t& collisionCount) { - real_t diameter = real_c(20); + real_t const diameter = real_c(20); for (uint_t i = 0; i < ac->size(); ++i) @@ -207,7 +207,7 @@ void WriteStressesToFile(std::vector<real_t>& hydroStress, std::vector<real_t>& WALBERLA_ROOT_SECTION() { - std::string filename = "ParticleStresses.txt"; + std::string const filename = "ParticleStresses.txt"; const std::string directoryName = "."; // Create the directory if it doesn't exist -- GitLab