Skip to content

Commit ddedaeb

Browse files
author
pshriwise
committed
Using internal cubit progress bar to report faceting progress.
1 parent e7d1f17 commit ddedaeb

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()
@@ -612,6 +614,9 @@ moab::ErrorCode DAGMCExportCommand::create_curve_facets(refentity_handle_map& cu
612614

613615
// Map iterator
614616
refentity_handle_map_itor ci;
617+
618+
progTool->clear_all();
619+
progTool->start(0,curve_map.size(),"FACETING CURVES");
615620

616621
// Create geometry for all curves
617622
GMem data;
@@ -719,7 +724,10 @@ moab::ErrorCode DAGMCExportCommand::create_curve_facets(refentity_handle_map& cu
719724
rval = mdbImpl->add_entities(ci->second, &edges[0], edges.size());
720725
if (moab::MB_SUCCESS != rval)
721726
return moab::MB_FAILURE;
727+
728+
progTool->step();
722729
}
730+
progTool->end();
723731

724732
if (!verbose_warnings && curve_warnings < 0) {
725733
message << "Suppressed " << -curve_warnings
@@ -741,6 +749,9 @@ moab::ErrorCode DAGMCExportCommand::create_surface_facets(refentity_handle_map&
741749

742750
DLIList<TopologyEntity*> me_list;
743751

752+
progTool->clear_all();
753+
progTool->start(0,surface_map.size(),"FACETING_SURFACES");
754+
744755
GMem data;
745756
// Create geometry for all surfaces
746757
for (ci = surface_map.begin(); ci != surface_map.end(); ++ci) {
@@ -850,8 +861,12 @@ moab::ErrorCode DAGMCExportCommand::create_surface_facets(refentity_handle_map&
850861
rval = mdbImpl->add_entities(ci->second, facets);
851862
if (moab::MB_SUCCESS != rval)
852863
return moab::MB_FAILURE;
864+
865+
progTool->step();
853866
}
854867

868+
progTool->end();
869+
855870
return moab::MB_SUCCESS;
856871
}
857872

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"
@@ -34,6 +35,7 @@ class DAGMCExportCommand: public CubitCommand
3435
MakeWatertight* mw;
3536

3637
protected:
38+
TtyProgressTool* progTool;
3739

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

0 commit comments

Comments
 (0)