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

obtain "cellZone"-info through programming

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 20, 2019, 03:19
Default obtain "cellZone"-info through programming
  #1
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 7
philiplu is on a distinguished road
Hello,
just found in net a snippet of codes for obtaining "cellZone"-info, as follows,
as I'm new in OF, so want to ask:
1. where shall I put this snippet of codes?
2. and when? before running a case?

thank you


codes-snippet of obtaining "cellZone"-info
-----------------------------------------------------------------------------
word zoneName = "zone1";
label zoneID = mesh.cellZones().findZoneID(zoneName);
if (zoneID == -1)
{
FatalErrorIn("cellZones") << "Cannot find cellZone " << zoneName << exit(FatalError);
}
labelList cells = mesh.cellZones()[zoneID];
-----------------------------------------------------------------------------
philiplu 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
[Gmsh] 3D coil mesh: can't create the volume? RomainBou OpenFOAM Meshing & Mesh Conversion 3 July 18, 2016 06:09
[Gmsh] Cgns support for gmsh robyTKD OpenFOAM Meshing & Mesh Conversion 1 July 13, 2016 12:27
[Gmsh] Vertex numbering is dense KateEisenhower OpenFOAM Meshing & Mesh Conversion 7 August 3, 2015 11:49
[Gmsh] Remesh STL KateEisenhower OpenFOAM Meshing & Mesh Conversion 0 June 25, 2015 07:08
OpenFOAM with Cygwin kitchener OpenFOAM Installation 6 April 25, 2006 00:09


All times are GMT -4. The time now is 02:32.