The psb_T_vect_type data structure encapsulates the dense vectors in a way similar to sparse matrices, i.e. including a base type psb_T_base_vect_type. The user will not, in general, access the vector components directly, but rather via the routines of sec. 6. Among other simple things, we define here an extraction method that can be used to get a full copy of the part of the vector stored on the local process.
The type declaration is shown in figure 3 where T is a placeholder for the data type and precision variants
The actual data is contained in the polymorphic component v%v; the separation between the application and the actual data is essential for cases where it is necessary to link to data storage made available elsewhere outside the direct control of the compiler/application, e.g. data stored in a graphics accelerator’s private memory.
nr = v%get_nrows()
memory_size = v%sizeof()
Note that a call to v%zero() is provided as a shorthand, but is equivalent to a call to v%set(zero) with the zero constant having the appropriate type and kind.