CMLVolMapper Class Reference

The volume mapper fills a logical 6-sided prism with hexahedra. More...

#include <CMLVolMapper.hpp>

Inheritance diagram for CMLVolMapper:

CMLMesher List of all members.

Public Member Functions

Constructor/Destructor
 CMLVolMapper (CML::OutputMsg msg_level=CML::STANDARD)
 A class constructor with an optional parameter.
virtual ~CMLVolMapper ()
 A virtual destructor for the class.
Mesh input
bool set_boundary_mesh (int num_points, double *const points, int num_quads, int *const quads, int *const point_ids=NULL)
 Set the boundary mesh for the volume mapper.
bool set_boundary_points (int num_points, double *const points, int k_ints, int j_ints, int i_ints, int *const point_ids=NULL)
 Set the boundary points for the volume mapper.
Core mesher
bool generate_mesh (int &num_points_out, int &num_hexes)
 Generate the hexahedral mesh for the volume.
Mesh output
bool get_mesh (int num_points_out, double *const points, int num_hexes, int *const hexes)
 Retrieve the generated hexahedral 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_hexes_buf (int buf_size, int *const hexes, int start_index=0)
 Retrieve the generated hexahedra one buffer at a time.
Algorithm properties
void set_create_hexes (bool hexes)
 Set the create-hexes flag.
bool get_create_hexes ()
 Get the state of the create-hexes flag.
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 volume mapper fills a logical 6-sided prism with hexahedra.

The volume is defined by a quadrilateral surface mesh or the points on the surface and the i, j, k intervals..


Constructor & Destructor Documentation

CMLVolMapper::CMLVolMapper ( CML::OutputMsg  msg_level = CML::STANDARD  ) 

A class constructor with an optional parameter.

Parameters:
msg_level An enumerated value that controls the amount of output. The default value is CML::STANDARD. A value of CML::NONE causes the mesher to suppress all output.
See also:
set_msg_level()


Member Function Documentation

virtual void CMLVolMapper::close_log_file (  )  [virtual]

Close an open log file.

See also:
open_log_file()

Implements CMLMesher.

bool CMLVolMapper::generate_mesh ( int &  num_points_out,
int &  num_hexes 
)

Generate the hexahedral mesh for the volume.

Parameters:
num_points_out The total number of points generated including the input points.
num_hexes The number of hexahedra (brick elements) generated. It may be zero if the create-hexes flag is false.
Returns:
true if successful, false otherwise.
See also:
set_create_hexes()

bool CMLVolMapper::get_create_hexes (  ) 

Get the state of the create-hexes flag.

See also:
set_create_hexes()

int CMLVolMapper::get_hexes_buf ( int  buf_size,
int *const   hexes,
int  start_index = 0 
)

Retrieve the generated hexahedra one buffer at a time.

Parameters:
buf_size The length of the hexes buffer array.
hexes The output buffer for hexahedra. A maximum of buf_size/8 hexahedra will be copied to this buffer. The hexahedron connectivity is described in get_mesh().
start_index The index of the first output hexahedron.
Returns:
The number of hexahedra returned in hexes buffer. Returns zero if start_index is greater than the number of hexahedra in the array.
Note:
To return all hexahedra, begin with start_index = 0 and increment it by the return value until the return value is zero.

bool CMLVolMapper::get_mesh ( int  num_points_out,
double *const   points,
int  num_hexes,
int *const   hexes 
)

Retrieve the generated hexahedral 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_hexes The number of hexahedra to retrieve. This should be the same number returned by generate_mesh().
hexes An array defining the connectivity of the generated mesh (array size = 8 * num_hexes.) The first four array values are the indices in the points array of the first hexhedron's front-face corner points and are entered in a counter-clockwise direction viewed from outside the hexahedron. The second four values describes the first hexhedron's back-face corner points. Corresponding points of the front and back faces form edges of the hexahedron. For example, the first corner of the front-face (index 0) and the first corner of the back face (index 4) form an edge of the hexahedron. The second eight values are the connectivity of the second hexahedron, etc. 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 CMLVolMapper::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 CMLVolMapper::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. The points ordering is described in get_mesh().
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.

virtual void CMLVolMapper::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 CMLVolMapper::set_boundary_mesh ( int  num_points,
double *const   points,
int  num_quads,
int *const   quads,
int *const   point_ids = NULL 
)

Set the boundary mesh for the volume mapper.

Parameters:
num_points The number of points in the surface meshes.
points An array of points (array size = 3 * num_points.) 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 quads on the surface of the volume.
quads An array defining the connectivity of the surface mesh (array size = 4 * num_quads.) The first four array values are the indices in the points array of the first quadrilateral's corner points. The second four describes the second quadrilateral, then the third, etc. The indices are entered in a counter-clockwise direction when viewed from outside the volume. Indices range from 0 to num_points_in - 1 since the points array is zero-based. Quadrilaterals on the 6 logical surface of the volume are usually grouped together by surface although that is not strictly necessary.
point_ids An optional array whose values are the user's identifiers for the points (array size = num_points_in.) Messages generated by the mapper use this array to translate from internal point identifiers to user identifiers.
Returns:
true if successful, false otherwise.

bool CMLVolMapper::set_boundary_points ( int  num_points,
double *const   points,
int  k_ints,
int  j_ints,
int  i_ints,
int *const   point_ids = NULL 
)

Set the boundary points for the volume mapper.

Parameters:
num_points The number of points in the surface meshes.
points An array of points (array size = 3 * num_points.) 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. The points define the boundary of a logical cube. Every point on the cube surface is defined. The following code fragment shows how the points array is interpreted:
         double* pnt = points;
         for (k = 0; k <= k_int; k++) {
           for (j = 0; j <= j_int; j++) {
             for (i = 0; i <= i_int; i++) {
               if (0 < k && k < k_ints &&
                   0 < j && j < j_ints &&
                   0 < i && i < i_ints)
                 continue; // skip interior nodes

               node_array[k][j][i] = new Node(pnt); // convert point to node
               pnt += 3;
             }
           }
         }
        

Parameters:
k_ints The number of intervals in the k-direction.
j_ints The number of intervals in the j-direction.
i_ints The number of intervals in the i-direction.
point_ids An optional array whose values are the user's identifiers for the points (array size = num_points_in.) Messages generated by the mapper use this array to translate from internal point identifiers to user identifiers.
Returns:
true if successful, false otherwise.

void CMLVolMapper::set_create_hexes ( bool  hexes  ) 

Set the create-hexes flag.

Parameters:
hexes If true, hexes will be created. If false, only points will be returned.
Note:
The default value of this flag is true so it only needs to be set if you do not want hexes but only points.
See also:
get_create_hexes()

virtual void CMLVolMapper::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 CMLVolMapper::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 CMLVolMapper::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 CMLVolMapper::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