|
[Sponsors] |
April 7, 2010, 04:14 |
ODETest.C Compiling failed in version 1.6
|
#1 |
Member
|
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 |
|
April 7, 2010, 06:12 |
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
April 21, 2010, 10:34 |
|
#3 |
Member
Wolfgang W.
Join Date: Nov 2009
Location: Switzerland
Posts: 57
Rep Power: 16 |
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 |
|
April 22, 2010, 04:42 |
|
#4 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
We have fixed ODEtest in OpenFOAM-1.6.x which you can obtain from our git repository.
H |
|
April 27, 2010, 06:36 |
|
#5 |
Member
Wolfgang W.
Join Date: Nov 2009
Location: Switzerland
Posts: 57
Rep Power: 16 |
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |