|
[Sponsors] |
Accessing phi from a fvPatchField at same patch |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 13, 2010, 21:07 |
Accessing phi from a fvPatchField at same patch
|
#1 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
Hi, I need for an fvPatchField-derived class to access the value of phi at the current patch. I thought I could achieve this using:
Code:
Field<scalar> phi(this->db().objectRegistry::lookupObject<surfaceScalarField>("phi").boundaryField()[this->patch().index()]()); Code:
Making dependency list for source file convectiveOutletFvPatchFields.C /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedField.H: In instantiation of 'Foam::DimensionedField<double, Foam::surfaceMesh>': /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/pointFieldsFwd.H:53: instantiated from 'Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>' convectiveOutletFvPatchField.C:252: instantiated from 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::Tensor<double>]' convectiveOutletFvPatchFields.C:45: instantiated from here /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedField.H:83: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedField.H:92: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedField.C:58: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedField.C:86: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedField.C:101: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedFieldIO.C:59: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/DimensionedFieldI.H:36: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.H: In instantiation of 'Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>': convectiveOutletFvPatchField.C:252: instantiated from 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::Tensor<double>]' convectiveOutletFvPatchFields.C:45: instantiated from here /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.H:98: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.H:99: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.H: In instantiation of 'Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::GeometricBoundaryField': /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.H:238: instantiated from 'Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>' convectiveOutletFvPatchField.C:252: instantiated from 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::Tensor<double>]' convectiveOutletFvPatchFields.C:45: instantiated from here /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.H:113: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:40: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:77: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:129: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:212: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C: In instantiation of 'Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>': convectiveOutletFvPatchField.C:252: instantiated from 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::Tensor<double>]' convectiveOutletFvPatchFields.C:45: instantiated from here /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C:197: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C:227: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C:254: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C:283: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C:313: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C:337: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/GeometricField.C:378: error: invalid use of incomplete type 'struct Foam::surfaceMesh' /home/vincent.kubicki/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/surfaceFieldsFwd.H:47: error: forward declaration of 'struct Foam::surfaceMesh' convectiveOutletFvPatchField.C: In member function 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::Tensor<double>]': convectiveOutletFvPatchFields.C:45: instantiated from here convectiveOutletFvPatchField.C:252: error: no match for call to '(const Foam::fvsPatchField<double>) ()' convectiveOutletFvPatchField.C: In member function 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::SymmTensor<double>]': convectiveOutletFvPatchFields.C:45: instantiated from here convectiveOutletFvPatchField.C:252: error: no match for call to '(const Foam::fvsPatchField<double>) ()' convectiveOutletFvPatchField.C: In member function 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::SphericalTensor<double>]': convectiveOutletFvPatchFields.C:45: instantiated from here convectiveOutletFvPatchField.C:252: error: no match for call to '(const Foam::fvsPatchField<double>) ()' convectiveOutletFvPatchField.C: In member function 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = Foam::Vector<double>]': convectiveOutletFvPatchFields.C:45: instantiated from here convectiveOutletFvPatchField.C:252: error: no match for call to '(const Foam::fvsPatchField<double>) ()' convectiveOutletFvPatchField.C: In member function 'void Foam::convectiveOutletFvPatchField<Type>::updateCoeffs() [with Type = double]': convectiveOutletFvPatchFields.C:45: instantiated from here convectiveOutletFvPatchField.C:252: error: no match for call to '(const Foam::fvsPatchField<double>) ()' make: *** [Make/linux64GccDPOpt/convectiveOutletFvPatchFields.o] Error 1 Thanks JD |
|
September 13, 2010, 21:23 |
|
#2 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
As mentioned at http://www.cfd-online.com/Forums/ope...atchfield.html , the solution was to include surfaceFields.H
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Using starToFoam | clo | OpenFOAM Meshing & Mesh Conversion | 33 | September 26, 2012 05:04 |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 05:38 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 03:34 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |