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

rf_cback_impl Class Reference

Object holds set of C callback routines. More...

#include <rf_cback_impl.h>

Inheritance diagram for rf_cback_impl:

rf_backend rf_backend_impl base_interface rf_ftnback_impl List of all members.

Public Methods

 rf_cback_impl (rfobj_impl *rfobj, rf_mesh_interface *mi, const char *form, const char *backend, int filesperstep, char filesasstep, rf_userparseinit_func pi=0, rf_userexternalload_func el=0, rf_userexternalclose_func ec=0, rf_userexternalgrid_func gr=0, rf_userexternalelements_func els=0, rf_userexternalgroups_func gp=0, rf_userexternalpostmesh_func po=0, rf_loadscalarbackend_func lo=0, rf_userexternalblank_func bl=0, rf_freelocaldata_func fld=0, rf_userfiledesc_func fd=0, int infl=0, int conf=0, int msf=1, int mintrin=0, int ufd=1, int nwf=0, int nwm=0, int zm=0, int mnv=1, int matv=0, void *ld=0)
 Initialize object. More...

 ~rf_cback_impl ()
 Should invoke delete_local_data because this class implements user_free_local().

void set_callbacks (rf_userparseinit_func pi, rf_userexternalload_func el, rf_userexternalclose_func ec, rf_userexternalgrid_func gr, rf_userexternalelements_func ems, rf_userexternalgroups_func gp, rf_userexternalpostmesh_func po, rf_loadscalarbackend_func lo, rf_userexternalblank_func bl, rf_freelocaldata_func fld, rf_userfiledesc_func ufd)
 Set all of the callback function values. More...

int user_parse_inputinit (const char *buf, int j, const char *file, const char *format, const char *zonemask, int *nfiles, const char **files)
 Invoke the parseinit callback function. More...

int user_external_load (int nfiles, const char **files, int *d_tstep, RFPrecType *d_prec, size_t *nnodes)
 Invoke the eload callback function. More...

int user_file_descriptor (size_t nnodes, int tstep)
 Invoke the file_desc callback function to set the file descriptor information. More...

int user_external_close ()
 Invoke the eclose callback function to close files. More...

int user_external_grid (int tstep)
 Invoke grid to define the nodes in the mesh. More...

int user_external_elements (int tstep)
 Invoke elems to define the unstructured elements in the mesh. More...

int user_external_groups (int tstep)
 Invoke groups to assign family ids if required. More...

int user_external_postmesh (int tstep)
 Invoke post to carry out post mesh definition actions. More...

int user_external_scalar (int idnum, const char *name, int nvals, RFEntityType type, void *values, int skip, RFPrecType prec, int tstep)
 Invoke loadscal to load scalar result. More...

int user_external_iblank (int *ib, int tstep)
 Invoke blank to specify structured surfaces to blank. More...

int user_free_local (void *data)
 Invoke the floc_data callback function. More...


Protected Attributes

rf_userparseinit_func parseinit
 C callback for user_parse_inputinit(). More...

rf_userexternalload_func eload
 C callback for user_external_load(). More...

rf_userexternalclose_func eclose
 C callback for user_external_close(). More...

rf_userexternalgrid_func grid
 C callback for user_external_grid(). More...

rf_userexternalelements_func elems
 C callback for user_external_elements(). More...

rf_userexternalgroups_func groups
 C callback for user_external_groups(). More...

rf_userexternalpostmesh_func post
 C callback for user_external_postmesh(). More...

rf_loadscalarbackend_func loadscal
 C callback for user_external_scalar(). More...

rf_userexternalblank_func blank
 C callback for user_external_iblank(). More...

rf_freelocaldata_func floc_data
 C callback for user_free_local(). More...

rf_userfiledesc_func file_desc
 C callback for user_file_descriptor(). More...


Detailed Description

Object holds set of C callback routines.

Object calls specified routines to carry out task. Required callbacks must be specified. Optional callbacks can be specified as 0.


Constructor & Destructor Documentation

rf_cback_impl::rf_cback_impl ( rfobj_impl * rfobj,
rf_mesh_interface * mi,
const char * form,
const char * backend,
int filesperstep,
char filesasstep,
rf_userparseinit_func pi = 0,
rf_userexternalload_func el = 0,
rf_userexternalclose_func ec = 0,
rf_userexternalgrid_func gr = 0,
rf_userexternalelements_func els = 0,
rf_userexternalgroups_func gp = 0,
rf_userexternalpostmesh_func po = 0,
rf_loadscalarbackend_func lo = 0,
rf_userexternalblank_func bl = 0,
rf_freelocaldata_func fld = 0,
rf_userfiledesc_func fd = 0,
int infl = 0,
int conf = 0,
int msf = 1,
int mintrin = 0,
int ufd = 1,
int nwf = 0,
int nwm = 0,
int zm = 0,
int mnv = 1,
int matv = 0,
void * ld = 0 )
 

Initialize object.

Note that constructor specifies the callback functions before the standard optional parameters.

See also:
set_callbacks().
Parameters:
rfobj   result object implementation to use.
mi   interface to mesh implementation to use.
form   format for reader. Generally is string "unknown".
backend   path or key to backend executable.
filesperstep   number of files per time step.
filesasstep   files as time step.
pi   user inputinit parse function.
el   user load function.
ec   user close function.
gr   user grid function.
els   user elements function.
gp   user group function.
po   user post mesh function.
lo   user load scalar result function.
bl   user blank structured faces function.
fld   user free local data function.
fd   user file descriptor function.
infl   inflate 2D to 3D structured mesh.
conf   conformalize. Reserved for future use.
msf   make subfaces.
mintrin   make interinsic variables.
ufd   use face data.
nwf   reserved for future use.
nwm   node weight method.
zm   zone mask. Reserved for future use.
mnv   make cell to node conversion variables.
mtav   material id available in result format.
ld   application specific local data. Implementation takes ownership.


Member Function Documentation

void rf_cback_impl::set_callbacks ( rf_userparseinit_func pi,
rf_userexternalload_func el,
rf_userexternalclose_func ec,
rf_userexternalgrid_func gr,
rf_userexternalelements_func ems,
rf_userexternalgroups_func gp,
rf_userexternalpostmesh_func po,
rf_loadscalarbackend_func lo,
rf_userexternalblank_func bl,
rf_freelocaldata_func fld,
rf_userfiledesc_func ufd ) [inline]
 

Set all of the callback function values.

Parameters:
pi   user inputinit parse function parseinit.
el   user load function eload.
ec   user close function elose.
gr   user grid function grid.
els   user elements function elems.
gp   user group function groups.
po   user post mesh function post.
lo   user load scalar result function loadscal.
bl   user blank structured faces function blank.
fld   user free local data function floc_data.
fd   user file descriptor function file_desc.

int rf_cback_impl::user_parse_inputinit ( const char * buf,
int j,
const char * file,
const char * format,
const char * zonemask,
int * nfiles,
const char ** files ) [virtual]
 

Invoke the parseinit callback function.

See also:
rf_backend_interface::user_parse_inputinit().
Parameters:
buf   inputinit line from visual3
j   how many fields parsed on standard inputinit command line.
file   Generally file name on inputinit line.
format   generally format on inputinit line.
zonemask   generally zonemask on inputinit line
nfiles   pointer to local number of files recognized. Method should return.
files   pointer to list of file names found. Up to 1024 file names allowed. Method should return.
Returns:
1 if inputinit line is valid, 0 if not.

Reimplemented from rf_backend.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_load ( int nfiles,
const char ** files,
int * d_tstep,
RFPrecType * d_prec,
size_t * nnodes ) [virtual]
 

Invoke the eload callback function.

See also:
rf_backend_interface::user_external_load() for specification.
Parameters:
nfiles   number of files the reader handle.
files   pointer to list of file names the reader must handle.
d_tstep   default time step to be read. User should return. Usually is 0, the first time step.
d_prec   default precision that should be used for nodes and results. User returns value. Used as hint for performance of reader.
nnodes   number of node coordinates in model. User returns value. Used as hint for performance of mesh implementation.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend_impl.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_file_descriptor ( size_t nnodes,
int tstep ) [virtual]
 

Invoke the file_desc callback function to set the file descriptor information.

file_desc is optional.

See also:
rf_backend_interface::user_file_descriptor() for specification.
Parameters:
nnodes   hinted number of nodes. Not guaranteed to be correct.
tstep   time step to read.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend_impl.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_close ( ) [virtual]
 

Invoke the eclose callback function to close files.

eclose is optional.

See also:
rf_backend_interface::user_external_close().

Reimplemented from rf_backend.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_grid ( int tstep ) [virtual]
 

Invoke grid to define the nodes in the mesh.

grid is required.

See also:
rf_backend_interface::user_external_grid() for specification.
Parameters:
tstep   time step to read.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend_impl.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_elements ( int tstep ) [virtual]
 

Invoke elems to define the unstructured elements in the mesh.

elems is optional.

See also:
rf_backend_interface::user_external_elements().
Parameters:
tstep   time step to read.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend_impl.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_groups ( int tstep ) [virtual]
 

Invoke groups to assign family ids if required.

groups is optional.

See also:
rf_backend_interface::user_external_groups().
Parameters:
tstep   time step to read.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend_impl.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_postmesh ( int tstep ) [virtual]
 

Invoke post to carry out post mesh definition actions.

post is optional.

See also:
rf_backend_interface::user_external_postmesh().
Parameters:
tstep   time step to read.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_scalar ( int idnum,
const char * name,
int nvals,
RFEntityType type,
void * values,
int skip,
RFPrecType prec,
int tstep ) [virtual]
 

Invoke loadscal to load scalar result.

loadscal is required.

See also:
rf_backend_interface::user_external_scalar().
Parameters:
idnum   reader identification number of the result.
name   result name. User should not modify.
nvals   number of values in the result.
type   entity type the caller requests result on.
values   array of precision prec the routine must fill.
skip   if values is a vector quantity, a non-zero skip will be passed.
prec   the precision of the values array.
tstep   time step to read.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_external_iblank ( int * ib,
int tstep ) [virtual]
 

Invoke blank to specify structured surfaces to blank.

blank is optional.

See also:
rf_backend_interface::user_external_iblank() .
Parameters:
ib   blanking data.
tstep   time step to read.
Returns:
1 = success, 0 = failure.

Reimplemented from rf_backend.

Reimplemented in rf_ftnback_impl.

int rf_cback_impl::user_free_local ( void * data ) [virtual]
 

Invoke the floc_data callback function.

See also:
rf_backend_interface::user_free_local() for specification.
Parameters:
data   user created data structure to be freed.

Reimplemented from rf_backend_impl.

Reimplemented in rf_ftnback_impl.


Member Data Documentation

rf_userparseinit_func rf_cback_impl::parseinit [protected]
 

C callback for user_parse_inputinit().

(REQUIRED)

rf_userexternalload_func rf_cback_impl::eload [protected]
 

C callback for user_external_load().

(REQUIRED)

rf_userexternalclose_func rf_cback_impl::eclose [protected]
 

C callback for user_external_close().

(OPTIONAL)

rf_userexternalgrid_func rf_cback_impl::grid [protected]
 

C callback for user_external_grid().

(REQUIRED)

rf_userexternalelements_func rf_cback_impl::elems [protected]
 

C callback for user_external_elements().

(OPTIONAL)

rf_userexternalgroups_func rf_cback_impl::groups [protected]
 

C callback for user_external_groups().

(OPTIONAL)

rf_userexternalpostmesh_func rf_cback_impl::post [protected]
 

C callback for user_external_postmesh().

(OPTIONAL)

rf_loadscalarbackend_func rf_cback_impl::loadscal [protected]
 

C callback for user_external_scalar().

(REQUIRED)

rf_userexternalblank_func rf_cback_impl::blank [protected]
 

C callback for user_external_iblank().

(OPTIONAL)

rf_freelocaldata_func rf_cback_impl::floc_data [protected]
 

C callback for user_free_local().

(OPTIONAL)

rf_userfiledesc_func rf_cback_impl::file_desc [protected]
 

C callback for user_file_descriptor().

(OPTIONAL)


The documentation for this class was generated from the following file:
Generated at Wed Mar 2 11:18:25 2005 for Result Library by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000