CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Error compiling simpleMatrixTestC

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 3, 2007, 13:05
Default Hi OpenFOAM users I tried t
  #1
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 10
jaswi is on a distinguished road
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
jaswi is offline   Reply With Quote

Old   September 28, 2007, 18:00
Default I got the same error messages
  #2
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 10
lr103476 is on a distinguished road
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
lr103476 is offline   Reply With Quote

Old   September 29, 2007, 05:16
Default Apparently, the matrix() funct
  #3
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 340
Rep Power: 10
lr103476 is on a distinguished road
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
lr103476 is offline   Reply With Quote

Old   September 29, 2007, 06:36
Default Yup, what you are doing is fin
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,781
Rep Power: 22
hjasak will become famous soon enough
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
hjasak is offline   Reply With Quote

Old   August 22, 2014, 03:32
Default
  #5
Senior Member
 
Wen Xu
Join Date: May 2014
Posts: 189
Rep Power: 4
wenxu is on a distinguished road
Do you mean that Ax=b, where A is the simplematrix, b is the source vector and x is the solution?
wenxu is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 01:23
compiling udf error help venkatesh4386@gmail.com FLUENT 1 November 7, 2008 03:20
Compiling ERROR hans007 FLUENT 0 December 12, 2007 05:58
compiling error baskar FLUENT 2 May 4, 2005 11:49


All times are GMT -4. The time now is 13:53.