CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Obtain PointLabels from code

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 19, 2007, 11:27
Default Hello out there, I need two
  #1
bfa
Member
 
Björn Fabritius
Join Date: Mar 2009
Location: Freiberg, Germany
Posts: 31
Rep Power: 8
bfa is on a distinguished road
Hello out there,

I need two things to be done, and somehow don't manage to do it:
1) How can I get the ID of a patch by name (I tried findPatchID, but it doesn't work on a fvMesh)?
2) How can I get the labels of the points belonging to this patch?

by the way: the search function in my doxygen representation is broken and it's quite hard to guess the right class if i want to find a specific function. Is that a known issue or am I alone with this problem?

thanks for your guidance
Bjoern
bfa is offline   Reply With Quote

Old   June 19, 2007, 11:50
Default Hi Björn! The answer to the f
  #2
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 215
Rep Power: 9
fra76 is on a distinguished road
Hi Björn!
The answer to the first question should be:
label patchI = mesh.boundaryMesh().findPatchID("patchname");

Regarding the second question, I don't know exactly how to access the point, but with this line you can access the faces centers:

const fvPatchVectorField& faceCentres = mesh.Cf().boundaryField()[patchID];

For the point, perhaps something like:

const fvPatchVectorField& faceCentres = mesh.points().boundaryField()[patchID];

But I've never tried it...
fra76 is offline   Reply With Quote

Old   June 19, 2007, 12:09
Default You can get all the point labe
  #3
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
You can get all the point labels on a patch via:

const labelList listOfPatchPointLabels mesh.boundaryMesh()[patchID].meshPoints();

Check:
src/OpenFOAM/lnInclude/PrimitivePatch.H and polyPatch.H for the members of polyPatch (i.e. mesh.boundaryMesh()[patchID]).
eugene is offline   Reply With Quote

Old   June 19, 2007, 13:08
Default thanks a lot to both of you!
  #4
bfa
Member
 
Björn Fabritius
Join Date: Mar 2009
Location: Freiberg, Germany
Posts: 31
Rep Power: 8
bfa is on a distinguished road
thanks a lot to both of you!
it worked just fine
bfa is offline   Reply With Quote

Old   June 19, 2007, 14:25
Default The search function in the dox
  #5
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
The search function in the doxygen documentation requires you install the documentation on a web server with php enabled.

Regards,
Alberto
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF: how to obtain the neighbor face? Benlong FLUENT 0 May 25, 2007 08:36
how to obtain streamline profile for 3d Frank FLUENT 1 February 2, 2006 04:01
How to obtain forces Karimu FLUENT 2 August 22, 2005 17:26
How to obtain.... Sharad Dugad FLUENT 6 February 13, 2002 13:14
how to obtain a profile ... olivier FLUENT 2 December 13, 2001 07:21


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