226 inline scalar
x()
const {
return pt.x(); }
227 inline scalar
y()
const {
return pt.y(); }
228 inline scalar
z()
const {
return pt.z(); }
229 inline scalar&
x() {
return pt.x(); }
230 inline scalar&
y() {
return pt.y(); }
231 inline scalar&
z() {
return pt.z(); }
235 inline static bool isCylinder(
const label
id);
245 void scale(
const scalar factor);
251 bool tooSmall(
const scalar minWidth)
const;
260 const int groupTypeId,
261 const string& buffer,
262 const label lineNo = -1,
390 return size() * nObstacle_;
396 return size() * nCylinder_;
402 return size() * (nObstacle_ + nCylinder_);
409 void append(
const scalar
x,
const scalar
y,
const scalar z)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A HashTable to objects of type <T> with a label key.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Locations for each instance of an obstacle group.
void addCylinder()
Increment the number of cylinder-like obstacles.
label nObstacle() const
The number of obstacles.
void addObstacle()
Increment the number of obstacles.
label nTotalObstacle() const
The number of locations x number of obstacles.
label nCylinder() const
The number of cylinder-like obstacles.
void append(const scalar x, const scalar y, const scalar z)
Add a location.
obstacleGrouping()
Construct null.
obstacleGrouping(const vector &origin)
Construct with one location (instance)
label nTotal() const
The number of locations x number of obstacles.
void clear()
Clear obstacle count and locations.
label nTotalCylinder() const
The number of locations x number of cylinder-like obstacles.
Obstacle definitions for PDR.
scalar volume() const
Volume of the obstacle.
static label addPieces(vtk::surfaceWriter &surfWriter, const UList< PDRobstacle > &list, label pieceId=0)
Add pieces to vtp output.
scalar sortBias
Bias for position sorting.
bool isCylinder() const
Is obstacle cylinder-like?
point pt
The obstacle location.
PDRobstacle(Istream &is)
Read construct as named dictionary.
direction orient
The x/y/z orientation (0,1,2)
scalar x() const
Obstacle position accessors.
bool setFromLegacy(const int groupTypeId, const string &buffer, const label lineNo=-1, const word &inputFile=word::null)
Set values from single-line, multi-column format.
volumeType trim(const boundBox &bb)
declareMemberFunctionSelectionTable(void, PDRobstacle, read, dictionary,(PDRobstacle &obs, const dictionary &dict),(obs, dict))
static void generateVtk(const fileName &outputDir, const UList< PDRobstacle > &obslist, const UList< PDRobstacle > &cyllist)
Generate multi-piece VTK (vtp) file of obstacles.
static scalar readFiles(const fileName &obsFileDir, const wordList &obsFileNames, const boundBox &meshBb, DynamicList< PDRobstacle > &blocks, DynamicList< PDRobstacle > &cylinders)
Read obstacle files and set the lists.
bool tooSmall(const scalar minWidth) const
True if the obstacle is considered to be too small.
meshedSurface surface() const
Surface (points, faces) representation.
label groupId
The group-id.
void readProperties(const dictionary &dict)
Read the 'name' identifier if present.
friend Istream & operator>>(Istream &is, PDRobstacle &obs)
void clear()
Reset to a zero obstacle.
static scalar legacyReadFiles(const fileName &obsFileDir, const wordList &obsFileNames, const boundBox &meshBb, DynamicList< PDRobstacle > &blocks, DynamicList< PDRobstacle > &cylinders)
Read obstacle files and add to the lists.
static constexpr int maxBlowoffPressure
The max blowoff pressure [bar].
vector span
The obstacle dimensions (for boxes)
bool read(Istream &is)
Read name / dictionary.
InfoProxy< PDRobstacle > info() const
Return info proxy.
legacyTypes
Obstacle types (legacy numbering)
@ OLD_BLOWOFF
ignored (old)
int typeId
The obstacle type-id.
void scale(const scalar factor)
Scale obstacle dimensions by specified scaling factor.
PDRobstacle()
Construct zero-initialized.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const noexcept
The number of elements in the UList.
A bounding box defined in terms of min/max extrema points.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
Base class for surface writers.
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
An enumeration wrapper for classification of a location as being inside/outside of a volume.
Write faces/points (optionally with fields) as a vtp file or a legacy vtk file.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Macros to ease declaration of member function selection tables.
#define declareMemberFunctionSelectionTable(returnType, baseType, funcName, argNames, argList, parListUnused)
Declare a run-time member-function selection (variables and adder classes)
labelPair readObstacleFiles(const fileName &obsFileDir, const wordList &obsFileNames, Map< obstacleGrouping > &groups)
Read obstacle files, do counting only.
bool operator!=(const eddy &a, const eddy &b)
vector point
Point is a vector.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Istream & operator>>(Istream &, directionInfo &)
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A older than B.
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))