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

Possible bug with tensor2D

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 7, 2009, 19:49
Default Possible bug with tensor2D
  #1
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
The following source fails to compile:

Code:
#include "tensor2D.H"
#include "IOstreams.H"

using namespace Foam;

int main()
{
    tensor2D t1(1, 2, 3, 4);
    tensor2D t2(1, 2, 3, 1);

    tensor2D tt2 = (t1 & t2);

    Info << tt2 << endl;

    return(0);
}
It returns the following error:
Code:
tensor2DTest.C: In function ‘int main()’:
tensor2DTest.C:11: error: conversion from ‘Foam::Tensor<double>’ to non-scalar type ‘Foam::tensor2D’ requested
/home/smenon/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Tensor2DI.H: In function ‘typename Foam::innerProduct<Foam::Tensor2D<Cmpt>, Foam::Tensor2D<Cmpt> >::type Foam::operator&(const Foam::Tensor2D<Cmpt>&, const Foam::Tensor2D<Cmpt>&) [with Cmpt = double]’:
tensor2DTest.C:11:   instantiated from here
/home/smenon/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Tensor2DI.H:187: error: conversion from ‘Foam::Tensor2D<double>’ to non-scalar type ‘Foam::Tensor<double>’ requested
make: *** [Make/linux64GccDPOpt/tensor2DTest.o] Error 1
This seems odd, since the operator overload is clearly defined in Tensor2DI.H, and I'm not performing any conversions from tensor2D to tensor. Any ideas?
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   December 8, 2009, 02:17
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by deepsterblue View Post
The following source fails to compile:
...
/home/smenon/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Tensor2DI.H: In function typename Foam::innerProduct... :

This seems odd, since the operator overload is clearly defined in Tensor2DI.H, and I'm not performing any conversions from tensor2D to tensor. Any ideas?
Did you look at 1.6.x first?
If you do, you'll see that this has been fixed. And you'll also see why was previously failing.
Specifically, take a look at commit d8d420a364ddc2b368063f994ca589bccf17a2ed
olesen is offline   Reply With Quote

Old   December 10, 2009, 15:01
Default
  #3
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Mark,
Thanks for pointing me in the right direction...
Call me a git-noob, but is there some way that I can browse the repository (in a web-browser perhaps) to look at a specific revision / commit? I'm looking to avoid downloading the entire thing...
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   December 10, 2009, 15:08
Default
  #4
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Oops... Never mind.
For those interested... The link is:
http://repo.or.cz/w/OpenFOAM-1.6.x.git/shortlog
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue 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
Bug about MULES::implicitSolve for interPhaseChangeFoam in OF-1.6 chiven OpenFOAM Bugs 18 April 18, 2013 22:56
Serious bug in LES interface fs82 OpenFOAM Bugs 21 November 16, 2009 08:15
Bug reports Mattijs Janssens (Mattijs) OpenFOAM 0 January 10, 2005 10:05
Win XP hot fix bug!!! Emilio Siemens 1 March 27, 2003 12:06
Forum y2k Bug Jonas Larsson Main CFD Forum 1 January 5, 2000 10:22


All times are GMT -4. The time now is 23:39.