fix bug in cellular test
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
03729abc7b
commit
d6939ba8dd
37
.vscode/launch.json
vendored
37
.vscode/launch.json
vendored
@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
@ -36,7 +33,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "electrosphere.engine.Main",
|
"mainClass": "electrosphere.engine.Main",
|
||||||
"env": {
|
"env": {
|
||||||
"ALSOFT_LOGLEVEL": 4,
|
"ALSOFT_LOGLEVEL": 4
|
||||||
},
|
},
|
||||||
"vmArgs": "-Xmx4G -Xms1024m -Djava.library.path=./shared-folder -XX:+UseZGC -XX:SoftMaxHeapSize=3G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\"./tmp/heap.hprof\"",
|
"vmArgs": "-Xmx4G -Xms1024m -Djava.library.path=./shared-folder -XX:+UseZGC -XX:SoftMaxHeapSize=3G -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=\"./tmp/heap.hprof\"",
|
||||||
"projectName": "Renderer"
|
"projectName": "Renderer"
|
||||||
@ -55,7 +52,7 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "electrosphere.engine.Main",
|
"mainClass": "electrosphere.engine.Main",
|
||||||
"projectName": "Renderer",
|
"projectName": "Renderer",
|
||||||
"args" : "--headless"
|
"args": "--headless"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
@ -63,7 +60,35 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "electrosphere.engine.Main",
|
"mainClass": "electrosphere.engine.Main",
|
||||||
"projectName": "Renderer",
|
"projectName": "Renderer",
|
||||||
"args" : "--simulate"
|
"args": "--simulate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "C/C++: gcc.exe build and debug active file",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${cwd}/out/build/test_runner.exe",
|
||||||
|
"args": [
|
||||||
|
"${cmake.testArgs}"
|
||||||
|
],
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"cwd": "${cmake.testWorkingDirectory}",
|
||||||
|
"environment": [],
|
||||||
|
"externalConsole": false,
|
||||||
|
"MIMode": "gdb",
|
||||||
|
"miDebuggerPath": "C:\\ProgramData\\mingw64\\mingw64\\bin\\gdb.exe",
|
||||||
|
"setupCommands": [
|
||||||
|
{
|
||||||
|
"description": "Enable pretty-printing for gdb",
|
||||||
|
"text": "-enable-pretty-printing",
|
||||||
|
"ignoreFailures": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Set Disassembly Flavor to Intel",
|
||||||
|
"text": "-gdb-set disassembly-flavor intel",
|
||||||
|
"ignoreFailures": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"preLaunchTask": "CMake: clean rebuild"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
75
.vscode/tasks.json
vendored
75
.vscode/tasks.json
vendored
@ -1,40 +1,39 @@
|
|||||||
{
|
{
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"tasks": [
|
"tasks": [
|
||||||
|
{
|
||||||
{
|
"type": "shell",
|
||||||
"type": "shell",
|
"label": "Install Native Lib",
|
||||||
"label": "Install Native Lib",
|
"command": "cp ./out/build/libStormEngine.* ./shared-folder",
|
||||||
"command": "cp ./out/build/libStormEngine.* ./shared-folder",
|
"group": "build",
|
||||||
"group": "build",
|
"detail": "Installs the native lib locally",
|
||||||
"detail": "Installs the native lib locally",
|
"dependsOn": [
|
||||||
"dependsOn": ["CMake: build",]
|
"CMake: build"
|
||||||
},
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
{
|
"type": "cmake",
|
||||||
"type": "cmake",
|
"label": "CMake: build",
|
||||||
"label": "CMake: build",
|
"command": "build",
|
||||||
"command": "build",
|
"targets": [
|
||||||
"targets": [
|
"all"
|
||||||
"all"
|
],
|
||||||
],
|
"preset": "${command:cmake.activeBuildPresetName}",
|
||||||
"preset": "${command:cmake.activeBuildPresetName}",
|
"group": "build",
|
||||||
"group": "build",
|
"problemMatcher": [],
|
||||||
"problemMatcher": [],
|
"detail": "CMake template build task"
|
||||||
"detail": "CMake template build task"
|
},
|
||||||
},
|
{
|
||||||
{
|
"type": "cmake",
|
||||||
"type": "cmake",
|
"label": "CMake: clean rebuild",
|
||||||
"label": "CMake: clean rebuild",
|
"command": "cleanRebuild",
|
||||||
"command": "cleanRebuild",
|
"targets": [
|
||||||
"targets": [
|
"all"
|
||||||
"all"
|
],
|
||||||
],
|
"preset": "${command:cmake.activeBuildPresetName}",
|
||||||
"preset": "${command:cmake.activeBuildPresetName}",
|
"group": "build",
|
||||||
"group": "build",
|
"problemMatcher": [],
|
||||||
"problemMatcher": [],
|
"detail": "CMake template clean rebuild task"
|
||||||
"detail": "CMake template clean rebuild task"
|
}
|
||||||
}
|
]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
@ -68,8 +68,8 @@ int fluid_sim_cellular_bounds_tests(){
|
|||||||
fluid_solve_bounds(chunkCount,queue,env);
|
fluid_solve_bounds(chunkCount,queue,env);
|
||||||
|
|
||||||
{
|
{
|
||||||
int borderVal = queue[0]->d[CENTER_LOC][IX(1,1,DIM-2)];
|
float borderVal = queue[0]->d[CENTER_LOC][IX(1,1,DIM-2)];
|
||||||
int transferedVal = queue[1]->d[CENTER_LOC][IX(1,1,0)];
|
float transferedVal = queue[1]->d[CENTER_LOC][IX(1,1,0)];
|
||||||
rVal += assertEqualsFloat(borderVal,CELLULAR_TEST_PLACE_VAL,"Border value was overwritten! -- %f %f \n");
|
rVal += assertEqualsFloat(borderVal,CELLULAR_TEST_PLACE_VAL,"Border value was overwritten! -- %f %f \n");
|
||||||
rVal += assertEqualsFloat(transferedVal,CELLULAR_TEST_PLACE_VAL,"Value want not transfered from border! -- %f %f \n");
|
rVal += assertEqualsFloat(transferedVal,CELLULAR_TEST_PLACE_VAL,"Value want not transfered from border! -- %f %f \n");
|
||||||
}
|
}
|
||||||
@ -80,9 +80,9 @@ int fluid_sim_cellular_bounds_tests(){
|
|||||||
|
|
||||||
//assert that the density moved
|
//assert that the density moved
|
||||||
{
|
{
|
||||||
int borderVal = queue[0]->d[CENTER_LOC][IX(1,1,DIM-2)];
|
float borderVal = queue[0]->d[CENTER_LOC][IX(1,1,DIM-2)];
|
||||||
int orderBorderVal = queue[0]->d[CENTER_LOC][IX(1,1,DIM-3)];
|
float orderBorderVal = queue[0]->d[CENTER_LOC][IX(1,1,DIM-3)];
|
||||||
int transferedVal = queue[1]->d[CENTER_LOC][IX(1,1,0)];
|
float transferedVal = queue[1]->d[CENTER_LOC][IX(1,1,0)];
|
||||||
rVal += assertEqualsFloat(borderVal,MIN_FLUID_VALUE,"Border value has not changed! -- %f %f \n");
|
rVal += assertEqualsFloat(borderVal,MIN_FLUID_VALUE,"Border value has not changed! -- %f %f \n");
|
||||||
rVal += assertEqualsFloat(orderBorderVal,CELLULAR_TEST_PLACE_VAL,"Border value has not moved! -- %f %f \n");
|
rVal += assertEqualsFloat(orderBorderVal,CELLULAR_TEST_PLACE_VAL,"Border value has not moved! -- %f %f \n");
|
||||||
rVal += assertEqualsFloat(transferedVal,CELLULAR_TEST_PLACE_VAL,"Value want not transfered from border! -- %f %f \n");
|
rVal += assertEqualsFloat(transferedVal,CELLULAR_TEST_PLACE_VAL,"Value want not transfered from border! -- %f %f \n");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user