49inline void resizeField
67 pdrBlock_(std::cref<PDRblock>(PDRblock::null()))
83 pdrBlock_ = std::cref<PDRblock>(pdrBlock);
97 const label maxDim =
cmptMax(pdrBlock.sizes()) + 2;
100 resizeField(
surf, cellDims);
116 resizeField(
drag_s, cellDims);
117 resizeField(
drag_r, cellDims);
134 resizeMatrix(
c_drag, maxDim);
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))
Generic templated field type with i-j-k addressing.
IjkField< vector > drag_r
Directional drag from round obstacles.
IjkField< vector > betai_inv1
IjkField< vector > along_block
Longitudinal area blockage from obstacles that extend all the way through the cell in a given directi...
IjkField< scalar > v_block
Volume blockage.
SquareMatrix< scalar > ac_lblock
IjkField< vector > area_block_r
Summed area blockage (directional) from round obstacles.
Vector< List< scalar > > overlap_1d
SquareMatrix< scalar > b_lblock
IjkField< vector > sub_count
Number of obstacles parallel to specified direction.
IjkField< Vector< bool > > hole_in_face
Face field for (directional) hole in face.
SquareMatrix< symmTensor2D > c_drag
Cell-centred drag.
IjkField< vector > area_block_s
Summed area blockage (directional) from sharp obstacles.
SquareMatrix< scalar > abperim
SquareMatrix< scalar > bc_lblock
IjkField< scalar > obs_size
Obstacle size in cell.
SquareMatrix< scalar > aboverlap
IjkField< Vector< bool > > dirn_block
A total directional blockage in the cell.
IjkField< scalar > obs_count
Number of obstacles in cell.
IjkField< vector > grating_count
Addition to count to account for grating comprises many bars (to get Lobs right).
IjkField< symmTensor > drag_s
Tensorial drag from sharp obstacles.
PDRarrays()
Construct null.
IjkField< vector > face_block
Face area blockage for face, summed from cell centre-plane to cell centre-plane.
void reset(const PDRblock &pdrBlock)
Reset PDRblock reference, resize and zero arrays.
IjkField< labelVector > face_patch
Face field for (directional) for patch Id.
SquareMatrix< scalar > a_lblock
IjkField< scalar > surf
Surface area in cell.
SquareMatrix< scalar > c_count
A templated (N x N) square matrix of objects of <Type>, containing N*N elements, derived from Matrix.
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
limits reset(1/(limits.max()+VSMALL), 1/(limits.min()+VSMALL))
Vector< label > labelVector
Vector of labels.
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0).
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)