Civil Engineering Reference
In-Depth Information
C= SUM (A, MASK= A>0.0)
would sum only coefficients of A which are greater than “zero”.
Gathering and scattering: A feature in F90 makes the 'gathering' and 'scattering' of
values, which we will need later, very simple. To explain these operations consider a
two-dimensional mesh of boundary elements in Figure 2.1.
The nodes of the mesh where elements are connected with each other can be
numbered in two different ways: locally and globally. When referring, for example, to
the unknown u (e.g. temperature in the case of heat conduction problems) one has two
vectors, a global one
u
u
u
uu
u
u
u
° °°
° °°
®¾
° °°
° °°
¯¿
1
2
3
{}
(2.7)
4
5
6
7
and a local one defined at element level, for example, for the two nodes of element 3:
3
-
u
½
}
1
{
u
(2.8)
u
2
For element 3 we may define a 'connectivity vector' of dimension 2, which contains
the global node numbers of the two nodes of the element
CONNECTIVITY=(/3,4/)
The 'scatter' operation is where the locally defined unknowns are put into the global
vector
U_GLOBAL(CONNECTIVITY)= U_LOCAL
This statement would put u 1 and u 2 of element 3 into locations 3 and 4 of the global
vector. The 'gather' operation would do the opposite, i.e.
U_LOCAL= U_GLOBAL(CONNECTIVITY)
would put the global values of u 1 and u 2 into the local positions 1 and 2.
Search WWH ::




Custom Search