CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

macro expansion within codeStream for boundary.findPatchID()

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 19, 2018, 03:33
Default macro expansion within codeStream for boundary.findPatchID()
  #1
Member
 
Fynn
Join Date: Feb 2016
Posts: 48
Rep Power: 8
PanPeter is on a distinguished road
Hello together,

I am using the macro expansion functionality to dynamically set the names for my boundary patches. Now I implement a code stream on a boundary patch. To access the mesh data on the respective patch I use mesh.boundary.findPatchID("patchName"). And here I don't find a way to replace patchName with my marco expansion. It seems the parentheses are not compatible with the macro expansion.

Does anybody have an idea as how to solve this or could suggest a work-around?

patchNames.h
Code:
boundary_names
{
    OUTLET_NAME		outlet;
}
0/p
Code:
#inlcude "../patchNames.h"
$boundary_names.OUTLET_NAME
{
type fixedValue; value #codeStream {
... ... code #{
... ... ... // this is where I want to use my macro expansion instead of writing "outlet" out: const label id = mesh.boundary().findPatchID("outlet"); ...
}#
}
}
PanPeter is offline   Reply With Quote

Reply

Tags
code stream, macro expansion

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
[blockMesh] Create internal faces as patch in blockMesh m.delta68 OpenFOAM Meshing & Mesh Conversion 14 July 12, 2018 14:43
timestep extraction for macro manuc Tecplot 0 August 10, 2016 12:20
Error in compiling new drag model k.farnagh OpenFOAM Programming & Development 13 May 21, 2016 03:08
Add New Pyrolysis Chemistry Type LWhitson2 OpenFOAM Programming & Development 0 April 30, 2015 18:54
Macro problem cfddummy Siemens 1 April 9, 2007 12:37


All times are GMT -4. The time now is 18:07.