83 const face&
f = pp[i];
114 const scalar span = boundaryTree.
bb().
mag();
127 label facei = boundaryTree.
shapes().faceLabels()[info.
index()];
131 if (isA<emptyPolyPatch>(bm[patchi]))
134 <<
" The sample point: " <<
sample
135 <<
" belongs to " << patchi
136 <<
" which is an empty patch. This is not permitted. "
137 <<
" This sample will not be included "
162 nearest[probei]= sampleInfo;
185 label proci = nearest[samplei].second().second();
186 label locali = nearest[samplei].
first().index();
189 <<
" found on processor:" << proci
190 <<
" in local face:" << locali
191 <<
" with location:" << nearest[samplei].
first().rawPoint()
217 processor_[sampleI] = nearest[sampleI].second().second();
243 const bool loadFromFiles,
258bool Foam::patchProbes::performAction(
unsigned request)
262 performAction(scalarFields_, request);
263 performAction(vectorFields_, request);
264 performAction(sphericalTensorFields_, request);
265 performAction(symmTensorFields_, request);
266 performAction(tensorFields_, request);
268 performAction(surfaceScalarFields_, request);
269 performAction(surfaceVectorFields_, request);
270 performAction(surfaceSphericalTensorFields_, request);
271 performAction(surfaceSymmTensorFields_, request);
272 performAction(surfaceTensorFields_, request);
282 return performAction(ACTION_ALL & ~ACTION_WRITE);
291 return performAction(ACTION_ALL);
299 patchNames_.resize(1);
Istream and Ostream manipulators taking arguments.
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Minimal example by using system/controlDict.functions:
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void resize(const label len)
Adjust allocated size of list.
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
label index() const noexcept
Return the hit index.
bool hit() const noexcept
Is there a hit?
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
const Field< point_type > & points() const noexcept
Return reference to global points.
static void listCombineAllGather(const List< commsStruct > &comms, List< T > &values, const CombineOp &cop, const int tag, const label comm)
After completion all processors have the same data.
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Return first.
const T2 & second() const noexcept
Return second.
T & first()
Return the first element of the list.
label size() const noexcept
The number of elements in the UList.
void size(const label n)
Older name for setAddressableSize.
T & operator[](const label i)
Return element of UList.
label size() const noexcept
The number of elements in the list.
const point & min() const
Minimum describing the bounding box.
const point & max() const
Maximum describing the bounding box.
static const boundBox invertedBox
A large inverted boundBox: min/max == +/- ROOTVGREAT.
void add(const boundBox &bb)
Extend to include the second box.
scalar mag() const
The magnitude of the bounding box span.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
A face is a list of labels corresponding to mesh vertices.
Abstract base-class for Time/database function objects.
static int debug
Flag to execute debug content.
Mesh data needed to do the Finite Volume discretisation.
Non-pointer based hierarchical recursive searching.
const treeBoundBox & bb() const
Top bounding box.
const Type & shapes() const
Reference to shape.
Set of locations to sample at patches.
virtual void findElements(const fvMesh &mesh)
Find elements containing patchProbes.
wordRes patchNames_
Patches to sample.
virtual bool execute()
Sample and store result if the sampleOnExecute is enabled.
virtual bool write()
Sample and write.
virtual bool read(const dictionary &)
Read.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
Set of locations to sample.
virtual const pointField & probeLocations() const noexcept
Return locations to probe.
labelList processor_
Processor holding the cell or face (-1 if point not found.
pointField oldPoints_
Original probes location (only used for patchProbes)
labelList elementList_
Cells to be probed (obtained from the locations)
labelList patchIDList_
Patch IDs on which the new probes are located (for patchProbes)
labelList faceList_
Faces to be probed.
int myProcNo() const noexcept
Return processor number.
Standard boundBox with extra functionality for use in octree.
treeBoundBox extend(Random &rndGen, const scalar s) const
Return slightly wider bounding box.
Encapsulation of data needed to search for faces.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const labelList nFaces(UPstream::listGatherValues< label >(aMesh.nFaces()))
#define WarningInFunction
Report a warning using Foam::Warning.
#define InfoInFunction
Report an information message using Foam::Info.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
PointIndexHit< point > pointIndexHit
A PointIndexHit for 3D points.
messageStream Info
Information stream (stdout output on master, null elsewhere)
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const wordHashSet &selectedFields, LIFOStack< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.