48 label oldCelli = refCell.
cellNo();
50 label newCelli = map[oldCelli];
74 label newMaster = map[iter.key()];
80 newSlave = map[iter.val()];
83 if ((newMaster != iter.key()) || (newSlave != iter.val()))
94 Map<label> newCellPairs(2*cellPairs.
size());
98 label newMaster = map[iter.key()];
102 if (iter.val() != -1)
104 newSlave = map[iter.val()];
110 <<
"master cell:" << iter.key()
111 <<
" has disappeared" <<
endl;
115 newCellPairs.insert(newMaster, newSlave);
119 cellPairs = newCellPairs;
133 bool changed =
false;
135 for (
const label celli :
cells)
137 const label newCelli = map[celli];
139 if (newCelli != celli)
152 for (
const label celli :
cells)
154 const label newCelli = map[celli];
158 newCells.
insert(newCelli);
171 const primitiveMesh&
mesh,
178 if (isEdge(
mesh, cut))
182 return weight*
pts[
e.end()] + (1-weight)*
pts[
e.start()];
186 return pts[getVertex(
mesh, cut)];
193 const primitiveMesh&
mesh,
198 if (!isEdge(
mesh, cut0) && !isEdge(
mesh, cut1))
203 getVertex(
mesh, cut0),
204 getVertex(
mesh, cut1)
223 label edgeI = getEdge(cut);
227 os <<
"edge:" << edgeI <<
e <<
' ' << coord(cut, weight);
231 label vertI = getVertex(cut);
233 os <<
"vertex:" << vertI <<
' ' << coord(cut, weight);
252 writeCut(
os, cuts[cutI], weights[cutI]);
void size(const label n)
Older name for setAddressableSize.
static label cutPairToEdge(const primitiveMesh &, const label cut0, const label cut1)
Find mesh edge (or -1) between two cuts.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & writeCut(Ostream &os, const label cut, const scalar) const
Write cut description to Ostream.
Ostream & writeCuts(Ostream &os, const labelList &, const scalarField &) const
Write cut descriptions to Ostream.
label size() const noexcept
The number of elements in table.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
const vector & direction() const
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
static void updateLabels(const labelList &map, List< refineCell > &)
Update refine list from map. Used to update cell/face labels.
Container with cells to refine. Refinement given as single direction.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
#define WarningInFunction
Report a warning using Foam::Warning.
static point coord(const primitiveMesh &, const label cut, const scalar weight)
Return coordinate of cut (uses weight if edgeCut)
List< label > labelList
A List of labels.
forAllConstIters(mixture.phases(), phase)