View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000076 | OpenFOAM | Bug | public | 2010-11-10 09:56 | 2010-11-10 15:58 |
Reporter | Assigned To | henry | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | RHEL | OS Version | 5 |
Summary | 0000076: simpleMatrix initialization/destruction error. | ||||
Description | There is something wrong with either the initialization or destruction of a simpleMatrix. Below is a code that writes the simpleMatrix values right after creating it, after it writes the matrix the diagonal elements are set to 1. It does this 2 times and should produce only zeros, but this is the output 2 2((0 2.96439e-323)(2.122e-314 5.67409e-310)) 2{0} 2 2((0 2.96439e-323)(2.122e-314 1)) 2{0} The second time the last element contains a 1 | ||||
Steps To Reproduce | just run this snippet label nSize = 2; for(label i=0; i<2; i++) { simpleMatrix<scalar> tt(nSize); Info << tt << endl; for(label j=0; j<nSize; j++) { tt[j][j] = 1.0; } } | ||||
Additional Information | I cant get the chemistry solver EulerImplicit to work since it relies on simpleMatrix. | ||||
Tags | No tags attached. | ||||
|
simpleMatrix<scalar> tt(nSize); This does not initialize the matrix. Info << tt << endl; This then prints the uninitialized matrix, so yes the values may well be different each time round the loop and may end up with values from the previous iteration. Try initializing the matrix before printing it. |
|
thanks that is much better :) so the bug is in this file then. src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C change the line simpleMatrix<scalar> RR(nSpecie); to simpleMatrix<scalar> RR(nSpecie, 0.0, 0.0); |
|
Thanks for the bug-report and fix. This is resolved by commit e02bd7dba95110b0af9e59ddc4c3b10dc88e630e |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-11-10 09:56 |
|
New Issue | |
2010-11-10 10:03 | henry | Assigned To | => henry |
2010-11-10 10:03 | henry | Status | new => assigned |
2010-11-10 10:05 | henry | Note Added: 0000118 | |
2010-11-10 11:16 |
|
Note Added: 0000119 | |
2010-11-10 15:58 | henry | Note Added: 0000120 | |
2010-11-10 15:58 | henry | Status | assigned => resolved |
2010-11-10 15:58 | henry | Resolution | open => fixed |