[petsc-dev] Copy *SNES-struct deeply

Matthew Knepley knepley at gmail.com
Thu Feb 28 05:50:28 CST 2013


On Thu, Feb 28, 2013 at 6:16 AM, Johannes Lotz <lotz at stce.rwth-aachen.de>wrote:

>
> On 02/28/2013 11:22 AM, Matthew Knepley wrote:
>
> On Thu, Feb 28, 2013 at 4:21 AM, Johannes Lotz <lotz at stce.rwth-aachen.de>wrote:
>
>> Hi, -- I'm new here
>>
>> and I have a somehow seemingly simple task:
>>
>> We need to get an exact copy of a previously set up SNES including all
>> function pointers, all options and especially the DM (also in deep copy --
>> except the ApplicationContext struct).
>>
>> is there a showstopper -- or maybe already functionality there?
>>
>
>  I am not opposed to making a shallow SNES copy, and we already have a
> DMClone(), so how about
>
>    SNESClone(snes, &snesB);
>   DMClone(dm, &dmB);
>
> -- I do not find a DMClone().
>

Ah, its specialized:


https://bitbucket.org/petsc/petsc-dev/src/923de80728797e2783dffed96365fada710347b8/include/petscdmplex.h?at=default#cl-23

Is there an objection to me promoting this? I think beforehand, we might
have a discussion about
a uniform interface of this type. I think we should have clone for all the
solver objects.

    Matt


>     SNESSetDM(snesB, dmB);
>
>        Matt
>
>
>> Regards,
>>   J.
>>
>
>
>
>  --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130228/5650b1dc/attachment.html>


More information about the petsc-dev mailing list