Go to the documentation of this file.
62 Istream&
operator>>(Istream& is, PDRobstacle& obs);
63 Ostream&
operator<<(Ostream& os,
const InfoProxy<PDRobstacle>& info);
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,
267 volumeType
trim(
const boundBox& bb);
275 vtk::surfaceWriter& surfWriter,
276 const UList<PDRobstacle>& list,
283 const fileName& outputDir,
284 const UList<PDRobstacle>& obslist,
285 const UList<PDRobstacle>& cyllist
306 bool operator<(
const PDRobstacle& a,
const PDRobstacle&
b);
388 return size() * nObstacle_;
394 return size() * nCylinder_;
400 return size() * (nObstacle_ + nCylinder_);
407 void append(
const scalar
x,
const scalar
y,
const scalar z)
static constexpr int maxBlowoffPressure
The max blowoff pressure [bar].
const Cmpt & x() const
Access to the vector x component.
A class for handling words, derived from Foam::string.
A helper class for outputting values to Ostream.
labelPair readObstacleFiles(const fileName &obsFileDir, const wordList &obsFileNames, Map< obstacleGrouping > &groups)
Read obstacle files, do counting only.
A class for handling file names.
constexpr const char *const group
Group name for atomic constants.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
label nCylinder() const
The number of cylinder-like obstacles.
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.
A HashTable to objects of type <T> with a label key.
Istream & operator>>(Istream &, directionInfo &)
void addObstacle()
Increment the number of obstacles.
Locations for each instance of an obstacle group.
List< treeBoundBox > meshBb(1, treeBoundBox(boundBox(coarseMesh.points(), false)).extend(rndGen, 1e-3))
PDRobstacle()
Construct zero-initialized.
volumeType trim(const boundBox &bb)
Trim obstacle to ensure it is within the specified bounding box.
bool isCylinder() const
Is obstacle cylinder-like?
const Cmpt & z() const
Access to the vector z component.
direction orient
The x/y/z orientation (0,1,2)
declareMemberFunctionSelectionTable(void, PDRobstacle, read, dictRead,(PDRobstacle &obs, const dictionary &dict),(obs, dict))
bool tooSmall(const scalar minWidth) const
True if the obstacle is considered to be too small.
bool operator!=(const eddy &a, const eddy &b)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
obstacleGrouping()
Construct null.
int typeId
The obstacle type-id.
void addCylinder()
Increment the number of cylinder-like obstacles.
An enumeration wrapper for classification of a location as being inside/outside of a volume.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
vector span
The obstacle dimensions (for boxes)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
label nTotalObstacle() const
The number of locations x number of obstacles.
point pt
The obstacle location.
label nTotal() const
The number of locations x number of obstacles.
void clear()
Clear the addressed list, i.e. set the size to zero.
meshedSurface surface() const
Surface (points, faces) representation.
scalar x() const
Obstacle position accessors.
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.
legacyTypes
Obstacle types (legacy numbering)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
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.
void clear()
Reset to a zero obstacle.
void clear()
Clear obstacle count and locations.
obstacleGrouping(const vector &origin)
Construct with one location (instance)
InfoProxy< PDRobstacle > info() const
Return info proxy.
friend Istream & operator>>(Istream &is, PDRobstacle &obs)
const Cmpt & y() const
Access to the vector y component.
label nObstacle() const
The number of obstacles.
bool read(Istream &is)
Read name / dictionary.
MeshedSurface< face > meshedSurface
Write faces/points (optionally with fields) as a vtp file or a legacy vtk file.
void append(const scalar x, const scalar y, const scalar z)
Add a location.
scalar sortBias
Bias for position sorting.
Obstacle definitions for PDR.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static const word null
An empty word.
label nTotalCylinder() const
The number of locations x number of cylinder-like obstacles.
A bounding box defined in terms of min/max extrema points.
Macros to enable the easy declaration of member function selection tables.
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A older than B.
static void generateVtk(const fileName &outputDir, const UList< PDRobstacle > &obslist, const UList< PDRobstacle > &cyllist)
Generate multi-piece VTK (vtp) file of obstacles.
void scale(const scalar factor)
Scale obstacle dimensions by specified scaling factor.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
vector point
Point is a vector.
Begin list [isseparator].
void readProperties(const dictionary &dict)
Read the 'name' identifier if present.
static label addPieces(vtk::surfaceWriter &surfWriter, const UList< PDRobstacle > &list, label pieceId=0)
Add pieces to vtp output.
scalar volume() const
Volume of the obstacle.
label groupId
The group-id.