Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 0 additions & 21 deletions CSG/CSGImport.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
#pragma once
/**
CSGImport.h
==============

See::

stree_load_test
CSGFoundry_importTree_Test


CAUTION : SOME PARALLEL DEV NEEDS REVIEW, CONSOLIDATION::

CSG_stree_Convert.h
CSG_stree_Convert_test.cc
CSG_stree_Convert_test.sh


**/

#include <string>
#include "plog/Severity.h"
Expand Down Expand Up @@ -59,6 +41,3 @@ struct CSG_API CSGImport // HMM: maybe CSGCreate is a better name ?
CSGNode* importListnode(int nodeOffset, int partIdx, const snode& node, const sn* nd);

};



27 changes: 6 additions & 21 deletions sysrap/stree.h
Original file line number Diff line number Diff line change
Expand Up @@ -2179,28 +2179,19 @@ inline int stree::find_lvid_node( const char* q_spec ) const
return nidx ;
}











/**
stree::pick_lvid_ordinal_node
-------------------------------

For ridx_type '?' look for the frame first using rem 'R' nodes and then tri 'T' nodes
For ridx_type '?' look for the frame first using rem 'R' nodes and then tri 'T' nodes.
For ridx_type 'N' search the full nds vector.

**/
inline const snode* stree::pick_lvid_ordinal_node( int lvid, int lvid_ordinal, char ridx_type ) const
{
const snode* _node = nullptr ;
assert( ridx_type == 'R' || ridx_type == 'T' || ridx_type == '?' );
if( ridx_type == 'R' || ridx_type == 'T' ) // remainder OR triangulated
assert(ridx_type == 'N' || ridx_type == 'R' || ridx_type == 'T' || ridx_type == '?');
if (ridx_type == 'N' || ridx_type == 'R' || ridx_type == 'T') // full, remainder OR triangulated
{
_node = _pick_lvid_ordinal_node(lvid, lvid_ordinal, ridx_type );
}
Expand Down Expand Up @@ -6135,7 +6126,6 @@ inline void stree::get_remainder_nidx(std::vector<int>& nodes ) const
get_repeat_nidx(nodes, q_repeat_index, q_repeat_ordinal);
}


/**
stree::get_repeat_node
-----------------------
Expand All @@ -6148,11 +6138,8 @@ not handle the rem and tri nodes.
::

TEST=get_repeat_node stree_load_test

TEST=get_repeat_node RIDX=1 RORD=10 stree_load_test run

TEST=get_repeat_node RIDX=9 RORD=0 stree_load_test run

TEST=get_repeat_node RIDX=1 RORD=10 stree_load_test
TEST=get_repeat_node RIDX=9 RORD=0 stree_load_test
**/

inline void stree::get_repeat_node(std::vector<snode>& nodes, int q_repeat_index, int q_repeat_ordinal ) const
Expand Down Expand Up @@ -6431,8 +6418,6 @@ stree::get_global_aabb_sibling_overlaps
-----------------------------------------

TEST=get_global_aabb_sibling_overlaps stree_load_test
TEST=get_global_aabb_sibling_overlaps stree_load_test pdb

**/


Expand Down
12 changes: 12 additions & 0 deletions sysrap/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ set(TEST_SOURCES

)

set(STREE_GDML_TEST_SOURCE
stree_load_test.cc
)

set(REPORT_SOURCES
sreport.cc
)
Expand Down Expand Up @@ -176,4 +180,12 @@ foreach(SRC ${BASH_RUN_TEST_SOURCES})
)
endforeach()

foreach(SRC ${STREE_GDML_TEST_SOURCE})
get_filename_component(TGT ${SRC} NAME_WE)
add_executable(${TGT} ${SRC})
target_compile_definitions(${TGT} PRIVATE STREE_LOAD_TEST_DEFAULT_GDML="${CMAKE_SOURCE_DIR}/tests/geom/sphere_leak.gdml")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the project source dir for the GDML fixture

When Simphony is included from another project with add_subdirectory() and that parent enables tests, this points at the parent's tests/geom/sphere_leak.gdml rather than Simphony's fixture; CMake documents CMAKE_SOURCE_DIR as the top-level source tree. In that context the new ctest target is compiled with a non-existent default GDML path, so U4GDML::Read returns null and the default desc run later dereferences st. Use this project's source directory (for example PROJECT_SOURCE_DIR here) or a path relative to CMAKE_CURRENT_SOURCE_DIR instead.

Useful? React with 👍 / 👎.

target_link_libraries(${TGT} U4 CUDA::cudart)
add_test(${name}.${TGT} ${TGT})
endforeach()

set_tests_properties(${name}.SBndTest PROPERTIES DISABLED TRUE)
Loading
Loading