How to compile a BC
Hello,
I'm trying to learn how to compile a BC within OF 2.1.1 . I tried to follow the instructions by openfoamwiki (http://openfoamwiki.net/index.php/Ho...dary_condition) but I'm not able to make it work. I copied all the files in opt/openfoam211/..../finiteVolume/fvPatchFields/..../fixedValue/ in a new directory. I renamed all the files adding the "my" prefix. Within all the files I replaced all the fixedValueFvPatchField occurrences with myfixedValueFvPatchField as indicated by the guide. I created the Make dir with Make/files file: myfixedValueFvPatchField.C LIB = $FOAM_USER_LIBBIN/libmyfixedValueFvPatch and Make/options file: EXE_INC =\ -I$(LIB_SRC)/finiteVolume/lnInclude LIB_LIBS =\ -lfiniteVolume 1st question: In openfoamwiki they say to :
2nd question: When I try wmake libso I get errors because "in myfixedValueFvPatch.C.....myfixedValueFvPatch<type > is not a type name... " (or something alike)at line 36 (you can refer to the fixedValue source code, since I didn't change it). Can you help me with this problem please? I will be grateful |
Hint: Here's my "files" file which works,
Code:
fvPatchFields = fields/fvPatchFields Code:
EXE_INC = \ -Louis |
Thank you louisgag.
Actually I could compile the BC and solve the problem by myself. The point is that I used as a basis for myBC the basic/fixedValue BC. Starting from a derived BC it was simple to understand what to do and make it work. However I still have a question: consider the src/finiteVolume/fields/fvPatchFields/basic/fixedValue/fixedValueFvPatchField.H file. At lines 50 and following, you can find: template<class Type> class fixedValueFvPatchField : public fvPatchField<Type> Is it because fixedValueFvPatchField is a general type and becames a specific class only when you specify if it either refers to a scalar or a vectorial field? |
Quote:
|
All times are GMT -4. The time now is 15:50. |