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)
|
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
add_executable(ctest main.c)
|
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"
|
#include "astaroth.h"
|
||||||
|
|
||||||
|
// From Astaroth Utils
|
||||||
|
#include "src/utils/config_loader.h"
|
||||||
|
#include "src/utils/memory.h"
|
||||||
|
#include "src/utils/verification.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
AcMeshInfo info = {
|
AcMeshInfo info;
|
||||||
.int_params[AC_nx] = 128,
|
acLoadConfig(AC_DEFAULT_CONFIG, &info);
|
||||||
.int_params[AC_ny] = 64,
|
|
||||||
.int_params[AC_nz] = 32,
|
// Alloc
|
||||||
};
|
AcMesh model, candidate;
|
||||||
|
acMeshCreate(info, &model);
|
||||||
|
acMeshCreate(info, &candidate);
|
||||||
|
|
||||||
|
// Init
|
||||||
|
acMeshRandomize(&model);
|
||||||
|
acMeshApplyPeriodicBounds(&model);
|
||||||
|
|
||||||
|
// TODO load to candidate
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
acInit(info);
|
acInit(info);
|
||||||
acIntegrate(0.1f);
|
acLoad(model);
|
||||||
|
acStore(&candidate);
|
||||||
acQuit();
|
acQuit();
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Verify and destroy
|
||||||
|
acVerifyMesh(model, candidate);
|
||||||
|
acMeshDestroy(&model);
|
||||||
|
acMeshDestroy(&candidate);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user