38 s()[0] = mesh.nCells();
39 s()[1] = mesh.nPoints();
55 volumeCell_(mesh.V()),
56 volumeDual_(mesh.nPoints(), 0.0),
60 forAll(this->mesh_.C(), celli)
63 polyMeshTetDecomposition::cellTetIndices(this->mesh_, celli);
68 const scalar v = tetIs.
tet(this->mesh_).
mag();
69 volumeDual_[triIs[0]] += v;
70 volumeDual_[triIs[1]] += v;
71 volumeDual_[triIs[2]] += v;
75 mesh.globalData().syncPointData
91 volumeCell_(am.volumeCell_),
92 volumeDual_(am.volumeDual_),
110 this->mesh_.globalData().syncPointData
131 dataCell_[tetIs.
cell()] +=
133 / (0.25*volumeCell_[tetIs.
cell()]);
135 for(
label i = 0; i < 3; i ++)
137 dataDual_[triIs[i]] +=
138 coordinates[i+1]*value
139 / (0.25*volumeDual_[triIs[i]]);
154 coordinates[0]*dataCell_[tetIs.
cell()]
155 + coordinates[1]*dataDual_[triIs[0]]
156 + coordinates[2]*dataDual_[triIs[1]]
157 + coordinates[3]*dataDual_[triIs[2]];
179 this->mesh_.points()[triIs[0]] - this->mesh_.C()[celli],
180 this->mesh_.points()[triIs[1]] - this->mesh_.C()[celli],
181 this->mesh_.points()[triIs[2]] - this->mesh_.C()[celli]
186 const vector t( -
T.T().x() -
T.T().y() -
T.T().z());
195 const Type
s(dataCell_[celli]);
197 return (
T & S) + (t*
s);
tmp< Field< Type > > primitiveField() const
Return an internal field of the average.
#define forAll(list, i)
Loop across all elements in list.
Type interpolate(const barycentric &coordinates, const tetIndices &tetIs) const
Interpolate.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
outerProduct< vector, Type >::type TypeGrad
Protected typedefs.
Dual(const IOobject &io, const dictionary &dict, const fvMesh &mesh)
Constructors.
triFace faceTriIs(const polyMesh &mesh) const
Return the indices corresponding to the tri on the face for.
tetPointRef tet(const polyMesh &mesh) const
Return the geometry corresponding to this tet.
TypeGrad interpolateGrad(const barycentric &coordinates, const tetIndices &tetIs) const
Interpolate gradient.
virtual ~Dual()
Destructor.
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))
A triangular face using a FixedList of labels corresponding to mesh vertices.
label cell() const
Return the cell.
scalar mag() const
Return volume.
Base class for lagrangian averaging methods.
List< label > labelList
A List of labels.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
Dual-mesh lagrangian averaging procedure.
AveragingMethod< Type >::TypeGrad TypeGrad
Gradient type.
label size() const
Return the number of elements in the UPtrList.
Mesh data needed to do the Finite Volume discretisation.
tmp< GeometricField< Type, fvPatchField, volMesh > > average(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Area-weighted average a surfaceField creating a volField.
void average()
Calculate the average.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void add(const barycentric &coordinates, const tetIndices &tetIs, const Type &value)
Member Functions.