[petsc-dev] PetscBag not a PetscObject?
Barry Smith
bsmith at mcs.anl.gov
Tue May 10 13:33:40 CDT 2011
Satish,
Go ahead and put this patch in also.
Barry
On May 10, 2011, at 12:28 PM, Ethan Coon wrote:
> Attached is a patch to hack in an prefix for use with PetscBag. Also
> fixed the PetscBag examples to work.
>
> Note that the fortran example doesn't compile unless the PETSC_REAL
> patch I sent in the previous example is included, as PETSC_REAL doesn't
> seem to exist in either finclude/petscsysdef.h or petsc.mod.
>
> Ethan
>
> On Fri, 2011-04-08 at 21:55 -0500, Barry Smith wrote:
>
>> At this time I vote that you add the PetscBagSetOptionsPrefix() directly for Bags and do not turn the Bag into a real PetscObject.
>>
>> Barry
>>
>> On Apr 8, 2011, at 12:29 PM, Ethan Coon wrote:
>>
>>>
>>> I'm using a couple of bags in an application, and that application is in
>>> turn being used in a domain-decomposition algorithm with multiple
>>> domains (each an instance of the application). So I'd like to set the
>>> options prefix of the bag, so that each application instance has its own
>>> prefix and can be used with the same options "database." Currently
>>> PetscBag passes PETSC_NULL for the prefix.
>>>
>>> To fix this, it looks like the best option would be to have a
>>> PetscBagSetOptionsPrefix() in the same mold as everything else. I added
>>> this, and then found out that PetscBag isn't a PetscObject, in the sense
>>> that it has no header or CLASS_ID (so PetscObjectSetOptionsPrefix()
>>> doesn't work on a bag).
>>>
>>> Is this the best way forward, to make PetscBag a PetscObject, with
>>> CLASS_ID, etc? And if so, is there a good example of this that I should
>>> follow to do so?
>>>
>>> Thanks,
>>>
>>> Ethan
>>>
>>>
>>>
>>>
>>> --
>>> ------------------------------------
>>> Ethan Coon
>>> Post-Doctoral Researcher
>>> Applied Mathematics - T-5
>>> Los Alamos National Laboratory
>>> 505-665-8289
>>>
>>> http://www.ldeo.columbia.edu/~ecoon/
>>> ------------------------------------
>>>
>>
>
> --
> ------------------------------------
> Ethan Coon
> Post-Doctoral Researcher
> Applied Mathematics - T-5
> Los Alamos National Laboratory
> 505-665-8289
>
> http://www.ldeo.columbia.edu/~ecoon/
> ------------------------------------
> <missing_PETSC_REAL><bagsetoptionsprefix>
More information about the petsc-dev
mailing list