Skip to content

C++ version of Kalker's FastSim algorithm, essential for railway dynamics simulations || GTest included according to the author's original provided data.

License

Notifications You must be signed in to change notification settings

criogenox/C_Cpp-version_FastSim_Algo_Railway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn

Logo

Railway applications 《 C 》

Kalker's FastSim algorithm C++ library

About the project

C++ version of Kalker's FastSim algorithm, designed for simulating rolling contact dynamics based on the simplified theory. Despite the time elapsed since its development, it efficiently calculates the forces acting on the contact patch, providing valuable insights for engineering simulations.

Why this repo?:

  • In order to provide a C++ version of a helpful contact algorithm, that regardless of being a classic simulation code, no one shares it.

    💪 don't let anyone get you down 💪

Built With

Logo Logo Logo

Additional info

Google Test (gtest) C++ testing framework to carry out and handled correctly well-structured checks ensuring the code results reliability.

Parameterized Tests:

  • It runs multiple test cases with a vector of doubles input as checking data, provided by the work's author.
  • It uses ASSERT_NEAR macro to compare floating-point results with a specified tolerance.

Setup and Teardown:

  • A method was implemented to perform any necessary initialization before running the first test, and to improve the measure of time of execution.

Benchmarking:

  • It includes timing functionality to measure the computation time for each test case.

Error Handling:

  • The parameterized implementation ensures the execution of the complete tests set, even in the event of an invalid test result.

CMake configuration: added several targets for a specific role, enabling better management of source files, libraries, and testing processes.

TARGET_SRC

  • It compiles the entire source code of the project into an executable.

TARGET_LIB

  • It creates a static library from the specified source files.
  • Its functionality testing is done by linking to the main program as entry point.

TARGET_TEST

  • It compiles the test files, enabling the run of unit tests according to the author's checking data.
  • It executes linked against the GoogleTest libraries (gtest_main, gmock_main) and the TARGET_LIB.

(back to top)

Output view sample

Test's full output: execution time, test tagging, and detailed results (especially when it fails)

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

C++ version of Kalker's FastSim algorithm, essential for railway dynamics simulations || GTest included according to the author's original provided data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published