Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlanarDomain Class Reference

#include <PlanarDomain.hpp>

Inheritance diagram for PlanarDomain:
Collaboration diagram for PlanarDomain:

Public Member Functions

 PlanarDomain (const Vector3D &normal, const Vector3D &point)
 
virtual ~PlanarDomain ()
 
DomainHint hint () const
 Give a hint about the nature of the domain for better performance. More...
 
void set_plane (const Vector3D &normal, const Vector3D &point)
 
virtual void snap_to (Mesh::EntityHandle entity_handle, Vector3D &coordinate) const
 Modifies "coordinate" so that it lies on the domain to which "entity_handle" is constrained. More...
 
virtual void normal_at (Mesh::EntityHandle entity_handle, Vector3D &coordinate) const
 Returns the normal of the domain to which "entity_handle" is constrained. More...
 
virtual void normal_at (Mesh::EntityHandle handle, Vector3D coords[], unsigned count, MsqError &err) const
 evaluate surface normals More...
 
virtual void closest_point (Mesh::EntityHandle handle, const Vector3D &position, Vector3D &closest, Vector3D &normal, MsqError &err) const
 evaluate closest point and normal More...
 
 PlanarDomain (const Vector3D &normal, const Vector3D &point)
 
virtual ~PlanarDomain ()
 
DomainHint hint () const
 Give a hint about the nature of the domain for better performance. More...
 
void set_plane (const Vector3D &normal, const Vector3D &point)
 
virtual void snap_to (Mesh::EntityHandle entity_handle, Vector3D &coordinate) const
 Modifies "coordinate" so that it lies on the domain to which "entity_handle" is constrained. More...
 
virtual void normal_at (Mesh::EntityHandle entity_handle, Vector3D &coordinate) const
 Returns the normal of the domain to which "entity_handle" is constrained. More...
 
virtual void normal_at (Mesh::EntityHandle handle, Vector3D coords[], unsigned count, MsqError &err) const
 evaluate surface normals More...
 
virtual void closest_point (Mesh::EntityHandle handle, const Vector3D &position, Vector3D &closest, Vector3D &normal, MsqError &err) const
 evaluate closest point and normal More...
 
- Public Member Functions inherited from MeshDomain
virtual ~MeshDomain ()
 

Private Attributes

Vector3D mNormal
 
double mCoeff
 

Detailed Description

This is a template for a planar domain. It will provide the normal information necessary for surface mesh optimization.

Definition at line 50 of file includeLinks/PlanarDomain.hpp.

Constructor & Destructor Documentation

PlanarDomain ( const Vector3D normal,
const Vector3D point 
)
inline

Definition at line 53 of file includeLinks/PlanarDomain.hpp.

References PlanarDomain::set_plane().

54  { set_plane( normal, point ); }
void set_plane(const Vector3D &normal, const Vector3D &point)

Here is the call graph for this function:

virtual ~PlanarDomain ( )
inlinevirtual

Definition at line 56 of file includeLinks/PlanarDomain.hpp.

56 { }
PlanarDomain ( const Vector3D normal,
const Vector3D point 
)
inline

Definition at line 53 of file src/Misc/PlanarDomain.hpp.

References PlanarDomain::set_plane().

54  { set_plane( normal, point ); }
void set_plane(const Vector3D &normal, const Vector3D &point)

Here is the call graph for this function:

virtual ~PlanarDomain ( )
inlinevirtual

Definition at line 56 of file src/Misc/PlanarDomain.hpp.

56 { }

Member Function Documentation

void closest_point ( Mesh::EntityHandle  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 MeshDomain.

Definition at line 63 of file Misc/PlanarDomain.cpp.

68 {
69  normal = mNormal;
70  closest = position - mNormal * (mNormal % position + mCoeff);
71 }
virtual void closest_point ( Mesh::EntityHandle  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 MeshDomain.

DomainHint hint ( ) const
inlinevirtual

Give a hint about the nature of the domain for better performance.

For implementations, if unsure, return NO_DOMAIN_HINT. SMOOTH_DOMAIN is a good default choice if the domain is a single geometric surface.

Implements MeshDomain.

Definition at line 58 of file includeLinks/PlanarDomain.hpp.

References Mesquite::PLANAR_DOMAIN.

DomainHint hint ( ) const
inlinevirtual

Give a hint about the nature of the domain for better performance.

For implementations, if unsure, return NO_DOMAIN_HINT. SMOOTH_DOMAIN is a good default choice if the domain is a single geometric surface.

Implements MeshDomain.

Definition at line 58 of file src/Misc/PlanarDomain.hpp.

References Mesquite::PLANAR_DOMAIN.

void normal_at ( Mesh::EntityHandle  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 MeshDomain.

Definition at line 46 of file Misc/PlanarDomain.cpp.

49 {
50  coordinate = mNormal;
51 }
virtual void normal_at ( Mesh::EntityHandle  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 MeshDomain.

virtual void normal_at ( Mesh::EntityHandle  handle,
Vector3D  coordinates[],
unsigned  count,
MsqError err 
) const
virtual

evaluate surface normals

Returns normals for a domain.

Parameters
entity_handleThe 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 MeshDomain.

void normal_at ( Mesh::EntityHandle  handle,
Vector3D  coordinates[],
unsigned  count,
MsqError err 
) const
virtual

evaluate surface normals

Returns normals for a domain.

Parameters
entity_handleThe 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 MeshDomain.

Definition at line 54 of file Misc/PlanarDomain.cpp.

References i.

58 {
59  for (unsigned i = 0; i < count; ++i)
60  coords[i] = mNormal;
61 }
blockLoc i
Definition: read.cpp:79
void set_plane ( const Vector3D normal,
const Vector3D point 
)
void set_plane ( const Vector3D normal,
const Vector3D point 
)

Definition at line 30 of file Misc/PlanarDomain.cpp.

References PlanarDomain::mCoeff, PlanarDomain::mNormal, and Vector3D::normalize().

Referenced by PlanarDomain::PlanarDomain().

Here is the call graph for this function:

Here is the caller graph for this function:

void snap_to ( Mesh::EntityHandle  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 MeshDomain.

Definition at line 38 of file Misc/PlanarDomain.cpp.

41 {
42  coordinate -= mNormal * ( mNormal % coordinate + mCoeff );
43 }
virtual void snap_to ( Mesh::EntityHandle  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 MeshDomain.

Member Data Documentation

double mCoeff
private

Definition at line 82 of file includeLinks/PlanarDomain.hpp.

Referenced by PlanarDomain::set_plane().

Vector3D mNormal
private

Definition at line 81 of file includeLinks/PlanarDomain.hpp.

Referenced by PlanarDomain::set_plane().


The documentation for this class was generated from the following files: