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

GeometricField -> mesh() Function

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 2 Post By Zeppo
  • 1 Post By Michael@UW
  • 2 Post By Zeppo
  • 1 Post By olesen
  • 1 Post By olesen

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 31, 2019, 07:25
Default GeometricField -> mesh() Function
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I am just wondering, if I am getting things correct (but my analysis will show that I am not correct). Assuming that we do have an object based on a volScalarField which is actually a GeometricField. For this field, we can apply the function named mesh(). This function is not implemented in the GeometricField class but as this class includes the DimensionedField class, we can see that it is implemented there. As I cannot find any other function named »mesh()«, I expect that this is correct. The mesh function returns a reference to an object based on the class Mesh:
Code:
const Mesh&  mesh() const;
The class Mesh is actually
Code:
GeoMesh::Mesh Mesh;
So while we call the mesh function, e.g.,
Code:
volScalarField T = ...;


const Mesh& foobar = T.mesh();
we get an object of type Mesh (GeoMesh::Mesh). I guess there is already a mistake in my analysis as I have no idea how we can do the follow:


Code:
.... = T.mesh().ddtScheme("foobar");
The ddtScheme function here is based on the class fvSchemes, which is not inherited by GeoMesh. Actually the code:
Code:
T.mesh()
has to return somehow the reference to the fvMesh class because this class inherites the functions from the fvSchemes class. Furthermore, one can program the following:


Code:
const fvMesh& test = T.mesh();
However, I do not get the connection between the function mesh() that returns the fvMesh object. I am working with FOAM for 9 years now and I do not get the simplest things. Yesterday I saw a report on the TV that the youngest German hacker is 18 years old and has a security company in Hamburg with 23 employees. And I am not even able to connect the mesh() function call to the fvMesh class.


The only thing that I could image is the following:
  • the GeoMesh class is a template based on the class MESH
  • the GeoMesh is constructed somewhen using the fvMesh class
  • If so, the returned object of the DimensionedField mesh() function, which is of class Mesh (typedef GeoMesh::Mesh) would return an fvMesh object because the Mesh is:
Code:
typedef MESH Mesh
  • and while the returned object of the function mesh() of the DimensionedField class is of type Mesh, while MESH is the class template parameter of the GeoMesh class, the type Mesh could be a fvMesh (related to the construction of the GeoMesh object.


I hope that the last statement was clear


Any hint is welcomed.
Thanks in advance.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

 


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
[snappyHexMesh] SnappyHexMesh/splitMeshRegion : region1 in zone "-1" GuiMagyar OpenFOAM Meshing & Mesh Conversion 3 August 4, 2023 12:38
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27


All times are GMT -4. The time now is 21:16.