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

access mesh in a function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2020, 05:50
Default access mesh in a function
  #1
New Member
 
chen yu Huang
Join Date: Nov 2019
Posts: 18
Rep Power: 7
chenu is on a distinguished road
Hello,
I would add a function in the OF solver, this function is packed as .so library and is included while wmake the OF solver. In my function I need mesh data, for example the neighboring cell or the coordinate of cell center.
My problem is, how could I access mesh in my function? I have included head file in my library to recognize fvMesh class and my idea is

//----In the OF solver------
meshread(mesh)

//----In my owning function
void meshread(fvMesh)

void meshread(mes){
,,,reading mesh data
}

I have compiled the solver and gotten the following error Foam::fvMesh::fvMesh(const Foam::fvMesh&) is a private within this context
meshread(mesh)

I would be grateful if someone shows me how to access mesh correctly. I could copy mesh data in my defined variable and send to my owning function, but it is inefficient.
Thank you
chenu 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
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10


All times are GMT -4. The time now is 20:22.