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

Accessing phi from a fvPatchField at same patch

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 13, 2010, 20:07
Default Accessing phi from a fvPatchField at same patch
  #1
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 9
johndeas is on a distinguished road
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()]());
but unfortunately, I receive the following error message:

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
So, if anyone could give me an help on that one, that would be much appreciated.

Thanks

JD
johndeas is offline   Reply With Quote

Old   September 13, 2010, 20:23
Default
  #2
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 9
johndeas is on a distinguished road
As mentioned at compilation problem with "fvPatch::lookupPatchField" , the solution was to include surfaceFields.H
johndeas is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
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
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 21:10.