MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <MeshDomain1D.hpp>
Public Member Functions | |
LineDomain (const Vector3D &point, const Vector3D &dir) | |
LineDomain (const MsqLine &line) | |
const MsqLine & | geom () const |
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 *handles, Vector3D coordinates[], 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_handles, MsqError &err) const |
virtual double | arc_length (const double position1[3], const double position2[3], MsqError &err) |
Measure arc length along curve. | |
virtual void | position_from_length (const double from_here[3], double length, double result_point[3], MsqError &err) |
Get a position on the curve given an arc length. | |
Private Attributes | |
MsqLine | mGeom |
Definition at line 78 of file MeshDomain1D.hpp.
MBMesquite::LineDomain::LineDomain | ( | const Vector3D & | point, |
const Vector3D & | dir | ||
) | [inline] |
Definition at line 84 of file MeshDomain1D.hpp.
: mGeom( point, dir ) {}
MBMesquite::LineDomain::LineDomain | ( | const MsqLine & | line | ) | [inline] |
Definition at line 86 of file MeshDomain1D.hpp.
: mGeom( line ) {}
double MBMesquite::LineDomain::arc_length | ( | const double | position1[3], |
const double | position2[3], | ||
MsqError & | err | ||
) | [virtual] |
Measure arc length along curve.
Get the length along a curve between two points on the curve.
Implements MBMesquite::CurveDomain.
Definition at line 124 of file MeshDomain1D.cpp.
References MBMesquite::MsqLine::closest(), and mGeom.
Referenced by MBMesquite::LineDomainTest::test_arc_length().
void MBMesquite::LineDomain::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 108 of file MeshDomain1D.cpp.
References MBMesquite::MsqLine::direction(), geom(), INTERNAL_ERROR, MSQ_SETERR, and MBMesquite::MsqLine::point().
{ closest = geom().point( geom().closest( position ) ); normal = geom().direction(); MSQ_SETERR( err )( "Cannot get normal for LineDomain", MsqError::INTERNAL_ERROR ); }
void MBMesquite::LineDomain::domain_DoF | ( | const Mesh::VertexHandle * | handle_array, |
unsigned short * | dof_array, | ||
size_t | num_handles, | ||
MsqError & | err | ||
) | const [virtual] |
Definition at line 119 of file MeshDomain1D.cpp.
{ std::fill( dof_array, dof_array + num_handles, 1 ); }
void MBMesquite::LineDomain::element_normal_at | ( | Mesh::ElementHandle | entity_handle, |
Vector3D & | coordinate | ||
) | const [virtual] |
const MsqLine& MBMesquite::LineDomain::geom | ( | ) | const [inline] |
Definition at line 88 of file MeshDomain1D.hpp.
Referenced by closest_point(), snap_to(), and vertex_normal_at().
{ return mGeom; }
void MBMesquite::LineDomain::position_from_length | ( | const double | from_here[3], |
double | length, | ||
double | result_point[3], | ||
MsqError & | err | ||
) | [virtual] |
Get a position on the curve given an arc length.
Measure a specified arc length along a curve.
from_here | Point on curve from which to measure |
length | Length along curve to move |
result_point | Output. A point on the curve length units from the point from_here in the forward direction along the curve. |
Implements MBMesquite::CurveDomain.
Definition at line 131 of file MeshDomain1D.cpp.
References MBMesquite::MsqLine::closest(), MBMesquite::Vector3D::get_coordinates(), mGeom, and MBMesquite::MsqLine::point().
Referenced by MBMesquite::LineDomainTest::test_position_from_length().
void MBMesquite::LineDomain::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 82 of file MeshDomain1D.cpp.
References geom(), and MBMesquite::MsqLine::point().
Referenced by MBMesquite::LineDomainTest::test_snap_to().
void MBMesquite::LineDomain::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 87 of file MeshDomain1D.cpp.
References geom.
void MBMesquite::LineDomain::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 99 of file MeshDomain1D.cpp.
References geom(), INTERNAL_ERROR, and MSQ_SETERR.
{ std::fill( coordinates, coordinates + count, geom().direction() ); MSQ_SETERR( err )( "Cannot get normal for LineDomain", MsqError::INTERNAL_ERROR ); }
MsqLine MBMesquite::LineDomain::mGeom [private] |
Definition at line 81 of file MeshDomain1D.hpp.
Referenced by arc_length(), and position_from_length().