|
[Sponsors] |
How to access my topoFvMesh member function in my code? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 7, 2016, 19:09 |
How to access my topoFvMesh member function in my code?
|
#1 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
Dear all,
I working on a customized version of movingConeTopoFvMesh (called it topoConeTopoFvMesh2) to move my grid (dynamicFvMesh). I defined an access function Code:
volScalarField alpha() { return alpha_; } Code:
alpha= mesh.alpha(); Code:
error: ‘class Foam::dynamicFvMesh’ has no member named ‘alpha’ alpha= mesh.alpha(); Cheers, Cyprien |
|
November 8, 2016, 11:11 |
|
#2 |
Senior Member
|
Hi,
1. You can use refCast on mesh to convert dynamicFvMesh to topoConeTopoFvMesh2 (something like Code:
const topoConeTopoFvMesh2& my_lovely_mesh = refCast<const topoConeTopoFvMesh2>(mesh) 2. You can use Code:
mesh.lookupObject<volScalarField>("name of alpha_ field") |
|
November 8, 2016, 11:31 |
|
#3 | |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
Compilation errors in ThirdPartymallochoard | feng_w | OpenFOAM Installation | 1 | January 25, 2009 07:59 |
Please help about the VTKFoam | liugx212 | OpenFOAM Running, Solving & CFD | 0 | November 18, 2005 19:27 |