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

Check if face on patch type empty

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By t.oliveira
  • 1 Post By Jerryfan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2016, 11:50
Default Check if face on patch type empty
  #1
Senior Member
 
Thomas Oliveira
Join Date: Apr 2015
Posts: 114
Rep Power: 12
t.oliveira is on a distinguished road
Given the number of a face, how can I identify if it is on a patch of type "empty"?
t.oliveira is offline   Reply With Quote

Old   June 2, 2016, 11:52
Default
  #2
Senior Member
 
Thomas Oliveira
Join Date: Apr 2015
Posts: 114
Rep Power: 12
t.oliveira is on a distinguished road
Use:
Code:
label facePatchId = -1;
facePatchId = mesh.boundaryMesh().whichPatch(faceID);
const polyPatch& pp = mesh.boundaryMesh()[facePatchId];
if (isA<emptyPolyPatch>(pp)){
    // face faceID is on patch of type "empty".
}
mm.abdollahzadeh likes this.
t.oliveira is offline   Reply With Quote

Old   July 7, 2016, 00:32
Default
  #3
Member
 
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 13
Jerryfan is on a distinguished road
Hi Thomas,


I think you can also do it this way when you try to determine whether the type of patch is empty.


Quote:
label facePatchId = -1;
facePatchId = mesh.boundaryMesh().whichPatch(faceID);
const polyPatch& pp = mesh.boundaryMesh()[facePatchId];
if (pp.type()=="empty"){
// face faceID is on patch of type "empty".
}
The type() function return the type. Hope this will help you.
t.oliveira likes this.
Jerryfan is offline   Reply With Quote

Reply

Tags
patch type

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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] sHM quality of multi-region aminem OpenFOAM Meshing & Mesh Conversion 0 April 16, 2015 12:38
[swak4Foam] Air Conditioned room groovyBC Sebaj OpenFOAM Community Contributions 7 October 31, 2012 15:16
singularity? mihaipruna OpenFOAM Running, Solving & CFD 5 April 24, 2012 18:18
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21


All times are GMT -4. The time now is 01:25.