View Issue Details

IDProjectCategoryView StatusLast Update
0002742OpenFOAMBugpublic2017-10-31 16:34
Reporterchaohsiung Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionno change required 
Summary0002742: [index] out of range
DescriptionThe [index] out of range.

The CompactSpatialTensor only has 18 components, however the constructor requests address larger than 18.
//------------------------------------
CompactSpatialTensor.H

template<class Cmpt>
class CompactSpatialTensor
:
    public MatrixSpace<CompactSpatialTensor<Cmpt>, Cmpt, 6, 3>


//------------------------------------
CompactSpatialTensorI.H

template<class Cmpt>
inline Foam::CompactSpatialTensor<Cmpt>::CompactSpatialTensor
(
    const Cmpt& t00, const Cmpt& t01, const Cmpt& t02,
    const Cmpt& t10, const Cmpt& t11, const Cmpt& t12,
    const Cmpt& t20, const Cmpt& t21, const Cmpt& t22,
    const Cmpt& t30, const Cmpt& t31, const Cmpt& t32,
    const Cmpt& t40, const Cmpt& t41, const Cmpt& t42,
    const Cmpt& t50, const Cmpt& t51, const Cmpt& t52
)
{
    this->v_[0] = t00;
    this->v_[1] = t01;
    this->v_[2] = t02;

    this->v_[6 + 0] = t10;
    this->v_[6 + 1] = t11;
    this->v_[6 + 2] = t12;

    this->v_[12 + 0] = t20;
    this->v_[12 + 1] = t21;
    this->v_[12 + 2] = t22;

    this->v_[18 + 0] = t30;
    this->v_[18 + 1] = t31;
    this->v_[18 + 2] = t32;

    this->v_[24 + 0] = t40;
    this->v_[24 + 1] = t41;
    this->v_[24 + 2] = t42;

    this->v_[30 + 0] = t50;
    this->v_[30 + 1] = t51;
    this->v_[30 + 2] = t52;
}

Best regards
TagsNo tags attached.

Activities

chris

2017-10-31 15:59

manager   ~0008964

Hasn't this just been fixed?
https://github.com/OpenFOAM/OpenFOAM-dev/commit/05aa97bd256f4130260607e3eb37a4117ca1d14c

henry

2017-10-31 16:34

manager   ~0008967

This is already fixed in OpenFOAM-5.x and OpenFOAM-dev

Issue History

Date Modified Username Field Change
2017-10-31 15:35 chaohsiung New Issue
2017-10-31 15:59 chris Note Added: 0008964
2017-10-31 16:34 henry Assigned To => henry
2017-10-31 16:34 henry Status new => resolved
2017-10-31 16:34 henry Resolution open => no change required
2017-10-31 16:34 henry Fixed in Version => 5.x
2017-10-31 16:34 henry Note Added: 0008967