32 const fvMesh& completeFvMesh,
36 const word& LagrangianName
39 completeMesh_(completeFvMesh, LagrangianName,
IOobject::NO_READ),
40 procMeshes_(procFvMeshes.size())
53 label completeSize = 0;
56 completeSize += procMeshes_[proci].size();
61 labelField completeCellIndices(completeSize, -1);
62 labelField completeFaceIndices(completeSize, -1);
63 labelField completeFaceTriIndices(completeSize, -1);
67 const label procSize = procMeshes_[proci].size();
69 const labelField& procCelli = procMeshes_[proci].celli();
70 const labelField& procFacei = procMeshes_[proci].facei();
73 procMeshes_[proci].coordinates();
79 procMeshes_[proci].faceTrii();
81 i0 += procMeshes_[proci].size();
87 forAll(completeCoordinates, i)
89 if (completeFaceIndices[i] < 0)
91 const label completeFacei = - completeFaceIndices[i] - 1;
92 const label completeFaceSize = completeFaces[completeFacei].
size();
94 completeFaceTriIndices[i] =
95 completeFaceSize - 1 - completeFaceTriIndices[i];
100 completeFaceIndices =
mag(completeFaceIndices) - 1;
108 completeFaceTriIndices
121 bool Foam::LagrangianFieldReconstructor::reconstructs
129 #define RECONSTRUCTS_LAGRANGIAN_FIELDS_TYPE(Type, nullArg) \
132 || reconstructs<LagrangianField<Type>> \
137 || reconstructs<LagrangianDynamicField<Type>> \
142 || reconstructs<LagrangianInternalField<Type>> \
147 || reconstructs<LagrangianInternalDynamicField<Type>> \
154 #undef RECONSTRUCTS_LAGRANGIAN_FIELDS_TYPE
162 completeMesh_.write();
#define RECONSTRUCTS_LAGRANGIAN_FIELDS_TYPE(Type, nullArg)
#define forAll(list, i)
Loop across all elements in list.
Pre-declare SubField and related Field type.
A HashTable with keys but without contents.
List of IOobjects with searching and retrieving facilities.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
LagrangianFieldReconstructor(const fvMesh &completeFvMesh, const PtrList< fvMesh > &procFvMeshes, const labelListList &faceProcAddressing, const labelListList &cellProcAddressing, const word &LagrangianName)
Construct from components.
void reconstructPositions() const
Write the reconstructed positions.
~LagrangianFieldReconstructor()
Destructor.
Class containing Lagrangian geometry and topology.
LagrangianSubMesh inject(const barycentricField &coordinates, const labelField &celli, const labelField &facei, const labelField &faceTrii, const FieldNamesAndFields &... fieldNamesAndFields)
Inject specified elements into the mesh. This method does not.
const polyMesh & mesh() const
Access the mesh.
void size(const label)
Override size to be inconsistent with allocated storage.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A List obtained as a section of another List.
A List with indirect addressing.
Mesh data needed to do the Finite Volume discretisation.
virtual const faceList & faces() const
Return raw faces.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)