<div dir="ltr">On Thu, Feb 28, 2013 at 6:16 AM, Johannes Lotz <span dir="ltr"><<a href="mailto:lotz@stce.rwth-aachen.de" target="_blank">lotz@stce.rwth-aachen.de</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><div class="im">
    <br>
    <div>On 02/28/2013 11:22 AM, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">On Thu, Feb 28, 2013 at 4:21 AM, Johannes Lotz <span dir="ltr"><<a href="mailto:lotz@stce.rwth-aachen.de" target="_blank">lotz@stce.rwth-aachen.de</a>></span>
        wrote:<br>
        <div class="gmail_extra">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi, --
              I'm new here<br>
              <br>
              and I have a somehow seemingly simple task:<br>
              <br>
              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).<br>
              <br>
              is there a showstopper -- or maybe already functionality
              there?<br>
            </blockquote>
            <div><br>
            </div>
            <div>I am not opposed to making a shallow SNES
              copy, and we already have a DMClone(), so how about</div>
            <div><br>
            </div>
            <div>  SNESClone(snes, &snesB);</div>
            <div>  DMClone(dm, &dmB);</div>
          </div>
        </div>
      </div>
    </blockquote></div>
    -- I do not find a DMClone().</div></blockquote><div><br></div><div style>Ah, its specialized:</div><div style><br></div><div style>  <a href="https://bitbucket.org/petsc/petsc-dev/src/923de80728797e2783dffed96365fada710347b8/include/petscdmplex.h?at=default#cl-23">https://bitbucket.org/petsc/petsc-dev/src/923de80728797e2783dffed96365fada710347b8/include/petscdmplex.h?at=default#cl-23</a></div>
<div style><br></div><div style>Is there an objection to me promoting this? I think beforehand, we might have a discussion about</div><div style>a uniform interface of this type. I think we should have clone for all the solver objects.</div>
<div style><br></div><div style>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><div class="im">
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div>  SNESSetDM(snesB, dmB);</div>
            <div><br>
            </div>
            <div>      Matt</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              Regards,<br>
                J.<br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          What most experimenters take for granted before they begin
          their experiments is infinitely more interesting than any
          results to which their experiments lead.<br>
          -- Norbert Wiener
        </div>
      </div>
    </blockquote>
    <br>
  </div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>