[petsc-dev] MatSetDA -> MatSetDM

Lisandro Dalcin dalcinl at gmail.com
Wed Mar 16 21:13:22 CDT 2011


On 16 March 2011 22:47, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
> On Mar 16, 2011, at 6:21 AM, Lisandro Dalcin wrote:
>
>> From petscdmda.h:
>>
>> extern PetscErrorCode MatSetDA(Mat,DM);
>>
>> Could you rename it? (sorry, I'm really busy with other stuff)
>
> Fixed.
>

Many thanks,

>>
>> BTW, we should have DMSetMatType() ...
>
> Actually my plan is to remove DMSetVecType() and change DMGetGlobalVector(), DMGGetLocalVector() and DMGetMatrix() to take an already created Vec or Mat and if the type is set  inside that object then to use that type otherwise to use a default type. This will match the new style of VecLoad() and MatLoad().
>
> The rational for this change is I want to remove all the MatCreate()s and VecCreates() and setting of types inside other parts of PETSc. This allows new Vec and Mat types to be introduced without also adding into DMGetMatrxi() etc new code whenever a new type is introduced.
>

I like it, but... Could we have  DMGetComm(dm,&comm) ?... the casting
required for PetscObjectGetComm((PetscObject)dm,&comm) is a bit
ugly...


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169



More information about the petsc-dev mailing list