Next: 4.4 Condition of the
Up: 4. The Assembly Module
Previous: 4.2 Approaches to Meet
4.3 Refined Key Demands on the Assembly Module
After the decision to design and implement new modules has been made, the key
demands on the assembly module can be refined. This also brings a row
transformation as discussed in Section 2.2.1 into play. Due to its
advantages, the assembly module shall provide the required capabilities. First
of all, the following definitions are given in order to clarify some terms:
- Assemble: assemble means to bring
together. Thus, assembling regards the adding of values to the linear
equation system. Assembling is completed when all values have been added.
- Assembly: in this context, the assembly or the
assembly module specifically provides all necessary features which
allow a simulator to assemble those values. However, the
assembly module is generally responsible for meeting all key demands given above.
- Compile: compile means to compose out
of materials from other sources, to collect and edit into a
volume, to run through a compiler, and to build up
gradually. Since four matrices (
,
,
, and
) and two
sets of right-hand-side vectors (
and
) are assembled, the first task is to
compile all of these parts to one linear equation system. Refer to
equations (4.12) and (4.13) to see how the parts are compiled.
- Compilation result: the compilation result is one linear equation
system
, the so-called complete linear equation system.
- Pre-elimination: after the complete linear equation system is compiled,
all equations marked with an elimination flag are
pre-eliminated. Hence, the assembly module also provides a solving
capability based on Gaussian elimination (see
Section 4.8).
- Inner linear equation system: one
result of the pre-elimination is the so-called inner linear
equation system. It consists of all equations which were not pre-eliminated.
The refined requirements can be summarized as follows:
- Application Programming Interface (API) providing methods for
- Adding values to the boundary system:
and
.
- Adding values to the segment system:
and
.
- Adding values to the transformation matrix
.
- Deleting equations.
- Administration of priority information required for the correct
handling of grid-points which are part of several segments.
- Setting elimination flags for pre-elimination: mark equations which are
eliminated from the linear equation system before it is passed to the
solver module.
- Invoking the solving process.
- Returning the solution: After reverting all transformations and
back-substituting the pre-eliminated equations, the output of the assembly
module is the complete solution vector (or vectors in the case of more
than one right-hand-side vector). In addition, the right-hand-side vector(s) are
returned which can be used for various norm calculations frequently
required for the damping and update of the Newton method.
- Usability
- Random access during assembling: all parts of the linear equation
system should be always accessible.
- Centralized administration of control parameters.
- Preparation of the linear equation system for solving:
- Row transformation: linear combination of rows to extinguish large entries.
- Variable transformation: reduce the coupling of the equations.
- Pre-elimination: eliminate problematic equations by Gaussian elimination
to improve the condition of the inner system matrix.
- Scaling: Since some preconditioners (for example the Incomplete-LU factorization,
see Section 5.2.5) use a threshold to decide whether to keep or skip an entry, the entries of the system matrix
are normalized.
- Sorting: Reduction of the bandwidth of a matrix in order to reduce the
factorization fill-in and thus the memory consumption.
- Handling of real-valued and complex-valued linear equation systems: In
the context of an efficient small-signal mode, handling of complex-valued
systems is particularly important.
- Performance-related features:
- Handling of multiple right-hand-side vectors: For some simulations,
for example calculating the complex-valued admittance matrix (see
Section 3.4), several linear equation systems differ only in the
right-hand-side vector. Thus, the effort for assembling, compiling,
pre-eliminating, sorting, scaling, and factorizing of the system matrix
actually has to be done only once. This factored matrix can then be
used for all right-hand-side vectors. For that reason the module is able
to simultaneously assemble several right-hand-side vectors.
- Reassembling of the imaginary part only: during a frequency stepping,
only the imaginary part is changed. In order to speed up the simulation,
the real-valued part should remain unmodified.
- Efficient handling of the sparse linear equation systems: storing large
linear equation systems in dense format requires a huge amount of
memory. Since the system matrices contain relatively few non-zero entries
(see Section 5.5.1), far less memory has to be allocated if
sparse matrix formats, for example MCSR (see Section 4.6 and
Appendix E), are used.
A plug-in concept has been implemented for scaling, sorting and solving the
inner linear equation system, making it possible to adapt or replace these
modules easily. The sorting and scaling modules obtain the system matrix on input
and return the sorting and scaling (diagonal) matrices which are then applied
by the assembly module. The solver module obtains the system matrix and all right-hand-side
vectors on input and returns the solution vectors of all inner linear equation
systems.
Next: 4.4 Condition of the
Up: 4. The Assembly Module
Previous: 4.2 Approaches to Meet
S. Wagner: Small-Signal Device and Circuit Simulation