|
FEAT 3
Finite Element Analysis Toolbox
|
This page describes ideas and concepts used throughout the whole lafem subsystem.
LAFEM comprises a wide range of different linear algebra containers and their corresponding operations.
All Containers are derived vom FEAT::LAFEM::Container, thus its page contains a list of all currently available containers.
Although many operations are different for each container, many concepts are common to all containers and shall be described in this document.
All Containers have at least the first three template parameters in common, describing memory location, floating point format and indexing data type.
The structs in FEAT::Mem are used to control, if the containers contents will be stored in the cpus main memory or in gpu memory, allocated by the cuda runtime.
The second template parameter is used as the datatype for the allocation of all floating point based arrays.
The third template parameter is used as the datatype for the allocation of all indexing related arrays, e.g. the column index array in a FEAT::LAFEM::SparseMatrixCSR.
All operations are member functions of the related containers. With little exceptions, the object which hosts the function call will contain the calculation result.
A typical call may look like these:
All containers provide at least three different member functions for proper conversion and data movement.
All containers offer the format() and clear() operations:
Every sparse matrix consists of its non-zero data arrays and a data layout (stored in various different arrays).
A FEAT::LAFEM::SparseLayout object can be retrieved by any matrix via the corresponding layout() member function to create another matrix with the same shared (except FEAT::LAFEM::SparseMatrixCOO and FEAT::LAFEM::SparseVector, which enforce deep copies) data layout.
Thus empty matrices with identical layout can be created easily and memory consumption can be reduced by reusing existing data layout arrays.
Usage:
Currently, two memory backends are supported:
To gain optimal performance from external libraries like MKL or CuBLAS, which automagically replace the generic algorithms if available, one needs to match the supported container configurations: