|
[Sponsors] |
August 3, 2007, 13:05 |
Hi OpenFOAM users
I tried t
|
#1 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Hi OpenFOAM users
I tried to compile the simpleMatrixTest.C located in /OpenFOAM/OpenFOAM-1.4/applications/test/simpleMatrix and it gives the following error: singh@taifun:~/OpenFOAM/OpenFOAM-1.4/applications/test/simpleMatrix> wmake Making dependency list for source file simpleMatrixTest.C SOURCE=simpleMatrixTest.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/singh/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64Gcc4DPOpt/simpleMatrixTest.o simpleMatrixTest.C: In function 'int main(int, char**)': simpleMatrixTest.C:41: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:42: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:43: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:44: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:45: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:46: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:47: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:48: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' simpleMatrixTest.C:49: error: 'class Foam::simpleMatrix<foam::vector<double> >' has no member named 'matrix' make: *** [Make/linux64Gcc4DPOpt/simpleMatrixTest.o] Fehler 1 I tried to look in the class but it didn't help me much. Anybody expert in C++ please take a look and help me to understand what's wrong Thanks a lot Kind Regards Jaswinder |
|
September 28, 2007, 18:00 |
I got the same error messages
|
#2 |
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18 |
I got the same error messages with the latest OF-1.4.1 versions (standard and dev). OF-1.3 worked OK.
Has anyone already fixed this problem with simpleMatrix.... Frank
__________________
Frank Bos |
|
September 29, 2007, 05:16 |
Apparently, the matrix() funct
|
#3 |
Senior Member
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 18 |
Apparently, the matrix() function disappeared in the simpleMatrix class. The source() function is still there. I assume that simpleMatrix just works as follows
simpleMatrix<vector> A(2); //filling the matrix A[0][0] = 1.0; A[0][1] = 2.0; A[1][0] = 3.0; A[1][1] = 4.0; //Defining some source vector A.source()[0] = vector(1.0, 1.0, 1.0); A.source()[1] = vector(2.0, 2.0, 2.0); //Solving the system Info << A.solve() << endl; Could someone confirm that this is the correct way? Regards, Frank
__________________
Frank Bos |
|
September 29, 2007, 06:36 |
Yup, what you are doing is fin
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33 |
Yup, what you are doing is fine. Have a look at simpleMatrix.H:
template<class> class simpleMatrix : public scalarMatrix Therefore simpleMatrix IS-A scalarMatrix and your access functions are fine. Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
August 22, 2014, 03:32 |
|
#5 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 12 |
Do you mean that Ax=b, where A is the simplematrix, b is the source vector and x is the solution?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling error | quansp | OpenFOAM Installation | 1 | April 20, 2009 07:37 |
Errors when Compiling UDF: error C2040/error C2099 | Julian K. | FLUENT | 1 | December 21, 2008 00:23 |
compiling udf error help | venkatesh4386@gmail.com | FLUENT | 1 | November 7, 2008 02:20 |
Compiling ERROR | hans007 | FLUENT | 0 | December 12, 2007 04:58 |
compiling error | baskar | FLUENT | 2 | May 4, 2005 11:49 |