|
[Sponsors] |
November 3, 2020, 08:08 |
What is 'GeoMesh' wrapper?
|
#1 |
Senior Member
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10 |
Hello, can someone please explain what the GeoMesh wrapper class does? I know it is used to wrap volMesh, surfaceMesh, pointMesh, but what does wrapping these meshes with GeoMesh achieve?
Also, volMesh, surfaceMesh, pointMesh themselves seem to be derived by wrapping the fvMesh class with GeoMesh. Why is this done? |
|
November 6, 2020, 14:56 |
|
#2 | |
Senior Member
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10 |
Quote:
|
||
November 7, 2020, 14:38 |
|
#3 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
I think:
For a given utility (e.g. decomposePar), GeoMesh template gives access to all types of meshes. Therefore, say decomposePar, can be executed for all mesh types that GeoMesh wraps. Benefit: easier maintainability, lesser code, better structure etc.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
November 8, 2020, 01:56 |
|
#4 |
Senior Member
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10 |
@HPE thank you for your answer. Yes I have seen it used in few places. Especially in GeometricField(Field, PatchField, GeoMesh) class. Here the GeoMesh can be volMesh or surfaceMesh etc. Let's say it's volMesh. The volMesh class inherits from GeoMesh<fvMesh> class. Why not inherit directly from fvMesh. Why use GeoMesh<fvMesh> (correct me if I am wrong...here 'fvMesh' is wrapped by 'GeoMesh' class right?)
|
|
November 8, 2020, 01:57 |
|
#5 |
Senior Member
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10 |
@HPE thank you for your answer. Yes I have seen it used in few places. Especially in GeometricField(Field, PatchField, GeoMesh) class. Here the GeoMesh can be volMesh or surfaceMesh etc. Let's say it's volMesh. The volMesh class inherits from GeoMesh<fvMesh> class. Why not inherit directly from fvMesh. Why use GeoMesh<fvMesh> (correct me if I am wrong...here 'fvMesh' is wrapped by 'GeoMesh' class right?).
|
|
Tags |
geomesh, wrapper |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with if statement | CHARLES | OpenFOAM Programming & Development | 17 | August 22, 2021 04:14 |
Elementwise multiplication operator | johndeas | OpenFOAM Running, Solving & CFD | 3 | March 9, 2019 14:03 |
adding compressible option to ptot | immortality | OpenFOAM Programming & Development | 13 | June 15, 2015 16:00 |
Sampling rhoFlux in electrostaticFoam | sverdoold | OpenFOAM Post-Processing | 14 | November 16, 2010 17:19 |
A stupid question | luckyluke | OpenFOAM Running, Solving & CFD | 14 | August 13, 2007 05:25 |