#include "cgm2moab.hpp"
#include "moab/ProgOptions.hpp"
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/CartVect.hpp"
#include "MBTagConventions.hpp"
#include "moab/GeomQueryTool.hpp"
#include "moab/GeomTopoTool.hpp"
#include <sstream>
#include <iomanip>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
Go to the source code of this file.
Macros | |
#define | OPTION_APPEND(X) |
Functions | |
void | chkerr (Interface *mbi, ErrorCode code, int line, const char *file) |
void | chkerr (Interface &mbi, ErrorCode code, int line, const char *file) |
void | chkerr (GeomTopoTool >t, ErrorCode code, int line, const char *file) |
static ErrorCode | get_signed_volume (Interface *MBI, const EntityHandle surf_set, const CartVect &offset, double &signed_volume) |
static ErrorCode | replace_surface (Interface *mbi, EntityHandle old_surf, EntityHandle old_file_set, EntityHandle new_surf, const Tag &senseTag) |
static ErrorCode | merge_input_surfs (Interface *mbi, const EntityHandle old_file_set, const EntityHandle new_file_set, const Tag &idTag, const Tag &dimTag, const Tag &senseTag) |
int | main (int argc, char *argv[]) |
Variables | |
bool | verbose = false |
program-wide verbose output flag More... | |
#define OPTION_APPEND | ( | X | ) |
void chkerr | ( | GeomTopoTool & | gtt, |
ErrorCode | code, | ||
int | line, | ||
const char * | file | ||
) |
Definition at line 46 of file cgm2moab.cpp.
References chkerr(), and moab::GeomTopoTool::get_moab_instance().
Definition at line 41 of file cgm2moab.cpp.
References chkerr().
Generic halt-on-error error checking
Definition at line 21 of file cgm2moab.cpp.
References moab::Interface::get_error_string(), moab::Interface::get_last_error(), and MB_SUCCESS.
Referenced by chkerr().
|
static |
Estimate the volume of the surface (actually multiplied by a factor of six). See DagMC::measure_volume, from which this code is borrowed, for algorithmic details. For our purpose, all that matters is the signedness.
offset | Offset to apply to surface to avoid a zero result. |
Definition at line 58 of file cgm2moab.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, MB_INVALID_SIZE, MB_SUCCESS, MBI, and MBTRI.
Referenced by replace_surface().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 260 of file cgm2moab.cpp.
References ProgOptions::add_cancel_opt, ProgOptions::addOpt(), ProgOptions::addOptionHelpHeading(), ProgOptions::addRequiredArg(), CHECKERR, moab::GeomTopoTool::construct_obb_trees(), moab::Core::create_meshset(), ProgOptions::error(), ErrorCode, moab::GeomTopoTool::find_geomsets(), GEOM_DIMENSION_TAG_NAME, ProgOptions::getOpt(), ProgOptions::getOptAllArgs(), moab::Core::globalId_tag(), idTag, input_file, moab::Core::load_file(), MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MB_UNHANDLED_OPTION, merge_input_surfs(), ProgOptions::numOptSet(), OPTION_APPEND, ProgOptions::parseCommandLine(), moab::Core::tag_get_handle(), verbose, and moab::Core::write_file().
|
static |
Given an "old" file and a "new" file, replace the facets in any surface of the old file with facets from the new file.
Definition at line 199 of file cgm2moab.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_type_and_tag(), idTag, MB_SUCCESS, MBENTITYSET, replace_surface(), moab::Range::size(), moab::Interface::tag_get_data(), and verbose.
Referenced by main().
|
static |
Replace the triangles in an old surface with those in a new surface, ensuring that their surfaces senses match before the replacement
Definition at line 98 of file cgm2moab.cpp.
References moab::Interface::add_entities(), moab::Interface::delete_entities(), ErrorCode, moab::Interface::get_entities_by_type(), get_signed_volume(), MB_SUCCESS, MBTRI, moab::Interface::remove_entities(), moab::Range::size(), moab::Interface::tag_get_data(), moab::Interface::tag_set_data(), and verbose.
Referenced by merge_input_surfs().
bool verbose = false |
program-wide verbose output flag
Definition at line 19 of file cgm2moab.cpp.
Referenced by main(), merge_input_surfs(), and replace_surface().