max function accepts calls lik
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 |
Are you referring to the max m
Are you referring to the max member function used for example in the form:
vsf.max(vsf, VSMALL) H |
No, I'm revering to the one us
No, I'm revering to the one used as a sand-alone function like in:
scalarField x = max(sf,VSMALL); Thanks. |
OK, I will add the equivalents
OK, I will add the equivalents for Field.
H |
These functions already exist
These functions already exist in OpenFOAM-1.5 and OpenFOAM-1.5.x
H |
Thanks Henry.
Thanks Henry.
|
Hi,
max and min function in
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. |
gMax and gMin are defined for
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 |
Thanks Henry. This means that
Thanks Henry. This means that the user only need to call min and max and they will work in parallel, right?
Best regards, Maka. |
For GeometricField max and min
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 |
All times are GMT -4. The time now is 23:37. |