finiteArea mapToSurface
Hi Everyone,
Does anyone have any experience using the finiteArea mapToSurface function in OpenFoam 1712? I was expecting the following to work (as was the case in foam-extend 4.0): Us.internalField() = vsm.mapToSurface(U.boundaryField()); It doesn't compile complaining that about no matching function call, below is what i'm giving it and what it's expecting and I can see the difference (I think) I just can't work out what I'm doing incorrectly. The error: Code:
no matching function for call to ‘Foam::volSurfaceMapping::mapToSurface(const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::Boundary&)’ Code:
candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::volSurfaceMapping::mapToSurface(const typename Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>::Boundary&) const Thanks, Andy |
Hello Andrew,
try: Us.primitiveFieldRef() = vsm.mapToSurface<vector>(U.boundaryField()); Regards Alex |
Thanks Alex,
That works, though I'm curious as to why it is that way and if it was intentional (the mapToVolume function has no such complexities and works the same way as in foam-extend). Any ideas? Andrew |
Hello Andrew,
the template definition of the function has changed. Maybe due to the use of the field ref mechanism the type information can not directly be provided to the function call and the new call was the least intrusive modification when porting the fa functionality from the ext version. Regards Alex |
Makes sense, could possibly do with this info on how to use in the comments since there are no places where it is used at the moment for reference.
Andrew |
All times are GMT -4. The time now is 00:22. |