Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
486eb58
some feedback changes
laert-ll Jun 12, 2024
f7f3835
Boundary Implementation
Ujin0912 Jun 12, 2024
4f4de78
Compilation fix
Ujin0912 Jun 12, 2024
c80daa1
cmake fix
laert-ll Jun 12, 2024
14187b2
more fixes
laert-ll Jun 12, 2024
ac3f171
complete task 1
Jun 13, 2024
90e86cc
activate ci on all assignment branches
Jun 13, 2024
dd9814f
preliminary xml setup
laert-ll Jun 13, 2024
afc5f09
xml input for cuboids
laert-ll Jun 13, 2024
2fe26c2
restore old changes with FileReader, ParticleGenerator, and parameters
Jun 14, 2024
bf7fbab
fix tests
Jun 14, 2024
1d95ac0
restore old changes in fileReader and parameters
Jun 14, 2024
a3a63c2
restore old changes in fileReader, parameters, ParticleGenerator, Par…
Jun 14, 2024
f8e0c09
adjust to old changes in FileReader
Jun 14, 2024
6f676ac
use Thermostat in "performSimulation()" with hardcoded args for now
Jun 14, 2024
c5d6fb7
edit xsd
Jun 15, 2024
cd98fe4
update xsd by adding ThermostatParameters
Jun 15, 2024
66875e5
Refactoring attempt not using BoundaryController
Ujin0912 Jun 15, 2024
1987779
Compilation fix
Ujin0912 Jun 15, 2024
7617728
Merge branch 'refs/heads/Assignment4_Ujin' into Assignment4
Ujin0912 Jun 15, 2024
8a2ddbf
Gravity and some changes in main method with map
Ujin0912 Jun 15, 2024
87da42e
add and fix test
Jun 15, 2024
837398c
use unique pointers instead of copying objects by value, general fixes
Jun 15, 2024
830527c
use shared_ptr for calculator, general fixes
Jun 15, 2024
648dd15
extend xsd with BoundaryParameters, adjust test
Jun 15, 2024
751e96c
adjust XMLReaderTest
Jun 15, 2024
dd26a63
Refactoring attempt not using BoundaryController
Ujin0912 Jun 15, 2024
91dc4d6
Merge remote-tracking branch 'origin/Assignment4' into Assignment4_Ujin
Ujin0912 Jun 15, 2024
d92dffe
xml new input format
laert-ll Jun 16, 2024
c3fdb2e
Fixed BoundaryHandler and MolSim, testing BoundaryHandlerTest.cpp aga…
Ujin0912 Jun 17, 2024
8e7a959
Merge remote-tracking branch 'origin/Assignment4' into Assignment4_Ujin
Ujin0912 Jun 17, 2024
466f2a6
Mergeable with Assignment4
Ujin0912 Jun 17, 2024
94da196
some refactorings, adjust xml reader
Jun 17, 2024
1771bf8
fix null pointer error
Jun 17, 2024
615314d
small logging change
Jun 17, 2024
71f6563
preliminary particle containtainer
laert-ll Jun 17, 2024
d2148a5
CI Pipeline fix attempt
Ujin0912 Jun 18, 2024
d9abc99
CI Pipeline fix attempt - with -y and set LD_LIBRARY_PATH
Ujin0912 Jun 18, 2024
917febb
CI Pipeline fix attempt - remove LD_LIBRARY_PATH
Ujin0912 Jun 18, 2024
ba25002
CI Pipeline Fix attempt reverted + updateSimulationParameters fixed
Ujin0912 Jun 18, 2024
133d8a3
txt file fixed
Ujin0912 Jun 18, 2024
17ac3af
attempt to fix ci
Jun 18, 2024
51ad71c
attempt to fix ci by installing libxerces again
Jun 18, 2024
b6710b8
fix initializeNeighbors()
Jun 18, 2024
d2190cd
add logging for easier debugging
Jun 18, 2024
e905e94
use cellSize as divisor for correct cellIndex-calculation
Jun 18, 2024
aaa1014
rename loadCuboids and add logging
Jun 18, 2024
b9666f0
fixed initialize neighbros
laert-ll Jun 19, 2024
4d0d391
fixed initialize neighbors and populate cells
laert-ll Jun 19, 2024
e0b3586
make initializeCells() and constructors better
Jun 19, 2024
a36d48c
use size_t for indexes
Jun 19, 2024
c25f3a4
Raw to shared pointer
Ujin0912 Jun 19, 2024
26ef233
small fix
Ujin0912 Jun 19, 2024
f0ee085
Saving State before Reversing
Ujin0912 Jun 19, 2024
f708194
Revert "Saving State before Reversing"
Ujin0912 Jun 19, 2024
21f8809
Revert "small fix"
Ujin0912 Jun 19, 2024
14eb39b
Revert "Raw to shared pointer"
Ujin0912 Jun 19, 2024
9cba9f1
use smart pointers instead of raw pointers
Jun 19, 2024
793913d
use "const" in parameters
Jun 19, 2024
04d127d
fix "nan"-values
Jun 19, 2024
1dbef3f
use logleve "DEBUG" for detailed loggings
Jun 19, 2024
be5c99f
complete updateCells()
Jun 19, 2024
a43ff37
link linkedCellContainer
Jun 19, 2024
8c48dfc
fix strings
Jun 19, 2024
73582c3
Merge branch 'refs/heads/Assignment4' into Assignment4_Laert
Jun 19, 2024
7fcc410
extend xsd, thermostat, TXTReader, XMLReader, ParticleGenerator, Simu…
Jun 19, 2024
bab25d5
update xsd, update performSimulation()
Jun 19, 2024
1bae224
Merge pull request #32 from laert-ll/Assignment4_Laert
rlawnsiiiii Jun 19, 2024
967335e
fix XMLReaderTest, add XMLReaderLCTest
Jun 20, 2024
9152bb3
integrate gravity into xml, update tests and performSimulation()
Jun 20, 2024
a81a03d
update txt input files
Jun 20, 2024
63e6ca3
add input-cuboid, generateDiscs for linked-cell container, update XML…
Jun 20, 2024
f7447ce
temporary ci-fix by doing cmaking again for test-job
Jun 20, 2024
036c06d
install libxerces-c-dev again
Jun 20, 2024
2da5184
Fix in input-sun.txt and gravity
Ujin0912 Jun 20, 2024
12a8de2
improve linked-cell
Jun 20, 2024
fb37ee8
Merge branch 'refs/heads/Assignment4' into Assignment4_ci_fix
Jun 20, 2024
74cd6d8
Merge pull request #33 from laert-ll/Assignment4_ci_fix
rlawnsiiiii Jun 20, 2024
1d994ff
attempt to fix ci
Jun 20, 2024
cbafdbd
adjusted ThermostatTest for LinkedCellContainer
laert-ll Jun 20, 2024
21dadf2
attempt to fix tests in ci by adjusting paths to xml-files
Jun 20, 2024
5f686dc
added removeParticle function
laert-ll Jun 20, 2024
c92f500
added tests for LinkedCellContainer
laert-ll Jun 20, 2024
8910294
Connect linked-cell algorithm with boundaryHandler
Jun 20, 2024
94fa06c
fix build
Jun 20, 2024
917c1f4
do not sanitize, just run tests
Jun 20, 2024
8b5f769
fix linkedCellContainerTest
Jun 20, 2024
6c4c871
added LC_LJCalculatorTest and adjusted LinkedCellContainerTest
laert-ll Jun 20, 2024
3bd4832
adjustments to LC_LJCalculatorTest
laert-ll Jun 20, 2024
6009adb
Tests Fix
Ujin0912 Jun 20, 2024
833605d
fix "getBoundaryCells()" and add test
Jun 20, 2024
7b98293
removed calculateX test
laert-ll Jun 20, 2024
e20c793
changed input logic to accept xml file alone
laert-ll Jun 20, 2024
6e9e539
add debugging logs, calculateF_LC_pairwise()
Jun 20, 2024
1625959
added id to particle creation for comparison
laert-ll Jun 20, 2024
1c980ec
spdlog fix
laert-ll Jun 20, 2024
ea6ae88
tiny fix
laert-ll Jun 20, 2024
9d773cc
add debugging loggings
Jun 20, 2024
bd61e42
add sigma and epsilon
Jun 20, 2024
c8251ed
add calculateGravityLC in LC_LJCalculator
Jun 20, 2024
5a4514d
fix input-disc.xml
Jun 20, 2024
59dae07
upload a template input-cuboid.xml
Jun 20, 2024
2bc233c
make gravtiy_arg protected
Jun 20, 2024
6192484
apply gravity to oldF too
Jun 20, 2024
869bd74
revert applying gravity to oldF too
Jun 20, 2024
def5566
set velocities and forces of ghost particle to zeros
Jun 20, 2024
b7cbda6
use downcasting to call calculateFPairwise
Jun 20, 2024
bf54952
do double operation
Jun 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 38 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,61 @@ name: CI Pipeline

on:
push:
branches: [ "main", "Assignment3" ]
branches: [ "main", "Assignment*" ]
pull_request:
branches: [ "main", "Assignment3" ]
branches: [ "main", "Assignment*" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Dependencies
run: sudo apt install libxerces-c-dev
- name: Install Dependencies
run: sudo apt install libxerces-c-dev

- name: Create build directory
run: mkdir -p ${{github.workspace}}/build
- name: Create build directory
run: mkdir -p ${{github.workspace}}/build

- name: CMake Configure
run: cmake -D CMAKE_CXX_FLAGS="-fsanitize=address" -B ${{github.workspace}}/build ${{github.workspace}}
- name: CMake Configure
run: cmake -D CMAKE_CXX_FLAGS="-fsanitize=address" -B ${{github.workspace}}/build ${{github.workspace}}

- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Save build environment
uses: actions/upload-artifact@v4
with:
name: built
path: ${{github.workspace}}/build
- name: Build
run: cmake --build ${{github.workspace}}/build

test:
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Install Dependencies
run: sudo apt install libxerces-c-dev

- name: Create build directory
run: mkdir -p ${{github.workspace}}/build

- name: CMake Configure
run: cmake -B ${{github.workspace}}/build ${{github.workspace}}

- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Set execute permissions for tests
run: chmod +x ${{ github.workspace }}/build/MolSimTests ${{ github.workspace }}/build/MolSimBenchmark

- name: Check current location
run: pwd

- name: Reload build environment
uses: actions/download-artifact@v4
with:
name: built
path: ${{github.workspace}}/build
- name: list files
run: ls -l ${{ github.workspace }}

- name: Set execute permissions for tests
run: chmod +x ${{github.workspace}}/build/MolSimTests ${{github.workspace}}/build/MolSimBenchmark
- name: list files in build directory
run: ls -l ${{ github.workspace }}/build

- name: Tests
working-directory: ${{github.workspace}}/build
run: ctest -V -R '.*Test'
- name: Tests
working-directory: ${{ github.workspace }}/build
run: ctest -V -R '.*Test'
131 changes: 77 additions & 54 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,143 +10,166 @@ project(PSEMolDyn_GroupC VERSION 0.0.1)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel")

# set Release as the default build type if it is not yet set.
if(NOT CMAKE_BUILD_TYPE)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif(NOT CMAKE_BUILD_TYPE)
endif (NOT CMAKE_BUILD_TYPE)

# ----------------------------------------Adding Libraries-------------------------------------------------
# Fetch spdlog from GitHub
FetchContent_Declare(
spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog
GIT_TAG v1.x
GIT_TAG v1.x
)
FetchContent_MakeAvailable(spdlog)

FetchContent_Declare(
cxxopts
GIT_REPOSITORY https://github.com/jarro2783/cxxopts
GIT_TAG master
cxxopts
GIT_REPOSITORY https://github.com/jarro2783/cxxopts
GIT_TAG master
)
FetchContent_MakeAvailable(cxxopts)

FetchContent_Declare(
gtest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG main
GIT_TAG main
)
FetchContent_MakeAvailable(gtest)

FetchContent_Declare(
benchmark
GIT_REPOSITORY https://github.com/google/benchmark
GIT_TAG main
GIT_TAG main
)
FetchContent_MakeAvailable(benchmark)

find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif ()

# ------------------------------------------------------------------------------------------------------------

# collect all cpp files
file(GLOB_RECURSE MY_SRC
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/input_schema.cxx"
)

file(GLOB_RECURSE TEST_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/tests/**/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/tests/**/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/objects/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/calculators/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/tests/**/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/tests/**/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/objects/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/calculators/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/boundaries/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/utils/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/utils/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/input_schema.cxx"
)

file(GLOB_RECURSE BENCHMARK_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/benchmark/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/benchmark/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/objects/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/objects/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/calculators/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/calculators/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/benchmark/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/benchmark/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/objects/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/objects/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/calculators/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/calculators/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/utils/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/src/utils/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/src/io/in/input_schema.cxx"
)

#------------------------------------------LOGGING---------------------------------------------------------
# get the log level from the command line
set(log_level "INFO" CACHE STRING "Log level")
# check if the log level is defined in the environment
if (DEFINED ENV{LOG_LEVEL})
set(log_level $ENV{LOG_LEVEL})
else ()
set(log_level "INFO")
endif ()

# define the valid log levels
set(valid_log_levels "TRACE" "DEBUG" "INFO" "WARN" "ERROR" "CRITICAL" "OFF")

# check if the log level is valid
if(NOT log_level IN_LIST valid_log_levels)
if (NOT log_level IN_LIST valid_log_levels)
message(FATAL_ERROR "Invalid log level: ${log_level}. Valid log levels are: ${valid_log_levels}")
endif()
endif ()

# define the SPDLOG_ACTIVE_LEVEL macro
add_compile_definitions(SPDLOG_ACTIVE_LEVEL=${log_level})
add_compile_definitions(LOG_LEVEL="${log_level}")
message(STATUS "Log level: ${log_level}")
#-----------------------------------------------------------------------------------------------------------
# create make target
add_executable(MolSim ${MY_SRC})
add_executable(MolSimTests ${TEST_SOURCES})
add_executable(MolSim ${MY_SRC}
tests/io/in/XMLReaderTest.cpp)
add_executable(MolSimTests ${TEST_SOURCES}
tests/io/in/XMLReaderTest.cpp)
add_executable(MolSimBenchmark ${BENCHMARK_SOURCES})

# set cxx standard. You may raise this if you want.
target_compile_features(MolSim
PRIVATE
cxx_std_17
cxx_std_17
)

target_include_directories(MolSim
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/libs/libxsd
${CMAKE_CURRENT_SOURCE_DIR}/libs/libxsd
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/src
)

target_include_directories(MolSimTests
PRIVATE
target_include_directories(MolSimTests
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/tests
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/libs/libxsd
)

target_include_directories(MolSimBenchmark
PRIVATE
target_include_directories(MolSimBenchmark
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/benchmark
${CMAKE_CURRENT_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/libs/libxsd
)

target_link_libraries(MolSim
# stuff that is used in headers and source files
PUBLIC
xerces-c
xerces-c
PRIVATE
spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>
gtest
gtest_main
cxxopts
spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>
gtest
gtest_main
cxxopts
)

target_link_libraries(MolSimTests
PRIVATE
gtest
gtest_main
spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>
PRIVATE
xerces-c
gtest
gtest_main
spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>
)

target_link_libraries(MolSimBenchmark
PRIVATE
benchmark
spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>
gtest
gtest_main
PRIVATE
xerces-c
benchmark
spdlog::spdlog $<$<BOOL:${MINGW}>:ws2_32>
gtest
gtest_main
)

add_test(NAME MolSimTests COMMAND MolSimTests)
Expand All @@ -155,10 +178,10 @@ add_test(NAME MolSimTests COMMAND MolSimTests)
# depending on the compiler different flags are used
target_compile_options(MolSim
PRIVATE
$<$<CXX_COMPILER_ID:Clang>:-Wall -fopenmp>
$<$<CXX_COMPILER_ID:Clang>:-Wall -fopenmp>
)

list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)

include(doxygen)
include(CTest)
include(CTest)
27 changes: 17 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ In order to build and run this code, you need the following tools installed on y

2. Build the code:

`cmake -Dlog_level={WANTED_LOG_LEVEL} ..`
`cmake ..`

The default log level is `INFO`.

If you wish to set the log level manually, run:
`LOG_LEVEL={WANTED_LOG_LEVEL} cmake ..`

Valid log levels are: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `CRITICAL`, `OFF`.


3. Make:

`make -j $(nproc)`
Expand All @@ -34,12 +40,13 @@ In order to build and run this code, you need the following tools installed on y

4. Run the code:

`./MolSim {INPUT} {DELTA_T} {END_TIME} {OUTPUT_WRITER} {CALCULATOR}`
`./MolSim {INPUT} {DELTA_T} {END_TIME} {OUTPUT_WRITER} {CALCULATOR} {BOUNDARIES}`

Example calls:
- `./MolSim --help`
- `./MolSim --input=../resources/input-sun.txt --delta_t=0.014 --end_time=1000 --output=vtk --calculator=sv`
- `./MolSim --input=../resources/input-cuboid.txt --delta_t=0.0002 --end_time=5 --output=vtk --calculator=lj`
Example calls:
- `./MolSim --help`
- `./MolSim --input=../resources/input-sun.txt --delta_t=0.014 --end_time=1000 --output=vtk --calculator=sv`
- `./MolSim --input=../resources/input-cuboid.txt --delta_t=0.0002 --end_time=5 --output=vtk --calculator=lj`
- `./MolSim --input=../resources/input-cuboid.xml --output=vtk --calculator=lj`

5. Available options for arguments:

Expand All @@ -56,9 +63,9 @@ In order to build and run this code, you need the following tools installed on y
`{CALCULATOR}`: The calculator to use. Available options are sv, lj or dummy.

6. If you wish to execute the tests:
- `./MolSimTests`
or
- `ctest -V -R '.*Test'`
- `./MolSimTests`
or
- `ctest -V -R '.*Test'`

7. If you wish to execute the benchmarks:
- `./MolSimBenchmark`
- `./MolSimBenchmark`
8 changes: 6 additions & 2 deletions benchmark/CalculatorLJBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "../src/calculators/LJCalculator.h"
#include "../src/objects/ParticleContainer.h"
#include "../src/io/in/FileReader.h"
#include "../src/io/in/TXTReader.h"
#include "benchmark/benchmark.h"
#include <memory>

Expand All @@ -11,8 +12,11 @@ static void BM_LJCalculator(benchmark::State& state) {
state.range(0) == 2 ? 0.001 :
state.range(0) == 3 ? 0.0005 : 5;
const double end_time = 5.0;
std::unique_ptr<calculators::Calculator> calculator = std::make_unique<calculators::LJCalculator>(1, 5, 5.31608);
ParticleContainer particleContainer = FileReader::readFile("../resources/input-cuboid.txt");
std::unique_ptr<calculators::Calculator> calculator = std::make_unique<calculators::LJCalculator>(5.31608);

fileReaders::TXTReader fileReader = fileReaders::TXTReader();
SimulationDataContainer simulationDataContainer = fileReader.readFile("../resources/input-cuboid.txt");
ParticleContainer particleContainer = *simulationDataContainer.getParticleContainer();

for (auto _ : state) {
double current_time = 0;
Expand Down
Loading