|
[Sponsors] |
December 4, 2019, 09:54 |
What does setOriented() do?
|
#1 |
New Member
Jesper R. K. Qwist
Join Date: Dec 2017
Posts: 22
Rep Power: 9 |
Hi everyone,
When constructing a field like surface field of Type like the following: Code:
// construct GeometricField<Type, fvsPatchField, surfaceMesh> tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> tfieldFlux ( new GeometricField<Type, fvsPatchField, surfaceMesh> ( IOobject ( "flux("+psi_.name()+')', psi_.instance(), psi_.mesh(), IOobject::NO_READ, IOobject::NO_WRITE ), psi_.mesh(), dimensions() ) ); GeometricField<Type, fvsPatchField, surfaceMesh>& fieldFlux = tfieldFlux.ref(); Code:
fieldFlux.setOriented(); Kind regards, Jesper Qwist |
|
December 4, 2019, 12:43 |
|
#2 |
Member
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 94
Rep Power: 15 |
Hii there,
I just looked at it out of curiosity and it seems this function only exists in ESI version of OF and not the foundation one. But you may look in https://www.openfoam.com/documentati...8H_source.html to see what it does. But the description says it all "Given point flip all faces such that normals point in same direction." You may look at member functions section to see what and how it does. Code:
static bool orient(triSurface&, const point&, const bool orientOutside); static bool orient ( triSurface& s, const triSurfaceSearch& querySurf, const point& samplePoint, const bool orientOutside ); |
|
December 5, 2019, 04:24 |
|
#3 |
New Member
Jesper R. K. Qwist
Join Date: Dec 2017
Posts: 22
Rep Power: 9 |
Thank you for your reply.
It did however clarify the question for me. The suggested code relates to triSurfaces. I do not think this is where we need to look for this case. I think the setOriented() function used here is the one defined in the class orientedType, which has the Detailed description: "Class to determine the 'oriented' status of surface fields." Link to the class: https://www.openfoam.com/documentati...e.html#details To me it seems that it controls shift in direction caused by one of the mathematical operations defined in the class orientedType. Still I do not understand when I would need this to be true or false. Best Regards, Jesper Qwist |
|
December 5, 2019, 06:45 |
|
#4 |
Member
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 94
Rep Power: 15 |
yeah I knew the link you sent me and you are right partially, cause the final function which is called is the setOriented in orientedType (the link you provided). but the problem is looking into it, would not help you at all cause orientedType is only the tool to achieve sth. And that sth should be sought in regions where this type is used . It is used in dimensionedFields and if you trace it further you would end up with the link I provided.
|
|
June 28, 2020, 05:54 |
|
#5 | ||
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Quote:
This has nothing to do with triSurface mesh orientation. Here is some information that I found (private communication): Quote:
|
|||
Tags |
geometricfield, orientation, setoriented, setoriented() |
|
|