#include "moab/GeomQueryTool.hpp"
#include "moab/GeomTopoTool.hpp"
#include "InitCGMA.hpp"
#include "CGMApp.hpp"
#include "moab/CN.hpp"
#include "moab/Core.hpp"
#include "moab/CartVect.hpp"
#include "moab/FileOptions.hpp"
#include "moab/Skinner.hpp"
#include "quads_to_tris.hpp"
#include <limits>
#include <cstdlib>
#include <sstream>
#include <ctime>
Go to the source code of this file.
Macros | |
#define | GF_CUBIT_FILE_TYPE "CUBIT" |
#define | GF_STEP_FILE_TYPE "STEP" |
#define | GF_IGES_FILE_TYPE "IGES" |
#define | GF_ACIS_TXT_FILE_TYPE "ACIS_SAT" |
#define | GF_ACIS_BIN_FILE_TYPE "ACIS_SAB" |
#define | GF_OCC_BREP_FILE_TYPE "OCC" |
Functions | |
void | tokenize (const std::string &str, std::vector< std::string > &tokens, const char *delimiters) |
ErrorCode | get_group_names (Interface *MBI, const EntityHandle group_set, const Tag nameTag, std::vector< std::string > &grp_names) |
ErrorCode | summarize_cell_volume_change (Interface *MBI, const EntityHandle cgm_file_set, const Tag categoryTag, const Tag dimTag, const Tag sizeTag, const Tag nameTag, const Tag idTag, const bool conserve_mass, const bool debug) |
ErrorCode | remove_empty_cgm_surfs_and_vols (Interface *MBI, const EntityHandle cgm_file_set, const Tag idTag, const Tag dimTag, const bool) |
ErrorCode | build_new_surface (Interface *MBI, EntityHandle &new_surf, const EntityHandle forward_parent_vol, const EntityHandle reverse_parent_vol, const int new_surf_id, const Tag dimTag, const Tag idTag, const Tag categoryTag, const Tag senseTag) |
ErrorCode | orient_faces_outward (Interface *MBI, const Range &faces, const bool) |
void | plot_histogram (const std::string &title, const std::string &x_axis_label, const std::string &y_axis_label, const int n_bins, const double data[], const int n_data) |
void | generate_plots (const double orig[], const double defo[], const int n_elems, const std::string &time_step) |
static double | tet_volume (const CartVect &v0, const CartVect &v1, const CartVect &v2, const CartVect &v3) |
double | measure (Interface *MBI, const EntityHandle element) |
ErrorCode | get_signed_volume (Interface *MBI, const EntityHandle surf_set, const CartVect &offset, double &signed_volume) |
ErrorCode | fix_surface_senses (Interface *MBI, const EntityHandle cgm_file_set, const EntityHandle cub_file_set, const Tag idTag, const Tag dimTag, const Tag senseTag, const bool debug) |
ErrorCode | replace_faceted_cgm_surfs (Interface *MBI, const EntityHandle cgm_file_set, const EntityHandle cub_file_set, const Tag idTag, const Tag dimTag, const bool debug) |
ErrorCode | add_dead_elems_to_impl_compl (Interface *MBI, const EntityHandle cgm_file_set, const EntityHandle cub_file_set, const Tag idTag, const Tag dimTag, const Tag categoryTag, const Tag senseTag, const bool debug) |
const char * | get_geom_file_type (const char *filename) |
const char * | get_geom_fptr_type (FILE *file) |
int | is_cubit_file (FILE *file) |
int | is_step_file (FILE *file) |
int | is_iges_file (FILE *file) |
int | is_acis_txt_file (FILE *file) |
int | is_acis_bin_file (FILE *file) |
int | is_occ_brep_file (FILE *file) |
int | main (int argc, char *argv[]) |
Variables | |
double | DEFAULT_DISTANCE = 0.001 |
double | DEFAULT_LEN = 0.0 |
int | DEFAULT_NORM = 5 |
#define GF_ACIS_BIN_FILE_TYPE "ACIS_SAB" |
Definition at line 20 of file cub2h5m.cpp.
#define GF_ACIS_TXT_FILE_TYPE "ACIS_SAT" |
Definition at line 19 of file cub2h5m.cpp.
#define GF_CUBIT_FILE_TYPE "CUBIT" |
Definition at line 16 of file cub2h5m.cpp.
#define GF_IGES_FILE_TYPE "IGES" |
Definition at line 18 of file cub2h5m.cpp.
#define GF_OCC_BREP_FILE_TYPE "OCC" |
Definition at line 21 of file cub2h5m.cpp.
#define GF_STEP_FILE_TYPE "STEP" |
Definition at line 17 of file cub2h5m.cpp.
ErrorCode add_dead_elems_to_impl_compl | ( | Interface * | MBI, |
const EntityHandle | cgm_file_set, | ||
const EntityHandle | cub_file_set, | ||
const Tag | idTag, | ||
const Tag | dimTag, | ||
const Tag | categoryTag, | ||
const Tag | senseTag, | ||
const bool | debug | ||
) |
Definition at line 860 of file cub2h5m.cpp.
References moab::Range::begin(), build_new_surface(), moab::debug, moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Skinner::find_skin(), moab::Range::front(), idTag, moab::intersect(), MB_INVALID_SIZE, MB_SUCCESS, MBENTITYSET, MBHEX, MBI, MBQUAD, orient_faces_outward(), moab::Range::size(), and moab::subtract().
Referenced by main().
ErrorCode build_new_surface | ( | Interface * | MBI, |
EntityHandle & | new_surf, | ||
const EntityHandle | forward_parent_vol, | ||
const EntityHandle | reverse_parent_vol, | ||
const int | new_surf_id, | ||
const Tag | dimTag, | ||
const Tag | idTag, | ||
const Tag | categoryTag, | ||
const Tag | senseTag | ||
) |
Definition at line 300 of file cub2h5m.cpp.
References CATEGORY_TAG_SIZE, ErrorCode, moab::geom_category, idTag, MB_SUCCESS, and MBI.
Referenced by add_dead_elems_to_impl_compl().
ErrorCode fix_surface_senses | ( | Interface * | MBI, |
const EntityHandle | cgm_file_set, | ||
const EntityHandle | cub_file_set, | ||
const Tag | idTag, | ||
const Tag | dimTag, | ||
const Tag | senseTag, | ||
const bool | debug | ||
) |
Definition at line 694 of file cub2h5m.cpp.
References moab::Range::begin(), moab::debug, moab::Range::end(), ErrorCode, moab::Range::front(), get_signed_volume(), idTag, make_tris_from_quads(), MB_SUCCESS, MBENTITYSET, MBI, MBQUAD, and moab::Range::size().
Referenced by main().
void generate_plots | ( | const double | orig[], |
const double | defo[], | ||
const int | n_elems, | ||
const std::string & | time_step | ||
) |
const char * get_geom_file_type | ( | const char * | filename | ) |
const char * get_geom_fptr_type | ( | FILE * | file | ) |
Definition at line 1455 of file cub2h5m.cpp.
References GF_ACIS_BIN_FILE_TYPE, GF_ACIS_TXT_FILE_TYPE, GF_CUBIT_FILE_TYPE, GF_IGES_FILE_TYPE, GF_OCC_BREP_FILE_TYPE, GF_STEP_FILE_TYPE, is_acis_bin_file(), is_acis_txt_file(), is_cubit_file(), is_iges_file(), is_occ_brep_file(), and is_step_file().
Referenced by get_geom_file_type().
ErrorCode get_group_names | ( | Interface * | MBI, |
const EntityHandle | group_set, | ||
const Tag | nameTag, | ||
std::vector< std::string > & | grp_names | ||
) |
Definition at line 41 of file cub2h5m.cpp.
References ErrorCode, MB_SUCCESS, MB_TAG_NOT_FOUND, MBI, NAME_TAG_SIZE, and nameTag.
Referenced by summarize_cell_volume_change().
ErrorCode get_signed_volume | ( | Interface * | MBI, |
const EntityHandle | surf_set, | ||
const CartVect & | offset, | ||
double & | signed_volume | ||
) |
Definition at line 653 of file cub2h5m.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, MB_INVALID_SIZE, MB_SUCCESS, MBI, and MBTRI.
Referenced by fix_surface_senses().
int is_acis_bin_file | ( | FILE * | file | ) |
Definition at line 1498 of file cub2h5m.cpp.
References buffer.
Referenced by get_geom_fptr_type().
int is_acis_txt_file | ( | FILE * | file | ) |
Definition at line 1504 of file cub2h5m.cpp.
References buffer, and length().
Referenced by get_geom_fptr_type().
int is_cubit_file | ( | FILE * | file | ) |
Definition at line 1480 of file cub2h5m.cpp.
References buffer.
Referenced by get_geom_fptr_type().
int is_iges_file | ( | FILE * | file | ) |
Definition at line 1492 of file cub2h5m.cpp.
References buffer.
Referenced by get_geom_fptr_type().
int is_occ_brep_file | ( | FILE * | file | ) |
Definition at line 1522 of file cub2h5m.cpp.
References buffer.
Referenced by get_geom_fptr_type().
int is_step_file | ( | FILE * | file | ) |
Definition at line 1486 of file cub2h5m.cpp.
References buffer.
Referenced by get_geom_fptr_type().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 1129 of file cub2h5m.cpp.
References add_dead_elems_to_impl_compl(), moab::Range::begin(), CATEGORY_TAG_NAME, CATEGORY_TAG_SIZE, moab::debug, moab::Range::end(), ErrorCode, fix_surface_senses(), generate_plots(), GEOM_DIMENSION_TAG_NAME, get_geom_file_type(), idTag, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_DOUBLE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, MBENTITYSET, MBI, moab::measure(), moab::GeomQueryTool::measure_volume(), MESHSET_TRACK_OWNER, NAME_TAG_NAME, NAME_TAG_SIZE, nameTag, remove_empty_cgm_surfs_and_vols(), replace_faceted_cgm_surfs(), size, moab::Range::size(), start_time, and summarize_cell_volume_change().
double measure | ( | Interface * | MBI, |
const EntityHandle | element | ||
) |
Definition at line 591 of file cub2h5m.cpp.
References ErrorCode, length(), MB_SUCCESS, MBEDGE, MBHEX, MBI, MBPOLYGON, MBPRISM, MBPYRAMID, MBQUAD, MBTET, MBTRI, moab::sum(), and tet_volume().
Definition at line 341 of file cub2h5m.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::Range::end(), ErrorCode, moab::Range::front(), MB_INVALID_SIZE, MB_SUCCESS, MBI, moab::CN::SideNumber(), and moab::Range::size().
Referenced by add_dead_elems_to_impl_compl().
void plot_histogram | ( | const std::string & | title, |
const std::string & | x_axis_label, | ||
const std::string & | y_axis_label, | ||
const int | n_bins, | ||
const double | data[], | ||
const int | n_data | ||
) |
ErrorCode remove_empty_cgm_surfs_and_vols | ( | Interface * | MBI, |
const EntityHandle | cgm_file_set, | ||
const Tag | idTag, | ||
const Tag | dimTag, | ||
const bool | |||
) |
Definition at line 188 of file cub2h5m.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, idTag, MB_SUCCESS, MBENTITYSET, MBI, and MBTRI.
Referenced by main().
ErrorCode replace_faceted_cgm_surfs | ( | Interface * | MBI, |
const EntityHandle | cgm_file_set, | ||
const EntityHandle | cub_file_set, | ||
const Tag | idTag, | ||
const Tag | dimTag, | ||
const bool | debug | ||
) |
Definition at line 791 of file cub2h5m.cpp.
References moab::Range::begin(), moab::debug, moab::Range::end(), ErrorCode, moab::Range::front(), idTag, make_tris_from_quads(), MB_SUCCESS, MBENTITYSET, MBI, MBQUAD, MBTRI, and moab::Range::size().
Referenced by main().
ErrorCode summarize_cell_volume_change | ( | Interface * | MBI, |
const EntityHandle | cgm_file_set, | ||
const Tag | categoryTag, | ||
const Tag | dimTag, | ||
const Tag | sizeTag, | ||
const Tag | nameTag, | ||
const Tag | idTag, | ||
const bool | conserve_mass, | ||
const bool | debug | ||
) |
Definition at line 59 of file cub2h5m.cpp.
References moab::Range::begin(), CATEGORY_TAG_SIZE, moab::debug, moab::Range::end(), ErrorCode, get_group_names(), idTag, MB_SUCCESS, MBENTITYSET, MBI, moab::GeomQueryTool::measure_volume(), MESHSET_SET, nameTag, and tokenize().
Referenced by main().
|
inlinestatic |
Definition at line 585 of file cub2h5m.cpp.
Referenced by measure().
void tokenize | ( | const std::string & | str, |
std::vector< std::string > & | tokens, | ||
const char * | delimiters | ||
) |
double DEFAULT_DISTANCE = 0.001 |
Definition at line 1103 of file cub2h5m.cpp.
double DEFAULT_LEN = 0.0 |
Definition at line 1104 of file cub2h5m.cpp.
int DEFAULT_NORM = 5 |
Definition at line 1105 of file cub2h5m.cpp.
Referenced by moab::ReadCGM::set_options().