|
[Sponsors] |
December 13, 2017, 05:39 |
Create new member variable for lduMatrix
|
#1 |
New Member
Join Date: Dec 2017
Posts: 1
Rep Power: 0 |
Hello everybody,
I try to create a new member variable for the lduMatrix class. For test purposes I want to count the number of lduMatrix objects. Therefore I added the line int number; in the public section of lduMatrix.H. In the constructor Foam::lduMatrix::ludMatrix(const lduMesh& mesh) in lduMatrix.C I added the following lines static int count=0; count++; number=count; In order to see which Matrices have been initialized, I added the line cout<<"number: "<<matrix_.number<<endl; in GaussSeidelSmoother.C. The output is a little bit confusing. The first lines look like this: number: 0 number: 0 number: 0 number: 0 number: 0 number: 0 number: 20 number: 19 number: 13 number: 17 . . . number: 0 number: 0 number: 0 number: 0 How is it possible, that number equals 0? With my implementation in lduMatrix.C the lowest digit for number should be 1. Therefore I conclude, that Matrix objects have to be initialized by a another way than Foam::lduMatrix::ludMatrix(const lduMesh& mesh), but where? Can somebody tell me, why "number: 0" is printed and how to fix my problem. Thank you in advance |
|
Tags |
ldumatrix |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling dynamicTopoFvMesh for OpenFOAM 2.1.x | Saxwax | OpenFOAM Installation | 25 | November 29, 2013 06:34 |
OpenFoam-1.6-ext Allwmake compilation error - one last barrier | Pat84 | OpenFOAM Installation | 15 | July 25, 2012 22:49 |
Condensation as an additional variable | Clark Griswold | CFX | 2 | April 21, 2012 08:20 |
error in COMSOL:'ERROR:6164 Duplicate Variable' | bhushas | COMSOL | 1 | May 30, 2008 05:35 |
[OpenFOAM] LibvtkFoamso | fred | ParaView | 2 | November 18, 2005 20:01 |