Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

rf_mesh_interface.h File Reference

Subclasses of rf_mesh_interface implement interface required by result library in connection with mesh. More...

#include <stdlib.h>
#include <stdarg.h>
#include "rf_base_interface.h"
#include "sharable.h"

Go to the source code of this file.

Compounds

class  str_domain_interface
class  vertex_interface
class  vertex_handle
class  element_interface
class  element_handle
struct  match_face_str
struct  rf_mesh_newnum
struct  rf_two_newnum
struct  RFMergeVtx
class  rf_mesh_interface

Typedefs

typedef sharable_pointer<vertex_interface__vertex_handle
 Handle to vertices.

typedef int (* enum_face_int_func )(rf_mesh_interface *mi, vertex_handle *vv, int nv, void* data)
 Enumerate faces of an element. More...

typedef int (* enum_face_int_vtx_func )(rf_mesh_interface *mi, const int *vtxs, int nv, void* data)
 Enumerate faces of an element. More...

typedef int (* enum_edge_int_func )(rf_mesh_interface *mi, vertex_handle *vv, int nv, void* data)
 Enumerate edges of an element. More...

typedef sharable_pointer<element_interface__element_handle
 Handle to elements.

typedef type_allocator<RFMergeVtx, 100> RFMergeVtxList
 List of nodes to merge.

typedef sharable_pointer<str_domain_interfacestr_domain_handle
 Abstract handle to a structured domain interface.

typedef type_allocator<str_domain_handle, 10> strdomain_handle_list
 List of structured domains.

typedef type_allocator<vertex_handle, 100> vertex_handle_list
 List of vertices.

typedef type_allocator<element_handle, 100> element_handle_list
 List of elements.

typedef int (* enum_vertex_int_func )(rf_mesh_interface *mi, vertex_handle& v, void* data)
 Callback function that is invoked when enumerating vertices. More...

typedef int (* enum_element_int_func )(rf_mesh_interface *mi, element_handle& ele, void* data)
 Callback function that is invoked when enumerating elements. More...

typedef sharable_pointer<rf_mesh_interfacerf_mesh_handle
 Handle to a mesh interface.


Functions

void ExportedByResultlib rfmi_sort_face (int nv, int *vv)
 
Deprecated:
use rf_mesh_interface::SortElement() instead.


float ExportedByResultlib rf_min_dist (const float loc[3], const float edge[2][3], float point[3], int snap)
 Compute the minimum distance between the point loc and the line specified by edge. More...

double ExportedByResultlib rf_min_dist (const double loc[3], const double edge[2][3], double point[3], int snap)
template<classT, classT1, classT2> void rf_vector (const T loc0[3], const T1 loc1[3], T2 vec[3])
 Create a vector from loc0 to loc1. More...

template<classT1, classT2> double rf_vector_dot (const T1 v1[3], const T2 v2[3])
 Compute dot product between two vectors. More...

template<classT> double rf_vector_magnitude (const T v[3])
 Compute magnitude of a vector by taking the sqrt of the dot product of itself. More...

template<classT> int rf_vector_normalize (T v[3])
 Normalize vector by dividing by magnitude. More...

template<classT, classT1, classT2> void rf_vector_cross (const T v1[3], const T1 v2[3], T2 vec[3])
 Take the cross product between vectors. More...

template<classT, classT1, classT2, classT3, classT4> void rf_vector_linear (const T& lam1, const T1 v1[3], const T2& lam2, const T3 v2[3], T4 vec[3])
 Take linear combination of vectors. More...

template<classT, classT1, classT2> void rf_vector_add (const T v1[3], const T1 v2[3], T2 vec[3])
 Addition of two vectors. More...

template<classT, classT1, classT2> void rf_vector_sub (const T v1[3], const T1 v2[3], T2 vec[3])
 Subtraction of two vectors. More...

template<classT, classT1> double rf_distance_squared (const T v_loc[3], const T1 loc[3])
 Compute distance^2 between v_loc and loc. More...

template<classT, classT1> double rf_distance (const T v_loc[3], const T1 loc[3])
 Compute distance between v_loc and loc. More...

template<classT> T rf_tri_area (const T p0[3], const T p1[3], const T p2[3])
 Compute the area of triangle. More...

template<classT> T rf_quad_area (const T p0[3], const T p1[3], const T p2[3], const T p3[3])
 QUAD in Z pattern. More...


Detailed Description

Subclasses of rf_mesh_interface implement interface required by result library in connection with mesh.

The frontend implementation describes how the user makes new backend implementations, and new structured and unstructured meshes.

Users define connectivity relative to NASTRAN order. The NASTRAN element, face and edge definitions can be found at this web address http://www.grc.nasa.gov/WWW/cgns/sids/conv.html

Copyright (c) 2000 ICEMCFD Engineering Copyright (c) 2001-2002 ICEMCFD Engineering as subsidary of ANSYS

Author(s):
Forest Rouse
Header: /home/josie/cvs/resultlib/rf_mesh_interface.h,v 1.98 2005/02/09 21:45:31 rouse Exp


Typedef Documentation

typedef int (* enum_face_int_func)(rf_mesh_interface *mi, vertex_handle *vv, int nv, void* data)
 

Enumerate faces of an element.

Pass array of vertex handles to callback function. If callback function returns 1, enumeration continues. If callback function return 0, enumeration stops.

typedef int (* enum_face_int_vtx_func)(rf_mesh_interface *mi, const int *vtxs, int nv, void* data)
 

Enumerate faces of an element.

Pass array of vertex indices to callback function. If callback function returns 1, enumeration continues. If callback function returns 0, enumeration stops.

typedef int (* enum_edge_int_func)(rf_mesh_interface *mi, vertex_handle *vv, int nv, void* data)
 

Enumerate edges of an element.

Pass array of vertex handles to callback function. If callback function returns 1, enumeration continues. If callback function returns 0, enumeration stops.

typedef int (* enum_vertex_int_func)(rf_mesh_interface *mi, vertex_handle& v, void* data)
 

Callback function that is invoked when enumerating vertices.

If callback function returns 1, enumeration continues. If callback function returns 0, enumeration stops.

typedef int (* enum_element_int_func)(rf_mesh_interface *mi, element_handle& ele, void* data)
 

Callback function that is invoked when enumerating elements.

If callback function returns 1, enumeration continues. If callback function returns 0, enumeration stops.


Function Documentation

float ExportedByResultlib rf_min_dist ( const float loc[3],
const float edge[2][3],
float point[3],
int snap )
 

Compute the minimum distance between the point loc and the line specified by edge.

If snap set to 1, then the minimum distance will be to a valid point on the line segment. Otherwise, the line will be taken as having infinite extent.

Parameters:
loc   minimum distance to this point.
edge   specification of the line.
point   point of closest approach on the line.
snap   if 0, line has infinite extent. If 1 (!= 0), only allow distance to be a point in the line segment.
Returns:
minimum distance from point loc to line.

double ExportedByResultlib rf_min_dist ( const double loc[3],
const double edge[2][3],
double point[3],
int snap )
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<classT, classT1, classT2>
void rf_vector ( const T loc0[3],
const T1 loc1[3],
T2 vec[3] ) [inline]
 

Create a vector from loc0 to loc1.

Parameters:
loc0   point 1.
loc1   point 2.
vec   = loc1 - loc0

template<classT1, classT2>
double rf_vector_dot ( const T1 v1[3],
const T2 v2[3] ) [inline]
 

Compute dot product between two vectors.

Parameters:
v1   vector 1.
v2   vector 2.
Returns:
dot product of the two vectors.

template<classT>
double rf_vector_magnitude ( const T v[3] ) [inline]
 

Compute magnitude of a vector by taking the sqrt of the dot product of itself.

Parameters:
v   vector.
Returns:
sqrt(v * v).

template<classT>
int rf_vector_normalize ( T v[3] ) [inline]
 

Normalize vector by dividing by magnitude.

dot product of itself.

Parameters:
v   vector.
Returns:
v / mag.

template<classT, classT1, classT2>
void rf_vector_cross ( const T v1[3],
const T1 v2[3],
T2 vec[3] ) [inline]
 

Take the cross product between vectors.

Parameters:
v1   vector 1.
v2   vector 2.
vec   = v1 X v2

template<classT, classT1, classT2, classT3, classT4>
void rf_vector_linear ( const T & lam1,
const T1 v1[3],
const T2 & lam2,
const T3 v2[3],
T4 vec[3] ) [inline]
 

Take linear combination of vectors.

Parameters:
lam1   coiefficient for v1
v1   vector 1.
lam2   coiefficient for v2
v2   vector 2.
vec   = lam1 * v1 + lam2 *v2

template<classT, classT1, classT2>
void rf_vector_add ( const T v1[3],
const T1 v2[3],
T2 vec[3] ) [inline]
 

Addition of two vectors.

See also:
rf_vector_linear()
Parameters:
v1   vector 1.
v2   vector 2.
vec   = v1 + v2

template<classT, classT1, classT2>
void rf_vector_sub ( const T v1[3],
const T1 v2[3],
T2 vec[3] ) [inline]
 

Subtraction of two vectors.

See also:
rf_vector_linear()
Parameters:
v1   vector 1.
v2   vector 2.
vec   = v1 - v2

template<classT, classT1>
double rf_distance_squared ( const T v_loc[3],
const T1 loc[3] ) [inline]
 

Compute distance^2 between v_loc and loc.

See also:
rf_distance()
Parameters:
v_loc   position 1.
loc   position 2.
Returns:
distance squared between two given points.

template<classT, classT1>
double rf_distance ( const T v_loc[3],
const T1 loc[3] ) [inline]
 

Compute distance between v_loc and loc.

See also:
rf_distance_squared()
Parameters:
v_loc   position 1.
loc   position 2.
Returns:
distance between two given points.
Examples:
med_impl.C.

template<classT>
T rf_tri_area ( const T p0[3],
const T p1[3],
const T p2[3] ) [inline]
 

Compute the area of triangle.

Only an approximation for quadratic elements. For more exact formulas for quadratic elements, use, for instance, shape function library.

Parameters:
p0   first point of triangle.
p1   second point of triangle.
p2   3rd point of triangle.
Returns:
area of tri = .5 * | (p1 - p0) X (p2 - p0) |

template<classT>
T rf_quad_area ( const T p0[3],
const T p1[3],
const T p2[3],
const T p3[3] ) [inline]
 

QUAD in Z pattern.

Sums area of two triangles.

See also:
rf_tri_area()
Parameters:
p0   first point of triangle.
p1   second point of triangle.
p2   3rd point of triangle.
Returns:
area of quad = triArea(p0, p1, p2) + triArea(p2, p3, p1)


Generated at Wed Mar 2 11:16:46 2005 for Result Library by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000