Vec: types, sizes, and block sizes...
Lisandro Dalcin
dalcinl at gmail.com
Wed Jul 22 17:24:09 CDT 2009
On Wed, Jul 22, 2009 at 6:53 PM, Barry Smith<bsmith at mcs.anl.gov> wrote:
>
> VecCreate()
> VecSetXXX
> VecSetYYY
> VecSetBlockSize()
> VecSetUp() (called also automatically as needed by later vector
> routines, like PCSetUp()/KSPSetUp()/SNESSetUp()/TSSetUp() are called)
> use the beast
>
OK, that was what I talked about... this change requires work from our
side, but the end-user API does not change at all... Nice...
Barry, let's elaborate a bit more all this:
1) VecCreate_XXX have stop allocating the array.
2) VecOpts needs to gain a 'setup' slot. The new slot is filled with
VecSetUp_XXX(), which basically do array allocation, but handling the
case of user-provided arrays with VecCreateXXXWithArray().
3) VecSetUp() will require at least a previous call to
VecSetSizes/VecSetBlocSize(). If the type is not set, it choses SEQ or
MPI depending on the size of Vec's MPI_Comm. After all this,
vec->ops->setup() is called.
4) Fix almost all Vec interface routines to call VecSetUp().
Am I missing something?
--
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