|
[Sponsors] |
April 8, 2014, 00:24 |
Fail to identify symmetryFvPatchScalarField
|
#1 | ||
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15 |
Hi Foamers,
I recently compiled OpenFOAM-2.1.0 with gcc version 4.8.2, I can compile OpenFOAM without error messages, except that I keep getting the warning: Quote:
However, When I want to identify certain boundary type such as symmetryFvPatchScalarField, I try the following lines, which used to work on the OF2.1.0 compiled with gcc4.6.1: Quote:
Do you have any ideas about how to solve this problem without changing gcc version? Because I don't have the permission to compile my own gcc on that cluster. Any hints will be highly appreciated, Thanks! |
|||
April 8, 2014, 02:13 |
|
#2 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 12 |
Does
Code:
forAll(p.boundaryField(), patchI) { if (p.boundaryField().types()[patchI] == symmetryPolyPatch) { // Do stuff } } |
|
April 8, 2014, 11:26 |
|
#3 |
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 15 |
Thanks, Christian, your method works, and you saved my life!!!
Code:
forAll(p.boundaryField(), patchi) { // if (isA<symmetryFvPatchScalarField>(p.boundaryField()[patchi])) if (p.boundaryField().types()[patchi] == "symmetryPlane") { // Info<<p.boundaryField().types()[patchi]<<endl; phiDraga.boundaryField()[patchi] = 0.0; phiDragb.boundaryField()[patchi] = 0.0; } } |
|
Tags |
gcc 4.8.2, symmetryfvpatch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Eclipse for OpenFOAM | AMahrla | OpenFOAM Programming & Development | 109 | October 8, 2017 16:20 |
How to identify the cells near the interface? | legendyxg | Fluent UDF and Scheme Programming | 2 | July 11, 2016 11:32 |
identify interface boundary nodes in parallel | emdoran | Fluent UDF and Scheme Programming | 0 | September 29, 2010 23:11 |
how to identify profile file source? | Ralf Schmidt | FLUENT | 0 | November 8, 2006 09:45 |
How to identify a correct value .?? | kevin | FLUENT | 1 | June 5, 2002 14:48 |