Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Do loop

The program contains a do loop that iterates the statements within the loop until the condition (A — 1)<0 is true. Try moving the do statement around in the program to see what changes in the output. Explain. If you encounter an infinite loop, True BASIC has a STOP statement to get you out. [Pg.6]

Do" loop,whichistheclassicstructureinthe "Do" loop is placed within a Module function to... [Pg.432]

In standard high level language programming the dimension of the NSS n, signals the number of nested do loops which are necessary to reproduce the structure in a computational environment. But the mathematical usefulness of this entity can be easily recognized when the particular characteristic of this symbolic unit is analyzed the involved vector parameters could be chosen with arbitrary and variable dimensions. There are many scientific and mathematical formulae which will benefit of this property, when written in a paper or computationally implemented. [Pg.231]

We also tag the DO loop with Tagl and the inductive assertion A (X,N,R). One candidate for in which the first 5 ccnjuncts come from our "fail-safe" heuristic and the last two from examination of the code is ... [Pg.175]

Since there are many trays and most are described by Eqs. (5.29) through (5.32), it is logical to use dimensioned variables and to evaluate derivatives and integrate using FORTRAN DO loops. It also makes sense to use a SUBROUTINE or FUNCTION to find given x , because the same equation is used over and over again. [Pg.129]

The following do loop adds the element stiffness matrices into the global stiffness The addition algorithm presented results... [Pg.461]

Assuming that the solution is supersaturated with respect to one of these three phases, it is necessary to increase the solute concentrations until equilibrium = absolution- Increasing solute concentrations will cause a decrease in aWtsolution- The solute concentrations (Xj) are increased in a DO loop (J — 1, n) by... [Pg.56]

There are two "do loops" in each of these equilibrium calculations. When the unknown is either temperature or pressure, the inner "do loop" of 30 iterations converges on the unknown phase compositions and the outer "do loop" of 50 iterations... [Pg.343]

Full details of the algorithm have been given elsewhere (37). Here, we indicate the features of the calculation which take advantage of vector processing facilities. The inner most DO loop of the program forms intermediates of the type... [Pg.32]

Table II lists the execution times for a DO-Loop which performs a simple addition of two vectors A and B. Times are given for both scalar and vector additions using one or two pipes as well as times for the same operation on the Cyber 174. Note that, for vector operations, increasing the array size is much less expensive than the corresponding increase on a scalar machine. For very small arrays (e.g. N 5) scalar execution on the ASC is faster because Vector overhead consumes a much higher percentage of the execution time. Table II lists the execution times for a DO-Loop which performs a simple addition of two vectors A and B. Times are given for both scalar and vector additions using one or two pipes as well as times for the same operation on the Cyber 174. Note that, for vector operations, increasing the array size is much less expensive than the corresponding increase on a scalar machine. For very small arrays (e.g. N 5) scalar execution on the ASC is faster because Vector overhead consumes a much higher percentage of the execution time.
This integration method can be optimized for the ASC in two steps. The first is to construct the code so that vectorization over each set of equations occurs. Here the main problem is the decision process associated with the application of the "stiff" or "normal" formulas to each equation. If these formulas are implemented in the usual fashion with an IF test in the appropriate DO Loops the smooth flow of contiguous data from core through the CPU will be inhibited and scalar code will result. Optimization of this process can be accomplished by calculating both formulas and applying a multiplicative factor 0 or 1. The following example of Fortran code illustrates this technique. [Pg.79]

It must be pointed out these considerations are highly dependent on the nature of the computation. In the particular problem reported here the extent of array processing is the overriding feature that makes these economies possible. The size of the arrays in relation to the hardware is also important. Experience has shown that it takes the equivalent of about four executions of a DO-loop to set up the array processor, and that the maximum number of array elements which can be processed without incurring additional overhead is 64. [Pg.91]

Q10 Do loop diuretics produce any adverse effects in the patient ... [Pg.46]

DO-loop range defined in text. 6 CPU time in microseconds. c Using vector order repertoire. FORTRAN H extended plus compiler with OPT = 2. [Pg.40]

Finally, we note that programming of a sort is possible using the spreadsheet Macro feature. This allows one to record a sequence of operation (Copy, Move, Sort, Regress, etc.) carried out in the spreadsheet. This sequence is given a name and can then be repeated later by Playing this macro. Macros can be fairly sophisticated since it is possible to use them to branch to different locations, to ran other Macros, and to perform Do loops in a manner as done in Visual Basic, C, or other programming languages. [Pg.78]

Chain carrier X, consumed in the first step, re-appears as a product in the second. Likewise, Y, consumed in the second step, re-appears as a product in the first. If you will (and belong to those who still learned FORTRAN in school), a chain reaction is a "reaction with a DO loop."... [Pg.261]

Like a DO loop in FORTRAN, the chain must be started and eventually be terminated. It is started by an additional reaction that serves as source of chain carriers. This is called initiation. It is terminated by a reaction that, once in a while, consumes chain carriers without generating others. This is called termination. The steps of the DO loop are called propagation. Typically, chain carriers are species (atoms or free radicals) with unpaired electrons. They resemble catalysts in that they arise again after having been consumed, but differ in having extremely short life spans that prevent their isolation. Moreover, the initiation and termination steps and their kinetic implications set chain reactions apart from catalysis as well as from any other kinds of chemical reactions. [Pg.261]

Chain reactions rely on highly reactive free radicals that convert reactants to products while cycling through a step sequence like a DO loop in FORTRAN, in which they are consumed and produced anew. The step sequence, called propagation, is initiated by a reaction or event that generates free radicals, and is terminated by reaction of free radicals with one another to form a stable product or products or, more rarely, their deactivation by some other mechanism. With few exceptions, termination is by reaction of the most plentiful free radical with itself. Termination usually is second-order in free radicals, and this leads to rate equations with exponents of one half or integer multiples of one half. [Pg.292]

How parallelism is expressed implicitly, as in an automatically parallelized DO loop, or explicitly, as in a UNIX fork-and-join model.- 39... [Pg.226]

How parallel execution is coordinated by compiler analysis of dependencies in a parallel DO loop, by use of message passing, or through shared data and mutual exclusion. [Pg.226]


See other pages where Do loop is mentioned: [Pg.229]    [Pg.1031]    [Pg.120]    [Pg.232]    [Pg.644]    [Pg.676]    [Pg.689]    [Pg.218]    [Pg.396]    [Pg.49]    [Pg.21]    [Pg.53]    [Pg.26]    [Pg.343]    [Pg.343]    [Pg.558]    [Pg.559]    [Pg.559]    [Pg.560]    [Pg.560]    [Pg.34]    [Pg.34]    [Pg.35]    [Pg.74]    [Pg.167]    [Pg.230]    [Pg.262]    [Pg.262]    [Pg.262]    [Pg.262]   
See also in sourсe #XX -- [ Pg.432 ]




SEARCH



Do...While loop

© 2024 chempedia.info