|
[Sponsors] |
December 10, 2009, 19:12 |
dynamic_cast and lookupObject
|
#1 |
Senior Member
Kevin Smith
Join Date: Mar 2009
Posts: 104
Rep Power: 17 |
I am having trouble compiling a custon dynamicFvMesh library. I've taken what is essentially the mixerGgiFvMesh and added these lines to it
Code:
121 word field("p"); 122 123 const volScalarField& p = lookupObject<volScalarField>(field); 124 Any help is appreciated Code:
/home/kevin/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/typeInfo.H: In function ‘bool Foam::isA(const Type&) [with TestType = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Type = Foam::regIOobject]’: /home/kevin/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/objectRegistryTemplates.C:44: instantiated from ‘Foam::wordList Foam::objectRegistry::names() const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]’ /home/kevin/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/objectRegistryTemplates.C:139: instantiated from ‘const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]’ freeRotatingGgiFvMesh/freeRotatingGgiFvMesh.C:123: instantiated from here /home/kevin/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/typeInfo.H:126: error: cannot dynamic_cast ‘(const Foam::regIOobject*)t’ (of type ‘const class Foam::regIOobject*’) to type ‘const struct Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>*’ (target is not pointer or reference to complete type) |
|
|
|