<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <div class="moz-cite-prefix">Thanks!</div>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 02/05/2022 18:07, Matthew Knepley
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAMYG4GkS1aCjYPynuNhiiiAdg82Y_Dtm6_BrUDV4AQS6v4hfnQ@mail.gmail.com">
      
      <div dir="ltr">
        <div dir="ltr">On Mon, May 2, 2022 at 11:25 AM Matteo Semplice
          <<a href="mailto:matteo.semplice@uninsubria.it" moz-do-not-send="true" class="moz-txt-link-freetext">matteo.semplice@uninsubria.it</a>>
          wrote:<br>
        </div>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">Hi.<br>
            <br>
            I am facing a PDE with 2 dofs per node in which one dof has
            periodic <br>
            b.c. in the x direction and the other one periodic b.c. in
            the y <br>
            direction. Is there a (possibly quick-and-dirty) solution to
            represent <br>
            this in a DM (not necessarily a DMDA)?<br>
          </blockquote>
          <div><br>
          </div>
          <div>I am trying to understand what this means. </div>
        </div>
      </div>
    </blockquote>
    <p>It comes from a toy model for more complicated quantum field
      theory model that's hard for me to understand.<br>
    </p>
    <blockquote type="cite" cite="mid:CAMYG4GkS1aCjYPynuNhiiiAdg82Y_Dtm6_BrUDV4AQS6v4hfnQ@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div>Usually we think of periodicity as arising from the
            domain, not the field.</div>
          <div><br>
          </div>
          <div>I think it would be easiest to:</div>
          <div><br>
          </div>
          <div>  a) Use two different DMDA for the fields that "match
            up" where needed</div>
          <div><br>
          </div>
        </div>
      </div>
    </blockquote>
    <p>This is kind of what I was thinking at. So I would create two
      DMDA, then a DMComposite with the two and finally create Vecs and
      Matrices from the DMComposite?<br>
    </p>
    <p>If so, then how do I assemble matrices for linear systems? If I
      extract submatrices, I could use MatSetValuesStencil on diagonal
      blocks, but how about the off-diagonal ones? These latter would
      have rows/cols indexed by different DMDAs.<br>
    </p>
    <p>Matteo<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite" cite="mid:CAMYG4GkS1aCjYPynuNhiiiAdg82Y_Dtm6_BrUDV4AQS6v4hfnQ@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_quote">
          <div>or</div>
          <div><br>
          </div>
          <div>  b) Use a DMStag since it sounds like these should live
            on horizontal and vertical edges</div>
          <div><br>
          </div>
          <div>  Thanks,</div>
          <div><br>
          </div>
          <div>     Matt</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            I understand the request it's strange, but I should add that
            we are <br>
            experimenting numerically with this toy model, so in fact
            the b.c. may <br>
            change in the future... just to stress once more that I am
            not after a <br>
            perfect solution, but anything that would at least allow
            parallel runs <br>
            with few processors would do for now.<br>
            <br>
            Thanks in advance<br>
            <br>
                 Matteo<br>
            <br>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>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><br>
                    </div>
                    <div><a href="https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cse.buffalo.edu%2F~knepley%2F&data=05%7C01%7Cmatteo.semplice%40uninsubria.it%7Cba6f4499929f45d75a5f08da2c55e259%7C9252ed8bdffc401c86ca6237da9991fa%7C0%7C0%7C637871044633599928%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DRvIjjr1cjHWdoSpQJr9UkIWVxlopKbKt%2BW5sQBvQE4%3D&reserved=0" originalsrc="http://www.cse.buffalo.edu/~knepley/" shash="rVJd/uyjAiPVTahSfgAkgs/xIhk5FjHS5KfJZtWZalxNrpIj1mulpTmIPG0Cd4tiyaCgwOz3w0vdeMqnGcrezIVL8rx5yo6T5V+VVJ5eBgZUVd4TsrwmzOlGS1GYWbZpUinsYKobn3tEoqnn5VqaGaLc60aHjDAjGiuAMZ8MWV8=" target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Prof. Matteo Semplice
Università degli Studi dell’Insubria
Dipartimento di Scienza e Alta Tecnologia – DiSAT
Professore Associato
Via Valleggio, 11 – 22100 Como (CO) – Italia
tel.: +39 031 2386316</pre>
  </body>
</html>