|
[Sponsors] |
Cannot compile a solver containing the "gSum" function |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2016, 03:28 |
Cannot compile a solver containing the "gSum" function
|
#1 |
New Member
Manuel do Nascimento
Join Date: May 2012
Posts: 14
Rep Power: 14 |
Hello, I was trying to compile a solver which contains the function "gSum". There is an error saying there is no proper function for calling gSum.
Any suggestions? Thanks |
|
February 11, 2016, 03:42 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29 |
I suggest you include the relevant code you wrote and the exact error message.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
February 11, 2016, 03:58 |
|
#3 |
Senior Member
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21 |
gSum works only with basic arrays - Field<T>, List<T> and so on. gSum doesn't work with complex fields, like GeometricField, i.e. volVectorField, surfaceScalarField.
__________________
MDPI Fluids (Q2) special issue for OSS software: https://www.mdpi.com/journal/fluids/..._modelling_OSS GitHub: https://github.com/unicfdlab Linkedin: https://linkedin.com/in/matvey-kraposhin-413869163 RG: https://www.researchgate.net/profile/Matvey_Kraposhin |
|
February 11, 2016, 04:55 |
|
#4 |
New Member
Manuel do Nascimento
Join Date: May 2012
Posts: 14
Rep Power: 14 |
Sorry!
The line in the code that gives the error message: sumV = gSum(alpha1*mesh.V()); (solver based on interFoam) in createfields: const volVectorField& C = mesh.C(); The error message was given in german, that's why I tried to translate it as well as possible: filename.H: in function "int main(int char**)": filename.H: error: no proper function for calling gSum(Foam::tmp<Foam:: DimensionedField<double, Foam::volMesh> >)« readMRFControls.H:26:31: note: candidates are: /opt/openfoam211/src/OpenFOAM/lnInclude/FieldFunctions.C:490:1: note: template<class Type> Type Foam::gSum(const Foam::UList<T>&) /opt/openfoam211/src/OpenFOAM/lnInclude/FieldFunctions.C:490:1: note: template<class Type> Type Foam::gSum(const Foam::tmp<Foam::Field<Type> >&) /opt/openfoam211/src/OpenFOAM/lnInclude/FieldFieldFunctions.C:564:1: note: template<template<class> class Field, class Type> Type Foam::gSum(const Foam::FieldField<Field, Type>&) /opt/openfoam211/src/OpenFOAM/lnInclude/FieldFieldFunctions.C:564:1: note: template<template<class> class Field, class Type> Type Foam::gSum(const Foam::tmp<Foam::FieldField<Field, Type> >&) Last edited by MdoNascimento; February 11, 2016 at 06:06. |
|
February 11, 2016, 10:08 |
|
#5 |
New Member
Manuel do Nascimento
Join Date: May 2012
Posts: 14
Rep Power: 14 |
Problem solved! Had to use
sumC = gSum(C.internalField()*alpha1.internalField()*mesh .V()); instead of sumC = gSum(C.internalField()*alpha1*mesh.V()); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
foamToTecplot360 | thomasduerr | OpenFOAM Post-Processing | 121 | June 11, 2021 10:05 |
Star cd es-ice solver error | ernarasimman | STAR-CD | 2 | September 12, 2014 00:01 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 10:20 |
function within solver | lindstroem | OpenFOAM Programming & Development | 8 | November 30, 2012 11:20 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 09:31 |