CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with compiling my boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 14, 2008, 12:06
Default Hello, I am trying to write ad
  #1
New Member
 
Petr Simanek
Join Date: Mar 2009
Posts: 5
Rep Power: 17
peita is on a distinguished road
Hello, I am trying to write adjoint boundary condions, I started with easy outlet boundary condition for pressure but I have problem with compiling my code. I made my Make with options
EXE_INC = \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS = \
-ltriSurface \
-lmeshTools

and files
myAdjointBoundaryFvPatchScalarField.C

LIB = $(FOAM_LIBBIN) /libfiniteVolume

it wrotes

peita@linux-note:~/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/fields/fvPatchFields/derived/myAdjoi ntBoundary> wmake
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: warning: overriding commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:165: warning: ignoring old commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: warning: overriding commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: warning: ignoring old commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:191: warning: overriding commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: warning: ignoring old commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: warning: overriding commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:165: warning: ignoring old commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: warning: overriding commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:174: warning: ignoring old commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:191: warning: overriding commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
/home/peita/OpenFOAM/OpenFOAM-1.4.1/wmake/Makefile:183: warning: ignoring old commands for target `/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt'
g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/peita/OpenFOAM/OpenFOAM-1.4.1/src/triSurface/lnInclude -I/home/peita/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/peita/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/peita/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/peita/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o -L/home/peita/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt \
-lOpenFOAM -ldl -lm -o OpenFOAM.out
/usr/lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `__tcf_4':
myAdjointBoundaryFvPatchScalarField.C.text+0x13): undefined reference to `Foam::fvPatchField<double>::destroydictionaryCons tructorTables()'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `__tcf_3':
myAdjointBoundaryFvPatchScalarField.C.text+0x33): undefined reference to `Foam::fvPatchField<double>::destroypatchMapperCon structorTables()'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `__tcf_2':
myAdjointBoundaryFvPatchScalarField.C.text+0x53): undefined reference to `Foam::fvPatchField<double>::destroypatchConstruct orTables()'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `__static_initialization_and_destruction_0(int, int)':
myAdjointBoundaryFvPatchScalarField.C.text+0x3b81): undefined reference to `Foam::fvPatchField<double>::constructpatchConstru ctorTables()'
myAdjointBoundaryFvPatchScalarField.C.text+0x3b90): undefined reference to `Foam::fvPatchField<double>::patchConstructorTable Ptr_'
myAdjointBoundaryFvPatchScalarField.C.text+0x3bca): undefined reference to `Foam::fvPatchField<double>::constructpatchMapperC onstructorTables()'
myAdjointBoundaryFvPatchScalarField.C.text+0x3bd9): undefined reference to `Foam::fvPatchField<double>::patchMapperConstructo rTablePtr_'
myAdjointBoundaryFvPatchScalarField.C.text+0x3c13): undefined reference to `Foam::fvPatchField<double>::constructdictionaryCo nstructorTables()'
myAdjointBoundaryFvPatchScalarField.C.text+0x3c22): undefined reference to `Foam::fvPatchField<double>::dictionaryConstructor TablePtr_'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `Foam::fvPatchField<double>::type() const':
myAdjointBoundaryFvPatchScalarField.C.text._ZNK4Foam12fvPatchFieldIdE4typeEv[Foam::fvPatchField<double>::type() const]+0x11): undefined reference to `Foam::fvPatchField<double>::typeName'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `Foam::fixedValueFvPatchField<double>::type() const':
myAdjointBoundaryFvPatchScalarField.C.text._ZNK4Foam22fixedValueFvPatchFieldIdE4typeEv[Foam::fixedValueFvPatchField<d ouble>::type() const]+0x11): undefined reference to `Foam::fixedValueFvPatchField<double>::typeName'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `Foam::fixedValueFvPatchField<double>::gradientBou ndaryCoeffs() const':
myAdjointBoundaryFvPatchScalarField.C.text._ZNK4Foam22fixedValueFvPatchFieldIdE22gradie ntBoundaryCoeffsEv[Foam::fixed ValueFvPatchField<double>::gradientBoundaryCoeffs( ) const]+0x2a): undefined reference to `Foam::fvPatch::deltaCoeffs() const'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `Foam::fixedValueFvPatchField<double>::gradientInt ernalCoeffs() const':
myAdjointBoundaryFvPatchScalarField.C.text._ZNK4Foam22fixedValueFvPatchFieldIdE22gradie ntInternalCoeffsEv[Foam::fixed ValueFvPatchField<double>::gradientInternalCoeffs( ) const]+0x24): undefined reference to `Foam::fvPatch::deltaCoeffs() const'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `Foam::fvPatchField<double>::snGrad() const':
myAdjointBoundaryFvPatchScalarField.C.text._ZNK4Foam12fvPatchFieldIdE6snGradEv[Foam::fvPatchField<double>::snGrad() const]+0x21): undefined reference to `Foam::fvPatch::deltaCoeffs() const'
Make/linuxGccDPOpt/myAdjointBoundaryFvPatchScalarField.o: In function `Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<foam::geometric field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const':
myAdjointBoundaryFvPatchScalarField.C.text._ZNK4Foam14objectRegistry12lookupObjectINS_1 4GeometricFieldINS_6VectorIdEE NS_12fvPatchFieldENS_7volMeshEEEEERKT_RKNS_4wordE[Foam::GeometricField<foam::vec tor<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<foam::geometric field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const]+0x150): undefined reference to `Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName'
myAdjointBoundaryFvPatchScalarField.C.text._ZNK4Foam14objectRegistry12lookupObjectINS_1 4GeometricFieldINS_6VectorIdEE NS_12fvPatchFieldENS_7volMeshEEEEERKT_RKNS_4wordE[Foam::GeometricField<foam::vec tor<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<foam::geometric field<foam::vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const]+0x303): undefined reference to `Foam::GeometricField<foam::vector<double>, Foam::fvPatchField, Foam::volMesh>::typeName'
collect2: ld returned 1 exit status
make: *** [OpenFOAM.out] Error 1


And when I try to use wmake in finiteVolume it also throws some errors
No rule to make target `myAdjointBoundaryFvPatchScalarField.C', needed by `myAdjointBoundaryFvPatchScalarField.dep'. Stop.

I tried to find some answer here on forum but I was not succesful.
Thank you for any help, Petr.
peita is offline   Reply With Quote

Old   February 15, 2008, 06:27
Default Hi Petr, I am actually kind
  #2
Senior Member
 
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19
braennstroem is on a distinguished road
Hi Petr,

I am actually kind of curious, how the lines of code look alike ... this might help the others helping you as well :-)
I wonder, if you wrote the condition from scratch or did you adjust any of the existing boundary conditions, like the convective outlet for example?

Greetings!
Fabian
braennstroem is offline   Reply With Quote

Old   February 16, 2008, 11:38
Default Hi Petr, Try "wmake libso"
  #3
Senior Member
 
Martin Beaudoin
Join Date: Mar 2009
Posts: 332
Rep Power: 22
mbeaudoin will become famous soon enough
Hi Petr,

Try "wmake libso" instead. But before doing so, read the rest of this message.

"wmake" is for compiling and linking applications.

"wmake libso" is for compiling and linking dynamically linked libraries, like libfiniteVolume.so.

Be aware though that from the information you gave in your message, you are currently trying to overwrite the $(FOAM_LIBBIN)/libfiniteVolume, which, as you could find out, is not such a great idea.

Instead, in your "files" file, try to change
LIB = $(FOAM_LIBBIN) /libfiniteVolume
to something like
LIB = $(FOAM_LIBBIN) /my_libfiniteVolume
in order to avoid overwriting your main libfiniteVolume library.

Otherwise, simply add myAdjointBoundaryFvPatchScalarField.C to the list of files in $FOAM_SRC/finiteVolume/Make/files, and do a "wmake libso" from $FOAM_SRC/finiteVolume in order to recompile this library with your additional code.

Martin
mbeaudoin is offline   Reply With Quote

Old   February 20, 2008, 07:55
Default Hello, thank you for your repl
  #4
New Member
 
Petr Simanek
Join Date: Mar 2009
Posts: 5
Rep Power: 17
peita is on a distinguished road
Hello, thank you for your reply.

I have succesfully compiled my b.c., but only with my own Make, when I added my code to $FOAM_SRC/finiteVolume it did not work, with error message:
make: *** No rule to make target `/derived/myAdjointboundary/myAdjointBoundaryfvPatchScalarField.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop.

Do anyone know what is going on?

Maybe it doesn't matter.

I linked my .so using userFoam, but I can't still make simpleFoam to see my b.c. it always tries to use default instead.

So, don't you know what to do? (I've read many post here, but with no help).

Thanks.
peita is offline   Reply With Quote

Old   February 21, 2008, 09:48
Default Hello, it seems that I finally
  #5
New Member
 
Petr Simanek
Join Date: Mar 2009
Posts: 5
Rep Power: 17
peita is on a distinguished road
Hello, it seems that I finally linked it right. Now I have some more problems. When I run simpleFoam (with code changes) it writes:

--> FOAM FATAL IO ERROR : keyword U is undefined in dictionary "/home/peita/OpenFOAM/OpenFOAM-1.4.1/tutorials/simpleFoam/pitzDaily/0/q::outlet"

file: /home/peita/OpenFOAM/OpenFOAM-1.4.1/tutorials/simpleFoam/pitzDaily/0/q::outlet from line 39 to line 39.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 146.

FOAM exiting

Can't anyone guess what is wrong?

Thank you, Petr Simanek.
peita is offline   Reply With Quote

Old   October 6, 2015, 10:16
Default
  #6
New Member
 
ZHENKAI ZHAO
Join Date: Oct 2015
Posts: 14
Rep Power: 11
zhaozhenkai is on a distinguished road
Hi, peita,

I have got the same problem as well.
make: *** No rule to make target `/derived/myAdjointboundary/myAdjointBoundaryfvPatchScalarField.dep', needed by `Make/linux64GccDPOpt/dependencies'. Stop.

Can you tell me how did you solve that? Thanks.
zhaozhenkai is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
boundary conditions problem Gui CFX 3 August 18, 2007 08:33
Boundary conditions problem philip FLUENT 6 June 10, 2005 14:00
Problem with Boundary conditions Mahiboobswamulu Main CFD Forum 10 August 26, 2003 14:24
Problem on boundary conditions Miko CFX 2 June 20, 2003 09:22
problem with boundary conditions mehdi icho Main CFD Forum 1 February 2, 2002 12:24


All times are GMT -4. The time now is 19:48.