Open
Conversation
258639d to
e99ede2
Compare
4ad5842 to
609a5fb
Compare
8dacd10 to
7d1133f
Compare
Switch from SonarSource/sonarcloud-github-c-cpp@v2 to SonarSource/sonarqube-scan-action@v7 which replaces the deprecated build wrapper and scanner integration.
Migrate all TOML parsing from cpptoml to tomlplusplus. Introduce a TomlConfig typedef to insulate downstream code from the concrete library. Keep cpptoml in third_party/ with a deprecation pragma so existing includes still compile. Move BDM_ASSIGN_CONFIG_VALUE macros to a new toml_config.h and turn the old cpptoml.h utility header into a forwarding shim with a deprecation warning.
When the diffusion coefficient is 0 but decay is nonzero, apply decay as a simple element-wise multiply instead of running the full FTCS stencil. The Laplacian term vanishes with D=0, so the stencil computation is wasted work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace deprecated sonarcloud-github-c-cpp action
The
sonarcloud-github-c-cppaction used in CI was deprecated and removed. Replaced with the currentsonarcloud-github-actionand updated the build wrapper download step to use the latest API.Add missing C++ standard library includes
Added explicit
#include <cmath>tolog_range_param.handrange_param.h. These headers relied on transitive includes which can break with different compilers or standard library versions.Replace cpptoml with tomlplusplus
cpptoml is an unmaintained library (last updated 2018). Replaced it with tomlplusplus v3.4.0, an actively maintained, header-only TOML v1.0 parser. Updated all config parsing code in
param.cc,param_group.cc,simulation.cc, and thecpptoml.hcompatibility wrapper.cpptoml is kept in
third_party/with a deprecation#pragma messageso downstream code that includes it still compiles. The oldsrc/core/util/cpptoml.hutility header is now a forwarding shim to the newsrc/core/util/toml_config.h, which contains theBDM_ASSIGN_CONFIG_VALUEmacros rewritten for tomlplusplus.A
TomlConfigtypedef (using TomlConfig = toml::table) is added inparam_group.hso that downstream code never references the concrete TOML library type directly. AllAssignFromConfigsignatures useconst TomlConfig&instead of the oldconst std::shared_ptr<cpptoml::table>&.Replace NULL with nullptr
Replaced 3 uses of the C macro
NULLwith C++nullptrincommand_line_options.cc,mapped_data_array.h, andbenchmark/main.cc.Update nlohmann/json from 3.9.1 to 3.12.0
Bumps the bundled single-header JSON library to stay current. The 3.9.1 release is from 2021; 3.12.0 includes accumulated bug fixes and maintenance improvements.
Full changelog: https://github.com/nlohmann/json/releases/tag/v3.12.0
Fix DiffusionGrid::GetConcentration error label
The out-of-bounds error in
GetConcentrationincorrectly identified itself asChangeConcentrationBy.Skip FTCS solver for zero-diffusion grids
When the diffusion coefficient is 0 but decay is nonzero,
EulerGrid::DiffuseWith*now applies decay as a simple element-wise multiply instead of running the full FTCS stencil. The Laplacian term vanishes with D=0, so the stencil computation is wasted work. Also fixes two pre-existing cpplint warnings indiffusion_grid.h.