MOAB: Mesh Oriented datABase
(version 5.4.1)
|
A MBMesquite::MeshDomain implemented on top of the ITAPS iGeom API. More...
#include <MsqIGeom.hpp>
Public Member Functions | |
MsqIGeom (iGeom_Instance geom, iBase_EntityHandle geom_ent_handle) | |
virtual | ~MsqIGeom () |
void | snap_to (Mesh::VertexHandle entity_handle, Vector3D &coordinat) const |
void | vertex_normal_at (Mesh::VertexHandle entity_handle, Vector3D &coordinate) const |
void | element_normal_at (Mesh::ElementHandle entity_handle, Vector3D &coordinate) const |
void | vertex_normal_at (const Mesh::VertexHandle *handles, Vector3D coordinates[], unsigned count, MsqError &err) const |
evaluate surface normals | |
void | closest_point (Mesh::VertexHandle handle, const Vector3D &position, Vector3D &closest, Vector3D &normal, MsqError &err) const |
evaluate closest point and normal | |
void | domain_DoF (const Mesh::VertexHandle *handle_array, unsigned short *dof_array, size_t num_vertices, MsqError &err) const |
Private Attributes | |
iBase_EntityHandle | geomEntHandle |
A MBMesquite::MeshDomain implemented on top of the ITAPS iGeom API.
Simple MeshDomain class implementatation that queries a single iGeom entity for all geometric queries. Suitable for use when the entire mesh to be smoothed lies on a single geometric surface.
Definition at line 109 of file MsqIGeom.hpp.
MBMesquite::MsqIGeom::MsqIGeom | ( | iGeom_Instance | geom, |
iBase_EntityHandle | geom_ent_handle | ||
) |
Definition at line 47 of file MsqIGeom.cpp.
: MsqCommonIGeom( geom ), geomEntHandle( geom_ent_handle ) { }
MBMesquite::MsqIGeom::~MsqIGeom | ( | ) | [virtual] |
Definition at line 52 of file MsqIGeom.cpp.
{}
void MBMesquite::MsqIGeom::closest_point | ( | Mesh::VertexHandle | handle, |
const Vector3D & | position, | ||
Vector3D & | closest, | ||
Vector3D & | normal, | ||
MsqError & | err | ||
) | const [virtual] |
evaluate closest point and normal
Given a position in space, return the closest position in the domain and the domain normal at that point.
entity_handle | Evaluate the subset of the domain contianing this entity |
position | Input position for which to evaluate |
closest | Closest position in the domain. |
normal | Domain normal at the location of 'closest' |
Implements MBMesquite::MeshDomain.
Definition at line 81 of file MsqIGeom.cpp.
References MBMesquite::MsqCommonIGeom::closest_and_normal(), geomEntHandle, iBase_SUCCESS, ierr, INTERNAL_ERROR, MSQ_SETERR, and MBMesquite::process_itaps_error().
{ int ierr = closest_and_normal( geomEntHandle, position, closest, p_normal ); if( iBase_SUCCESS != ierr ) MSQ_SETERR( err )( process_itaps_error( ierr ), MsqError::INTERNAL_ERROR ); }
void MBMesquite::MsqIGeom::domain_DoF | ( | const Mesh::VertexHandle * | handle_array, |
unsigned short * | dof_array, | ||
size_t | num_vertices, | ||
MsqError & | err | ||
) | const |
Definition at line 91 of file MsqIGeom.cpp.
References dim, geomEntHandle, MBMesquite::MsqCommonIGeom::get_dimension(), iBase_SUCCESS, ierr, INTERNAL_ERROR, MSQ_SETERR, and MBMesquite::process_itaps_error().
{ unsigned short dim; int ierr = get_dimension( &geomEntHandle, &dim, 1 ); if( iBase_SUCCESS != ierr ) MSQ_SETERR( err )( process_itaps_error( ierr ), MsqError::INTERNAL_ERROR ); std::fill( dof_array, dof_array + num_vertices, dim ); }
void MBMesquite::MsqIGeom::element_normal_at | ( | Mesh::ElementHandle | entity_handle, |
Vector3D & | coordinate | ||
) | const [virtual] |
Implements MBMesquite::MeshDomain.
Definition at line 66 of file MsqIGeom.cpp.
References geomEntHandle, iBase_SUCCESS, ierr, MBMesquite::MsqCommonIGeom::normal(), and MBMesquite::process_itaps_error().
{ int ierr = normal( geomEntHandle, coordinate ); if( iBase_SUCCESS != ierr ) process_itaps_error( ierr ); }
void MBMesquite::MsqIGeom::snap_to | ( | Mesh::VertexHandle | entity_handle, |
Vector3D & | coordinate | ||
) | const [virtual] |
Modifies "coordinate" so that it lies on the domain to which "entity_handle" is constrained. The handle determines the domain. The coordinate is the proposed new position on that domain.
Implements MBMesquite::MeshDomain.
Definition at line 54 of file MsqIGeom.cpp.
References geomEntHandle, iBase_SUCCESS, ierr, MBMesquite::MsqCommonIGeom::move_to(), and MBMesquite::process_itaps_error().
{ int ierr = move_to( geomEntHandle, coordinate ); if( iBase_SUCCESS != ierr ) process_itaps_error( ierr ); }
void MBMesquite::MsqIGeom::vertex_normal_at | ( | Mesh::VertexHandle | entity_handle, |
Vector3D & | coordinate | ||
) | const [virtual] |
Returns the normal of the domain to which "entity_handle" is constrained. For non-planar surfaces, the normal is calculated at the point on the domain that is closest to the passed in value of "coordinate". If the domain does not have a normal, or the normal cannot be determined, "coordinate" is set to (0,0,0). Otherwise, "coordinate" is set to the domain's normal at the appropriate point. In summary, the handle determines the domain. The coordinate determines the point of interest on that domain.
User should see also PatchData::get_domain_normal_at_vertex and PatchData::get_domain_normal_at_element .
Implements MBMesquite::MeshDomain.
Definition at line 60 of file MsqIGeom.cpp.
References geomEntHandle, iBase_SUCCESS, ierr, MBMesquite::MsqCommonIGeom::normal(), and MBMesquite::process_itaps_error().
{ int ierr = normal( geomEntHandle, coordinate ); if( iBase_SUCCESS != ierr ) process_itaps_error( ierr ); }
void MBMesquite::MsqIGeom::vertex_normal_at | ( | const Mesh::VertexHandle * | handles, |
Vector3D | coordinates[], | ||
unsigned | count, | ||
MsqError & | err | ||
) | const [virtual] |
evaluate surface normals
Returns normals for a domain.
handles | The domain evaluated is the one in which this mesh entity is constrained. |
coordinates | As input, a list of positions at which to evaluate the domain. As output, the resulting domain normals. |
count | The length of the coordinates array. |
Implements MBMesquite::MeshDomain.
Definition at line 72 of file MsqIGeom.cpp.
References geomEntHandle, iBase_SUCCESS, ierr, INTERNAL_ERROR, MSQ_SETERR, MBMesquite::MsqCommonIGeom::normal(), and MBMesquite::process_itaps_error().
{ int ierr = normal( geomEntHandle, coordinates, count ); if( iBase_SUCCESS != ierr ) MSQ_SETERR( err )( process_itaps_error( ierr ), MsqError::INTERNAL_ERROR ); }
A handle for the geometry entity to evaluate
Definition at line 140 of file MsqIGeom.hpp.
Referenced by closest_point(), domain_DoF(), element_normal_at(), snap_to(), and vertex_normal_at().