31 Foam::labelList Foam::pointFieldDecomposer::patchFieldDecomposer::addressing
33 const pointPatch& completePatch,
34 const pointPatch& procPatch,
38 const labelList& completePatchPoints = completePatch.meshPoints();
39 const labelList& procPatchPoints = procPatch.meshPoints();
42 labelList map(completePatch.boundaryMesh().mesh().size(), -1);
43 forAll(completePatchPoints, pointi)
45 map[completePatchPoints[pointi]] = pointi;
51 forAll(procPatchPoints, pointi)
53 result[pointi] =
map[pointProcAddressing[procPatchPoints[pointi]]];
57 if (result.size() &&
min(result) < 0)
60 <<
"Incomplete patch point addressing"
77 labelList(addressing(completePatch, procPatch, pointProcAddressing)),
89 completeMesh_(completeMesh),
90 procMeshes_(procMeshes),
91 pointProcAddressing_(pointProcAddressing),
92 patchFieldDecomposers_(procMeshes_.size())
98 patchFieldDecomposers_.set
108 patchFieldDecomposers_[proci].set
113 completeMesh_.
boundary()[procPatchi],
115 pointProcAddressing_[proci]
136 #define DO_POINT_FIELDS_TYPE(Type, nullArg) \
138 || !objects.lookupClass(PointField<Type>::typeName).empty();
140 #undef DO_POINT_FIELDS_TYPE
#define forAll(list, i)
Loop across all elements in list.
static pointMesh & New(const word &name, const polyMesh &mesh)
Construct and return the named DemandDrivenMeshObject.
List of IOobjects with searching and retrieving facilities.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
label size() const
Return the number of elements in the UPtrList.
Foam::tmp< Foam::Field< Type > > map(const Field< Type > &mapF) const
Point patch field decomposer class.
patchFieldDecomposer(const pointPatch &completePatch, const pointPatch &procPatch, const labelList &pointProcAddressing)
Construct given patches and addressing.
static bool decomposes(const IOobjectList &objects)
Return whether anything in the object list gets decomposed.
pointFieldDecomposer(const pointMesh &completeMesh, const PtrList< fvMesh > &procMeshes, const labelListList &pointAddressing)
Construct from components.
~pointFieldDecomposer()
Destructor.
Mesh representing a set of points created from polyMesh.
const pointBoundaryMesh & boundary() const
Return reference to boundary mesh.
Basic pointPatch represents a set of points from the mesh.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)
#define DO_POINT_FIELDS_TYPE(Type, nullArg)