MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <XYPlanarDomain.hpp>
Public Member Functions | |
XYPlanarDomain () | |
virtual | ~XYPlanarDomain () |
virtual void | snap_to (Mesh::VertexHandle entity_handle, Vector3D &coordinate) const |
virtual void | vertex_normal_at (Mesh::VertexHandle entity_handle, Vector3D &coordinate) const |
virtual void | element_normal_at (Mesh::ElementHandle entity_handle, Vector3D &coordinate) const |
virtual void | vertex_normal_at (const Mesh::VertexHandle *handle, Vector3D coords[], unsigned count, MsqError &err) const |
evaluate surface normals | |
virtual void | closest_point (Mesh::VertexHandle handle, const Vector3D &position, Vector3D &closest, Vector3D &normal, MsqError &err) const |
evaluate closest point and normal | |
virtual void | domain_DoF (const Mesh::VertexHandle *handle_array, unsigned short *dof_array, size_t num_vertices, MsqError &err) const |
This is a template for a planar domain that exists in the xy-plane (z=0). It will provide the normal information necessary for surface mesh optimization.
Definition at line 51 of file XYPlanarDomain.hpp.
MBMesquite::XYPlanarDomain::XYPlanarDomain | ( | ) | [inline] |
Definition at line 54 of file XYPlanarDomain.hpp.
{};
MBMesquite::XYPlanarDomain::~XYPlanarDomain | ( | ) | [virtual] |
Definition at line 35 of file XYPlanarDomain.cpp.
{}
void MBMesquite::XYPlanarDomain::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 63 of file XYPlanarDomain.cpp.
{ closest = Vector3D( position[0], position[1], 0.0 ); }
void MBMesquite::XYPlanarDomain::domain_DoF | ( | const Mesh::VertexHandle * | handle_array, |
unsigned short * | dof_array, | ||
size_t | num_vertices, | ||
MsqError & | err | ||
) | const [virtual] |
Definition at line 72 of file XYPlanarDomain.cpp.
{ std::fill( dof_array, dof_array + num_vertices, 2 ); }
void MBMesquite::XYPlanarDomain::element_normal_at | ( | Mesh::ElementHandle | entity_handle, |
MBMesquite::Vector3D & | coordinate | ||
) | const [virtual] |
Implements MBMesquite::MeshDomain.
Definition at line 48 of file XYPlanarDomain.cpp.
{ coordinate = Vector3D( 0.0, 0.0, 1.0 ); }
void MBMesquite::XYPlanarDomain::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 37 of file XYPlanarDomain.cpp.
{ coordinate[2] = 0.0; }
void MBMesquite::XYPlanarDomain::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 42 of file XYPlanarDomain.cpp.
{ coordinate = Vector3D( 0.0, 0.0, 1.0 ); }
void MBMesquite::XYPlanarDomain::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 54 of file XYPlanarDomain.cpp.
{ for( unsigned i = 0; i < count; ++i ) coords[i] = Vector3D( 0.0, 0.0, 1.0 ); }