Vec: types, sizes, and block sizes...

Lisandro Dalcin dalcinl at gmail.com
Fri Jul 24 11:09:15 CDT 2009


On Fri, Jul 24, 2009 at 12:33 PM, Barry Smith<bsmith at mcs.anl.gov> wrote:
>
>   If all the types,sizes,blocksize are going to be REQUIRED calls then the
> object can keep track of what it has received and as soon as it receives all
> the "required" information do the final creation (this is what Matt proposed
> in his more flowery language). If something like blocksize is optional then
> it makes things more complicated (hate to make blocksize required or require
> it before setting the sizes).

What about this?

1) Remove VecSetBlockSize()

2) Add VecSetSizesBlock(vec, bs, n, N), implement here all the checks
and logics (perhaps even the PetscMapSetup?)

3) Now VecSetSizes(vec, n, N) just calls VecSetSizesBlock(vec, 1, n, N)

After that, of course you cannot change the vec's block size. This
way, the block size if more or less optional, but if you no pass it,
it becomes 1 (one) and you cannot change it anymore...We should also
add convenience calls VecCreateSeqBlock() and VecCreateMPIBlock()...



-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594



More information about the petsc-dev mailing list