General software for preconditioning the iterative solution of linear syste
ms is greatly lagging behind the literature. This is partly because specifi
c problems need specific matrix and preconditioner data structures in order
to be solved efficiently, i.e., multiple implementations of a precondition
er with specialized data structures are required. This article presents a f
ramework to support preconditioning with various, possibly user-defined, da
ta structures for matrices that are partitioned into blocks. The main idea
is to define data structures for the blocks, and an upper layer of software
which uses these blocks transparently of their data structure. This transp
arency can be accomplished by using an object-oriented language. Thus, vari
ous preconditioners, such as block relaxations and block-incomplete factori
zations, only need to be defined once and will work with any block type. In
addition, it is possible to transparently interchange various approximate
or exact techniques for inverting pivot blocks, or solving systems whose co
efficient matrices are diagonal blocks. This leads to a rich variety of pre
conditioners that can be selected. Operations with the blocks are performed
with optimized libraries or fundamental data types. Comparisons with an op
timized Fortran 77 code on both workstations and Gray supercomputers show t
hat this framework can approach the efficiency of Fortran 77, as long as su
itable block sizes and block types are chosen.