|
[Sponsors] |
August 31, 2010, 10:05 |
use of scale(a, b) function?? error: ‘scale’ was not declared in this scope
|
#1 | |
New Member
Ozgur Kirlangic
Join Date: May 2009
Location: Istanbul
Posts: 16
Rep Power: 17 |
Hi,
In the Programmer’s Guide there is a description of a function named as scale: Quote:
Code:
error: ‘scale’ was not declared in this scope Code:
#include "fvCFD.H" ... vector a(1,2,3), b(4,5,6), c; c=scale(a,b) What can I do about this? Thanks, Ozgur Last edited by ozgur; August 31, 2010 at 11:23. Reason: title was not descriptive |
||
August 31, 2010, 12:25 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Unfortunately the Programmers Guide is not up to date, as the function is now called "cmptMultiply".
Best regards, Niels |
|
September 1, 2010, 06:53 |
|
#3 |
New Member
Ozgur Kirlangic
Join Date: May 2009
Location: Istanbul
Posts: 16
Rep Power: 17 |
Hi Niels,
Thanks again Ozgur |
|
December 31, 2012, 10:19 |
|
#5 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Nick,
You can just multiply two scalarFields with the operator "*", which result in a scalarField, so the cmptMultiply is not needed. Happy New Year Niels |
|
January 1, 2013, 03:11 |
|
#6 |
Member
Nick
Join Date: Nov 2011
Location: Tongji University,Shanghai,China
Posts: 33
Blog Entries: 6
Rep Power: 15 |
Hi Niels,
Thank you! It's cool and convenient to use "*" for scalarField multiply. Sometimes it is just hard to access OpenFOAM for there are so few documents about how to operate field. And it's slow and inefficient to dig in the source code itself. If there are some instructions of handing fields, that would be better for OpenFAOM user programming! Happy new year! Nick |
|
May 26, 2014, 20:34 |
Thank you Niels
|
#7 |
New Member
yves candau
Join Date: May 2014
Posts: 4
Rep Power: 12 |
||
August 27, 2015, 18:02 |
|
#8 | |||
New Member
Paul W. Fontana
Join Date: Jul 2013
Posts: 5
Rep Power: 13 |
How do you multiply a vector field by a scalar constant? If alpha is a const and U is a vector field (e.g. velocity), is it just cmptMultiply(U,alpha) or cmptMultiply(alpha,U)? (I tried just using a * U, but I got a compile-time error. The file createFields.H defines alpha as follows:
Quote:
Quote:
The compile-time error I get is Quote:
|
||||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |