TerraNeo: Refactor temperature initialization methods and update parameters for improved flexibility
Summary
This merge request includes updates and improvement to address issue #287 (closed) . The changes are aimed at enhancing functionality, fixing bugs, and improving code quality. It also ensures compatibility with older versions and includes a new test case for legacy parameter files.
Changes Made
- Temperature Initialization Parameter Refactoring:
- Added new switch parameter
initialTemperatureDeviatonMethodfor different temperature deviation methods, includingSINGLE_SPH,RANDOM_SUPERPOSITION_SPH, andWHITE_NOISE. - Merged parameter
noiseFactortobuoyancyFactor - Added
superpositionSPHRandomSeedfor controlling the coefficients generated inRANDOM_SUPERPOSITION_SPH - Parameters related are regroupped in
.prmfiles - Remove unused parameters, e.g.
temperatureSphericalHarmonic - Include
versionparameter is added in the file for version control (Update 2024.12.19 - 2) -
shearHeatingScalingis renamed tolithosphereShearHeatingScaling(Update 2024.12.20)
- Added new switch parameter
- Temperature Initialization Code Cleanup:
- Rename some of the classes and structs to remove ambiguity and improve clarity.
- Moved
initialTemperatureSteepnessas a variable inTN.initialisationParam, it fits better there. -
sphToolis created atParameterIO.hpp, we don't need to create it again and again in function that returns the temperature -
temperatureSingleSPHandtemperatureRandomSuperpositioneSPHare created for easier code-reading - Now
TemperatureInitializationParametersgets a copy ofTemperatureDeivationInitialisationParametersfromTerraNeoParameters, so we don't need to awkwardly pass every single parameter to the temperature methods
- Bug Fixes:
- Moved the generation of
superpositionRandatParameterIO.hppfrom function that returns the temperature at each point
- Moved the generation of
Parameter File Version 0.2 Standard (Update 2024.12.19 - 2)
This merge request establishes version 0.2 as the new standard for parameter files. TerraNeo parameter files now require a version field, with version 0.2; indicating compliance with the updated structure and features. Files without a version field will default to version 0.1 to maintain backward compatibility. The introduction of versioning ensures clarity and enables seamless evolution of the parameter file format in future updates.
Additional Updates
2024.12.19 - 1
- Backward Compatibility: Adjusted code to support old parameter file versions.
- New Test Case: Added a dedicated test case to validate legacy parameter file functionality
2024.12.19 - 2
- Add versioning support to parameter files and update test configurations
- A new ParameterFileVersion struct is created for this specific purpose
- All
.prmfile withoutversionparameter will be seen as version0.1(previous version)
2024.12.20
-
shearHeatingScalingis renamed tolithosphereShearHeatingScalingas discussed in the meeting on 2024.12.20
Edited by Parry Choi