-
Notifications
You must be signed in to change notification settings - Fork 65
Refactor Capstone support #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5792912
to
537b4e3
Compare
3d9c856
to
d377593
Compare
Running into problem with empty parts after |
This occurred with the capVol wing case with METIS on 4 procs. Log for mpirun -np 4 ./capVol -gm 3 wing_surf_only.cre out.cre
|
Metis balancing for meshes with empty parts is fixed in #499 |
cd5cb4b
to
18c73b8
Compare
- Add -m option to convert mesh database to MDS during adaptation. This option speeds up adaptation. - This tests the conversion capability. Signed-off-by: Aiden Woodruff <[email protected]>
- Replace writeCre with cs.save_file. - Replace ma::adaptVerbose with ma::adapt (the production version). - Remove ma::Input arguments which are just reinforcing the defaults. - If the defaults chagne we shouldn't force using the old ones. - Don't delete old mesh model before adapting. - Change CapstoneModule name. - Reorder mds mesh after conversion. Signed-off-by: Aiden Woodruff <[email protected]>
- Disable verify() for non-volume meshes. Signed-off-by: Aiden Woodruff <[email protected]>
Signed-off-by: Aiden Woodruff <[email protected]>
- gmi_cap.h: add gmi_cap_probe and gmi_cap_load_some functions. - wrap headers and functions requiring C++ into #ifdef __cplusplus. - remove using namespace declarations. - add import with gmodel. - gmi_cap.cc: add using namespace CreateMG. - add Geometry namespace to enums (i.e. VERTEX, EDGE, FACE, REGION). - add gmodel to struct cap_model. - use reinterpret_cast instead of C-style casts. - (gmi_cap_start): handle initialization of static capstonemodule. - (gmi_cap_stop): destruct static capstone module. - (create_cre): uncomment function. - (gmi_cap_probe): add short overload to just get mesh names. - add long overload to get model and mesh contents. - (gmi_register_cap): register create_cre for gmi_load. - (owned_import): uncomment function. - (gmi_cap_load): call gmi_cap_load_some with all mesh names. - (gmi_cap_load_some): add new function to only load specific mesh names. - (gmi_import_cap): add overload to use current geometry. - replace PCU_ALWAYS_ASSERT with if statement and gmi_fail. - test/capLoadSome.cc: add utility to test gmi_cap_load_some. - test/capProbe.cc: add utility to test gmi_cap_probe. - test/CMakeLists.txt: add capLoadSome and capProbe. Signed-off-by: Aiden Woodruff <[email protected]>
- gmi_cap/CMakeLists.txt: update link libraries. - gmi_cap/gmi_cap.h: add function documentation. - add doxygen group Signed-off-by: Aiden Woodruff <[email protected]>
- apf_cap/CMakeLists.txt: - apf_cap/apfCAP.h: move MeshCAP definition to apfCAP.cc. - add function documentation. - (hasCAP): new function. - add copyright notice. - fix #include guard name. - remove namespace using declarations. - forward declare arguments. - remove unnecessary #includes. - (createMesh): rename to createCapMesh. - similar to loadMdsMesh, etc - (createCapMesh): add overload using existing gmi_model. - (getCapNative): add function to replace MeshCAP::getMesh functionality. - test/cap*: replace createMesh with createCapMesh. - update #includes now that apf_cap doesn't have anything. - remove using namespace CreateMG::*. - prefer MDBI/GDBI to long names. - apf_cap/apfCAP.cc: reorganize #includes. - add using namespace CreateMG and alias commonly used CreateMG::Mesh (which would also conflict with apf::Mesh). - (hasCAP): add definition. - (MeshCAP): add class definition from apfCAP.h - add ownership of mesh database interface in case we use the gmi_model createCapMesh. - (MeshCAP::MeshCAP): use Capstone get_dimension. - add MeshMG:: namespace where needed. - light reformatting. - (createMesh): remove unused function (with non-existent capMesh* type). - (castEntity): remove unused function. Signed-off-by: Aiden Woodruff <[email protected]>
- gmi_cap/gmi_cap.h: add gmi_cap_write. - gmi_cap/gmi_cap.cc (gmi_cap_write): add function to write native capstone CRE file. - apf_cap/apfCAP.h: add createCapMesh with no mesh name to load first Capstone mesh model. - remove trailing whitespace. - add generateCapMesh to generate meshes. - add makeEmptyCapMesh for copying. - add disownCapModel like disownMdsModel. - apf_cap/apfCAP.cc: add AppProcessor for Functions. - (MeshCAP): add setupAdjacencies helper and model ownership boolean. - (MeshCAP::setupAdjacencies): always setup complete adjacencies. - (MeshCAP::MeshCAP): use setupAdjacencies. - (MeshCAP::~MeshCAP): only destroy model if owned. - add new CreateCapMesh, makeEmptyMesh, generateCapMesh, disownCapModel function definitions. - test/capVol: reorganize #includes. - use exceptions and add new Args class. - add extensive help text with raw string literal. - refactor main into functions. - add before/after vtk flags. - add flag to force splitter/balancer. - test/testing.cmake: reduce capVol test cases without new flag. Signed-off-by: Aiden Woodruff <[email protected]>
- test/capVolSizeFields.h (CylBoundaryLayer): use ma::getBoundingBox which does PCU::Max. Signed-off-by: Aiden Woodruff <[email protected]>
- test/testing.cmake: add parallel capVol cases. Signed-off-by: Aiden Woodruff <[email protected]>
18c73b8
to
d92206b
Compare
- gmi_cap/gmi_cap.h: remove #include gmi.h and forward declare gmi_model/gmi_ent. - rename gmi_cap_load_some to gmi_cap_load_selective. - update references to gmi_cap_load_some. - (gmi_cap_write): add documentation. - (gmi_cap_probe): add documentation. - (gmi_cap_load_selective): add documentation. - gmi_cap/gmi_cap.cc: rename gmi_cap_load_some to gmi_cap_load_selective. - apf_cap/apfCAP.h: add \file documentation block. - remove forward declarations (i.e. pcu namespace) from Doxygen with empty \cond. - add apf_cap documentation group. - rename gmi_cap_load_some to gmi_cap_load_selective. - add missing \param documentation - test/capLoadSome.cc: remove #include <apf*.h> - replace gmi_cap_load_some with gmi_cap_load_selective. - sort #include blocks. - test/capVol.cc: remove obsolete #include <CapstoneModule> and <CreateMG_Framework_Mesh> now that the details have been refactored into apf_cap. - remove using namespace declaration. - replace gmi_cap_load_some with gmi_cap_load_selective. Signed-off-by: Aiden Woodruff <[email protected]>
- test/testing.cmake: further limit default capVol test set. - remove tests that took more than 500 seconds. Signed-off-by: Aiden Woodruff <[email protected]>
- test/capVolSizeFields.h: add Shock2 which is similar to the old cube shock (Shock) but with steeper gradation toward the shock and a minimum size (the minimum has the biggest speed impact). - also the new Shock2 is a little more geometry-agnostic wrt bounds. - (CylBoundaryLayer): update lion_oprint statements now that there is a distinct Shock2 class. - test/capVol.cc: use Shock2 as cube shock (input 3). - test/testing.cmake: re-enable CubeMds3d cases now that they use the faster size-field. - remove PUMI_TEST_CAPVOL_FULL section so that the only additional flag is PUMI_TEST_CAPVOL_EXTRA. Signed-off-by: Aiden Woodruff <[email protected]>
- gmi_cap/gmi_cap.cc (gmi_cap_probe): check return value of reader->probe for failure (missing file, etc.) and gmi_fail. Signed-off-by: Aiden Woodruff <[email protected]>
- test/cap2vtk.cc: remove obsolete #includes. - replace direct Capstone calls with new gmi_cap/apf_cap APIs. - use exceptions to ensure allocated objects are cleaned up. - test/cap_closestPoint.cc: replace direct capstone calls with new APIs. - test/cap_inClosureOf.cc: replace direct capstone calls with new APIs. Signed-off-by: Aiden Woodruff <[email protected]>
Signed-off-by: Aiden Woodruff <[email protected]>
- test/capCheckParam.cc: remove most direct capstone #includes, except Geometry/Mesh Frameworks (and only directly). - use new apf_cap APIs to load geometry/mesh. - (checkParameterization): fix indentation. - replace printf with cout. - test/capGeomTest.cc: remove obsolete and direct Capstone #includes. - use new apf_cap APIs to load geometry/mesh. - replace ma::Vector with apf::Vector3, ma::MeshEntity with apf::MeshEntity, ma::Iterator with apf::MeshIterator, and remove #include <ma.h> - these are all typedefs, but should be regarded as internal to ma. Signed-off-by: Aiden Woodruff <[email protected]>
- gmi_cap/gmi_cap.h: prioritize system files over local ones. Signed-off-by: Aiden Woodruff <[email protected]>
- gmi_cap/gmi_cap.h: use CreateMG_CoreDefs.h for M_GTopo i.e. Handle and forward declare GDBI. - gmi_cap/gmi_cap.cc: move CreateMG_Framework_Geometry.h here instead to reduce TU size. - sort #include blocks. - gmi_cap/CMakeLists.txt: update public link libraries. - apf_cap/apfCAP.h: rename getCapNative to exportCapNative (which is congruent with gmi_export_cap). - (disownCapModel): fix doxygen block. - (getCapId): add function to facilitate conversion from apf::MeshEntity to M_MTopo. forward declare MeshEntity. - (getCapEntity): add function to convert M_MTopo to MeshEntity. - (loadCapSizing): add function to load Capstone sizing from a vector of Capstone Metric6s. - add convenience overload to create `apf::Field`s. - (loadCapSizingFile): add function to load Capstone sizing from a bulk sizing file. - add convenience overload to create `apf::Field`s. - (has_smoothCapAnisoSizes): change CAP to Cap to unify convention. - (smoothCapAnisoSizes): change CAP to Cap to unify convention. - apf_cap/apfCAPsizing.cc: add separate file with sizing-related functions that generally do not need to access the full MeshCAP interface (although at some point the interface may be moved to an internal apfCAPmesh.h file). - (load_file): move here from test/capAdapt.cc. - (doSmoothing): refactor from smoothCapAnisoSizes for reuse in loadCapSizingFile. - (loadCapSizing): add function definition, moved from test/capAdapt.cc convertMetric6ToAnisoFields. - add overload definition. - (loadCapSizingFile): add function definition from test/capAdapt loadSizing. - (has_smoothCapAnisoSizes): move from apfCAP.cc. - (smoothCapAnisoSizes): move from apfCAP.cc and use doSmoothing and loadCapSizing. - apf_cap/apfCAP.cc (getCapId, getCapEntity): define functions. - (exportCapNative): rename function. fix error message. - apf_cap/CMakeLists.txt: add apfCAPsizing.cc. - update link libraries. - fix HAVE_CAPSTONE_SIZINGMETRICTOOL check for Capstone 12.5.2. - test/capAdapt.cc: remove direct Capstone #includes and clean other unneeded headers. - (load_file, decompose_metric, loadSizing, convertMetric6toAnisoFields, makeApfInterfaceWithSizing): remove functions and use new apf_cap interfaces. - remove CapstoneModule. - load gmi_model everywhere and only rank 0 gets full mesh. - use apf::makeEmptyCapMesh instead of direct Capstone API. - destroy model (and always mark unowned). - test/capCheckParam.cc: rename getCapNative to exportCapNative. - test/cap_smooth.cc: rename has_smoothCAPAnisoSizes to has_smoothCapAnisoSizes. - test/CMakeLists.txt: update capAdapt and capCheckParam linking (the latter needs real Capstone headers now). Signed-off-by: Aiden Woodruff <[email protected]>
- change HAVE_CAPSTONE_SIZINGMETRICTOOL to PUMI_HAS_CAPSTONEMETRICTOOL to get ahead of #477. Signed-off-by: Aiden Woodruff <[email protected]>
- CMakeLists.txt: change capstone option to PUMI_ENABLE_CAPSTONE to avoid collision, but still recognize old ENABLE_CAPSTONE flag. - rename compile definition to PUMI_HAS_CAPSTONE - apf_cap/CMakeLists.txt, gmi_cap/CMakeLists.txt: use PUMI_ENABLE_CAPSTONE. - fix PUMI_HAS_CAPSTONE_SIZINGMETRICTOOL. - apf/apfMesh.cc, ma/maSnap.cc: use PUMI_HAS_CAPSTONE - test/CMakeLists.txt, test/testing.cmake: use PUMI_ENABLE_CAPSTONE and PUMI_HAS_CAPSTONE_SIZINGMETRICTOOL. Signed-off-by: Aiden Woodruff <[email protected]>
- apf_cap/apfCAP.h: add extractCapSizing. - apf_cap/apfCAPsizing.cc: refactor first part of smoothCapAnisoSizes into extractCapSizing and then use the function for smoothing. Signed-off-by: Aiden Woodruff <[email protected]>
- apf_cap/apfCAP.h: add apf_cap_sizing subgroup and document new functions. added direction since it's non-obvious based on const-ness alone. Signed-off-by: Aiden Woodruff <[email protected]>
- test/capAdapt.cc: make Args a struct and remove accessors in favor of simple members. - add before.vtk and after.vtk prefix name arguments - only write vtks if those arguments are given Signed-off-by: Aiden Woodruff <[email protected]>
@cwsmith please review when you get a chance. |
Also might be good to get Jacob's eyes on this since there are substantial API changes and he might have inputs. |
/runtests |
Build Log |
- test/capCheckParam.cc: use apf APIs to call the same underlying Capstone ones. - reformat table. - check edges as well as faces. - enable lion error messages - test/CMakeLists.txt: remove obsolete capVol include dir. - remove obsolete capCheckParam link libraries. Signed-off-by: Aiden Woodruff <[email protected]>
- test/capNativeAdapt.cc: similar to simxAnisoAdapt, add utility to run native capstone adaptation for testing/timing purposes. - test/CMakeLists.txt: add capNativeAdapt. - apf_cap/apfCAP.h: add loadCapSizingFileMetrics to facilitate loading sizing/vmap files. - apf_cap/apfCAPsizing.cc (load_file): add error checking for file open failure. - (loadCapSizingFileMetrics): refactor file loading/remapping part of loadCapSizingFile into this function. doesn't require writing new code and allows me to keep the SFINAE load_file function limited to apfCAPsizing.cc Signed-off-by: Aiden Woodruff <[email protected]>
Refactor Capstone support
apf_cap
gmi_cap
using namespace
declarations from the global scope#include
s in favor of forward declaration.CreateMG_CoreDefs.h
for M_GTopo because it's a typedef to at template.test cases
CylBoundaryLayer
).