Renumbering and symbolic factorization: MLTPRE =================================================== For convenience, the prefix NU has been omitted in front of the structure names. **Data structures read**. From the data structure: nume_ddl, we extract the records: NUME. DELG: Indicates whether the degree of freedom is "Lagrange" or not. NUME. DEEQ, NUME. NUEQ, NUME. PRNO: These 3 recordings establish the links between the degrees of freedom subject to a boundary condition and the corresponding Lagranges. The next 3 records describe a "Morse" matrix. SMOS. SMHC: Term column number SMOS. SMDI: Addresses of diagonal terms SMOS. SMDE.: Numbers of unknowns, and terms in the matrix **Written data structures.** (In front of each *Code_Aster* structure, we wrote the name of the corresponding table FORTRAN, which will be used later for more convenience.) MLTF. ADNT ADINIT: addresses of the initial terms in the factored matrix MLTF. LGBL LGBLOC: length of the blocks of the factored matrix MLTF. LGSN LGSN: length of the supernodes MLTF. LOCL LOCAL: used in assembling front matrices, correspondence between the local numbers of the father and son supernode. MLTF. ADRE ADRESS MLTF. SUPN SUPND: definition of supernodes MLTF. FILS FILS: son of the supernodes in the elimination tree MLTF. FRER FRERE: brother of the supernodes in the elimination tree MLTF. LGSN LGSN: length of the supernodes MLTF. LFRN LFRONT: order of the frontal matrices (after elimination) MLTF. NBAS NBASS: pointer linked to the assembly of the front matrices MLTF. ADPI ADPILE: addresses in the front-end matrix stack MLTF. ANCI ANC: inverse renumbering table MLTF. NBLI NBLIGN: order of the frontal matrices (before elimination) MLTF. NCBL NCBLOC: number of degrees of freedom for each block MLTF. DECA DECAL: offset between the start of the column of a supernode and the start of the block JEVEUX that contains it MLTF. SEQU SEQ: order of elimination of supernodes (tree path). These data structures will be described in the following paragraphs. **Code description.** There are 2 phases, the first consists in renumbering, the second in what is called in the language of the multi-frontal method, symbolic factorization. Data structure NUME_DDL describes a numbering of :math:`\text{NEQ}` degrees of freedom, including, most of the time, so-called Lagrange degrees of freedom. These degrees of freedom must satisfy the following order relationship: (1) :math:`\mathit{L1}` *) that are allocated before* *PREML2 (* :math:`\mathit{NOPGLO}` *and* :math:`\mathit{NOPLOC}` *)* :math:`\mathit{LGIND}` *is primarily a result of renumbering, provided by* PREML1 *and* *increased by* PREMLC *depending on boundary conditions.* :math:`\mathit{LGIND}` *is an overestimation of* :math:`\mathit{GLOBAL}` *and* :math:`\mathit{LOCAL}` *we don't want to keep a structure that's too important.* *So, after* PREML2 *, we know the real length of these arrays, we redefine* :math:`\mathit{LGIND}` *to this value, and we copy* :math:`\mathit{GLOBAL}` *and* :math:`\mathit{LOCAL}` *into structures* :math:`\mathit{NOMGLO}` *and* :math:`\mathit{NOMLOC}` *of exact length.* PREMLD ------ This is a technical step: this routine makes a :math:`\mathit{ADJNCY}` structure like those used by renumbering algorithms, this time all degrees of freedom from :math:`1` to :math:`\text{NEQ}` are taken into account. *N.B. Memory Allowance* *The structure* :math:`(\mathit{XADJ},\mathit{ADJNCY})` *made by* PREMLD *, is called* :math:`(\mathit{XADJ1},\mathit{ADJNC1})` *in* MLTPRE\ *.* *We use the same length* :math:`\mathit{LGADJN}` *calculated previously*. .. _Ref313437826: PREML2 ------ This is the second phase of MLTPRE: among other things, we perform symbolic factorization, which is a simulation of real factorization, without floating operation, intended to facilitate the work of real factorization, by manufacturing certain necessary pointers. PREML2 calls the following routines: * FACSMB: symbolic factorization itself. * MLTPOS: fabrication of the factorization sequence, i.e., raising the tree defined by table :math:`\mathit{PAREND}`, which thus defines the order in which supernodes are eliminated. * MLTBLC: We define here the division into blocks of the factored matrix, virtually "out of core", because it is divided into blocks that can be released by the JEVEUX software package. * MLTPAS: Here we calculate the address of the initial coefficients in the factored matrix. FACSMB ~~~~~ **Data** (They are the result of renumbering): :math:`\mathit{SUPND}` :math:`\mathit{PAREND}`, (And from the initial topology): :math:`\mathit{ADJNCY}`. **Results**: :math:`\mathit{GLOBAL}` :math:`\mathit{LOCAL}` :math:`\mathit{ADRESS}` :math:`\mathit{NBASS}` :math:`\mathit{DEBFAC}` :math:`\mathit{DEBFSN}` :math:`\mathit{LGSN}` :math:`\mathit{LFRON}` :math:`\mathit{FILS}` :math:`\mathit{FRERE}`. These tables are described below. :math:`\mathit{FILS}` and :math:`\mathit{FRERE}` are the "inverse" arrays of table :math:`\mathit{PAREND}`, they allow you to know all the "child" supernodes of a given supernode :math:`\mathit{SN}`, they are :math:`\mathit{FILS}(\mathit{SN})`, :math:`\mathit{FRERE}(\mathit{FILS}(\mathit{SN}))`, and so on. For the other results, it is necessary to return to the basic principles of the multi-frontal method, using the following figures: +-----------------------------------------------------------------------------------------------------------------------------+ | | + .. image:: images/100000000000041C000001B681D7F3E828138D17.png + | :width: 6.8126in | + :height: 2.8362in + | | + + | | +-----------------------------------------------------------------------------------------------------------------------------+ .. _Ref314476805: .. _Ref302564019: **Figure** **1 Assembling 2 daughter matrices into a mother matrix** +-----------------------------------------------------------------------------------------------------------------------------+ | | + .. image:: images/1000000000000394000001CEA24FD123DA6F62FC.png + | :width: 6.8126in | + :height: 3.4362in + | | + + | | +-----------------------------------------------------------------------------------------------------------------------------+ .. _Ref3144768051: .. _Ref3025640191: **Figure** **2 Front matrix** :math:`\mathit{SN}` FIG. 1 shows the frontal matrix :math:`\mathit{SN}` (of the supernode :math:`\mathit{SN}`), consisting of the terms coming from the initial matrix, as well as the terms coming from the daughter matrices :math:`\mathit{SNF1}` and SNF2, after eliminating the supernodes :math:`\mathit{SNF1}` and :math:`\mathit{SNF2}`. After elimination, the gray part of the front matrix will constitute the columns of the factored matrix, and the remaining white part stored in the stack of front matrices will agglomerate to the mother matrix during the assembly of this last one. The symbolic factorization performed by FACSMB will simulate this assembly/elimination process. For each supernode :math:`\mathit{SN}`, we will create a linked list containing the unknown numbers of the supernode itself, as well as the unknown numbers of the neighbors of all the sons of :math:`\mathit{SN}`. Neighbors of the sons are included, but not the sons themselves who have been eliminated. In FORTRAN language, FACSMB produces the following tables: :math:`\mathit{LGSN}(\mathit{SN})`: number of unknowns of the supernode :math:`\mathit{SN}` (in fact = :math:`\mathit{supnd}(\mathit{sn}+1)\mathrm{-}\mathit{supnd}(\mathit{sn})`), :math:`\mathit{NBLIGN}(\mathit{SN})`: total number of unknowns of the SN front-end matrix :math:`\mathit{LFRONT}(\mathit{SN})\mathrm{=}\mathit{NBLIGN}(\mathit{SN})\mathrm{-}\mathit{LGSN}(\mathit{SN})`, order of the front-end matrix after elimination that will be stored in the stack. FACSMB also makes an array :math:`\mathit{GLOBAL}`, equipped with an array of :math:`\mathit{ADRESS}` pointers. :math:`\mathit{GLOBAL}` contains the numbers of the unknowns of the front-end matrix :math:`\mathit{SN}` (before elimination), between the addresses :math:`\mathit{ADRESS}(\mathit{SN})` and :math:`\mathit{ADRESS}(\mathit{SN}+1)\mathrm{-}1`. These unknowns are :math:`\mathit{NBLIGN}(\mathit{SN})\mathrm{=}(\mathit{ADRESS}(\mathit{SN}+1)\mathrm{-}\mathit{ADRESS}(\mathit{SN}))` in number. Table :math:`\mathit{LOCAL}` is accessed as :math:`\mathit{GLOBAL}`, using table :math:`\mathit{ADRESS}`. Let :math:`\mathit{FSN1}` be the supernode "son" of the supernode :math:`\mathit{SN}`, as in the figure above, and let :math:`I` be an index between :math:`\mathit{ADRESS}(\mathit{FSN1})+\mathit{LGSN}(\mathit{FSN1})` and :math:`\mathit{ADRESS}(\mathit{FSN1}+1),\mathit{LOCAL}(I)` will be the local number (between :math:`1` and :math:`\mathit{NBLIGN}(\mathit{SN})`) of this unknown in the matrix of the supernode "father" :math:`\mathit{SN}` (we have :math:`\mathit{PAREND}(\mathit{FSN1})\mathrm{=}\mathit{SN}`). :math:`\mathit{LOCAL}` will be used in assembling the "daughter" front-end matrix into the "parent" front-end matrix, it gives the destination address directly. This is illustrated using the following example: +-----------------------------------------------------------------------------------------------------------------------------+ | | + .. image:: images/100000000000023D0000015030F60FD78052E695.png + | :width: 4.4791in | + :height: 2.9909in + | | + + | | +-----------------------------------------------------------------------------------------------------------------------------+ Front-end matrix :math:`\mathit{SN}` has :math:`(p+q)` unknowns: :math:`\mathit{i1},\mathit{i2},\mathrm{..},\mathit{ip},\mathit{e1},\mathit{e2},\dots ,\mathit{eq}`, with :math:`\mathit{NBLIGN}(\mathit{SN})\mathrm{=}p+q` :math:`\mathit{LGSN}(\mathit{SN})\mathrm{=}p` :math:`\mathit{LFRONT}(\mathit{SN})\mathrm{=}q` :math:`\mathit{ADRESS}(\mathit{SN}+1)–\mathit{ADRESS}(\mathit{SN})\mathrm{=}p+q`, :math:`\mathit{GLOBAL}\mathrm{=}\mathrm{[}\mathit{i1},\mathit{i2},\dots \mathit{ip},\mathit{e1},\mathit{e2},\dots \mathrm{..}\mathit{eq}\mathrm{]}`, with addresses varying between :math:`\mathit{ADRESS}(\mathit{SN})+1` and :math:`\mathit{ADRESS}(\mathit{SN}+1)`, :math:`\mathit{LOCAL}\mathrm{=}\mathrm{[}\mathrm{0,0},\mathrm{..},\mathrm{0,}\mathit{l1},\mathit{l2},\dots \dots \mathrm{.}\mathit{lq}\mathrm{]}` At the same addresses as above, :math:`\mathit{l1},\mathit{l2},\mathit{lq}` are the local numbers in the :math:`\mathit{PAREND}(\mathit{SN})` front-end matrix. (values between :math:`1` and :math:`\mathit{NBLIGN}(\mathit{PAREND}(\mathit{SN}))`). :math:`\mathit{NBASS}`, a counter also used for assembly, is defined as follows: :math:`\mathit{NBASS}(\mathit{FSN1})` is the number of unknowns :math:`\mathit{INC}` such as :math:`\mathit{INC}<\mathit{SUPND}(\mathit{SN}+1)`, where :math:`\mathit{PAREND}(\mathit{FSN1})\mathrm{=}\mathit{SN}`. So this is the number of unknowns in :math:`\mathit{FSN1}`, assembled in the mother matrix :math:`\mathit{SN}` and which will be eliminated when :math:`\mathit{SN}` is eliminated. :math:`\mathit{DEBFAC}` and :math:`\mathit{DEBFSN}`, these 2 tables give the same values, the first is indexed by unknown, the second by supernode, they provide, for :math:`\mathit{DEBFAC}`, the addresses of the diagonal coefficients of the unknowns in the factored matrix. For :math:`\mathit{DEBFSN}`, this is the address of the diagonal coefficient of the first unknown of the supernode. We saw in Figure 2 that the columns corresponding to the unknowns of the eliminated supernode, (in gray), constituted the columns of the factored matrix called :math:`\mathit{FACTOR}`. The addresses of the diagonal coefficients provided by DEBFAC are addresses in a virtual array :math:`\mathit{FACTOR}` containing the factored matrix. In fact, a set of JEVEUX blocks will contain the factored matrix, and an additional pointer will be used for each block. N.B. Programming We can see in the previous figures that we store the columns of :math:`\mathit{SN}`, all integer, (gray rectangle), without taking into account the symmetry of the diagonal block. We thus consume a little more memory, but we are dealing with regular storage necessary for the use of routines BLAS which require storages in 2-dimensional FORTRAN arrays. MLTPOS ~~~~~ It should be noted that the frontal matrices resulting from the removals are stored in a stack. All the daughter matrices of the same super node :math:`\mathit{SN}` are stored (stacked), consecutively. Once read (unstacked), they are no longer reused, and the front-end matrix resulting from the elimination of :math:`\mathit{SN}` is stored in their place. The length of this pile decreases or increases as you kill it, it reaches a maximum that you need to know. MLTPOS goes through the tree, calculates :math:`\mathit{ESTIM}`, the maximum length of the stack for its subsequent allocation, constructs an array :math:`\mathit{SEQ}(\mathrm{1 }\mathrm{:}\mathit{NBSN})` that provides the order of elimination of supernodes by going through the tree from the bottom up. It provides :math:`\mathit{ADPILE}` which contains the address in the stack of the :math:`\mathit{SN}` front-end matrices. MLTPOS contains an algorithm for renumbering the order in which supernodes are eliminated, intended to minimize the length of the front-end matrix stack ([:ref:`AS87 `]) MLTBLC ~~~~~ This routine builds the pointers for the block division of the factored matrix. Each block will contain the columns of an integer number of supernodes. We will never encounter the configuration where the different columns of the same supernode belong to 2 blocks. **Data**: :math:`\mathit{MAXBLOC}`: maximum block length. Each block will contain columns for as many super nodes as possible. :math:`\mathit{MAXBLOC}` is calculated before the call to MLTBLC, it is in fact the length (in columns) of the largest of the supernodes, and the latter (generally the highest in the tree) will occupy a block by itself. **Results**: :math:`\mathit{NBLOC}`: Number of blocks. :math:`\mathit{LGBLOC}(\mathrm{1 }\mathrm{:}\mathit{NBLOC})`: lengths of each block. :math:`\mathit{NCBLOC}(\mathrm{1 }\mathrm{:}\mathit{NBLOC})`: definition of the blocks, as follows block :math:`\mathit{IB}` consists of the columns of the supernodes :math:`\mathit{SEQ}(\mathit{NCBLOC}(\mathit{IB}\mathrm{-}1)+1)`, to :math:`\mathit{SEQ}(\mathit{NCBLOC}(\mathit{IB}))`. :math:`\mathit{DECAL}(\mathrm{1 }\mathrm{:}\mathit{NBSN})` lag table that allows access to the first diagonal term of each supernode in the factored matrix. We will illustrate this with the following diagram: ISN =0 For IB=1, NBLOC! Loop over the blocks of the factored JEVEUO (JEXNUM (FACTOL, IB), 'L', IFACL) ! Block IB from collection FACTOL is loaded in IFACL For NC = 1, NCBLOC (IB)! Loop on the Supernodes of Block IB ISN = ISN +1 SN= SEQ (ISN)! We follow the elimination sequence ADFAC = IFACL + DECAL (SN) —1 ! ADFAC is the address in ZR of the first coefficient of the supernode SN MLTPAS ~~~~~ This routine calculates the addresses in the factored matrix, coefficients from the initial matrix. These addresses are stored in structure MLTF. ADNT, whose name is FORTRAN :math:`\mathit{ADINIT}` or :math:`\mathit{COL}` and whose length is :math:`\mathit{LMAT}`. N.B. Programming particularity. *Some addresses calculated of* :math:`\mathit{ADINIT}` *are negative. Indeed in the non-symmetric case, we have 2 initial matrices* :math:`\mathit{MATI}` *and* :math:`\mathit{MATS}` *which have the same topology, (same neighbors, same trough), the symbolic factorization is the same.* *However, it may happen that a coefficient of* :math:`\mathit{MATI}` *(lower part of the initial matrix), has a destination in the upper part of the factored matrix. (In the same way between* :math:`\mathit{MATS}` *and the lower part of the factorized one). In this case the address of the initial coefficient is stored negative and the routine for injecting the coefficients of the initial matrix,* * *MLTASAle takes into account and addresses the coefficients* correctly. IF (CODE .GT.0) THEN ZR (IFACL + ADPROV - DEB) = ZR (MATI +I1-1): MATI injected into IFACL (ower) ZR (IFACU + ADPROV - DEB) = ZR (MATS +I1-1) ELSE ZR (IFACL + ADPROV - DEB) = ZR (MATS +I1-1) ZR (IFACU + ADPROV - DEB) = ZR (MATI +I1-1) MATI injected into IFACU (pper) ENDIF MLTPRE call tree ----------------------- +----------------------------------------------------------------------------------------------------------------------------+ | | + .. image:: images/100000000000042E000001E691EA26C9734CA710.png + | :width: 6.889in | + :height: 3.1283in + | | + + | | +----------------------------------------------------------------------------------------------------------------------------+