50 void Foam::patchProbes::findElements(
const fvMesh&
mesh)
61 <<
" Unknown patch name "
69 const polyPatch& pp = bm[
patchi];
76 bndFaces[i] = pp.start() + i;
79 treeBoundBox overallBb(pp.points());
80 overallBb = overallBb.extend(1
e-4);
82 const indexedOctree<treeDataFace> boundaryTree
100 scalar span = boundaryTree.bb().mag();
110 info = boundaryTree.findNearest
117 label facei = boundaryTree.shapes().faceLabels()[info.index()];
121 if (isA<emptyPolyPatch>(bm[
patchi]))
124 <<
" The sample point: " << sample
125 <<
" belongs to " <<
patchi
126 <<
" which is an empty patch. This is not permitted. "
127 <<
" This sample will not be included "
135 nearest[probei].elementi = facei;
136 nearest[probei].data =
magSqr(fc-sample);
145 RemoteData<scalar>::smallestEqOp()
155 <<
" found on processor:" << nearest[sampleI].proci
156 <<
" in local cell/face:" << nearest[sampleI].elementi
171 faceList_[sampleI] = nearest[sampleI].elementi;
219 if (locations_.size() && prepare())
221 sampleAndWrite(scalarFields_);
222 sampleAndWrite(vectorFields_);
223 sampleAndWrite(sphericalTensorFields_);
224 sampleAndWrite(symmTensorFields_);
225 sampleAndWrite(tensorFields_);
227 sampleAndWriteSurfaceFields(surfaceScalarFields_);
228 sampleAndWriteSurfaceFields(surfaceVectorFields_);
229 sampleAndWriteSurfaceFields(surfaceSphericalTensorFields_);
230 sampleAndWriteSurfaceFields(surfaceSymmTensorFields_);
231 sampleAndWriteSurfaceFields(surfaceTensorFields_);
Istream and Ostream manipulators taking arguments.
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
static void listCombineGather(const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm)
static void listCombineScatter(const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm)
Scatter data. Reverse of combineGather.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Abstract base-class for Time/database functionObjects.
const polyMesh & poly() const
Return reference to polyMesh.
Set of locations to sample.at patches.
patchProbes(const word &name, const Time &time, const dictionary &dict)
Construct from Time and dictionary.
virtual bool write()
Sample and write.
virtual ~patchProbes()
Destructor.
virtual bool read(const dictionary &)
Read.
Motion of the mesh specified as a list of pointMeshMovers.
const polyBoundaryMesh & boundary() const
Return boundary mesh.
virtual const labelList & faceOwner() const
Return face owner.
const labelIOList & tetBasePtIs() const
Return the tetBasePtIs.
const vectorField & faceCentres() const
Set of locations to sample.
pointField locations_
Probe locations.
bool read(const dictionary &, const bool initialise)
Read the probes.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
#define InfoInFunction
Report an information message using Foam::Info.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
PointIndexHit< point > pointIndexHit
Ostream & endl(Ostream &os)
Add newline and flush stream.
vector point
Point is a vector.
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)