<div dir="ltr"><div><div><div>Hi Martin,<br><br></div>We're working on some infrastructure to document API changes. I'd like to wait to merge your changes for switching the tensor order output for vtkCellDerivatives until that's done. That way it will be easier to notify everyone of this change (even though it's not technically changing the API, just how the output should be interpreted). We're hoping it will be ready in a week. Is that ok to wait for merging your changes into VTK master?<br><br></div>Thanks,<br></div>Andy<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 2:42 PM, Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Martin,<br><br></div>In case you didn't receive the email notice, your changes have been merged into master. Thanks for your contribution to VTK! This looks like it was your first contribution. I hope it wasn't too onerous to get done but the community works hard to make sure that the code is high quality and well tested.<br><br></div>Best regards,<br></div>Andy<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 10:22 AM, Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It looks like vtkCellDerivates is the only class that uses vtkTensor. When we switch vtkCellDerivatives to C ordering I think we'll just remove vtkTensor. Less code with the same functionality and probably better efficiency -- tough to beat that :)<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 22, 2016 at 9:03 AM, Martin Genet <span dir="ltr"><<a href="mailto:martin.genet@polytechnique.edu" target="_blank">martin.genet@polytechnique.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Sounds good.<br>
    <br>
    However, here the culprit seems to be vtkTensor, which stores the
    data in column. vtkCellDerivatives simply fills a vtkTensor (filling
    is storage independent, since one provides the actual components),
    and then returns the underlying vector.<br>
    <br>
    One option would be to make vtkCellDerivatives independent of
    vtkTensor.<br>
    <br>
    But I think it would be better to correct the storage in vtkTensor.
    Actually, it seems that vtkTensor is used only in
    vtkCellDerivatives, so it would not change the rest of the library.<br>
    <br>
    Let me know what you would prefer.<span><font color="#888888"><br>
    <br>
    Martin</font></span><div><div><br>
    <br>
    <div>On 20/01/2016 19:19, Andy Bauer wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div>I've looked at this a bit more along with others and
            unfortunately there's some inconsistency in VTK for tensor
            ordering. If you look at the vtkCell::Derivatives()
            documentation (<a href="http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkCell.html#aff3d8332e9d7d556a9d2e9f91173d068</a>),

            it's using a C/row-major ordering. There's some places in
            that have done row-major and others that have done column
            major. For the most part it hasn't been an issue since
            many/most of the uses of tensor have been symmetric but it
            should be fixed regardless.<br>
            <br>
          </div>
          I've entered a mantis issue for this at <a href="http://www.paraview.org/Bug/view.php?id=15949" target="_blank"></a><a href="http://www.paraview.org/Bug/view.php?id=15949" target="_blank">http://www.paraview.org/Bug/view.php?id=15949</a>.<br>
          <br>
        </div>
        Would you be willing to go in and make the change to
        vtkCellDerivatives? I'm hoping to go through your changes to
        that class sometime today.<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Jan 20, 2016 at 7:52 AM, Andy
          Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hmm, in fact it does. I was looking at
              vtkGradientFilter instead of vtkCellDerivatives for the
              ordering of the output of the gradient of a vector. I
              think the output order is supposed to be
              fortran/column-major ordering like vtkCellDerivatives
              instead of C/row-major ordering like vtkGradientFilter.
              Well, you can see the confusion that crops up and maybe
              that's why vtkTensors was done that way. In any case, let
              me verify for sure which way is correct and get back to
              you on this.<br>
            </div>
            <div>
              <div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Wed, Jan 20, 2016 at 5:24
                    AM, Martin Genet <span dir="ltr"><<a href="mailto:martin.genet@polytechnique.edu" target="_blank"></a><a href="mailto:martin.genet@polytechnique.edu" target="_blank">martin.genet@polytechnique.edu</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text="#000000" bgcolor="#FFFFFF"> Thanks
                        Andy.<br>
                        <br>
                        Well, I might be wrong but I'm under the
                        impression that vtkCellDerivatives returns
                        [du/dx, dv/dx, dw/dx, du/dy, dv/dy, ...]. Am I
                        wrong?<span><font color="#888888"><br>
                            <br>
                            Martin</font></span>
                        <div>
                          <div><br>
                            <br>
                            <div>On 20/01/2016 03:07, Andy Bauer wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <div dir="ltr">
                                <div>
                                  <div>
                                    <div>Hi Martin,<br>
                                      <br>
                                    </div>
                                    I haven't looked closely enough at
                                    vtkTensors (I don't know if I even
                                    knew about it before today) but
                                    indeed the ordering output in
                                    vtkCellDerivatives for a velocity
                                    vector {u,v,w} needs to be [du/dx,
                                    du/dy, du/dz, dv/dx, dv/dy, ...]
                                    like you have it. I'm not sure when
                                    vtkTensors is ordered the way it is.<br>
                                    <br>
                                  </div>
                                  Cheers,<br>
                                </div>
                                Andy<br>
                              </div>
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">On Tue, Jan 19,
                                  2016 at 5:02 PM, Martin Genet <span dir="ltr"><<a href="mailto:martin.genet@polytechnique.edu" target="_blank"></a><a href="mailto:martin.genet@polytechnique.edu" target="_blank">martin.genet@polytechnique.edu</a>></span>
                                  wrote:<br>
                                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                    <div text="#000000" bgcolor="#FFFFFF"> Thanks Andy.<br>
                                      <br>
                                      I need to clarify something: the
                                      Derivatives function of vtkCell
                                      objects returns a derivs vector
                                      containing the components of the
                                      gradient of some vector field
                                      defined at the cell nodes; the
                                      components are ordered in row (as
                                      usually in C, i.e., (0,0), (0,1),
                                      (0,2), (1,0), (1,1), (1,2), (2,0),
                                      (2,1), (2,2)). Now in the
                                      CellDerivatives filter the derivs
                                      vector is used to fill a
                                      vtkTensors, and then the filter
                                      returns the internal vector
                                      storing the data of the
                                      vtkTensors. However, the
                                      components of the vtkTensors are
                                      ordered in column (as usually in
                                      fortran, i.e., (0,0), (1,0),
                                      (2,0), (0,1), (1,1), (2,1), (0,2),
                                      (1,2), (2,2)). Is it on purpose
                                      that the vtkTensors store their
                                      data in column and not in row?
                                      Isn't it a little dangerous to mix
                                      both storage in the code? Thanks
                                      for the clarification!<span><font color="#888888"><br>
                                          <br>
                                          Martin</font></span>
                                      <div>
                                        <div><br>
                                          <br>
                                          <div>On 18/01/2016 13:32, Andy
                                            Bauer wrote:<br>
                                          </div>
                                          <blockquote type="cite">
                                            <div dir="ltr">
                                              <div>
                                                <div>
                                                  <div>Hi Martin,<br>
                                                    <br>
                                                  </div>
                                                  Thanks for following
                                                  up on this. I found
                                                  the merge request now
                                                  and will look at this.
                                                  In general, developers
                                                  should request others
                                                  to do a code review on
                                                  this. This can be done
                                                  via something like
                                                  "@acbauer please
                                                  review this" or
                                                  sending an email on
                                                  this VTK list with a
                                                  link to the merge
                                                  request.<br>
                                                  <br>
                                                </div>
                                                Best,<br>
                                              </div>
                                              Andy<br>
                                            </div>
                                            <div class="gmail_extra"><br>
                                              <div class="gmail_quote">On

                                                Mon, Jan 18, 2016 at
                                                6:23 AM, Martin Genet <span dir="ltr"><<a href="mailto:martin.genet@polytechnique.edu" target="_blank"></a><a href="mailto:martin.genet@polytechnique.edu" target="_blank">martin.genet@polytechnique.edu</a>></span>
                                                wrote:<br>
                                                <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                  <div text="#000000" bgcolor="#FFFFFF">
                                                    Hi Andy,<br>
                                                    <br>
                                                    I followed the
                                                    directions, and
                                                    submitted a patch
                                                    (19 days ago), but
                                                    haven't heard
                                                    anything back.<br>
                                                    <br>
                                                    In GitLab the merge
                                                    requests counter is
                                                    at 0, but when I try
                                                    to create a new
                                                    merge request from
                                                    my commit, it tells
                                                    the merge request
                                                    already exists. Is
                                                    it being reviewed
                                                    somewhere? Thanks!<span><font color="#888888"><br>
                                                        <br>
                                                        Martin</font></span>
                                                    <div>
                                                      <div><br>
                                                        <br>
                                                        <div>On
                                                          29/12/2015
                                                          13:22, Andy
                                                          Bauer wrote:<br>
                                                        </div>
                                                        <blockquote type="cite">
                                                          <div dir="ltr">
                                                          <div>
                                                          <div>
                                                          <div>Hi
                                                          Martin,<br>
                                                          <br>
                                                          </div>
                                                          This patch
                                                          makes sense.
                                                          It would need
                                                          a test if you
                                                          want to get
                                                          your changes
                                                          into VTK. The
                                                          directions for
                                                          contributing
                                                          to VTK are at
                                                          <a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md" target="_blank"></a><a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md" target="_blank">https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md</a>.<br>
                                                          <br>
                                                          </div>
                                                          Cheers,<br>
                                                          </div>
                                                          Andy<br>
                                                          </div>
                                                          <div class="gmail_extra"><br>
                                                          <div class="gmail_quote">On

                                                          Mon, Dec 28,
                                                          2015 at 5:50
                                                          PM, Martin
                                                          Genet <span dir="ltr"><<a href="mailto:martin.genet@polytechnique.edu" target="_blank"></a><a href="mailto:martin.genet@polytechnique.edu" target="_blank">martin.genet@polytechnique.edu</a>></span>
                                                          wrote:<br>
                                                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                          <div text="#000000" bgcolor="#FFFFFF"> Thanks Andy.<br>
                                                          <br>
                                                          What about
                                                          simply adding
                                                          another mode,
                                                          e.g.
                                                          SetTensorModeToComputeGreenLagrangeStrain,
                                                          to the
                                                          vtkCellDerivatives
                                                          filter? Would
                                                          the attached
                                                          patch make
                                                          sense?<br>
                                                          <br>
                                                          Martin<br>
                                                          <br>
                                                          <div>On
                                                          28/12/2015
                                                          14:12, Andy
                                                          Bauer wrote:<br>
                                                          </div>
                                                          <blockquote type="cite">
                                                          <div dir="ltr">
                                                          <div>
                                                          <div>
                                                          <div>Hi
                                                          Martin,<br>
                                                          <br>
                                                          </div>
                                                          Changing the
                                                          name of the
                                                          SetTensorModeToComputeStrain
                                                          method to
                                                          something else
                                                          would break
                                                          backward
                                                          compatibility
                                                          which is
                                                          generally
                                                          avoided in
                                                          VTK. Other
                                                          options for
                                                          this include
                                                          deriving a
                                                          class to
                                                          compute
                                                          non-linear
                                                          strain from
                                                          vtkCellDerivatives
                                                          if it shares
                                                          enough of the
                                                          algorithm with
                                                          the linearized
                                                          version or
                                                          maybe just
                                                          creating a new
                                                          filter.<br>
                                                          <br>
                                                          </div>
                                                          Cheers,<br>
                                                          </div>
                                                          Andy<br>
                                                          </div>
                                                          <div class="gmail_extra"><br>
                                                          <div class="gmail_quote">On


                                                          Sat, Dec 26,
                                                          2015 at 4:36
                                                          PM, Martin
                                                          Genet <span dir="ltr"><<a href="mailto:martin.genet@polytechnique.edu" target="_blank"></a><a href="mailto:martin.genet@polytechnique.edu" target="_blank">martin.genet@polytechnique.edu</a>></span>
                                                          wrote:<br>
                                                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear


                                                          VTK users:<br>
                                                          <br>
                                                          I realize that
                                                          the
                                                          vtkCellDerivatives
                                                          filter, when
                                                          SetTensorModeToComputeStrain
                                                          is activated,
                                                          returns the
                                                          symmetric part
                                                          of the
                                                          gradient of
                                                          the input
                                                          vector field,
                                                          which is the
                                                          linearized
                                                          strain tensor,
                                                          i.e., not a
                                                          proper measure
                                                          of deformation
                                                          when large
                                                          displacements
                                                          are involved.
                                                          Would that
                                                          make sense to
                                                          have two
                                                          different
                                                          modes,
                                                          SetTensorModeToComputeLinearizedStrain
                                                          or
                                                          SetTensorModeToComputeSymmetricGradient,
                                                          and
                                                          SetTensorModeToComputeStrain
                                                          or
                                                          SetTensorModeToComputeGreenLagrangeStrain?
                                                          Thanks!<br>
                                                          <br>
                                                          Martin<br>
_______________________________________________<br>
                                                          Powered by <a href="http://www.kitware.com" target="_blank"></a><a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
                                                          <br>
                                                          Visit other
                                                          Kitware
                                                          open-source
                                                          projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank"></a><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                                                          <br>
                                                          Please keep
                                                          messages
                                                          on-topic and
                                                          check the VTK
                                                          FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank"></a><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
                                                          <br>
                                                          Search the
                                                          list archives
                                                          at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank"></a><a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
                                                          <br>
                                                          Follow this
                                                          link to
                                                          subscribe/unsubscribe:<br>
                                                          <a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank"></a><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                          </blockquote>
                                                          <br>
                                                          </div>
                                                          </blockquote>
                                                          </div>
                                                          <br>
                                                          </div>
                                                        </blockquote>
                                                        <br>
                                                      </div>
                                                    </div>
                                                  </div>
                                                </blockquote>
                                              </div>
                                              <br>
                                            </div>
                                          </blockquote>
                                          <br>
                                        </div>
                                      </div>
                                    </div>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                            </blockquote>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>