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

ODETest.C Compiling failed in version 1.6

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2010, 04:14
Default ODETest.C Compiling failed in version 1.6
  #1
Member
 
Su Xiaohui
Join Date: Mar 2009
Location: Singapore
Posts: 30
Rep Power: 17
sxhdhi is on a distinguished road
Send a message via Skype™ to sxhdhi
Dear All,

When I compiled ODETest.C in version 1.6 it is failure. I remembered I could do it in version 1.5.

The error info I obtained is

moduser@pingu1:~/OpenFOAM/OpenFOAM-1.6/applications/test/ODETest$ wmake
Making dependency list for source file ODETest.C
SOURCE=ODETest.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/moduser/OpenFOAM/OpenFOAM-1.6/src/ODE/lnInclude -IlnInclude -I. -I/home/moduser/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/moduser/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ODETest.o
ODETest.C:72: error: wrong number of template arguments (1, should be 2)
/home/moduser/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/Matrix.H:55: error: provided for ‘template<class Form, class Type> class Foam::Matrix’
ODETest.C: In member function ‘void testODE::jacobian(Foam::scalar, const Foam::scalarField&, Foam::scalarField&, int&) const’:
ODETest.C:80: error: invalid types ‘int[int]’ for array subscript
ODETest.C:81: error: invalid types ‘int[int]’ for array subscript
ODETest.C:82: error: invalid types ‘int[int]’ for array subscript
ODETest.C:83: error: invalid types ‘int[int]’ for array subscript
ODETest.C:85: error: invalid types ‘int[int]’ for array subscript
ODETest.C:86: error: invalid types ‘int[int]’ for array subscript
ODETest.C:87: error: invalid types ‘int[int]’ for array subscript
ODETest.C:88: error: invalid types ‘int[int]’ for array subscript
ODETest.C:90: error: invalid types ‘int[int]’ for array subscript
ODETest.C:91: error: invalid types ‘int[int]’ for array subscript
ODETest.C:92: error: invalid types ‘int[int]’ for array subscript
ODETest.C:93: error: invalid types ‘int[int]’ for array subscript
ODETest.C:95: error: invalid types ‘int[int]’ for array subscript
ODETest.C:96: error: invalid types ‘int[int]’ for array subscript
ODETest.C:97: error: invalid types ‘int[int]’ for array subscript
ODETest.C:98: error: invalid types ‘int[int]’ for array subscript
ODETest.C: In function ‘int main(int, char**)’:
ODETest.C:114: error: cannot declare variable ‘ode’ to be of abstract type ‘testODE’
ODETest.C:42: note: because the following virtual functions are pure within ‘testODE’:
/home/moduser/OpenFOAM/OpenFOAM-1.6/src/ODE/lnInclude/ODE.H:84: note: virtual void Foam::ODE::jacobian(Foam::scalar, const Foam::scalarField&, Foam::scalarField&, Foam::scalarSquareMatrix&) const
make: *** [Make/linux64GccDPOpt/ODETest.o] Error 1

Could anyone help me?

BTW, I found OpenFOAM ODE could only treat IVP problem. Is it possible to modify the solver for BVP? Thanks in advance!

Best Regards,

Xiaohui
sxhdhi is offline   Reply With Quote

Old   April 7, 2010, 06:12
Default
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Works fine for 16x.

For BVP you'd be better off to use a matrix based method. Or reformulate it in terms of a simulation on a 1D mesh and use finite volume operators.
mattijs is offline   Reply With Quote

Old   April 21, 2010, 10:34
Default
  #3
Member
 
Wolfgang W.
Join Date: Nov 2009
Location: Switzerland
Posts: 57
Rep Power: 16
WiWo is on a distinguished road
Hi Xiaohui,

I was wondering if you were able to solve your problem with ODEtest. I was trying to compile ODEtest in OF1.6 and I'm getting exactly the same error as you do.

Further I tried compiling ODEtest in OFdev-1.5 which yields complains about the virtual functions pretty similar to what you get in the last few lines of your output.

SOURCE=ODETest.C ; g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/wolfgang/OpenFOAM/OpenFOAM-1.5-dev/src/ODE/lnInclude -IlnInclude -I. -I/home/wolfgang/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/wolfgang/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ODETest.o
ODETest.C: In function »int main(int, char**)«:
ODETest.C:114: error: cannot declare variable ‘ode’ to be of abstract type ‘testODE’
ODETest.C:42: note: because the following virtual functions are pure within ‘testODE’:

Does anybody have suggestions about how to overcome this problem?

Cheers,
Wolfgang
WiWo is offline   Reply With Quote

Old   April 22, 2010, 04:42
Default
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
We have fixed ODEtest in OpenFOAM-1.6.x which you can obtain from our git repository.

H
henry is offline   Reply With Quote

Old   April 27, 2010, 06:36
Default
  #5
Member
 
Wolfgang W.
Join Date: Nov 2009
Location: Switzerland
Posts: 57
Rep Power: 16
WiWo is on a distinguished road
Dear Henry,

Thank you for the hint to OF-1.6.x - ODEtest works fine there.

I tried to transfer this ODEtest to OF-1.5dev, as this is the environment I'm currently using (mainly because I need icoFsiFoam). It seems that there are quite some significant differences in the ODEsolver class between OF16x and OF15dev and some other classes (e.g. scalarSquareMatrix) are missing.

In the end I wasn't able to get ODEtest running on ODE15dev but it helped a lot in understanding how the ODEsolver works. I could figure out another solution, which works in OF15dev by adapting the sixDOFSolver and its dedicated classes.

Thank you very much for your help.

Best regards,
Wolfgang
WiWo is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transient boundary conditions Jarrod Sinclair (Sinclair) OpenFOAM Running, Solving & CFD 133 May 6, 2015 07:21
OpenFOAM-1.6 install cookbook MadsR OpenFOAM Installation 372 November 20, 2010 12:57
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 14:43
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31
user defined function cfduser CFX 0 April 29, 2006 11:58


All times are GMT -4. The time now is 21:15.