GetFEM++  5.3
bgeot_sparse_tensors.h File Reference

Sparse tensors, used during the assembly. More...

#include "gmm/gmm_except.h"
#include "bgeot_config.h"
#include "dal_bit_vector.h"
#include <iostream>
#include <bitset>

Go to the source code of this file.


 Basic Geometric Tools.

Detailed Description

Sparse tensors, used during the assembly.

Julien Pommier
January 2003. "sparse" tensors: these are not handled like sparse matrices

As an example, let say that we have a tensor t(i,j,k,l) of dimensions 4x2x3x3, with t(i,j,k,l!=k) == 0.

Then the tensor shape will be represented by a set of 3 objects of type 'tensor_mask': mask1: {i}, "1111" mask2: {j}, "11" mask3: {k,l}, "100" "010" "001" They contain a binary tensor indicating the non-null elements.

The set of these three masks define the shape of the tensor (class tensor_shape)

If we add information about the location of the non-null elements (by mean of strides), then we have an object of type 'tensor_ref'

Iteration on the data of one or more tensor should be done via the 'multi_tensor_iterator', which can iterate over common non-null elements of a set of tensors.

maximum (virtual) number of elements in a tensor : 2^31 maximum number of dimensions : 254

"ought to be enough for anybody"

Definition in file bgeot_sparse_tensors.h.