CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Should the %3d%3d in GeometricFieldstorePrevIter be %3d (https://www.cfd-online.com/Forums/openfoam-bugs/62502-should-3d-3d-geometricfieldstorepreviter-3d.html)

cpplabs February 10, 2008 17:27

Hi, Should the "==" be "="
 
Hi,
Should the "==" be "=" in the following function? I guess it is supposed to do a copy and "=" should be used instead of "==".
Thnaks.
===============================================
// Store previous iteration field
template<class> class PatchField, class GeoMesh>
void Foam::GeometricField<type,>::storePrevIter() const
{
if (!fieldPrevIterPtr_)
{
if (debug)
{
Info<< "Allocating previous iteration field" << endl
<<>info() << endl;
}

fieldPrevIterPtr_ =
new GeometricField<type,>(*this);
}
else
{
*fieldPrevIterPtr_ == *this;
}
}

hjasak February 10, 2008 17:39

No: == is a forced assignment
 
No: == is a forced assignment version of =


All times are GMT -4. The time now is 06:30.