A small update to ctest
This commit is contained in:
@@ -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)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user