next up previous contents
Next: Files and their routines. Up: ndf access routines Previous: Summary of C routines   Contents


C wrappers for the FORTRAN routines


ndfcaccess

C declaration:

void ndfcaccess( int yi, char *libnam, char *Version, char *grptype, char *subpath, int ls );

yi i N/A Id of the incident particle
libnam i N/A Evaluated data library name
Version i N/A Version of evaluated data
grptype i N/A Suffix added to file name
subpath o N/A Returned string of directory
ls i N/A Length of 'subpath' space (i.e. sizeof( *subpath ))

This routine is a C wrapper for the FORTRAN routine ndfaccess with one additional argument. This argument, 'ls', informs ndfcaccess about the length of space in bytes reserved for 'subpath'. The following C codes demonstrates it usage.

    char subpath[64];
    ndfcaccess( 1, "endl", "current", "230", subpath, sizeof( subpath ) );
If there is not enough space in 'subpath' to hold the sub-directory name and the trailing NULL byte, then the name is truncated with a trailing NULL.


ndfcatw

C declaration:

double ndfcatw( void );

'return value' f AMU Atomic mass in AMU for the current target

This routine is a C wrapper for the FORTRAN routine ndfatw.


ndfcbuff

C declaration:

void ndfcbuff( void *p );

p i N/A Pointer to memory allocated by the user

This routine is a C wrapper for the FORTRAN routine ndfbuff.


ndfcclose

C declaration:

void ndfcclose( void );

This routine is a C wrapper for the FORTRAN routine ndfclose. It also frees memory allocated by other ndf C wrapper routines. For example, the memory allocated by ndfcopen. Note, ndfcclose only frees memory allocated by the C wrapper routines. If a user calls ndfinit, allocates memory and calls ndfbuff, then ndfcclose will not frees the memory allocated by the user, but will free other memory that the C wrapper routines may have allocated.


ndfccorrec

C declaration:

void ndfccorrec( double *tccs );

tccs[ ncg x ( lMax + 1 ) ] o barn The transport-correcting cross-section

This routine is a C wrapper for the FORTRAN routine ndfcorrec.


ndfced

C declaration:

void ndfced( int yo, double *ed );

yo i N/A Id of the transportable outgoing particle
ed[ ncg ] o MeV-barn outgoing particle's energy deposited

This routine is a C wrapper for the FORTRAN routine ndfed. Note that the arguments are in reverse order as compared to ndfed.


ndfcemax

C declaration:

void ndfcemax( double *em );

em[ ncg ] o MeV-barn Available energy

This routine is a C wrapper for the FORTRAN routine ndfemax.


ndfcep

C declaration:

void ndfcep( double *ep );

ep[ ncg ] o MeV-barn Production energy

This routine is a C wrapper for the FORTRAN routine ndfep.


ndfcfism

C declaration:

int ndfcfism( double *fm );

fm[ ncg x ncg ] o barn Fission matrix
'return value' f N/A Indicates whether or not data is present

This routine is a C wrapper for the FORTRAN routine ndffism. The error flag returned as the second argument in ndffism is returned as ndfcfism's return value.


ndfcfisx

C declaration:

int ndfcfisx( double *fnubar );

fnubar[ ncg ] o barn Fission nubar data
'return value' f N/A Indicates whether or not data is present

This routine is a C wrapper for the FORTRAN routine ndffisx. The error flag returned as the second argument in ndffisx is returned as ndfcfisx's return value.


ndfcflxw

C declaration:

void ndfcflxw( double *flux );

flux[ ncg ] o N/A l = 0 collapsed flux weights

This routine is a C wrapper for the FORTRAN routine ndfflxw.


ndfcflxw_l

C declaration:

void ndfcflxw_l( int l, double *d );

l i N/A Requested Legendre order
flux[ ncg ] o N/A l order collapsed flux weights

This routine is a C wrapper for the FORTRAN routine ndfflxw_l.


ndfcfsp

C declaration:

void ndfcfsp( double *FissSpec );

FissSpec[ ncg ] o N/A Normalized fission spectrum

This routine is a C wrapper for the FORTRAN routine ndffsp.


ndfcgid

C declaration:

int ndfcgid( void );

'return value' f N/A Group id for the incident particle

This routine is a C wrapper for the FORTRAN routine ndfgid.


ndfcgp

C declaration:

void ndfcgp( double *gb );

gb[ ng + 1 ] o MeV Uncollapsed energy boundaries for the incident particle

This routine is a C wrapper for the FORTRAN routine ndfgp.


ndfcgroup

C declaration:

void ndfcgroup( int ncg, double *cgb, int fid );

ncg i N/A Number of collapsed groups
cgb[ ncg + 1 ] i MeV Boundaries for the collapsed group
fid i N/A bdfls id of the flux to uses for collapsing

This routine is a C wrapper for the FORTRAN routine ndfgroup. Note that the first two arguments are reversed as compared to the arguments of ndfgroup.


ndfcidog

C declaration:

int ndfcidog( int gid, double *gb );

gid i N/A Id of the energy group to input from the bdfls file
gb[ 'return value' + 1 ] o MeV Boundaries of returned group
'return value' f N/A Number of returned groups

This routine is a C wrapper for the FORTRAN routine ndfidog. Note that ndfidog's third argument is returned as ndfcidog's return value and ndfidog's forth argument is not used by ndfcidog.


ndfcifsp

C declaration:

int ndfcifsp( void );

'return value' f N/A Flag indicating whether or not ndffsp will print a fatal message

This routine is a C wrapper for the FORTRAN routine ndffsp.


ndfcinfo

C declaration:

void ndfcinfo( char *path, int ls );

path[ls] o N/A Full path name of the current open ndfy$\scriptstyle \bf i$ file.
ls i N/A Length of path space (i.e., sizeof( *path )).

This routine is a C wrapper for the FORTRAN routine ndfinfo with one additional argument. This argument, 'ls', informs ndfcinfo about the length of space in bytes reserved for 'path'. The following C codes demonstrates it usage.

    char subpath[64];
    ndfcinfo( path, sizeof( path ) );
The path is truncated with a trailing NULL if path is not long enough.


ndfcinit

C declaration:

int ndfcinit( int yi, char *Name, int *ReqdMem );

yi i N/A Id of the incident particle
Name[5] o N/A File name (e.g., "ndf1")
ReqdMem o N/A Memory in 8-byte words needed by ndf routines
'return value' f N/A Date in the ndfy$\scriptstyle \bf i$ file

This routine is a C wrapper for the FORTRAN routine ndfinit. Note that ndfinit's third argument is ndfcinit's return value and ndfinit's forth argument is ndfcinit's third argument. This routine and ndfcbuff can, and probably should, be replaced by ndfcopen.


ndfciso

C declaration:

int ndfciso( int ZA );

ZA i N/A ZA = (1000 x Z + A) of the target to select
'return value' f N/A Flag indicating if target was found in file

This routine is a C wrapper for the FORTRAN routine ndfiso. The error flag returned as the second argument in ndfiso is returned as ndfciso's return value.


ndfcistab

C declaration:

int ndfcistab( int **ZAList );

(*ZAList)[ 'return value' ] o N/A List of targets (ZAs)
'return value' f N/A Number of ZAs in ZAList

This routine is a C wrapper for the FORTRAN routine ndfistab. This routine allocates the memory for the ZA list, calls ndfistab, and then returns a pointer to the allocated memory in 'ZAList'. The number of targets in 'ZAList' is returned as ndfcistab's returned value. The user must not free the allocated memory, as this is done by ndfcclose. Multiple calls to ndfcistab are allowed.


ndfcmxorder

C declaration:

int ndfcmxorder( void );

'return value' f N/A Maximum Legendre order

This routine is a C wrapper for the FORTRAN routine ndfmxorder. Note that ndfmxorder's first argument is returned as ndfcmxorder's return value.


ndfcmxorder_tc

C declaration:

int ndfcmxorder_tc( void );

'return value' f N/A Maximum Legendre order allowed by transport correction method

This routine is a C wrapper for the FORTRAN routine ndfmxorder_tc.


ndfcncorrec

C declaration:

int ndfcncorrec( void );

'return value' f N/A Length of data returned by ndfccorrec

This routine is a C wrapper for the FORTRAN routine ndfncorrec.


ndfcngroup

C declaration:

int ndfcngroup( void );

'return value' f N/A Number of collapsed groups

This routine is a C wrapper for the FORTRAN routine ndfngroup. If collapsing has been initiated then the number of collapsed groups for the incident particle is returned. Else, the number of uncollapsed groups is returned.


ndfcngroups

C declaration:

int ndfcngroups( void );

'return value' f N/A Number of uncollapsed groups

This routine is a C wrapper for the FORTRAN routine ndfngroups.


ndfcnistab

C declaration:

int ndfcnistab( void );

'return value' f N/A Number of targets in the opened ndfy$\scriptstyle \bf i$ file

This routine is a C wrapper for the FORTRAN routine ndfnistab.


ndfcnmaxgps

C declaration:

int ndfcnmaxgps( void );

'return value' f N/A Largest group size used in processing the opened ndfy$\scriptstyle \bf i$ file

This routine is a C wrapper for the FORTRAN routine ndfnmaxgps.


ndfcnppyos

C declaration:

int ndfcnppyos( void );

'return value' f N/A Number of transportable outgoing particles

This routine is a C wrapper for the FORTRAN routine ndfnppyos.


ndfcnprod

C declaration:

int ndfcnprod( int C );

C i N/A C-value for the requested reaction
'return value' f N/A Number of outgoing particles produced for reaction C

This routine is a C wrapper for the FORTRAN routine ndfnprod. If the requested C-value is not in the reaction list for the current target then 0 is returned.


ndfcnreact

C declaration:

int ndfcnreact( void );

'return value' f N/A Number of reactions for the current target

This routine is a C wrapper for the FORTRAN routine ndfnreact.


ndfcnrxs

C declaration:

int ndfcnrxs( int C );

C i N/A C-value for the requested reaction
'return value' f N/A Number of reactions of type C

This routine is a C wrapper for the FORTRAN routine ndfnrxs.


ndfcnyos

C declaration:

int ndfcnyos( void );

'return value' f N/A Number of transportable outgoing particles with energy deposit data

This routine is a C wrapper for the FORTRAN routine ndfnyos.


ndfcopen

C declaration:

int ndfcopen( int yi, char *Name );

yi i N/A Id of the incident particle
Name[5] o N/A File name (e.g., "ndf1")
'return value' f N/A Date in the ndfy$\scriptstyle \bf i$ file

This routine replaces the routines ndfinit and ndfbuff. Effectively, it calls ndfinit, allocates the requested memory and then calls ndfbuff. The date returned by ndfinit is returned as ndfcopen's return value and the file name returned by ndfinit is returned in the ndfcopen argument 'Name'. A call to ndfcclose will free the allocated memory. Do not use ndfclose with this routine.


ndfcpmat

C declaration:

void ndfcpmat( int yo, int n, double *g, double *pm, double *ed );

yo i N/A Requested outgoing particle (yo $ \neq$ yi)
nch i N/A Number of groups in ch
ch[ nch + 1 ] i MeV Outgoing particle's collapsed group boundaries
matrix[ nch x ncg ] o barn yi $ \rightarrow$ yo production transfer matrix for yi $ \neq$ yo
energy[ ncg ] o MeV-barn Corrected energy deposited by outgoing particle

This routine is a C wrapper for the FORTRAN routine ndfpmat. Note that the argument order is different than that of ndfpmat.


ndfcppmatrix

C declaration:

int ndfcppmatrix( int yo, double *pm );

yo i N/A Requested outgoing particle (yo $ \neq$ yi)
matrix[ 'return value' x ng ] o barn Uncollapsed yi $ \rightarrow$ yo production transfer
      matrix for yi $ \neq$ yo
'return value' f N/A Number of groups representing the outgoing particle
      energy grouping

This routine is a C wrapper for the FORTRAN routine ndfppmatrix. Note that ndfppmatrix's last argument is returned as ndfcppmatrix's return value.


ndfcppyos

C declaration:

int ndfcppyos( int **yoList );

(*yoList)[ 'return value' ] o N/A List of outgoing particle ids for the current target
'return value' f N/A Number of outgoing particle ids returned

This routine is a C wrapper for the FORTRAN routine ndfppyos. Note that ndfcppyos's last argument is returned as ndfppyos's return value, and that ndfcppyos returns a pointer to the list. Currently, the list is static memory and is not and should not be freed. Selecting a new target and calling this routine will overwrite the old data.


ndfcprod

C declaration:

int ndfcprod( int C, int **ZAList, int **MList );

C i N/A C-value for the requested reaction
(*ZAList)[ 'return value' ] o N/A List of targets (i.e., ZAs)
(*MList)[ 'return value' ] o N/A List of multiplicities
'return value' f N/A Number of outgoing particles produced for reaction C

This routine is a C wrapper for the FORTRAN routine ndfprod. Note that ndfprod's second argument is returned as ndfcprod's return value. If the requested C-value is not in the reaction list for the current target then a fatal message is printed. ZAList and MList are the list of ZA's and their multiplicities. Memory for ZAList and MList are allocated by ndfcprod and freed when a new target is selected with ndfciso or when the ndfy$\scriptstyle \bf i$ file is closed with ndfcclose. If you use ndfcprod you must use ndfciso and ndfcclose instead of ndfiso and ndfclose to insure that memory is properly freed.


ndfcreact

C declaration:

int ndfcreact( int **C );

(*C)[ 'return value' ] o N/A List of C-values for each reaction
'return value' f N/A Number of reactions returned

This routine is a C wrapper for the FORTRAN routine ndfreact. Note that ndfreact's second argument is returned as ndfcreact's return value. Memory for C is allocated by ndfcreact and freed when a new target is selected with ndfciso or when the ndfy$\scriptstyle \bf i$ file is closed with ndfcclose. If you use ndfcreact you must use ndfciso and ndfcclose instead of ndfiso and ndfclose to insure that memory is properly freed.


ndfcrxs

C declaration:

double ndfcrxs( int C, int n, double *cs );

C i N/A C-value for the requested reaction
n i N/A Number of reactions with this C-value to include
cs[ ncg ] o barn Collapsed cross-section for this reaction
'return value' f MeV Q-value for last reaction

This routine is a C wrapper for the FORTRAN routine ndfrxs. Note that ndfreact's third argument (i.e., the Q-value) is returned as ndfcreact's return value. Also, ndfrxs's second and last arguments are ndfcrxs's third and second arguments, respectively.


ndfcrxslevel

C declaration:

int ndfcrxslevel( int C, int L, double *S, double *Q, double *X1, double *X2, double *X3, double *Qeff, double *cs );

C i N/A C-value for the requested reaction
L i N/A Level for the requested C-value
*S o N/A S-value for reaction
*Q o MeV Q-value for reaction
*X1 o Varies X1-value for reaction
*X2 o Varies X2-value for reaction
*X3 o Varies X3-value for reaction
*Qeff o MeV Q eff-value for reaction
cs[ ncg ] o barns Collapsed cross-section for reaction
'return value' f N/A 1 if requested C and L are present, 0 otherwise

This routine is a C wrapper for the FORTRAN routine ndfrxslevel.


ndfcrxslist

C declaration:

int ndfcrxslist( int C, double *S, double *Q, double *X1, double *X2, double *X3, double *Qeff );

C i N/A C-value for the requested reaction
S[ 'return value' ] o N/A List of S-values for reaction
Q[ 'return value' ] o MeV List of Q-values for reaction
X1[ 'return value' ] o Varies List of X1-values for reaction
X2[ 'return value' ] o Varies List of X2-values for reaction
X3[ 'return value' ] o Varies List of X3-values for reaction
Qeff[ 'return value' ] o MeV List of Q eff-values for reaction
'return value' f N/A Number of reactions of type C

This routine is a C wrapper for the FORTRAN routine ndfrxslist.


ndfcsig

C declaration:

void ndfcsig( int l, double *tcs, double *ed, double *tm, double *tc );

l i N/A Requested Legendre order
tcs[ ncg ] o barn Transport corrected total cross-section
ed[ ncg ] o MeV-barn Energy deposited by incident particle type
tm[ ncg x ncg x ( l + 1 ) ] o barn Transport corrected interaction transfer matrix
tc[ ncg ] o barn Transport correcting cross-section

This routine is a C wrapper for the FORTRAN routine ndfsig. Note that ndfcsig's first argument is ndfsig's last, with ndfcsig's other arguments being one greater than ndfsig's arguments.


ndfcsp

C declaration:

void ndfcsp( double *speeds );

speeds[ ncg ] o cm/sh Group speeds for the opened ndfy$\scriptstyle \bf i$ file

This routine is a C wrapper for the FORTRAN routine ndfsp.


ndfctotal

C declaration:

void ndfctotal( double *tcs );

tcs[ ncg ] o barn Uncorrected collapsed total cross-section for the current target

This routine is a C wrapper for the FORTRAN routine ndftotal.


ndfctransfer

C declaration:

void ndfctransfer( int l, double *d );

l i N/A Requested Legendre order
d[ ng x ng ] o barn Uncollapsed interaction transfer matrix for Legendre order l

This routine is a C wrapper for the FORTRAN routine ndftransfer.


ndfctrcorr

C declaration:

void ndfctrcorr( CorrectionTypes c );

c i N/A Requested transport correction method

This routine is a C wrapper for the FORTRAN routine ndftrcorr. CorrectionTypes is a C enum with valid values of e_ndfnone, e_ndfPendlebury, e_ndfLLNL and e_ndfFerguson.


ndfcwsp

C declaration:

void ndfcwsp( double *w );

w[ ncg ] o N/A Collapsed normalized l = 0 flux

This routine is a C wrapper for the FORTRAN routine ndfwsp.


ndfcyo

C declaration:

int ndfcyo( int j );

j i N/A Index of the requested id
'return value' f N/A The jth id from the particle directory

This routine is a C wrapper for the FORTRAN routine ndfyo.


ndfcyos

C declaration:

int ndfcyos( int **yoList );

(*yoList)[ 'return value' ] o N/A List of transportable outgoing particles with
      energy deposit data
'return value' f N/A Number of transportable outgoing particles with
      energy deposit data

This routine is a C wrapper for the FORTRAN routine ndfyos. Note that ndfyos's last argument is returned as ndfcyos's return value, and that ndfcyos returns a pointer to the list. Currently, the list is static memory, and is not and should not be freed. Selecting a new target and calling this routine will overwrite the old data.


ndfcyo_gid

C declaration:

int ndfcyo_gid( int yo );

yo i N/A The id of the requested particle
'return value' f N/A Group id used for particle yo

This routine is a C wrapper for the FORTRAN routine ndfyo_gid.


ndfcyo_iecflg

C declaration:

int ndfcyo_iecflg( int yo );

yo i N/A Requested transportable outgoing particle
'return value' f N/A Particle and/or Energy conservation flag

This routine is a C wrapper for the FORTRAN routine ndfyo_info. Note, ndfcyo_iecflg only returns the iecflg value from ndfyo_info, which is ndfcyo_iecflg's return value.


ndfcyo_nego

C declaration:

int ndfcyo_nego( int yo );

yo i N/A Requested transportable outgoing particle
'return value' f N/A Number of groups representing transportable
      outgoing particle's energy grouping

This routine is a C wrapper for the FORTRAN routine ndfyo_info. Note, ndfcyo_nego only returns the nh value from ndfyo_info, which is ndfcyo_nego's return value.


next up previous contents
Next: Files and their routines. Up: ndf access routines Previous: Summary of C routines   Contents