|
[Sponsors] |
February 20, 2018, 13:59 |
finiteArea mapToSurface
|
#1 |
Member
Andrew Coughtrie
Join Date: May 2011
Posts: 51
Rep Power: 15 |
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&)’ Us.internalField() = vsm.mapToSurface(U.boundaryField()); Code:
candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::volSurfaceMapping::mapToSurface(const typename Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>::Boundary&) const tmp<Field<Type>> mapToSurface Thanks, Andy |
|
March 5, 2018, 09:21 |
|
#2 |
New Member
A.KvJ
Join Date: Feb 2012
Posts: 3
Rep Power: 14 |
Hello Andrew,
try: Us.primitiveFieldRef() = vsm.mapToSurface<vector>(U.boundaryField()); Regards Alex |
|
March 5, 2018, 09:37 |
|
#3 |
Member
Andrew Coughtrie
Join Date: May 2011
Posts: 51
Rep Power: 15 |
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 |
|
March 6, 2018, 04:26 |
|
#4 |
New Member
A.KvJ
Join Date: Feb 2012
Posts: 3
Rep Power: 14 |
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 |
|
March 6, 2018, 05:31 |
|
#5 |
Member
Andrew Coughtrie
Join Date: May 2011
Posts: 51
Rep Power: 15 |
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 |
|
Tags |
finitearea, maptosurface |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
1712 finiteArea Parallel bug? | Andrew.Coughtrie | OpenFOAM Bugs | 1 | February 14, 2018 12:02 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
New finiteArea Boundary Condition | cutty4sark | OpenFOAM Programming & Development | 1 | January 24, 2013 09:47 |
Gradients on surfaces or how to find neighbour faces for face on a patch | tehache | OpenFOAM Running, Solving & CFD | 21 | May 25, 2010 08:08 |