Skip to content

Commit 94e6747

Browse files
author
pshriwise
committed
Using internal cubit progress bar to report faceting progress.
1 parent 059a258 commit 94e6747

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

export_dagmc_cmd/DAGMCExportCommand.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ DAGMCExportCommand::DAGMCExportCommand() :
5353
load_message <<"Loaded DAGMC export plugin." << std::endl;
5454
CubitInterface::get_cubit_message_handler()->print_error(load_message.str().c_str());
5555
}
56+
57+
progTool = new TtyProgressTool();
5658
}
5759

5860
DAGMCExportCommand::~DAGMCExportCommand()
@@ -598,6 +600,9 @@ moab::ErrorCode DAGMCExportCommand::create_curve_facets(refentity_handle_map& cu
598600

599601
// Map iterator
600602
refentity_handle_map_itor ci;
603+
604+
progTool->clear_all();
605+
progTool->start(0,curve_map.size(),"FACETING CURVES");
601606

602607
// Create geometry for all curves
603608
GMem data;
@@ -705,7 +710,10 @@ moab::ErrorCode DAGMCExportCommand::create_curve_facets(refentity_handle_map& cu
705710
rval = mdbImpl->add_entities(ci->second, &edges[0], edges.size());
706711
if (moab::MB_SUCCESS != rval)
707712
return moab::MB_FAILURE;
713+
714+
progTool->step();
708715
}
716+
progTool->end();
709717

710718
if (!verbose_warnings && curve_warnings < 0) {
711719
message << "Suppressed " << -curve_warnings
@@ -727,6 +735,9 @@ moab::ErrorCode DAGMCExportCommand::create_surface_facets(refentity_handle_map&
727735

728736
DLIList<TopologyEntity*> me_list;
729737

738+
progTool->clear_all();
739+
progTool->start(0,surface_map.size(),"FACETING_SURFACES");
740+
730741
GMem data;
731742
// Create geometry for all surfaces
732743
for (ci = surface_map.begin(); ci != surface_map.end(); ++ci) {
@@ -836,8 +847,12 @@ moab::ErrorCode DAGMCExportCommand::create_surface_facets(refentity_handle_map&
836847
rval = mdbImpl->add_entities(ci->second, facets);
837848
if (moab::MB_SUCCESS != rval)
838849
return moab::MB_FAILURE;
850+
851+
progTool->step();
839852
}
840853

854+
progTool->end();
855+
841856
return moab::MB_SUCCESS;
842857
}
843858

export_dagmc_cmd/DAGMCExportCommand.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "CubitCommandInterface.hpp"
55
#include "CubitMessageHandler.hpp"
6+
#include "TtyProgressTool.hpp"
67

78
// CGM includes
89
#include "RefEntity.hpp"
@@ -30,6 +31,7 @@ class DAGMCExportCommand: public CubitCommand
3031
bool execute(CubitCommandData &data);
3132

3233
protected:
34+
TtyProgressTool* progTool;
3335

3436
moab::ErrorCode create_tags();
3537
moab::ErrorCode parse_options(CubitCommandData &data, moab::EntityHandle* file_set = 0);

0 commit comments

Comments
 (0)