Go to the documentation of this file.
38 s()[0] =
mesh.nCells();
39 s()[1] =
mesh.nPoints();
55 volumeCell_(
mesh.V()),
56 volumeDual_(
mesh.nPoints(), 0.0),
62 forAll(this->mesh_.C(), cellI)
65 polyMeshTetDecomposition::cellTetIndices(this->mesh_, cellI);
69 const face&
f = this->mesh_.faces()[tetIs.
face()];
70 const scalar v = tetIs.
tet(this->mesh_).
mag();
72 volumeDual_[
f[tetIs.
facePtA()]] += v;
73 volumeDual_[
f[tetIs.
facePtB()]] += v;
77 mesh.globalData().syncPointData
114 const point position,
118 const face&
f = this->mesh_.faces()[tetIs.
face()];
121 tetVertices_[1] =
f[tetIs.
facePtA()];
122 tetVertices_[2] =
f[tetIs.
facePtB()];
126 tetCoordinates_ =
max(tetCoordinates_, scalar(0));
133 this->mesh_.globalData().syncPointData
147 const point position,
152 tetGeometry(position, tetIs);
154 dataCell_[tetIs.
cell()] +=
155 tetCoordinates_[0]*value
156 / (0.25*volumeCell_[tetIs.
cell()]);
158 for(
label i = 0; i < 3; i ++)
160 dataDual_[tetVertices_[i]] +=
161 tetCoordinates_[i+1]*value
162 / (0.25*volumeDual_[tetVertices_[i]]);
170 const point position,
174 tetGeometry(position, tetIs);
177 tetCoordinates_[0]*dataCell_[tetIs.
cell()]
178 + tetCoordinates_[1]*dataDual_[tetVertices_[0]]
179 + tetCoordinates_[2]*dataDual_[tetVertices_[1]]
180 + tetCoordinates_[3]*dataDual_[tetVertices_[2]];
188 const point position,
192 tetGeometry(position, tetIs);
202 this->mesh_.points()[tetVertices_[0]] - this->mesh_.C()[cellI],
203 this->mesh_.points()[tetVertices_[1]] - this->mesh_.C()[cellI],
204 this->mesh_.points()[tetVertices_[2]] - this->mesh_.C()[cellI]
209 const vector t( -
T.T().x() -
T.T().y() -
T.T().z());
213 dataDual_[tetVertices_[0]],
214 dataDual_[tetVertices_[1]],
215 dataDual_[tetVertices_[2]]
218 const Type
s(dataCell_[cellI]);
220 return (
T & S) + (t*
s);
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
tetPointRef tet(const polyMesh &mesh) const
Return the geometry corresponding to this tet from the.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
tmp< Field< Type > > internalField() const
Return an internal field of the average.
TypeGrad interpolateGrad(const point position, const tetIndices &tetIs) const
Interpolate gradient.
AveragingMethod< Type >::TypeGrad TypeGrad
Public typedefs.
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
virtual ~Dual()
Destructor.
void syncDualData()
Sync point data over processor boundaries.
label facePtB() const
Return face point B.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
static autoPtr< labelList > size(const fvMesh &mesh)
Private static member functions.
label face() const
Return the face.
label faceBasePt() const
Return the face base point.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const Field< scalar > & volumeCell_
Private data.
Dual(const IOobject &io, const dictionary &dict, const fvMesh &mesh)
Constructors.
List< label > tetVertices_
Tet vertex labels.
List< scalar > tetCoordinates_
Tet barycentric coordinates.
Mesh data needed to do the Finite Volume discretisation.
void tetGeometry(const point position, const tetIndices &tetIs) const
Private member functions.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
label cell() const
Return the cell.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Storage and named access for the indices of a tet which is part of the decomposition of a cell.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Type interpolate(const point position, const tetIndices &tetIs) const
Interpolate.
label facePtA() const
Return face point A.
Dual-mesh lagrangian averaging procedure.
Field< scalar > volumeDual_
Volume of the point-centered regions.
void add(const point position, const tetIndices &tetIs, const Type &value)
Member Functions.
A face is a list of labels corresponding to mesh vertices.
void average()
Calculate the average.
scalar barycentric(const point &pt, List< scalar > &bary) const
Calculate the barycentric coordinates of the given.
scalar mag() const
Return volume.