CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Problem with TypeName in Boundary Condition (http://www.cfd-online.com/Forums/openfoam-programming-development/91454-problem-typename-boundary-condition.html)

JimKnopf August 11, 2011 10:02

Problem with TypeName in Boundary Condition
 
Hi Everybody!

I tried to implement a new BC. It inherits from fixedValueFvPatchField<scalar> and is called wallFilmFvPatchField

wenn I try to compile it i get the following error:

Code:

Make/linux64GccDPOpt/wallFilmFvPatchField.o: In function `Foam::wallFilmFvPatchField::type() const':
wallFilmFvPatchField.C:(.gnu.linkonce.t._ZNK4Foam20wallFilmFvPatchField4typeEv+0x3): undefined reference to `Foam::wallFilmFvPatchField::typeName'

I havn't defined a member type(), but it got a TypeName("wallFilm");

I tried to define a memberfunction type() which returns a word but that wasn't a solution.

Actually I don't even know what the exact problem is and where it got that type() thing from.

Hope anybody can help

Greetz
Jim

marupio August 11, 2011 11:38

OpenFOAM has a bunch of hidden type-naming macros that are handy for the underlying machinery. Look at className.H and typeInfo.H in src/OpenFOAM/db/typeInfo for their definitions. fvPatchFields usually call these macros through their own macros... eg: "makePatchTypeField" - see the bottom of fvPatchField.H. You should look at an example fvPatchField that is similar, and see what they are doing. It is important to distinguish between a templated fvPatchField (e.g. fixedInternalValueFvPatchField) and a non-templated one (e.g. fixedFluxPressure) because they have different requirements.

-Dave


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