|
[Sponsors] |
June 13, 2016, 07:41 |
Interpretting an error message
|
#1 |
New Member
Paul
Join Date: Jun 2016
Posts: 21
Rep Power: 9 |
Hi guys,
Struggling to get a solver I've made to compile and have only one somewhat obscure error message left to overcome. I am hoping that someone might be able to advise me on what I'm doing wrong. The message is: Code:
In file included from /opt/openfoam30/src/OpenFOAM/lnInclude/dimensionedType.H:343:0, from /opt/openfoam30/src/OpenFOAM/lnInclude/dimensionedScalar.H:38, from /opt/openfoam30/src/OpenFOAM/lnInclude/TimeState.H:38, from /opt/openfoam30/src/OpenFOAM/lnInclude/Time.H:47, from /opt/openfoam30/src/finiteVolume/lnInclude/fvCFD.H:6, from MOCsolver.C:32: /opt/openfoam30/src/OpenFOAM/lnInclude/dimensionedType.C: In instantiation of ‘Foam::dimensioned<typename Foam::pTraits<arg1>::cmptType> Foam::dimensioned<Type>::component(Foam::direction) const [with Type = double; typename Foam::pTraits<arg1>::cmptType = double; Foam::direction = unsigned char]’: /opt/openfoam30/src/OpenFOAM/lnInclude/dimensionedType.C:404:23: required from ‘Foam::dimensioned<typename Foam::pTraits<arg1>::cmptType> Foam::dimensioned<Type>::operator[](Foam::direction) const [with Type = double; typename Foam::pTraits<arg1>::cmptType = double; Foam::direction = unsigned char]’ MOCsolver.C:86:68: required from here /opt/openfoam30/src/OpenFOAM/lnInclude/dimensionedType.C:287:5: error: request for member ‘component’ in ‘((const Foam::dimensioned<double>*)this)->Foam::dimensioned<double>::value_’, which is of non-class type ‘const double’ ); ^ /opt/openfoam30/src/OpenFOAM/lnInclude/dimensionedType.C: In member function ‘Foam::dimensioned<typename Foam::pTraits<arg1>::cmptType> Foam::dimensioned<Type>::component(Foam::direction) const [with Type = double; typename Foam::pTraits<arg1>::cmptType = double; Foam::direction = unsigned char]’: /opt/openfoam30/src/OpenFOAM/lnInclude/dimensionedType.C:288:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ Code:
for (int i=0; i<naz; i++) { for (int j=0; j<npo; j++) { for (int n=0; n<ncells; n++) { tau[i][j][n]=Lray[celllabel[n]]*sigmaT[celllabel[n]].value()/mag(cosphi[i]*sintheta[j]); exp_factor[i][j][n]= 1.0+Foam::exp(tau[i][j][n]); } } } Cheers for any help. |
|
June 13, 2016, 14:31 |
|
#2 |
New Member
Paul
Join Date: Jun 2016
Posts: 21
Rep Power: 9 |
Found a work around by changing the sigmaT to a volScalarField. Now other problems to fix!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error interpretting 2 UDFs | Thomashoffmann | Fluent UDF and Scheme Programming | 0 | January 16, 2013 10:09 |