mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: array: check input. See #2445.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2018 OpenCFD Ltd.
|
||||
Copyright (C) 2018,2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -56,6 +56,15 @@ void Foam::arraySet::calcSamples
|
||||
{
|
||||
const meshSearch& queryMesh = searchEngine();
|
||||
|
||||
if (cmptMin(pointsDensity_) < 1)
|
||||
{
|
||||
FatalErrorInFunction << "Illegal specification for pointsDensity "
|
||||
<< pointsDensity_
|
||||
<< ". It specifies the number of points per coordinate axis"
|
||||
<< " so should contain positive integers only."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
const scalar dx = spanBox_.x()/(pointsDensity_.x() + 1);
|
||||
const scalar dy = spanBox_.y()/(pointsDensity_.y() + 1);
|
||||
const scalar dz = spanBox_.z()/(pointsDensity_.z() + 1);
|
||||
|
||||
@ -39,7 +39,18 @@ Description
|
||||
spanBox | The sample box dimensions (vector) | yes |
|
||||
\endtable
|
||||
|
||||
The dictionary can also contain an embedded coordinateSystem specification.
|
||||
The dictionary should also contain an embedded (Cartesian) coordinateSystem
|
||||
specification, for example,
|
||||
|
||||
\verbatim
|
||||
origin (-0.05 -0.05 -0.05);
|
||||
rotation
|
||||
{
|
||||
type axes;
|
||||
e1 (1 0 0);
|
||||
e2 (0 1 0);
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
arraySet.C
|
||||
|
||||
Reference in New Issue
Block a user