|
[Sponsors] |
November 21, 2008, 08:14 |
max function accepts calls lik
|
#1 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
max function accepts calls like:
volScalarField vsf = ...; max(vsf, VSMALL); But does not accept similar calls like: scalarField sf = ...; max(sf, VSMALL); Usually the latter is need when creating boundary condition of wallFunction type. This refers to V1.3; Thanks. Best regards, Maka |
|
November 21, 2008, 10:40 |
Are you referring to the max m
|
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
Are you referring to the max member function used for example in the form:
vsf.max(vsf, VSMALL) H |
|
November 21, 2008, 11:03 |
No, I'm revering to the one us
|
#3 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
No, I'm revering to the one used as a sand-alone function like in:
scalarField x = max(sf,VSMALL); Thanks. |
|
November 21, 2008, 12:03 |
OK, I will add the equivalents
|
#4 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
OK, I will add the equivalents for Field.
H |
|
November 21, 2008, 12:12 |
These functions already exist
|
#5 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
These functions already exist in OpenFOAM-1.5 and OpenFOAM-1.5.x
H |
|
November 21, 2008, 12:53 |
Thanks Henry.
|
#6 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
Thanks Henry.
|
|
February 19, 2009, 09:23 |
Hi,
max and min function in
|
#7 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
Hi,
max and min function in the following code behaves correctly (they consider cell and patch values) but gMax, gMin does not (they only consider cell value but NOT the patch values) // calculate unit vector in wall normal direction for the boundary patches. volVectorField wallNormal(reflectionVectors(mesh_).n()); Info << "gMax,gMin(wallNormal)" << gMax(wallNormal) << " " << gMin(wallNormal) << endl; Info << "max,min(wallNormal)" << max(wallNormal) << " " << min(wallNormal) << endl; This is V1.3 Best regards, Maka. |
|
February 19, 2009, 10:05 |
gMax and gMin are defined for
|
#8 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
gMax and gMin are defined for Field not GeometricField and calling them for a GeometricField simply calls the functions defined for the internal field as you have found. The GeometricField max and min call gMax and gMin of the internal Field and boundary FieldField. So the behavior you see is the design behavior.
H |
|
February 19, 2009, 10:19 |
Thanks Henry. This means that
|
#9 |
Senior Member
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18 |
Thanks Henry. This means that the user only need to call min and max and they will work in parallel, right?
Best regards, Maka. |
|
February 19, 2009, 10:43 |
For GeometricField max and min
|
#10 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
For GeometricField max and min work in parallel, i.e. they do reductions over the processors. For Field max and min do not do reductions as this would not be the correct default behavior for all usages of Field and gMax and gMin should be used if the parallel-reduced value is required.
H |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to sum up scalarField | wese | OpenFOAM Running, Solving & CFD | 2 | August 19, 2019 18:30 |
How to set up an AUTO_WRITE scalarField | xiao | OpenFOAM Running, Solving & CFD | 9 | July 22, 2010 04:23 |
ScalarField division | maka | OpenFOAM Pre-Processing | 2 | August 27, 2007 06:10 |
[CGNS] Computing a cellcentered scalarField from a vertexcentered scalarField | mbeaudoin | OpenFOAM Meshing & Mesh Conversion | 10 | February 22, 2007 08:43 |
Replacing components in a scalarField | grtabor | OpenFOAM Running, Solving & CFD | 1 | February 5, 2007 13:24 |