CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Why polyBoundaryMesh wasn't made into a nested class?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By olesen
  • 1 Post By olesen

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 5, 2021, 23:26
Default Why polyBoundaryMesh wasn't made into a nested class?
  #1
Senior Member
 
Mandeep Shetty
Join Date: Apr 2016
Posts: 185
Rep Power: 10
granzer is on a distinguished road
I see that polyBoundaryMesh class is used in polyMesh class (has-a relationship) to take care of boundary mesh. Why isn't the polyBoundaryMesh class made into nested class inside the polyMesh class like how the GeometricField:: Boundary is a nested class inside GeometricField and takes care of the boundary fields and related boundary conditions.
granzer is offline   Reply With Quote

Old   January 6, 2021, 14:13
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Stick it on an issue (https://develop.openfoam.com/Develop...nfoam/-/issues).
Can't see any particular advantage to having it nested, but off-hand no particular disadvantage either.

BTW: one general issue with nested classes is that it makes them almost impossible to forward declare (this hit us with the profiling classes). Maybe not a factor here, but figured I might mention it anyhow.
granzer likes this.
olesen is offline   Reply With Quote

Old   January 7, 2021, 12:19
Default
  #3
Senior Member
 
Mandeep Shetty
Join Date: Apr 2016
Posts: 185
Rep Power: 10
granzer is on a distinguished road
Quote:
Originally Posted by olesen View Post
Stick it on an issue (https://develop.openfoam.com/Develop...nfoam/-/issues).
Can't see any particular advantage to having it nested, but off-hand no particular disadvantage either.

BTW: one general issue with nested classes is that it makes them almost impossible to forward declare (this hit us with the profiling classes). Maybe not a factor here, but figured I might mention it anyhow.
What do you think about the case where we just import the surface mesh(I have never tried this)? Would polyBoundaryMesh as a inner class still work in such a case or will having it as a seperate class be advantageous.

(I didn't know nested class couldn't be forward declared outside the enclosing class. That helped me learn something new .)
granzer is offline   Reply With Quote

Old   January 8, 2021, 14:22
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
In the meantime can't really see any advantages for nesting polyBoundaryMesh. Could maybe add as a typedef inside polyMesh I suppose, but still can't see what it helps.
granzer likes this.
olesen is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM class declaration error with volScalarField raunakbardia OpenFOAM Programming & Development 0 June 2, 2019 15:46
BasicTurbulenceModel class declaration in OpenFOAM 6 rod_petrone OpenFOAM Programming & Development 3 April 15, 2019 08:27
Extract a member function from a class by using autoPtr mkhm OpenFOAM Programming & Development 9 November 13, 2018 12:05
tailor made class, wmake libso successfully, but run failed. sharonyue OpenFOAM Programming & Development 1 November 20, 2014 21:49
Possible bug in OpenFoam Interpolation class MMC15 OpenFOAM Bugs 2 March 23, 2014 12:55


All times are GMT -4. The time now is 15:05.