[MOAB-dev] r4006 - MOAB/trunk/tools/dagmc
wilsonp at engr.wisc.edu
wilsonp at engr.wisc.edu
Wed Jun 16 02:31:47 CDT 2010
Author: wilsonp
Date: 2010-06-16 02:31:46 -0500 (Wed, 16 Jun 2010)
New Revision: 4006
Modified:
MOAB/trunk/tools/dagmc/DagMC.cpp
MOAB/trunk/tools/dagmc/DagMC.hpp
Log:
Reorganization of the source code in DagMC.*.
The purpose of this reorganization is to enhance maintainability by collecting
related methods into nearby sections of the header and implementation files.
Six sections have been defined:
I. Geometry initialization
II. Fundamental geometry operations/queries
III. Cross-referencing
IV. DagMC Settings
V. Geometry metadata
VI. Other
(Constructors and related method are not categorized.)
The header file has been arranged so that public and private methods are collected
together in each section. The implementation has been arranged in the same order
as the header.
Some doxygen comments were added to the header for important methods.
This reorganization should not change any of the algorithms or interface to DagMC.
Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp 2010-06-13 14:06:03 UTC (rev 4005)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp 2010-06-16 07:31:46 UTC (rev 4006)
@@ -55,41 +55,14 @@
DagMC *DagMC::instance_ = NULL;
-const bool debug = false;
-
-unsigned int DagMC::interface_revision()
-{
- unsigned int result = 0;
- sscanf( DAGMC_INTERFACE_REVISION, "$Rev: %u $\n", &result );
- return result;
-}
-
-
void DagMC::create_instance(Interface *mb_impl)
{
if (NULL == mb_impl) mb_impl = new Core();
instance_ = new DagMC(mb_impl);
}
-void DagMC::set_useCAD( bool use_cad ){
- useCAD = use_cad;
- if( useCAD ){
- if( !have_cgm_geom ){
- std::cerr << "Warning: CAD-based ray tracing not avaiable, because CGM has no data." << std::endl;
- std::cerr << " your input file was probably not a CAD format." << std::endl;
- useCAD = false;
- }
-#ifndef HAVE_CGM_FIRE_RAY
- {
- std::cerr << "Warning: use_cad = 1 not supported with this build of CGM/DagMC." << std:: endl;
- std::cerr << " Required ray-fire query not available. (Cubit-based CGM?)" << std::endl;
- useCAD = false;
- }
-#endif
- }
-}
-
+const bool debug = false;
DagMC::DagMC(Interface *mb_impl)
: mbImpl(mb_impl), obbTree(mb_impl), have_cgm_geom(false)
{
@@ -137,6 +110,319 @@
}
More information about the moab-dev
mailing list