diff --git a/src/ctest/CMakeLists.txt b/src/ctest/CMakeLists.txt index f3439f3..5e01f02 100644 --- a/src/ctest/CMakeLists.txt +++ b/src/ctest/CMakeLists.txt @@ -6,4 +6,4 @@ set(CMAKE_C_STANDARD 11) set(CMAKE_C_STANDARD_REQUIRED ON) add_executable(ctest main.c) -target_link_libraries(ctest PRIVATE astaroth_core) +target_link_libraries(ctest PRIVATE astaroth_core astaroth_utils) diff --git a/src/ctest/main.c b/src/ctest/main.c index 5f31f17..44d3c12 100644 --- a/src/ctest/main.c +++ b/src/ctest/main.c @@ -21,16 +21,38 @@ #include "astaroth.h" +// From Astaroth Utils +#include "src/utils/config_loader.h" +#include "src/utils/memory.h" +#include "src/utils/verification.h" + int main(void) { - AcMeshInfo info = { - .int_params[AC_nx] = 128, - .int_params[AC_ny] = 64, - .int_params[AC_nz] = 32, - }; + AcMeshInfo info; + acLoadConfig(AC_DEFAULT_CONFIG, &info); + + // Alloc + AcMesh model, candidate; + acMeshCreate(info, &model); + acMeshCreate(info, &candidate); + + // Init + acMeshRandomize(&model); + acMeshApplyPeriodicBounds(&model); + + // TODO load to candidate + //////////////////////////////////////////////////////////////////////////////////////////////// acInit(info); - acIntegrate(0.1f); + acLoad(model); + acStore(&candidate); acQuit(); + //////////////////////////////////////////////////////////////////////////////////////////////// + + // Verify and destroy + acVerifyMesh(model, candidate); + acMeshDestroy(&model); + acMeshDestroy(&candidate); + return EXIT_SUCCESS; }