MOAB: Mesh Oriented datABase  (version 5.2.1)
MBMesquite::PointDomain Class Reference

#include <MeshDomain1D.hpp>

+ Inheritance diagram for MBMesquite::PointDomain:
+ Collaboration diagram for MBMesquite::PointDomain:

Public Member Functions

 PointDomain (const Vector3D &location)
const Vector3Dgeom () 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

Private Attributes

Vector3D mGeom

Detailed Description

Definition at line 43 of file MeshDomain1D.hpp.


Constructor & Destructor Documentation

MBMesquite::PointDomain::PointDomain ( const Vector3D location) [inline]

Definition at line 49 of file MeshDomain1D.hpp.

: mGeom( location ) {}

Member Function Documentation

void MBMesquite::PointDomain::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.

Parameters:
entity_handleEvaluate the subset of the domain contianing this entity
positionInput position for which to evaluate
closestClosest position in the domain.
normalDomain normal at the location of 'closest'

Implements MBMesquite::MeshDomain.

Definition at line 61 of file MeshDomain1D.cpp.

References geom(), INTERNAL_ERROR, MSQ_SETERR, and MBMesquite::Vector3D::set().

{
    closest = geom();
    normal.set( 0, 0, 0 );
    MSQ_SETERR( err )( "Cannot get normal for PointDomain", MsqError::INTERNAL_ERROR );
}
void MBMesquite::PointDomain::domain_DoF ( const Mesh::VertexHandle handle_array,
unsigned short *  dof_array,
size_t  num_handles,
MsqError err 
) const [virtual]

Definition at line 69 of file MeshDomain1D.cpp.

{
    std::fill( dof_array, dof_array + num_handles, 0 );
}
void MBMesquite::PointDomain::element_normal_at ( Mesh::ElementHandle  entity_handle,
Vector3D coordinate 
) const [virtual]

Implements MBMesquite::MeshDomain.

Definition at line 49 of file MeshDomain1D.cpp.

References MBMesquite::Vector3D::set().

{
    coordinate.set( 0, 0, 0 );
}
const Vector3D& MBMesquite::PointDomain::geom ( ) const [inline]

Definition at line 51 of file MeshDomain1D.hpp.

Referenced by closest_point(), and snap_to().

    {
        return mGeom;
    }
void MBMesquite::PointDomain::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 39 of file MeshDomain1D.cpp.

References geom().

{
    coordinate = geom();
}
void MBMesquite::PointDomain::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 44 of file MeshDomain1D.cpp.

References MBMesquite::Vector3D::set().

{
    coordinate.set( 0, 0, 0 );
}
void MBMesquite::PointDomain::vertex_normal_at ( const Mesh::VertexHandle handles,
Vector3D  coordinates[],
unsigned  count,
MsqError err 
) const [virtual]

evaluate surface normals

Returns normals for a domain.

Parameters:
handlesThe domain evaluated is the one in which this mesh entity is constrained.
coordinatesAs input, a list of positions at which to evaluate the domain. As output, the resulting domain normals.
countThe length of the coordinates array.

Implements MBMesquite::MeshDomain.

Definition at line 54 of file MeshDomain1D.cpp.

References INTERNAL_ERROR, and MSQ_SETERR.

{
    std::fill( coordinates, coordinates + count, Vector3D( 0, 0, 0 ) );
    MSQ_SETERR( err )( "Cannot get normal for PointDomain", MsqError::INTERNAL_ERROR );
}

Member Data Documentation

Definition at line 46 of file MeshDomain1D.hpp.

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines