57#ifndef Foam_vf_raySearchEngine_H
58#define Foam_vf_raySearchEngine_H
277#include "raySearchEngineI.H"
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Generic GeometricField class.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool agglomerate_
Agglomeration flag.
void createGeometry()
Create patch geometry based on the original mesh.
static const label maxDynListLength
const mapDistribute & map() const
Parallel map.
label nParticipatingFaces() const
Number of participating faces.
TypeName("raySearchEngine")
Run-time type information.
globalIndex globalNumbering_
Global numbering.
const fvMesh & mesh_
Reference to the mesh.
const List< labelField > & allAgg() const noexcept
List of all face agglomeration index per processor.
label nFace_
Number of original faces.
virtual void shootRays(labelList &rayStartFaceOut, labelList &rayEndFaceOut) const =0
Shoot rays; returns lists of ray start and end faces.
static autoPtr< raySearchEngine > New(const fvMesh &mesh, const dictionary &dict)
Selector.
const globalIndex & globalNumbering() const noexcept
Global numbering.
static label closestPointIndex(const point &p0, const List< point > &pts)
List< pointField > allCf_
List of all face centres per processor.
void createParallelAddressing(labelList &rayEndFace) const
Create parallel addressing - map, compact-to-global.
coordSystem::cartesian createCoordSystem(const point &origin, const vector &dir) const
Create Cartesian co-ordinate system.
autoPtr< singleCellFvMesh > agglomMeshPtr_
Agglomerated mesh representation.
void interpolate(GeometricField< Type, fvPatchField, volMesh > &fld, const List< List< Type > > &values) const
Interpolate field.
const labelList & compactToGlobal() const noexcept
Compact to global addressing.
void createAgglomeration(const IOobject &io)
Create patch geometry based on the agglomerated mesh.
virtual void correct(labelListList &visibleFaceFaces) const
Correct.
virtual ~raySearchEngine()=default
Destructor.
List< vectorField > allSf_
List of all face areas per processor.
raySearchEngine(const fvMesh &mesh, const dictionary &dict)
Constructor.
autoPtr< mapDistribute > mapPtr_
Parallel map.
labelList compactToGlobal_
Compact to global addressing.
static void check(const labelList &nVisibleFaceFaces)
tmp< pointField > createHemiPoints(const label nRayPerFace) const
Create a set of points describing a hemisphere.
scalarList patchAreas_
Patch areas.
const fvMesh & mesh() const noexcept
Reference to the mesh.
const List< pointField > & allCf() const noexcept
List of all face centres per processor.
declareRunTimeSelectionTable(autoPtr, raySearchEngine, mesh,(const fvMesh &mesh, const dictionary &dict),(mesh, dict))
Selection table.
label nCoarseFace_
Number of coarse faces.
const List< vectorField > & allSf() const noexcept
List of all face areas per processor.
const labelList & patchIDs() const noexcept
List of participating patch IDs.
List< labelField > allAgg_
List of all face agglomeration index per processor.
const word patchGroup_
Name of patch group to identify participating patches.
raySearchEngine(const raySearchEngine &)=delete
No copy construct.
const scalarList & patchAreas() const noexcept
Patch areas.
void operator=(const raySearchEngine &)=delete
No copy assignment.
labelList patchIDs_
List of participating patch IDs.
void compactAddressing(const mapDistribute &map, pointField &compactCf, vectorField &compactSf, List< List< vector > > &compactFineSf, List< List< point > > &compactFineCf, DynamicList< List< point > > &compactPoints, DynamicList< label > &compactPatchId) const
Create compact addressing.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A Cartesian coordinate system.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Mesh data needed to do the Finite Volume discretisation.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
Class containing processor-to-processor mapping information.
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from Foam::string.
const volScalarField & p0
A namespace for various viewFactor model implementations.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Field< label > labelField
Specialisation of Field<T> for label.
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
List< scalar > scalarList
List of scalar.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.