Contents Prev Manual

SUBROUTINE TB02A(A,F,X,Y,N)

Interpolates in non-equal interval table.

Arguments:

On entry real arrays A and F hold the arguments and function values
X holds the required argument
N is the dimension of A and F, and so is the number of items

On exit Y holds the interpolated function value

Called by:

FORMFA

*** TB02A updated by JCM from HARWELL ***

Classification:

Mathematical Functions . . . . . . . Utility

SUBROUTINE TBLFND(NAME,IANS,IFAM,IGEN,ISPC,
KP,KS)

Looks for an A4 NAME in every table it can find, trying to
identify it as part of a LSQ parameter name.

Arguments:

On entry NAME is the target name to find
On exit IANS gives the answer:
IANS=0 means cannot find NAME anywhere
IANS=large -ve means that NAME is not part of a parameter specification,
but some other word recognised on a FIX/VAR Y card , like: 'ONLY' (-99) or 'ALL' (-100)

IANS=small -ve means that NAME is a word recognised from the user's
table, and IANS has been picked up from the user's parallel table table of small -ve integers or parameter specs

IANS=+ve means that NAME was part of a parameter specification; it may
be a family, genus or species name, and from it may have been deduced other things (like family name from genus name)

In this case, as many of IFAM, IGEN and ISPC as can be set on exit are set.

Prerequisite calls:

Expects LSQ to have been set up by LSETUP; if structure parameters are to be LSQ parameters, expects tables of atom names in /ATNAM and form factor names in /FONAM
If Multiphase, expects KPHASE to hold phase required for this one word.

Calls:

IATOM ISCAT KPAK KUNPAK NCFIND

Called by:

PARRD

Common blocks used:

/ATNAM/ to use ATNA
/CHARS/ to use IDIGIT
/FONAM/ to use FONA
/FORMD2/ to use all members
/GLOBAL/ to use MULFAS
/PHASE/ to use KPHASE
/POSNS2/ to use all members
/PRBLEM/ to use NFAM
/WDSPC/ to use all members
/WORDS/ to use all members

*** TBLFND updated by JCM 8 May 90 ***

Classification:

General Least Squares Refinement . . . . . . . Utility

SUBROUTINE TBOUND(IFOUND)

A specialist routine used duing the plotting of atomic positions
in main program ATMPLO.

Calls:

GMEQ GMPRD

Called by:

ATMPLO

Common blocks used:

/SCRAT/ to use all members

*** TBOUND by PJB Aug 86 ***

Classification:

Fourier Calculations . . . . . . . Crystallographic

LOGICAL FUNCTION TESTOV(A,B)

Tests a floating division for potential overflow.

Arguments:

On entry A is the real numerator
B is the real denominator
on exit TESTOV is set .TRUE. if A/B would overflow, .FALSE. if not.

Called by:

ABMULT ABSOR CALCFR CALCMG CALCMP CALCSF EXTINC FETSHF GEOMLS LFCALC LMPCAL MATINV MULIND RDNUMS RFACS SETFOU SETGAU SPHELI SYMEQU WGHTSF ARTILT MPLSQ CALCTW

*** TESTOV by JCM 22 Nov 83 ***

Classification:

Tests . . . . . . . Utility

SUBROUTINE TESTP(LUN,LINO,I,HEADNG,NL)

Puts a given heading at top of every printer page, counting lines.

Arguments:

On entry LUN is the required output unit number
LINO is the number of lines already output on the current page
I is the number of lines required to be output on this call
HEADNG is the character variable holding the heading
NL is the number of lines in HEADNG

On exit LINO has been updated.

Description:

Tests the potential output against a page size of NLINES

Output:

If necessary, throws a page and puts out the heading on unit LUN

Calls:

NEWPAG

Called by:

ABSCOR ARPRIN ABSMSF D3OP99 BPBPRC AISPRC CENPRC NCHECK GETMSF GETSFZ INCMSF MAGPOW POWDER

*** TESTP by JCM 16 Oct 85 ***

Classification:

CCSL Input/Output Routines . . . . . . . Utility

FUNCTION THREEJ(AJ)

RETURNS A 3J COEFFICIENT

Arguments:

AJ(6) holds the angular momentum quantum numbers
They are floating point numbers, only because they may be half integral.

Calls:

VECOUP

*** THREEJ NEW BY by PJB April 03 ***

Classification:

Mathematical Functions . . . . . . . Utility

SUBROUTINE TQLI(D,E,N,NP,Z,BOTH)

Performs the QL algorithm for eigenvalues and vectors of a real
symmetric matrix previously reduced to tridiagonal form.

Arguments:

On entry D is a real vector of length NP whose first N elements are the
diagonal elements of the required tridiagonal matrix;

E similarly holds the sub-diagonal matrix; E(1) is arbitrary.
N is the size of all required matrices and vectors;
NP is their DIMENSION in the routine, and may be larger.
Z is an NPxNP array holding an NxN matrix. If the routine
TRED2 has been used to reduce the matrix to tridiagonal, Z should on entry to TQLI contain the matrix on exit from TRED2.
Otherwise it should contain a unit matrix.

BOTH is a logical, set TRUE if both eigenvalues and eigenvectors
are wanted.

On exit D holds the eigenvalues, and the Kth column of Z holds the
normalised eigenvector corresponding to D(K).

Notes:

Adapted from Press, Flannery, Teukolsky &$1;Vetterling, Numerical Recipes.

Calls:

ERRMES

Called by:

MUCALC

*** TQLI by JCM from "NUMERICAL RECIPES" Dec 89 ***

Classification:

Mathematical Functions . . . . . . . Utility

SUBROUTINE TRANSC(A,ND)

Replaces a COMPLEX square matrix by its transposed conjugate.

Arguments:

On entry A is a COMPLEX NDxND matrix
On exit the elements of A have been replaced by their conjugates, and A
has been transposed.

Called by:

REAORB

*** TRANSC by JCM 12 Jul 83 ***

Classification:

Matrices and Vectors . . . . . . . Utility

SUBROUTINE TRANSQ(A,ND)

Replaces a real square matrix by its transpose.

Arguments:

On entry A is an NDxND real square matrix
On exit A has been replaced by its transpose

Called by:

DOCHI1 MAGSYM MPCON OPSYM READRT RELMT3 ROTOSM SETDC SETFOU SYMUNI USYM

*** TRANSQ by JCM 12 Jul 83 ***

Classification:

Matrices and Vectors . . . . . . . Utility

SUBROUTINE TRED2(A,N,NP,D,E,BOTH)

Performs the Householder reduction of a real symmetric matrix to
tridiagonal form.

Arguments:

On entry A is a real, symmetric NxN matrix held in an NPxNP array
BOTH is a LOGICAL which is TRUE if both eigenvalues and eigen- vectors will subsequently be wanted.

On exit D is a vector of length NP whose first N elements hold the
diagonal of the tridiagonal matrix,

E similarly holds the sub-diagonal elements, and E(1)=0.
If BOTH, then A is replaced by the orthogonal matrix Q which effects the transformation; if .NOT. BOTH, A holds rubbish.

Notes:

For eigenvalues and eigenvectors, should be followed by a call to TQLI.
Adapted from Press, Flannery, Teukolsky &$1;Vetterling, Numerical Recipes.

Called by:

MUCALC

*** TRED2 by JCM from "NUMERICAL RECIPES" 4 Dec 89 ***

Classification:

Mathematical Functions . . . . . . . Utility

SUBROUTINE TRIAN1(A,B,C,D,I)

Applies the cosine formula for the solution of spherical
triangles.

Arguments:

The entry and exit conditions vary according to the entry value of I:
I=1: sets D=angle A given sides A,B,C
I=2: sets A=side A given sides B,C and D=angle A.
I=3: sets D=side A given angles A,B,C
I=4: sets A=angle A given angles B,C and D=side A.

Description:

The angles are given and returned as their cosines.

Output:

Writes an error message is a cosine found >1

Called by:

GETDC

Common blocks used:

/IOUNIT/ to use LPT ITO

*** TRIAN1 by JCM 25 Jan 85 ***

Classification:

Trigonometry . . . . . . . Utility

SUBROUTINE TRIG(A,B,K)

Sets up cos(nx) and sin(nx) for a range of n by recursion.

Arguments:

On entry B is the reqired argument x
K is the required number of terms

On exit A is the COMPLEX array holding the answers

Description:

Calculates the COMPLEX trigonometric functions A(i) = CEXP(0,m*B) for i = m+1, m = 0,K-1.

Called by:

DIJROT ERRMAP FOUR1D FOUR1Z FOURGP SPHARM

*** TRIG by JCM 18 Apr 84 ***

Classification:

Trigonometry . . . . . . . Utility

SUBROUTINE TRINV3(A,D)

Replaces a 3x3 matrix by the transpose of its inverse.

Arguments:

On entry A holds a 3x3 real matrix
On exit D is the value of the determinant of the matrix.
A has been replaced by its inverse

Description:

If D is less than 10E-5 no replacement takes place.

Called by:

ATMPLO MPCON SETDC USYM

*** TRINV3 by JCM ***

Classification:

Matrices and Vectors . . . . . . . Utility

SUBROUTINE TRYUNI(NCHK)

A specialist routine used in the setting up of the asymmetric
unit, to try out a given set of planes as faces of the unit.

Arguments:

On entry NCHK non-zero indicates that a check on the given representative indices HT (see below) is to be performed whatever the given unit is like.

Prerequisite calls:

The scratch COMMON /SCRAT/ is set up as follows:
A tentative asymmetric unit is held as NOPL planes in the array ASY, the dimension of 4 allowing for "dead" planes in case we need to revive them.
The status of each plane is in NSTAT:
0=not there 1=possible 25=mandatory

HT is a 1x3 array holding the indices of a typical reflection which must occur within (that is, not on the faces or the edges of) the finished asymmetric unit.

Description:

TRYUNI does not necessarily produce the correct unit, but it checks that any unit it sends out has 1 and only 1 relative of HT in it.
A unit which is too small, or which fails the above test, is flagged on exit by NICE=-1.
An acceptable unit is falgged by NICE=1.
NOPL is expected to be 1, 2 or 3. Copies NOPL planes out of the temporary array ASY to the (eventually) permanent array ASYM in /FUNIT/.
If there is more than 1 plane, the edge(s) and angle(s) involved are set up, together with AMUL = the proportion of reciprocal space occupied by the given unit.
We then have VOL=AMUL*NMUL, and aim at VOL=1.
If there are 3 planes forming a hinge, sets VOL=0., and NICE=1, and leaves the configuration for the calling routine (FIXUNI) to deal with.
If VOL=1., checks that the unit contains 1 and only 1 relative of the representative indices in HT.
If NCHK is non-zero does this check in any case, counting the number of relatives both inside and outside. This caould be useful if the user is ever allowe to specify his own unit.

Calls:

ANGRAD EQVEC ERRIN2 ERRMES FCTOR GMEQ GMREV INBOX ROTSYM SCALPR VECPRD

Called by:

FIXUNI

Common blocks used:

/CONSTA/ to use PI TWOPI FOURPI PIBY2
/FRIED/ to use FRIEDL
/FUNIT/ to use NASYM ASYM EDGE ANG NMUL
/IOUNIT/ to use LPT ITO
/NSYM/ to use NOPC
/SCRAT/ to use all members

*** TRYUNI by JCM 25 Sep 84 ***

Classification:

Basic Crystallography . . . . . . . Setting Up


Contents Manual

P. Jane Brown e-mail: brown@ill.fr
Institut Laue Langevin,
Grenoble, FRANCE