Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DomainTSTT Class Reference
Inheritance diagram for DomainTSTT:
Collaboration diagram for DomainTSTT:

Public Member Functions

 DomainTSTT (TSTTG::Geometry &geom, TSTTM::Mesh &mesh, TSTTR::Relate &relate) throw ( TSTTB::Error )
 
virtual ~DomainTSTT ()
 
DomainHint hint () const
 Give a hint about the nature of the domain for better performance. More...
 
void snap_to (Mesh::EntityHandle entity_handle, Vector3D &coordinat) const
 Modifies "coordinate" so that it lies on the domain to which "entity_handle" is constrained. More...
 
void normal_at (Mesh::EntityHandle entity_handle, Vector3D &coordinate) const
 Returns the normal of the domain to which "entity_handle" is constrained. More...
 
void normal_at (Mesh::EntityHandle handle, Vector3D coordinates[], unsigned count, MsqError &err) const
 evaluate surface normals More...
 
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 GeomTSTT
virtual ~GeomTSTT ()
 
virtual ~GeomTSTT ()
 
- Public Member Functions inherited from MeshDomain
virtual ~MeshDomain ()
 

Protected Member Functions

void * geom_from_mesh (void *handle) const throw ( TSTTB::Error )
 Get geometric entity owning a mesh entity. More...
 
- Protected Member Functions inherited from GeomTSTTCommon
 GeomTSTTCommon (TSTTG::Geometry &geom) throw (TSTTB::Error )
 
virtual ~GeomTSTTCommon ()
 
void move_to (void *geom_handle, Vector3D &coord) const throw ( TSTTB::Error )
 Evaluate the closest point to the input position on the specified geometric entity and return the result in the passed position argument (move the passed position onto the geometry.) More...
 
void normal (void *geom_handle, Vector3D &coord) const throw ( TSTTB::Error )
 Given a geometric entity and a position, evaluate the normal on the geometric entity at the closest point on that entity to the input position, and pass back the result in the input coord vector. More...
 
void normal (void *geom_handle, Vector3D coords[], unsigned count) const throw ( TSTTB::Error )
 Given a geometric entity and a position, evaluate the normal on the geometric entity at the closest point on that entity to the input position, and pass back the result in the input coord vector. More...
 
void closest_and_normal (void *geom_handle, const Vector3D &position, Vector3D &closest, Vector3D &normal) const throw (TSTTB::Error)
 Given a geometric entity and a position, get point on the geometric entity closest to the input position, and the surface normal at that position. More...
 

Private Attributes

TSTTG::Topology topoIface
 TSTT interface implementation used to get dimension of geometric entities. More...
 
TSTTM::Mesh meshIface
 TSTT interface used to query mesh entity properties. More...
 
TSTTR::Relate relateIface
 TSTT interface implementation for mesh->geometry association. More...
 
sidl::array< void * > oneMeshHandle
 Temporary storage for mesh entity handles. More...
 
sidl::array< TSTTG::GentityType > oneTypeOut
 Temporary storage for geometry entity type. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GeomTSTT
static GeomTSTTcreate (TSTTG::Geometry &geom, TSTTM::Mesh &mesh, TSTTR::Relate &assoc, MsqError &err)
 Create MeshDommain from TSTT classification and geometry interfaces. More...
 
static GeomTSTTcreate (TSTTG::Geometry &geom, void *geom_ent_handle, MsqError &err)
 Create a MeshDomain for a single geometric entity that uses the TSTT geometry interface for geometric evaluation. More...
 
static GeomTSTTcreate (TSTTG::Geometry &geom, TSTTM::Mesh &mesh, TSTTR::Relate &assoc, MsqError &err)
 Create MeshDommain from TSTT classification and geometry interfaces. More...
 
static GeomTSTTcreate (TSTTG::Geometry &geom, void *geom_ent_handle, MsqError &err)
 Create a MeshDomain for a single geometric entity that uses the TSTT geometry interface for geometric evaluation. More...
 
- Protected Attributes inherited from GeomTSTTCommon
TSTTG::Shape geomIface
 TSTT geometry interface implementation to query. More...
 
sidl::array< void * > geomHandles
 Temporary storage for geometry entity handles. More...
 
sidl::array< double > positionsIn
 Temporary storate for input and output vectors. More...
 
sidl::array< double > positionsOut
 
sidl::array< double > normalsOut
 

Detailed Description

Definition at line 107 of file GeomTSTT.cpp.

Constructor & Destructor Documentation

DomainTSTT ( TSTTG::Geometry &  geom,
TSTTM::Mesh &  mesh,
TSTTR::Relate &  relate 
)
throw (TSTTB::Error
)

Definition at line 233 of file GeomTSTT.cpp.

237  : GeomTSTTCommon( geom ),
238  topoIface( geom ),
239  meshIface(mesh),
240  relateIface( relate ),
241  oneMeshHandle( alloc_sidl_vector<void*>(1) ),
242  oneTypeOut( alloc_sidl_vector<TSTTG::GentityType>(1) )
243 {
244 }
TSTTG::Topology topoIface
TSTT interface implementation used to get dimension of geometric entities.
Definition: GeomTSTT.cpp:144
TSTTM::Mesh meshIface
TSTT interface used to query mesh entity properties.
Definition: GeomTSTT.cpp:146
sidl::array< TSTTG::GentityType > oneTypeOut
Temporary storage for geometry entity type.
Definition: GeomTSTT.cpp:153
TSTTR::Relate relateIface
TSTT interface implementation for mesh-&gt;geometry association.
Definition: GeomTSTT.cpp:148
sidl::array< void * > oneMeshHandle
Temporary storage for mesh entity handles.
Definition: GeomTSTT.cpp:151
GeomTSTTCommon(TSTTG::Geometry &geom)
Definition: GeomTSTT.cpp:407
~DomainTSTT ( )
virtual

Definition at line 246 of file GeomTSTT.cpp.

246 {}

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 297 of file GeomTSTT.cpp.

References GeomTSTTCommon::closest_and_normal(), DomainTSTT::geom_from_mesh(), MsqError::INTERNAL_ERROR, MsqError::INVALID_ARG, MSQ_SETERR, and Mesquite::process_tstt_error().

302 {
303  try {
304  void* geom = geom_from_mesh( (void*)handle );
305  if (!geom) {
307  return;
308  }
309 
310  closest_and_normal( geom, position, closest, normal );
311  }
312  catch (TSTTB::Error& tstt_err ) {
314  }
315 }
void normal(void *geom_handle, Vector3D &coord) const
Given a geometric entity and a position, evaluate the normal on the geometric entity at the closest p...
Definition: GeomTSTT.cpp:437
void closest_and_normal(void *geom_handle, const Vector3D &position, Vector3D &closest, Vector3D &normal) const
Given a geometric entity and a position, get point on the geometric entity closest to the input posit...
Definition: GeomTSTT.cpp:479
invalid function argument passed
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
void * geom_from_mesh(void *handle) const
Get geometric entity owning a mesh entity.
Definition: GeomTSTT.cpp:318
static msq_std::string process_tstt_error(TSTTB::Error &tstt_err)

Here is the call graph for this function:

void * geom_from_mesh ( void *  handle) const
throw (TSTTB::Error
)
protected

Get geometric entity owning a mesh entity.

Definition at line 318 of file GeomTSTT.cpp.

Referenced by DomainTSTT::closest_point(), DomainTSTT::normal_at(), and DomainTSTT::snap_to().

320 {
321  int junk;
322  oneMeshHandle.set( 0, mesh_ent_handle );
323  relateIface.getMeshRelatedEntities( &geomIface,
324  &meshIface,
325  oneMeshHandle, 1,
326  geomHandles, junk );
327  // get dimension
328  junk = 1;
329  topoIface.gentityGetType( geomHandles, 1, oneTypeOut, junk );
330 
331  return oneTypeOut[0] == TSTTG::GentityType_GREGION ? 0 : geomHandles.get(0);
332 }
TSTTG::Topology topoIface
TSTT interface implementation used to get dimension of geometric entities.
Definition: GeomTSTT.cpp:144
sidl::array< void * > geomHandles
Temporary storage for geometry entity handles.
Definition: GeomTSTT.cpp:99
TSTTM::Mesh meshIface
TSTT interface used to query mesh entity properties.
Definition: GeomTSTT.cpp:146
TSTTG::Shape geomIface
TSTT geometry interface implementation to query.
Definition: GeomTSTT.cpp:96
sidl::array< TSTTG::GentityType > oneTypeOut
Temporary storage for geometry entity type.
Definition: GeomTSTT.cpp:153
TSTTR::Relate relateIface
TSTT interface implementation for mesh-&gt;geometry association.
Definition: GeomTSTT.cpp:148
sidl::array< void * > oneMeshHandle
Temporary storage for mesh entity handles.
Definition: GeomTSTT.cpp:151

Here is the caller graph for this function:

DomainHint hint ( ) const
virtual

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 249 of file GeomTSTT.cpp.

References Mesquite::NO_DOMAIN_HINT.

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 265 of file GeomTSTT.cpp.

References DomainTSTT::geom_from_mesh(), GeomTSTTCommon::normal(), and Mesquite::process_tstt_error().

267 {
268  try {
269  void* geom = geom_from_mesh( (void*)handle );
270  if (geom)
271  normal( geom, coordinate );
272  }
273  catch (TSTTB::Error& tstt_err ) {
274  process_tstt_error(tstt_err);
275  }
276 }
void normal(void *geom_handle, Vector3D &coord) const
Given a geometric entity and a position, evaluate the normal on the geometric entity at the closest p...
Definition: GeomTSTT.cpp:437
void * geom_from_mesh(void *handle) const
Get geometric entity owning a mesh entity.
Definition: GeomTSTT.cpp:318
static msq_std::string process_tstt_error(TSTTB::Error &tstt_err)

Here is the call graph for this function:

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 278 of file GeomTSTT.cpp.

References DomainTSTT::geom_from_mesh(), MsqError::INTERNAL_ERROR, MsqError::INVALID_ARG, MSQ_SETERR, GeomTSTTCommon::normal(), and Mesquite::process_tstt_error().

282 {
283  try {
284  void* geom = geom_from_mesh( (void*)handle );
285  if (!geom) {
287  return;
288  }
289 
290  normal( geom, coordinates, count );
291  }
292  catch (TSTTB::Error& tstt_err ) {
294  }
295 }
void normal(void *geom_handle, Vector3D &coord) const
Given a geometric entity and a position, evaluate the normal on the geometric entity at the closest p...
Definition: GeomTSTT.cpp:437
invalid function argument passed
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
void * geom_from_mesh(void *handle) const
Get geometric entity owning a mesh entity.
Definition: GeomTSTT.cpp:318
static msq_std::string process_tstt_error(TSTTB::Error &tstt_err)

Here is the call 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 252 of file GeomTSTT.cpp.

References DomainTSTT::geom_from_mesh(), GeomTSTTCommon::move_to(), and Mesquite::process_tstt_error().

254 {
255  try {
256  void* geom = geom_from_mesh( (void*)handle );
257  if (geom)
258  move_to( geom, coordinate );
259  }
260  catch (TSTTB::Error& tstt_err ) {
261  process_tstt_error(tstt_err);
262  }
263 }
void move_to(void *geom_handle, Vector3D &coord) const
Evaluate the closest point to the input position on the specified geometric entity and return the res...
Definition: GeomTSTT.cpp:418
void * geom_from_mesh(void *handle) const
Get geometric entity owning a mesh entity.
Definition: GeomTSTT.cpp:318
static msq_std::string process_tstt_error(TSTTB::Error &tstt_err)

Here is the call graph for this function:

Member Data Documentation

TSTTM::Mesh meshIface
mutableprivate

TSTT interface used to query mesh entity properties.

Definition at line 146 of file GeomTSTT.cpp.

sidl::array<void*> oneMeshHandle
mutableprivate

Temporary storage for mesh entity handles.

Definition at line 151 of file GeomTSTT.cpp.

sidl::array<TSTTG::GentityType> oneTypeOut
mutableprivate

Temporary storage for geometry entity type.

Definition at line 153 of file GeomTSTT.cpp.

TSTTR::Relate relateIface
mutableprivate

TSTT interface implementation for mesh->geometry association.

Definition at line 148 of file GeomTSTT.cpp.

TSTTG::Topology topoIface
mutableprivate

TSTT interface implementation used to get dimension of geometric entities.

Definition at line 144 of file GeomTSTT.cpp.


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