CMLSurfSubMapper Class Reference

The surface submapper fills a surface with quadrilaterals if the surface may be subdivided into a series of mappable regions. More...

#include <CMLSurfSubMapper.hpp>

Inheritance diagram for CMLSurfSubMapper:

CMLMesher List of all members.

Public Member Functions

Constructor/Destructor
 CMLSurfSubMapper (CMLSurfEval *geom_eval, CMLSizeEval *size_eval=NULL, bool subMapSmooth=true, CML::OutputMsg msg_level=CML::STANDARD)
 A class constructor.
virtual ~CMLSurfSubMapper ()
 A virtual destructor for the class.
Mesh input
bool set_boundary_mesh (int num_points_in, double *const points, int num_loops, int *const loop_sizes, int *const point_types=NULL)
 Supply the boundary loops describing the surface boundary.
Core mesher
bool generate_mesh (int &num_points_out, int &num_quads)
 Generate a structured quadrilateral mesh for the surface.
Mesh ouput
bool get_mesh (int num_points_out, double *const points, int num_quads, int *const quads)
 Retrieve the generated quadrilateral mesh.
int get_points_buf (int buf_size, double *const points, int start_index=0)
 Retrieve the generated points one buffer at a time.
int get_quads_buf (int buf_size, int *const quads, int start_index=0)
 Retrieve the generated quadrilaterals one buffer at a time.
Message output control
virtual CML::OutputMsg get_msg_level () const
 Get the value of the message level flag.
virtual void set_msg_level (CML::OutputMsg level)
 Set the value of the message level flag.
virtual void open_log_file (const char *filename, bool append=false)
 Open a log file to record algorithm output.
virtual void close_log_file ()
 Close an open log file.
virtual void set_message_handler (CubitMessageHandler *h)
 Use an alternate output message handler.
virtual void set_progress_handler (CMLProgress *h)
 Use an alternate progress handler.
CAMAL version
virtual int get_major_version () const
 Returns the major version number.
virtual int get_minor_version () const
 Returns the minor version number.
virtual int get_subminor_version () const
 Returns the subminor version (patch) number.
virtual int get_allint_version () const
 Returns version number as one integer.
virtual const char * get_version_string ()
 Returns version number as a string.
Mesher properties
virtual void set_sizing_function (CML::SizingType type, double size1=-1.0, double size2=-1.0)
 Set a sizing function and its parameters.

Detailed Description

The surface submapper fills a surface with quadrilaterals if the surface may be subdivided into a series of mappable regions.

The surface is defined by loops of points that are the surface's boundary. The submapper uses a CMLSurfEval object to move nodes to the surface.


Constructor & Destructor Documentation

CMLSurfSubMapper::CMLSurfSubMapper ( CMLSurfEval geom_eval,
CMLSizeEval size_eval = NULL,
bool  subMapSmooth = true,
CML::OutputMsg  msg_level = CML::STANDARD 
)

A class constructor.

Parameters:
geom_eval A pointer to the geometry evaluator object that performs move-to-surface, normal-at-point, etc. computations.
size_eval A pointer to the mesh size evaluator object that is used to evaluate the mesh size at different locations. It may be NULL if no external sizing function is used.
subMapSmooth A flag to tell the submapper whether to smooth the resulting mesh. The default is to smooth.
msg_level An enumerated constant that controls the amount of output. The default value is CML::STANDARD. A value of CML::NODE causes the surface submapper to suppress all output.
See also:
set_msg_level()


Member Function Documentation

virtual void CMLSurfSubMapper::close_log_file (  )  [virtual]

Close an open log file.

See also:
open_log_file()

Implements CMLMesher.

bool CMLSurfSubMapper::generate_mesh ( int &  num_points_out,
int &  num_quads 
)

Generate a structured quadrilateral mesh for the surface.

Parameters:
num_points_out The total number of points generated including the input points
num_quads The number of quadrilaterals generated
Returns:
true if successful, false otherwise
Note:
These two output values are useful for dynamically allocating the memory necessary to retrieve the quadrilateral mesh with get_mesh().

bool CMLSurfSubMapper::get_mesh ( int  num_points_out,
double *const   points,
int  num_quads,
int *const   quads 
)

Retrieve the generated quadrilateral mesh.

Parameters:
num_points_out The number of points to retrieve. This should be the same number returned by generate_mesh().
points An array of points in the generated mesh (array size = 3 * num_points_out.)
The first three array values are the x, y and z coordinates of the first point. The next three are for the second point, then the third, etc.
num_quads The number of quadrilaterals to retrieve. This should be the same number returned by generate_mesh().
quads An array defining the connectivity of the generated mesh (array size = 4 * num_quads.)
The first four array values are the indices to the points array of the first quadrilateral's corner points. The second four describes the second quadrilateral, then the third, etc. The four indices of a quadrilateral are entered in a counter-clockwise direction around the face when viewed from a positive distance along the surface normal through the element. Indices range from 0 to num_points_out - 1 since the points array is zero-based.
Returns:
true if successful, false otherwise

virtual CML::OutputMsg CMLSurfSubMapper::get_msg_level (  )  const [virtual]

Get the value of the message level flag.

Returns:
The current message level flag.
See also:
set_msg_level()

Implements CMLMesher.

int CMLSurfSubMapper::get_points_buf ( int  buf_size,
double *const   points,
int  start_index = 0 
)

Retrieve the generated points one buffer at a time.

Parameters:
buf_size The length of the points array.
points The output buffer for points. A maximum of buf_size/3 points will be copied to this buffer.
start_index The index of the first output point.
Returns:
The number of points returned in points buffer. Returns zero if start_index is greater than the number of points in the array.
Note:
To return all points, begin with start_index = 0 and increment it by the return value until the return value is zero.

int CMLSurfSubMapper::get_quads_buf ( int  buf_size,
int *const   quads,
int  start_index = 0 
)

Retrieve the generated quadrilaterals one buffer at a time.

Parameters:
buf_size The length of the quads buffer array
quads The output buffer for quadrilaterals. A maximum of buf_size/4 quadrilaterals will be copied to this buffer.
start_index The index of the first output quadrilateral.
Returns:
The number of quadrilaterals returned in quads buffer. Returns zero if start_index is greater than the number of quadrilaterals in the array.
Note:
To return all quadrilaterals, begin with start_index = 0 and increment it by the return value until the return value is zero.

virtual void CMLSurfSubMapper::open_log_file ( const char *  filename,
bool  append = false 
) [virtual]

Open a log file to record algorithm output.

Parameters:
filename The log file name
append Appends to the file filename if it exists
See also:
close_log_file()

Implements CMLMesher.

bool CMLSurfSubMapper::set_boundary_mesh ( int  num_points_in,
double *const   points,
int  num_loops,
int *const   loop_sizes,
int *const   point_types = NULL 
)

Supply the boundary loops describing the surface boundary.

Parameters:
num_points_in The number of points in the boundary loops.
points An array of points (array size = 3 * num_points_in.)
The first three array values are the x, y and z coordinates of the first point. The next three are for the second point, then the third, etc.
num_loops The number of loops that describe the boundary of the surface.
loop_sizes The number of points in each loop. The array size will be num_loops.
point_types The corner type of each point passed in. The array size will be the same as that for points. This array is optional. The point_types will be computed from the loops if the pointer to this array is NULL.
Returns:
true if successful, false otherwise.

virtual void CMLSurfSubMapper::set_message_handler ( CubitMessageHandler *  h  )  [virtual]

Use an alternate output message handler.

Parameters:
h A pointer to a message handler derived from CubitMessageHandler.

Implements CMLMesher.

virtual void CMLSurfSubMapper::set_msg_level ( CML::OutputMsg  level  )  [virtual]

Set the value of the message level flag.

Parameters:
level The value of the message level is an enumerated constant. The default value is CML::STANDARD and generates minimal output. A value of CML::VERBOSE generates more output, and a value of CML::DEBUG generates output helpful to developers. A value of CML::NONE causes the mesher to suppress all output.
See also:
get_msg_level()

Implements CMLMesher.

virtual void CMLSurfSubMapper::set_progress_handler ( CMLProgress *  h  )  [virtual]

Use an alternate progress handler.

Parameters:
h A pointer to a progress hander derived from CMLProgress.

Implements CMLMesher.

virtual void CMLSurfSubMapper::set_sizing_function ( CML::SizingType  type,
double  size1 = -1.0,
double  size2 = -1.0 
) [virtual]

Set a sizing function and its parameters.

Parameters:
type The enum of sizing function for the triangle mesher or paver.
size1 The constant size for CONSTANT_SIZING function and the minimum size for all others.
size2 The maximum size for all sizing functions.

Implements CMLMesher.


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

CAMAL 5.2-0 documentation created on 1 Jun 2010
Comments to csimsoft.com