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

wmake libso error while compiling library for dynamic mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Naveed Salman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2017, 18:30
Default wmake libso error while compiling library for dynamic mesh
  #1
New Member
 
Naveed Salman
Join Date: Apr 2017
Location: Ankara, Turkey
Posts: 2
Rep Power: 0
Naveed Salman is on a distinguished road
Dear Openfoam users,

I am using openfoam version 4 on Ubuntu 16.04 and I am following book The OpenFoam Technology Primer by Tomislav Maric, Jens Hopken and Kyle Mooney.
I am trying to implement the moving boundary condition and I am using these commands from the book. (Chapter 10 Boundary Conditions).

These are the commands I write on my terminal

Code:
mkdir -p $WM_PROJECT_USER_DIR/applications/tabulatedRigidBodyDisplacement
Code:
 cd $WM_PROJECT_USER_DIR/applications/tabulatedRigidBodyDisplacement
Code:
cp $FOAM_SRC/fvMotionSolver/pointPatchFields/derived/oscillatingDisplacement/* .
Code:
rm *.dep
This is written in the book but doing this says nothing to remove



Code:
mv oscillatingDisplacementPointPatchVectorField.H tabulatedRigidBodyDisplacementPointPatchVectorField.H
Code:
mv oscillatingDisplacementPointPatchVectorField.C tabulatedRigidBodyDisplacementPointPatchVectorField.C
Code:
sed -i "s/oscillating/tabulatedRigidBody/g" *.[HC]
Code:
mkdir Make
Code:
touch Make/files
Then I open this blank file named “files” I write this in gedit and save

Code:
tabulatedRigidBodyDisplacementPointPatchVectorField.C

LIB = $(FOAM_USER_LIBBIN)/libtabulatedRigidBodyDisplacement
Code:
touch Make/options
Then I open this blank file named “options” I write this in it and save

Code:
EXE_INC = \
   -I$(LIB_SRC)/finiteVolume/lnInclude \
   -I$(LIB_SRC)/dynamicFvMesh/lnInclude \
   -I$(LIB_SRC)/meshTools/lnInclude \
   -I$(LIB_SRC)/fileFormats/lnInclude

LIB_LIBS = \
   -lfiniteVolume \
   -lmeshTools \
   -lfileFormats
Then I compile using wmake libso

Code:
wmake libso
It compiles without error

Then I add some include files in header file (tabulatedRigidBodyDisplacementPointPatchVectorFie ld.H)

Code:
#include "fixedValuePointPatchField.H"
#include "solidBodyMotionFunction.H"
and include files in source file (tabulatedRigidBodyDisplacementPointPatchVectorFie ld.C)


Code:
#include "tabulatedRigidBodyDisplacementPointPatchVectorField.H"
#include "pointPatchFields.H"
#include "addToRunTimeSelectionTable.H"
#include "Time.H"
#include "polyMesh.H"
#include "fvMesh.H"
#include "IFstream.H"
#include "transformField.H"
And I modify then I modify the source and header files according to the book. I have attached the files.

Then I compile and I get error

Code:
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam4/src/finiteVolume/lnInclude -I/opt/openfoam4/src/dynamicFvMesh/lnInclude -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/fileFormats/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude   -fPIC -c tabulatedRigidBodyDisplacementPointPatchVectorField.C -o Make/linux64GccDPInt32Opt/tabulatedRigidBodyDisplacementPointPatchVectorField.o
tabulatedRigidBodyDisplacementPointPatchVectorField.C: In member function ‘virtual void Foam::tabulatedRigidBodyDisplacementPointPatchVectorField::updateCoeffs()’:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:125:5: error: no matching function for call to ‘transform(Foam::septernion, const vectorField&)’
     );
     ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/dimensionedType.H:40:0,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/DimensionedField.H:43,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/pointPatchField.H:46,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/valuePointPatchField.H:38,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/fixedValuePointPatchField.H:38,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.H:38,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:26:
/opt/openfoam4/src/OpenFOAM/lnInclude/dimensionSet.H:374:29: note: candidate: Foam::dimensionSet Foam::transform(const Foam::dimensionSet&)
         friend dimensionSet transform(const dimensionSet&);
                             ^
/opt/openfoam4/src/OpenFOAM/lnInclude/dimensionSet.H:374:29: note:   candidate expects 1 argument, 2 provided
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransformI.H:26:0,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransform.H:203,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/septernion.H:46,
                 from /opt/openfoam4/src/dynamicFvMesh/lnInclude/solidBodyMotionFunction.H:48,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.H:39,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:26:
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:145:14: note: candidate: Foam::label Foam::transform(const tensor&, bool)
 inline label transform(const tensor&, const bool i)
              ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:145:14: note:   no known conversion for argument 1 from ‘Foam::septernion’ to ‘const tensor& {aka const Foam::Tensor<double>&}’
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:151:14: note: candidate: Foam::label Foam::transform(const tensor&, Foam::label)
 inline label transform(const tensor&, const label i)
              ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:151:14: note:   no known conversion for argument 1 from ‘Foam::septernion’ to ‘const tensor& {aka const Foam::Tensor<double>&}’
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:157:15: note: candidate: Foam::scalar Foam::transform(const tensor&, Foam::scalar)
 inline scalar transform(const tensor&, const scalar s)
               ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:157:15: note:   no known conversion for argument 1 from ‘Foam::septernion’ to ‘const tensor& {aka const Foam::Tensor<double>&}’
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:164:21: note: candidate: template<class Cmpt> Foam::Vector<Cmpt> Foam::transform(const tensor&, const Foam::Vector<Cmpt>&)
 inline Vector<Cmpt> transform(const tensor& tt, const Vector<Cmpt>& v)
                     ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:164:21: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensor& {aka const Foam::Tensor<double>&}’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransformI.H:26:0,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransform.H:203,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/septernion.H:46,
                 from /opt/openfoam4/src/dynamicFvMesh/lnInclude/solidBodyMotionFunction.H:48,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.H:39,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:26:
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:171:21: note: candidate: template<class Cmpt> Foam::Tensor<Cmpt> Foam::transform(const tensor&, const Foam::Tensor<Cmpt>&)
 inline Tensor<Cmpt> transform(const tensor& tt, const Tensor<Cmpt>& t)
                     ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:171:21: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensor& {aka const Foam::Tensor<double>&}’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransformI.H:26:0,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransform.H:203,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/septernion.H:46,
                 from /opt/openfoam4/src/dynamicFvMesh/lnInclude/solidBodyMotionFunction.H:48,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.H:39,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:26:
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:215:30: note: candidate: template<class Cmpt> Foam::SphericalTensor<Cmpt> Foam::transform(const tensor&, const Foam::SphericalTensor<Cmpt>&)
 inline SphericalTensor<Cmpt> transform
                              ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:215:30: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensor& {aka const Foam::Tensor<double>&}’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransformI.H:26:0,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/spatialTransform.H:203,
                 from /opt/openfoam4/src/OpenFOAM/lnInclude/septernion.H:46,
                 from /opt/openfoam4/src/dynamicFvMesh/lnInclude/solidBodyMotionFunction.H:48,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.H:39,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:26:
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:226:25: note: candidate: template<class Cmpt> Foam::SymmTensor<Cmpt> Foam::transform(const tensor&, const Foam::SymmTensor<Cmpt>&)
 inline SymmTensor<Cmpt> transform(const tensor& tt, const SymmTensor<Cmpt>& st)
                         ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transform.H:226:25: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensor& {aka const Foam::Tensor<double>&}’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:37:6: note: candidate: template<class Type> void Foam::transform(Foam::Field<Type>&, const tensorField&, const Foam::Field<Type>&)
 void transform
      ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:37:6: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:125:5: note:   ‘Foam::septernion’ is not derived from ‘Foam::Field<Type>’
     );
     ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:59:18: note: candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::transform(const tensorField&, const Foam::Field<Type>&)
 tmp<Field<Type>> transform
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:59:18: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensorField& {aka const Foam::Field<Foam::Tensor<double> >&}’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:72:18: note: candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::transform(const tensorField&, const Foam::tmp<Foam::Field<Type> >&)
 tmp<Field<Type>> transform
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:72:18: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensorField& {aka const Foam::Field<Foam::Tensor<double> >&}’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:86:18: note: candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::transform(const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&, const Foam::Field<Type>&)
 tmp<Field<Type>> transform
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:86:18: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:100:18: note: candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::transform(const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&, const Foam::tmp<Foam::Field<Type> >&)
 tmp<Field<Type>> transform
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:100:18: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:115:6: note: candidate: template<class Type> void Foam::transform(Foam::Field<Type>&, const tensor&, const Foam::Field<Type>&)
 void transform
      ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:115:6: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:125:5: note:   ‘Foam::septernion’ is not derived from ‘Foam::Field<Type>’
     );
     ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:127:18: note: candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::transform(const tensor&, const Foam::Field<Type>&)
 tmp<Field<Type>> transform
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:127:18: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensor& {aka const Foam::Tensor<double>&}’
  SBMFPtr().transformation(),
                          ^
In file included from /opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:137:0,
                 from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:140:18: note: candidate: template<class Type> Foam::tmp<Foam::Field<Type> > Foam::transform(const tensor&, const Foam::tmp<Foam::Field<Type> >&)
 tmp<Field<Type>> transform
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformFieldTemplates.C:140:18: note:   template argument deduction/substitution failed:
tabulatedRigidBodyDisplacementPointPatchVectorField.C:123:26: note:   cannot convert ‘Foam::solidBodyMotionFunction::transformation()’ (type ‘Foam::septernion’) to type ‘const tensor& {aka const Foam::Tensor<double>&}’
  SBMFPtr().transformation(),
                          ^
In file included from tabulatedRigidBodyDisplacementPointPatchVectorField.C:33:0:
/opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:111:6: note: candidate: void Foam::transform(Foam::vectorField&, const Foam::quaternion&, const vectorField&)
 void transform(vectorField&, const quaternion&, const vectorField&);
      ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:111:6: note:   candidate expects 3 arguments, 2 provided
/opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:114:18: note: candidate: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::transform(const Foam::quaternion&, const vectorField&)
 tmp<vectorField> transform(const quaternion&, const vectorField&);
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:114:18: note:   no known conversion for argument 1 from ‘Foam::septernion’ to ‘const Foam::quaternion&’
/opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:117:18: note: candidate: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::transform(const Foam::quaternion&, const Foam::tmp<Foam::Field<Foam::Vector<double> > >&)
 tmp<vectorField> transform(const quaternion&, const tmp<vectorField>&);
                  ^
/opt/openfoam4/src/OpenFOAM/lnInclude/transformField.H:117:18: note:   no known conversion for argument 1 from ‘Foam::septernion’ to ‘const Foam::quaternion&’
/opt/openfoam4/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/tabulatedRigidBodyDisplacementPointPatchVectorField.o' failed
make: *** [Make/linux64GccDPInt32Opt/tabulatedRigidBodyDisplacementPointPatchVectorField.o] Error 1
Kindly guide me why I am getting this error? Feel free to ask anything else that you need.
Regards,
Naveed Salman
Naveed Salman is offline   Reply With Quote

Old   August 26, 2017, 23:24
Default
  #2
New Member
 
Daniel L
Join Date: Oct 2016
Posts: 5
Rep Power: 9
dyle is on a distinguished road
Any progress?
dyle is offline   Reply With Quote

Old   August 28, 2017, 14:00
Default
  #3
New Member
 
Naveed Salman
Join Date: Apr 2017
Location: Ankara, Turkey
Posts: 2
Rep Power: 0
Naveed Salman is on a distinguished road
Dear dyle,
Unfortunately, there was no progress with OpenFoam ver 4.0 and I didn't get any help regarding that as well (as you can see).
So I tried installing OpenFoam ver 3.0 and applied the same thing and got the thing working.
But installing OpenFoam ver 3.0 on Ubuntu 16.04 is not straightforward because of some flex compatibility issues. I had to follow Openfoamwiki website to install openfoam ver 3.0.

From this weblink https://openfoamwiki.net/index.php/I...u#Ubuntu_16.04
dyle likes this.
Naveed Salman is offline   Reply With Quote

Old   August 28, 2017, 20:53
Default
  #4
New Member
 
Daniel L
Join Date: Oct 2016
Posts: 5
Rep Power: 9
dyle is on a distinguished road
hi Naveed,
Thank you for fast reply. I will try it.
dyle 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
decomposePar is missing a library whk1992 OpenFOAM Pre-Processing 8 March 7, 2015 07:53
fireFoam.1.7.x_0.4 compilation error !link OpenFOAM Installation 9 December 24, 2012 04:15
OpenFOAM15 installables are incomplete problem with paraFoam tryingof OpenFOAM Bugs 17 December 7, 2008 04:41
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10


All times are GMT -4. The time now is 06:35.