49 label newCelli = map[oldCelli];
73 label newMaster = map[iter.key()];
79 newSlave = map[iter()];
82 if ((newMaster != iter.key()) || (newSlave != iter()))
97 label newMaster = map[iter.key()];
103 newSlave = map[iter()];
109 <<
"master cell:" << iter.key()
110 <<
" has disappeared" <<
endl;
114 newCellPairs.insert(newMaster, newSlave);
118 cellPairs = newCellPairs;
132 bool changed =
false;
136 const label newCelli = map[iter.key()];
138 if (newCelli != iter.key())
153 const label newCelli = map[iter.key()];
157 newCells.insert(newCelli);
177 if (isEdge(mesh, cut))
179 const edge&
e = mesh.
edges()[getEdge(mesh, cut)];
181 return weight*pts[e.
end()] + (1-weight)*pts[e.
start()];
185 return pts[getVertex(mesh, cut)];
197 if (!isEdge(mesh, cut0) && !isEdge(mesh, cut1))
202 getVertex(mesh, cut0),
203 getVertex(mesh, cut1)
222 label edgeI = getEdge(cut);
226 os <<
"edge:" << edgeI << e <<
' ' << coord(cut, weight);
230 label vertI = getVertex(cut);
232 os <<
"vertex:" << vertI <<
' ' << coord(cut, weight);
251 writeCut(os, cuts[cutI], weights[cutI]);
#define forAll(list, i)
Loop across all elements in list.
static label cutPairToEdge(const primitiveMesh &, const label cut0, const label cut1)
Find mesh edge (or -1) between two cuts.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Cell-face mesh analysis engine.
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.
virtual const pointField & points() const =0
Return mesh points.
label size() const
Return number of elements in table.
const vector & direction() const
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
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...
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
void setSize(const label)
Reset size of List.
#define WarningInFunction
Report a warning using Foam::Warning.
label end() const
Return end vertex label.
static point coord(const primitiveMesh &, const label cut, const scalar weight)
Return coordinate of cut (uses weight if edgeCut)
const dimensionedScalar e
Elementary charge.
label start() const
Return start vertex label.