|
[Sponsors] |
How to get a BC's primitive type and motified it in the programm? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 13, 2016, 04:58 |
How to get a BC's primitive type and motified it in the programm?
|
#1 |
New Member
Xiaoqiu HE
Join Date: Mar 2016
Location: Wuhan, China
Posts: 29
Rep Power: 10 |
Dear Foamers~!
Here I met a problem: I want to get the primitive type of BC for a field, for example the field "v". Code:
const & fvBoundaryMesh & thisBoundary = mesh.boundary(); // here i get the boundary mesh const & fvPatch = thisBoundary[ 0 ]; // here i get the first patch const & thisFvPatchField = v.boundaryField()[ 0 ]; // i get the fvPatchField on the first patch |
|
June 13, 2016, 05:35 |
|
#2 |
New Member
Xiaoqiu HE
Join Date: Mar 2016
Location: Wuhan, China
Posts: 29
Rep Power: 10 |
there is a easy method to indicate the primitive type of the BC:
Code:
Foam::word nameSpecial = v.boundaryField()[fvPatchID].type(); Info << "\n this patch is of type: " << nameSpecial << endl; |
|
|
|