2.10: TQSIZE

TOCGroup 1TQGTEDTQUSEDGroup 2A-ZGroup 1

GET-ARRAY-SIZES

Use TQSIZE to get the internal array dimensions of ChemApp.

Added for ChemApp version 1.1.3

Synopsis

FORTRAN: CALL TQSIZE(NA,NB,NC,ND,NE,NF,NG,NH,NI,NJ,NK,NOERR)

C: tqsize(&na,&nb,&nc,&nd,&ne,&nf,&ng,&nh,&ni,&nj,&nk,&noerr);

Pascal: tqsize(na,nb,nc,nd,ne,nf,ng,nh,ni,nj,nk,noerr);

Basic: Call tqsize(na,nb,nc,nd,ne,nf,ng,nh,ni,nj,nk,noerr)


Name Type Value set on call or returned
NA INTEGER Returns the maximum number of constituents
NB INTEGER Returns the maximum number of system components
NC INTEGER Returns the maximum number of mixture phases
ND INTEGER Returns the maximum number of excess Gibbs energy coefficients for a mixture phase
NE INTEGER Returns the maximum number of excess magnetic coefficients for a mixture phase
NF INTEGER Returns the maximum number of sublattices for a mixture phase
NG INTEGER Returns the maximum number of constituents of a sublattice
NH INTEGER Returns the maximum number of oxide constituents of a phase described by the Gaye-Kapoor-Frohberg or modified quasichemical formalisms
NI INTEGER Returns the maximum number of Gibbs energy/heat capacity equations for a constituent
NJ INTEGER Returns the maximum number of Gibbs energy/heat capacity equations
NK INTEGER Returns the maximum number of constituents with P,T-dependent molar volumes
NOERR INTEGER Returns an error number

TQSIZE returns the dimensions of a number of internal arrays. Among other purposes, it can be used to verify whether one is working with the standard or extended version of ChemApp.

See also

TQUSED

Examples

FORTRAN:View plain source code



C Display the sizes of selected ChemApp internal arrays
PROGRAM CAF4 IMPLICIT NONE
INTEGER NOERR INTEGER LA,LB,LC,LD,LE,LF,LG,LH,LI,LJ,LK
C Initialise ChemApp CALL TQINI(NOERR)
C Get array sizes CALL TQSIZE(LA,LB,LC,LD,LE,LF,LG,LH,LI,LJ,LK,NOERR)
50 FORMAT(1X,A,I3)
WRITE(UNIT=*,FMT=50) 'Maximum number of constituents: ',LA WRITE(UNIT=*,FMT=50) 'Maximum number of system components: ',LB WRITE(UNIT=*,FMT=50) 'Maximum number of mixture phases: ',LC WRITE(UNIT=*,FMT=50) 'Maximum number of sublattices for a '// * 'mixture phase: ',LF

Output:
 Maximum number of constituents: 300
 Maximum number of system components:  15
 Maximum number of mixture phases:  20
 Maximum number of sublattices for a mixture phase:   5

END

C:View plain source code




/* Program cac4 */ /* Display the sizes of selected ChemApp internal arrays */
#include "cacint.h"
int main() { LI noerr, la,lb,lc,ld,le,lf,lg,lh,li,lj,lk;
/* Initialise ChemApp */ tqini(&noerr);
/* Get array sizes */ tqsize(&la,&lb,&lc,&ld,&le,&lf,&lg,&lh,&li,&lj,&lk,&noerr);
printf("Internal array sizes of this version of ChemApp:\n" "Maximum number of constituents: %li\n" "Maximum number of system components: %li\n" "Maximum number of mixture phases: %li\n" "Maximum number of sublattices for a mixture phase: %li\n", la,lb,lc,lf);

Output:
Internal array sizes of this version of ChemApp:
Maximum number of constituents: 300
Maximum number of system components: 15
Maximum number of mixture phases: 20
Maximum number of sublattices for a mixture phase: 5

return 0;
}


ChemApp Programmer's Manual, Edition 3.6© GTT-Technologies, 2003