CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

Algebraic tensor operations

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 17, 2007, 10:20
Default Cross Product: I tried to c
  #1
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 10
maka is on a distinguished road
Cross Product:

I tried to calculate a cross product by a code like

A ^ U

A is dimensionedVector
U is volVectorField

I got the error:

error: no match for 'operator^' in 'Foam::operator==(const Foam::tmp<foam::fvmatrix<type> >&, const Foam::dimensioned<type>&) [with Type = Foam::Vector<double>](((const Foam::dimensioned<foam::vector<double> >&)((const Foam::dimensioned<foam::vector<double> >*)(& Foam::operator-(const Foam::dimensioned<type>&, const Foam::dimensioned<type>&) [with Type = Foam::Vector<double>](((const Foam::dimensioned<foam::vector<double> >&)((const Foam::dimensioned<foam::vector<double> >*)(& Foam::operator*(const Foam::dimensioned<double>&, const Foam::dimensioned<type>&) [with Type = Foam::Vector<double>](((const Foam::dimensioned<foam::vector<double> >&)((const Foam::dimensioned<foam::vector<double> >*)(& omegaF)))))))))))) ^ U'
/data/maka/OpenFOAM/linuxAMD64/gcc-4.1.0/bin/../lib/gcc/x86_64-unknown-linux-gnu /4.1.0/../../../../include/c++/4.1.0/bits/ios_base.h:165: note: candidates are: std::_Ios_Iostate std::operator^(std::_Ios_Iostate, std::_Ios_Iostate)
/data/maka/OpenFOAM/linuxAMD64/gcc-4.1.0/bin/../lib/gcc/x86_64-unknown-linux-gnu /4.1.0/../../../../include/c++/4.1.0/bits/ios_base.h:127: note: std::_Ios_Openmode std::operator^(std::_Ios_Openmode, std::_Ios_Openmode)
/data/maka/OpenFOAM/linuxAMD64/gcc-4.1.0/bin/../lib/gcc/x86_64-unknown-linux-gnu /4.1.0/../../../../include/c++/4.1.0/bits/ios_base.h:87: note: std::_Ios_Fmtflags std::operator^(std::_Ios_Fmtflags, std::_Ios_Fmtflags)

Any idea how to define such operation:

I wanted the cross product to be applied to the vector A with each vector of the volVectorField. Thanks.

Best regards,
Maka.
maka is offline   Reply With Quote

Old   July 17, 2007, 14:04
Default this is to be done as a part o
  #2
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 10
maka is on a distinguished road
this is to be done as a part of equation definition like Ueqn for example in icoFoam.
maka is offline   Reply With Quote

Old   July 17, 2007, 14:40
Default it was operator precedence pro
  #3
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 10
maka is on a distinguished road
it was operator precedence problem, that is discussed in here.

the solution is to use the (A ^ U) instead of A ^ U
maka is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nonbasic mathematical operations ngj OpenFOAM 0 September 26, 2008 17:16
FvPatch operations maka OpenFOAM Post-Processing 4 July 10, 2008 07:36
Cleaning up operations Vidya Raja FLUENT 3 May 22, 2006 14:17
body operations fintan CFX 3 December 1, 2005 00:05
GET_GVAR operations? Cujo CFX 3 July 23, 2003 11:27


All times are GMT -4. The time now is 14:47.