#include "iMesh.h"
#include "iMeshP.h"
#include "MBiMesh.hpp"
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/Intx2MeshOnSphere.hpp"
#include "moab/ReadUtilIface.hpp"
#include "moab/ParallelComm.hpp"
#include "MBTagConventions.hpp"
#include "moab/ParallelMergeMesh.hpp"
#include "moab/IntxUtils.hpp"
#include <sstream>
#include <mpi.h>
Go to the source code of this file.
Macros | |
#define | NC 3 |
Functions | |
void | initialize_area_and_tracer (iMesh_Instance instance, iBase_EntitySetHandle imesh_euler_set, double *area_vals, int *ierr) |
void | update_tracer_test (iMesh_Instance instance, iBase_EntitySetHandle imesh_euler_set, iBase_EntitySetHandle imesh_output_set, int numTracers, double *tracer_vals, int *ierr) |
void | update_tracer (iMesh_Instance instance, iBase_EntitySetHandle imesh_euler_set, int *ierr) |
ErrorCode | create_coarse_mesh (Interface *mb, ParallelComm *pcomm, EntityHandle coarseSet, double *coords, int *corners, int nc, int nelem, EntityHandle &start_vert, int &totalNumVertices, int &numCornerVertices, std::vector< double * > &coordv) |
ErrorCode | fill_coord_on_edges (Interface *mb, std::vector< double * > &coordv, double *coords, Range &edges, EntityHandle start_v, Range &coarseQuads, int nc, int numCornerVertices, Tag &fineVertOnEdgeTag) |
ErrorCode | create_fine_mesh (Interface *mb, ParallelComm *pcomm, EntityHandle coarseSet, EntityHandle fine_set, double *coords, int nc, int nelem, EntityHandle start_vert, int numCornerVertices, std::vector< double * > &coordv) |
void | create_mesh (iMesh_Instance instance, iBase_EntitySetHandle *imesh_euler_set, iBase_EntitySetHandle *imesh_departure_set, iBase_EntitySetHandle *imesh_intx_set, double *coords, int *corners, int nc, int nelem, MPI_Fint comm, int *ierr) |
ErrorCode | set_departure_points_position (Interface *mb, EntityHandle lagrSet, double *dep_coords, double radius2) |
void | intersection_at_level (iMesh_Instance instance, iBase_EntitySetHandle fine_set, iBase_EntitySetHandle lagr_set, iBase_EntitySetHandle intx_set, double *dep_coords, double radius2, int *ierr) |
void | cleanup_after_intersection (iMesh_Instance instance, iBase_EntitySetHandle fine_set, iBase_EntitySetHandle lagr_set, iBase_EntitySetHandle intx_set, int *ierr) |
void | cleanup_after_simulation (int *ierr) |
Variables | |
static double | radius = 1. |
static double | gtol = 1.e-9 |
static bool | debug = false |
static int * | mapping_to_coords = NULL |
static int | numVertices = 0 |
static Intx2MeshOnSphere * | pworker = NULL |
#define NC 3 |
Definition at line 49 of file wrap_intx.cpp.
void cleanup_after_intersection | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle | fine_set, | ||
iBase_EntitySetHandle | lagr_set, | ||
iBase_EntitySetHandle | intx_set, | ||
int * | ierr | ||
) |
Definition at line 938 of file wrap_intx.cpp.
References moab::Core::clear_meshset(), moab::Core::delete_entities(), ErrorCode, ERRORV, moab::Core::get_connectivity(), moab::Core::get_entities_by_dimension(), mb, and moab::subtract().
void cleanup_after_simulation | ( | int * | ierr | ) |
Definition at line 988 of file wrap_intx.cpp.
References mapping_to_coords, and numVertices.
ErrorCode create_coarse_mesh | ( | Interface * | mb, |
ParallelComm * | pcomm, | ||
EntityHandle | coarseSet, | ||
double * | coords, | ||
int * | corners, | ||
int | nc, | ||
int | nelem, | ||
EntityHandle & | start_vert, | ||
int & | totalNumVertices, | ||
int & | numCornerVertices, | ||
std::vector< double * > & | coordv | ||
) |
Definition at line 222 of file wrap_intx.cpp.
References moab::Core::add_entities(), ErrorCode, ERRORR, moab::Core::get_adjacencies(), moab::ReadUtilIface::get_element_connect(), moab::ReadUtilIface::get_node_coords(), moab::Core::globalId_tag(), mb, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBQUAD, PARALLEL_PARTITION_TAG_NAME, moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), moab::Interface::query_interface(), moab::ParallelComm::resolve_shared_ents(), moab::Range::size(), moab::Core::tag_get_handle(), moab::Core::tag_set_data(), moab::Interface::UNION, and moab::Core::write_file().
Referenced by create_mesh().
ErrorCode create_fine_mesh | ( | Interface * | mb, |
ParallelComm * | pcomm, | ||
EntityHandle | coarseSet, | ||
EntityHandle | fine_set, | ||
double * | coords, | ||
int | nc, | ||
int | nelem, | ||
EntityHandle | start_vert, | ||
int | numCornerVertices, | ||
std::vector< double * > & | coordv | ||
) |
Definition at line 473 of file wrap_intx.cpp.
References moab::Core::add_entities(), moab::ParallelComm::assign_global_ids(), entities, ErrorCode, ERRORR, fill_coord_on_edges(), moab::ParallelComm::filter_pstatus(), moab::Core::get_adjacencies(), moab::Core::get_connectivity(), moab::ReadUtilIface::get_element_connect(), moab::Core::get_entities_by_dimension(), moab::Range::index(), mapping_to_coords, mb, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MBQUAD, moab::ParallelMergeMesh::merge(), NC, numVertices, PARALLEL_PARTITION_TAG_NAME, moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), PSTATUS_NOT, PSTATUS_NOT_OWNED, moab::Interface::query_interface(), moab::Core::side_number(), moab::side_number(), moab::Range::size(), moab::Core::tag_get_data(), moab::Core::tag_get_handle(), moab::Core::tag_set_data(), moab::ReadUtilIface::update_adjacencies(), moab::Core::write_file(), and moab::Core::write_mesh().
Referenced by create_mesh().
void create_mesh | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle * | imesh_euler_set, | ||
iBase_EntitySetHandle * | imesh_departure_set, | ||
iBase_EntitySetHandle * | imesh_intx_set, | ||
double * | coords, | ||
int * | corners, | ||
int | nc, | ||
int | nelem, | ||
MPI_Fint | comm, | ||
int * | ierr | ||
) |
Definition at line 779 of file wrap_intx.cpp.
References create_coarse_mesh(), create_fine_mesh(), moab::Core::create_meshset(), ErrorCode, ERRORV, gtol, mb, MESHSET_SET, pworker, and moab::Intx2Mesh::set_box_error().
Referenced by pushparmeshintomoab().
ErrorCode fill_coord_on_edges | ( | Interface * | mb, |
std::vector< double * > & | coordv, | ||
double * | coords, | ||
Range & | edges, | ||
EntityHandle | start_v, | ||
Range & | coarseQuads, | ||
int | nc, | ||
int | numCornerVertices, | ||
Tag & | fineVertOnEdgeTag | ||
) |
Definition at line 373 of file wrap_intx.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, ERRORR, moab::Core::get_adjacencies(), moab::Range::index(), mb, MB_SUCCESS, NC, moab::Core::side_number(), moab::side_number(), and moab::Core::tag_set_data().
Referenced by create_fine_mesh().
void initialize_area_and_tracer | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle | imesh_euler_set, | ||
double * | area_vals, | ||
int * | ierr | ||
) |
Definition at line 69 of file wrap_intx.cpp.
References ErrorCode, ERRORV, moab::Core::get_entities_by_type(), mb, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MBQUAD, moab::Range::size(), moab::Core::tag_get_handle(), and moab::Core::tag_set_data().
void intersection_at_level | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle | fine_set, | ||
iBase_EntitySetHandle | lagr_set, | ||
iBase_EntitySetHandle | intx_set, | ||
double * | dep_coords, | ||
double | radius2, | ||
int * | ierr | ||
) |
Definition at line 880 of file wrap_intx.cpp.
References moab::Intx2Mesh::create_departure_mesh_3rd_alg(), moab::debug, ErrorCode, ERRORV, moab::ParallelComm::get_pcomm(), moab::Intx2Mesh::intersect_meshes(), mb, moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), pworker, radius, set_departure_points_position(), and moab::Core::write_mesh().
ErrorCode set_departure_points_position | ( | Interface * | mb, |
EntityHandle | lagrSet, | ||
double * | dep_coords, | ||
double | radius2 | ||
) |
Definition at line 847 of file wrap_intx.cpp.
References moab::CartVect::array(), ErrorCode, ERRORR, moab::Core::get_connectivity(), moab::Core::get_entities_by_type(), mapping_to_coords, mb, MB_SUCCESS, MBQUAD, numVertices, moab::Core::set_coords(), and moab::Range::size().
Referenced by intersection_at_level().
void update_tracer | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle | imesh_euler_set, | ||
int * | ierr | ||
) |
Definition at line 150 of file wrap_intx.cpp.
References moab::Intx2Mesh::create_departure_mesh_2nd_alg(), moab::Core::create_meshset(), moab::debug, ErrorCode, ERRORV, gtol, moab::Intx2Mesh::intersect_meshes(), mb, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MESHSET_SET, radius, moab::Core::tag_get_handle(), moab::Intx2MeshOnSphere::update_tracer_data(), and moab::Core::write_file().
Referenced by advection().
void update_tracer_test | ( | iMesh_Instance | instance, |
iBase_EntitySetHandle | imesh_euler_set, | ||
iBase_EntitySetHandle | imesh_output_set, | ||
int | numTracers, | ||
double * | tracer_vals, | ||
int * | ierr | ||
) |
Definition at line 102 of file wrap_intx.cpp.
References ErrorCode, ERRORV, moab::Core::get_entities_by_type(), mb, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_DOUBLE, MBQUAD, pworker, moab::Range::size(), moab::Core::tag_get_data(), moab::Core::tag_get_handle(), moab::Core::tag_set_data(), and moab::Intx2MeshOnSphere::update_tracer_data().
|
static |
Definition at line 28 of file wrap_intx.cpp.
|
static |
Definition at line 27 of file wrap_intx.cpp.
Referenced by create_mesh(), and update_tracer().
|
static |
Definition at line 41 of file wrap_intx.cpp.
Referenced by cleanup_after_simulation(), create_fine_mesh(), and set_departure_points_position().
|
static |
Definition at line 42 of file wrap_intx.cpp.
Referenced by cleanup_after_simulation(), create_fine_mesh(), and set_departure_points_position().
|
static |
Definition at line 45 of file wrap_intx.cpp.
Referenced by create_mesh(), intersection_at_level(), and update_tracer_test().
|
static |
Definition at line 26 of file wrap_intx.cpp.
Referenced by moab::Coupler::initialize_tree(), intersection_at_level(), main(), manufacture_lagrange_mesh_on_sphere(), moab::IntxRllCssphere::set_radius(), moab::Intx2MeshOnSphere::set_radius_destination_mesh(), moab::Intx2MeshOnSphere::set_radius_source_mesh(), moab::OrientedBoxTreeTool::sphere_intersect_triangles(), moab::BoundBox::update(), update_tracer(), and moab::Intx2MeshOnSphere::update_tracer_data().