| 129 | |
| 130 | |
| 131 | bool Foam::sampledPlane::update() |
| 132 | { |
| 133 | if (!needsUpdate_) |
| 134 | { |
| 135 | return false; |
| 136 | } |
| 137 | |
| 138 | sampledSurface::clearGeom(); |
| 139 | |
| 140 | labelList selectedCells = mesh().cellZones().findMatching(zoneKey_).used(); |
| 141 | |
| 142 | if (selectedCells.empty()) |
| 143 | { |
| 144 | reCut(mesh(), triangulate_); |
| 145 | } |
| 146 | else |
| 147 | { |
| 148 | reCut(mesh(), triangulate_, selectedCells); |
| 149 | } |
| 150 | |
| 151 | if (debug) |
| 152 | { |
| 153 | print(Pout); |
| 154 | Pout<< endl; |
| 155 | } |
| 156 | |
| 157 | needsUpdate_ = false; |
| 158 | return true; |
| 159 | } |
| 160 | |
| 161 | |
| 162 | Foam::tmp<Foam::scalarField> Foam::sampledPlane::sample |