<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Change SYSTEM "https://itk.org/migrationv4/ITKMigration.dtd">

<!--**
**
** SymmetricSecondRankTensorMultiply.xml
**
** >>>>>>>>>>>>>>>>>>>>>>>>>>>>
** THIS FILE HAS BEEN AUTOMATICALLY GENERATED. EDIT IT BEFORE COMMITING
** <<<<<<<<<<<<<<<<<<<<<<<<<<<
**
** Please, make sure this file validates the following w3c test before committing it: http://validator.w3.org
**-->
<Change>
    <!--**
    ** Title for the online migration page
    **-->
    <Title>
      Symmetric Second Rank Tensor Multiply
    </Title>

    <!--**
    ** The author of the change
    **-->
    <Author>
      Kris Zygmunt
    </Author>

    <!--**
    ** Date of creation for the XML document
    **-->
    <Date>
      2012-05-29
    </Date>

    <!--**
    ** Plain text description of the change
    ** Extracted from git commit messages
    **-->
    <Description>
      <![CDATA[
      BUG: SymmetricSecondRankTensor Pre and PostMultiply return wrong type
      SymmetricSecondRankTensor&apos;s PreMultiply and PostMultiply methods
      return a tensor instead of a matrix, but multiplying a tensor by a
      matrix is not guaranteed to produce a symmetric tensor as a result.
      Thus this method has been throwing away valuable information in the lower
      triangle of the matrix and producing incorrect answers as a result.

      The solution is to return a Matrix instead of a tensor from both methods.

      ]]>
    </Description>

    <!--**
    ** Sample code snippets
    ** Extracted from git diff of changed files in Examples and Testing
    **-->
    <SampleCode>
      <Old>
        <![CDATA[
    typedef itk::SymmetricSecondRankTensor<double,3>   Double3DTensorType;
    typedef itk::Matrix<double, 3, 3>                  Double3DMatrixType;
    Double3DTensorType tensor3D;
    Double3DMatrixType matrix3D;
    Double3DTensorType result1 = tensor3D.PreMultiply( matrix3D );
        ]]>
      </Old>

      <New>
        <![CDATA[
    typedef itk::SymmetricSecondRankTensor<double,3>   Double3DTensorType;
    typedef itk::Matrix<double, 3, 3>                  Double3DMatrixType;
    Double3DTensorType tensor3D;
    Double3DMatrixType matrix3D;
    Double3DMatrixType result1 = tensor3D.PreMultiply( matrix3D );
        ]]>
      </New>

    </SampleCode>

    <SampleCode>
      <Old>
    <![CDATA[
    typedef itk::SymmetricSecondRankTensor<double,3>   Double3DTensorType;
    typedef itk::Matrix<double, 3, 3>                  Double3DMatrixType;
    Double3DTensorType tensor3D;
    Double3DMatrixType matrix3D;
    Double3DTensorType result1 = tensor3D.PreMultiply( matrix3D ).PostMultiply( matrix3D.GetTranspose() );
    ]]>
      </Old>
      <New>
    <![CDATA[
    typedef itk::SymmetricSecondRankTensor<double,3>   Double3DTensorType;
    typedef itk::Matrix<double, 3, 3>                  Double3DMatrixType;
    Double3DTensorType tensor3D;
    Double3DMatrixType matrix3D;
    Double3DTensorType result1 = tensor3D.Rotate( matrix3D );
    ]]>
      </New>
    </SampleCode>

    <!--**
    ** The change-ids for all commits in the topic branch
    **-->
    <Gerrit-ChangeId>
      Id67b52af2f78a4c56336e00680d4f2fdfaec408d
    </Gerrit-ChangeId>

    <!--**
    ** List of all changed files from the topic branch
    **-->
    <FileList>
      Modules/Core/Common/include/itkSymmetricSecondRankTensor.h
      Modules/Core/Common/include/itkSymmetricSecondRankTensor.hxx
      Modules/Core/Common/test/itkSymmetricSecondRankTensorTest.cxx
    </FileList>

    <MigrationFix-Manual>
      <Old>
          PreMultiply
      </Old>
      <New></New>
    </MigrationFix-Manual>
    <MigrationFix-Manual>
      <Old>
          PostMultiply
      </Old>
      <New></New>
    </MigrationFix-Manual>

</Change>
