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"
72 const pointPatch& completePatch,
73 const pointPatch& procPatch,
77 labelList(addressing(completePatch, procPatch, pointProcAddressing)),
78 forwardFieldMapper(static_cast<const
labelList&>(*this))
84 const pointMesh& completeMesh,
85 const PtrList<fvMesh>& procMeshes,
89 completeMesh_(completeMesh),
90 procMeshes_(procMeshes),
91 pointProcAddressing_(pointProcAddressing),
92 patchFieldDecomposers_(procMeshes_.size())
98 patchFieldDecomposers_.set
101 new PtrList<patchFieldDecomposer>(procMesh.boundary().size())
104 forAll(procMesh.boundary(), procPatchi)
106 if (procPatchi < completeMesh_.boundary().size())
108 patchFieldDecomposers_[proci].set
111 new patchFieldDecomposer
113 completeMesh_.boundary()[procPatchi],
114 procMesh.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.
Foam::tmp< Foam::Field< Type > > map(const Field< Type > &mapF) const
patchFieldDecomposer(const pointPatch &completePatch, const pointPatch &procPatch, const labelList &pointProcAddressing)
Construct given patches and addressing.
pointFieldDecomposer(const pointMesh &completeMesh, const PtrList< fvMesh > &procMeshes, const labelListList &pointAddressing)
Construct from components.
static bool decomposes(const IOobjectList &objects)
Return whether anything in the object list gets decomposed.
~pointFieldDecomposer()
Destructor.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
List< labelList > labelListList
A List of labelList.
FOR_ALL_FIELD_TYPES(makeFieldSourceTypedef)