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

rf_backend Class Reference

Overrides the mesh loading fuction, node, cell and group functions to use the appropriate method in rfinfo_base for reading from the implementation the reader is providing. More...

#include <rf_backend.h>

Inheritance diagram for rf_backend:

rf_backend_impl base_interface blocker exuns_impl rf_cback_impl rf_domain_impl rf_exuns_impl script_impl rf_ftnback_impl domain_impl rf_icem_impl domain_impl_icem domain_impl_restrict List of all members.

Public Methods

 rf_backend (rfobj_impl *nbi=0, void *ld=0)
 Invoke rf_backend::rf_backend(rfobj_impl *, void *).

 rf_backend (rfobj_impl *rfobj, const rf_mesh_handle& mi, const char *form, const char *backend, int filesperstep, char filesasstep, 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 mtav=0, void *ld=0)
 Specify creation of interface and set RFRunPars. More...

 rf_backend (const rf_backend& rfobj)
 Copy constructor and equality operator are NOPs.

rf_backend& operator= (const rf_backend& rfobj)
 Copy constructor and equality operator are NOPs.

 ~rf_backend ()
 All subclasses should invoke close_internal_reader() to properly run down. More...

int user_parse_inputinit (const char *buf, int j, const char *file, const char *format, const char *zonemask, int *nfiles, const char **files)
 Default implementation simply returns that the decoded file name is the only file. More...

int user_fileset_load (size_t nsets, int *d_tstep, RFPrecType *d_prec, size_t *nnodes)
 Default implementation invokes deprecated function user_external_load with all files used in call. More...

int user_external_postmesh (int tstep)
 Default implementation simply returns 1. More...

int user_external_iblank (int *ib, int tstep)
 Default implementation invokes finfo_base::iblank_backend. More...

int user_external_scalar (int idnum, const char *name, int nvals, RFEntityType type, void *values, int skip, RFPrecType prec, int tstep)
 Method MUST be implemented by reader. More...

int user_external_close ()
 Default implementation is a NOP. More...

int load_mesh (size_t iNFiles, const char **iFiles, int iNpars=0, const char **iPars=0)
 Invokes rfinfo_base::load_mesh_backend. More...

int nodes_local (void *crds, void *bbmin, void *bbmax, int prec, int tstep)
 Invokes rfinfo_base::nodes_local_backend. More...

int cells_local (int type, int* eles, int tstep, RFConnOrder desired_ord)
 Invokes rfinfo_base::cells_local_backend. More...

int group_local (int idord, RFEntityType type, RFConnOrder iOrd, int *numbers, int ext)
 Invokes rfinfo_base::group_local_backend. More...


Detailed Description

Overrides the mesh loading fuction, node, cell and group functions to use the appropriate method in rfinfo_base for reading from the implementation the reader is providing.

Readers must override certain user_external_xxx functions in order to completec aller request to read result file(s). Readers should subclass this class.

See also:
rf_backend_interface::user_external_load() , rf_backend_interface::user_external_grid() , rf_backend_interface::user_external_elements() , rf_backend_interface::user_external_groups() , rf_backend_interface::user_external_scalar()
Examples:

exuns_impl.h, and rf_exuns_impl.cxx.


Constructor & Destructor Documentation

rf_backend::rf_backend ( rfobj_impl * rfobj,
const rf_mesh_handle & mi,
const char * form,
const char * backend,
int filesperstep,
char filesasstep,
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 mtav = 0,
void * ld = 0 )
 

Specify creation of interface and set RFRunPars.

This is the standard constructor readers invoke. Sets up reader specific information.

See also:
rf_backend_interface::set_construct_runpars().
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.
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.

rf_backend::~rf_backend ( ) [inline]
 

All subclasses should invoke close_internal_reader() to properly run down.

Reason is that symantics of destructors precludes this method properly working if invoked anywhere but the reader destructor. Side effect of not doing this is a memory leak and potentially improperly closed files if the destructor of an interface is invoked instead of a call to rf_close which does properly run interface down.

See also:
rf_close() , rf_backend_interface::close_internal_reader().


Member Function Documentation

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

Default implementation simply returns that the decoded file name is the only file.

If the inputinit line for reader is more complicated, then need to override this method. See rf_backend_interface::user_parse_inputinit() for specification.

Reimplemented from rf_backend_impl.

Reimplemented in blocker, domain_impl, exuns_impl, rf_cback_impl, rf_ftnback_impl, and script_impl.

Examples:
exuns_impl.h.

int rf_backend::user_fileset_load ( size_t nsets,
int * d_tstep,
RFPrecType * d_prec,
size_t * nnodes ) [virtual]
 

Default implementation invokes deprecated function user_external_load with all files used in call.

This will allow migration of all current readers/scripts to user_fileset_load. See rf_backend_interface::user_fileset_load() for specification.

Reimplemented from rf_backend_impl.

Reimplemented in blocker, domain_impl, and exuns_impl.

Examples:
exuns_impl.h.

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

Default implementation simply returns 1.

See rf_backend_interface::user_external_postmesh() for specification.

Reimplemented from rf_backend_impl.

Reimplemented in domain_impl, rf_cback_impl, and rf_ftnback_impl.

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

Default implementation invokes finfo_base::iblank_backend.

See rf_backend_interface::user_external_iblank() for specification.

Reimplemented from rf_backend_impl.

Reimplemented in rf_cback_impl, and rf_ftnback_impl.

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

Method MUST be implemented by reader.

See rf_backend_interface::user_external_scalar() for specification.

Reimplemented from rf_backend_impl.

Reimplemented in exuns_impl, rf_cback_impl, and rf_ftnback_impl.

Examples:
exuns_impl.h.

int rf_backend::user_external_close ( ) [virtual]
 

Default implementation is a NOP.

See rf_backend_interface::user_external_close() for specification.

Reimplemented from rf_backend_impl.

Reimplemented in blocker, domain_impl, exuns_impl, rf_cback_impl, and rf_ftnback_impl.

Examples:
exuns_impl.h.

int rf_backend::load_mesh ( size_t iNFiles,
const char ** iFiles,
int iNpars = 0,
const char ** iPars = 0 ) [virtual]
 

Invokes rfinfo_base::load_mesh_backend.

See rf_backend_interface::load_mesh() for specification.

Reimplemented from rf_backend_impl.

int rf_backend::nodes_local ( void * crds,
void * bbmin,
void * bbmax,
int prec,
int tstep )
 

Invokes rfinfo_base::nodes_local_backend.

See rf_backend_interface::nodes_local() for specification.

int rf_backend::cells_local ( int type,
int * eles,
int tstep,
RFConnOrder desired_ord ) [virtual]
 

Invokes rfinfo_base::cells_local_backend.

See rf_backend_interface::cells_local() for specification.

Reimplemented from rf_backend_impl.

int rf_backend::group_local ( int idord,
RFEntityType type,
RFConnOrder iOrd,
int * numbers,
int ext ) [virtual]
 

Invokes rfinfo_base::group_local_backend.

See rf_backend_interface::group_local() for specification.

Reimplemented from rf_backend_impl.


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