ViennaLS
Loading...
Searching...
No Matches
pyWrap.hpp
Go to the documentation of this file.
1#include <pybind11/functional.h>
2#include <pybind11/iostream.h>
3#include <pybind11/pybind11.h>
4#include <pybind11/stl.h>
5
6// all header files which define API functions
7#include <lsAdvect.hpp>
12#include <lsCheck.hpp>
13#include <lsCompareChamfer.hpp>
17#include <lsCompareVolume.hpp>
18#include <lsConvexHull.hpp>
19#include <lsDetectFeatures.hpp>
20#include <lsDomain.hpp>
21#include <lsExpand.hpp>
22#include <lsExtrude.hpp>
23#include <lsFileFormats.hpp>
24#include <lsFromMesh.hpp>
25#include <lsFromSurfaceMesh.hpp>
26#include <lsFromVolumeMesh.hpp>
27#include <lsGeometricAdvect.hpp>
29#include <lsGeometries.hpp>
30#include <lsMakeGeometry.hpp>
31#include <lsMarkVoidPoints.hpp>
32#include <lsMaterialMap.hpp>
33#include <lsMesh.hpp>
34#include <lsOxidation.hpp>
35#include <lsOxidationModel.hpp>
37#include <lsPrune.hpp>
38#include <lsReader.hpp>
39#include <lsReduce.hpp>
41#include <lsSlice.hpp>
42#include <lsToDiskMesh.hpp>
43#include <lsToHullMesh.hpp>
44#include <lsToMesh.hpp>
46#include <lsToSurfaceMesh.hpp>
47#include <lsToVoxelMesh.hpp>
48#include <lsTransformMesh.hpp>
49#include <lsVTKReader.hpp>
50#include <lsVTKRenderWindow.hpp>
51#include <lsVTKWriter.hpp>
52#include <lsVelocityField.hpp>
53#include <lsVersion.hpp>
55#include <lsWriter.hpp>
56
57#include <vcLogger.hpp>
58#include <vcSmartPointer.hpp>
59
60using namespace viennals;
61namespace py = pybind11;
62
63// always use double for python export
64typedef double T;
65
66PYBIND11_DECLARE_HOLDER_TYPE(TemplateType, SmartPointer<TemplateType>);
67
68// GeometricAdvectDistribution
69template <int D>
71 : public GeometricAdvectDistribution<T, D> {
72 typedef std::array<viennahrle::CoordType, 3> vectorType;
73 typedef std::array<viennahrle::CoordType, 6> boundsType;
74 typedef GeometricAdvectDistribution<T, D> ClassType;
76
77public:
78 bool isInside(const vectorType &initial, const vectorType &candidate,
79 double eps = 0.) const override {
80 PYBIND11_OVERLOAD(bool, ClassType, isInside, initial, candidate, eps);
81 }
82
83 T getSignedDistance(const vectorType &initial, const vectorType &candidate,
84 unsigned long initialPointId) const override {
85 PYBIND11_OVERLOAD_PURE(T, ClassType, getSignedDistance, initial, candidate,
86 initialPointId);
87 }
88
89 boundsType getBounds() const override {
90 PYBIND11_OVERLOAD_PURE(boundsType, ClassType, getBounds);
91 }
92};
93
94inline void bindOxidationSharedTypes(py::module &module) {
95 py::enum_<GpuMode>(module, "GpuMode", py::module_local())
96 .value("Cpu", GpuMode::Cpu)
97 .value("Gpu", GpuMode::Gpu)
98 .value("Auto", GpuMode::Auto)
99 .export_values();
100
101 py::class_<OxidationParameters>(module, "OxidationParameters",
102 py::module_local())
103 .def(py::init<>())
104 .def_readwrite("diffusionCoefficient",
106 .def_readwrite("reactionRate", &OxidationParameters::reactionRate)
107 .def_readwrite("transferCoefficient",
109 .def_readwrite("equilibriumConcentration",
111 .def_readwrite("oxidantMoleculeDensity",
113 .def_readwrite("expansionCoefficient",
115 .def_readwrite("velocitySign", &OxidationParameters::velocitySign)
116 .def_readwrite("temperature", &OxidationParameters::temperature)
117 .def_readwrite("reactionActivationVolume",
119 .def_readwrite("referencePressure",
121 .def_readwrite("diffusionActivationVolume",
123 .def_readwrite("reactionRateRatio111",
125 .def_readwrite("crystalAxis", &OxidationParameters::crystalAxis)
126 .def_readwrite("maskTransferCoefficient",
128 .def_readwrite("maskConcentration",
130 .def_readwrite("minBoundaryDistance",
132 .def_readwrite("maxIterations", &OxidationParameters::maxIterations)
133 .def_readwrite("tolerance", &OxidationParameters::tolerance)
134 .def_readwrite("relaxation", &OxidationParameters::relaxation)
135 .def_readwrite("maxGridPoints", &OxidationParameters::maxGridPoints)
136 .def_readwrite("material", &OxidationParameters::material);
137
138 py::class_<OxidationPresets>(module, "OxidationPresets", py::module_local())
139 .def(py::init<>())
140 .def_static("wet1000CDealGrove100",
142 .def_static("oxideMechanics1000C", &OxidationPresets::oxideMechanics1000C)
143 .def_static("siliconNitrideMask1000C",
145 .def_static("siliconNitrideMask", &OxidationPresets::siliconNitrideMask,
146 py::arg("temperatureCelsius"));
147
148 py::class_<OxidationDeformationParameters>(
149 module, "OxidationDeformationParameters", py::module_local())
150 .def(py::init<>())
151 .def_readwrite("viscosity", &OxidationDeformationParameters::viscosity)
152 .def_readwrite("ambientPressure",
154 .def_readwrite(
155 "minMechanicsBoundaryDistance",
157 .def_readwrite("shearModulus",
159 .def_readwrite("stressRelaxationTime",
161 .def_readwrite("shearActivationVolume",
163 .def_readwrite("stressTimeStep",
165 .def_readwrite("mechanicsIterations",
167 .def_readwrite("mechanicsTolerance",
169 .def_readwrite("maxGridPoints",
171 .def_readwrite("material", &OxidationDeformationParameters::material);
172
173 py::class_<OxidationMaskParameters>(module, "OxidationMaskParameters",
174 py::module_local())
175 .def(py::init<>())
176 .def_readwrite("youngModulus", &OxidationMaskParameters::youngModulus)
177 .def_readwrite("poissonRatio", &OxidationMaskParameters::poissonRatio)
178 .def_readwrite("viscosity", &OxidationMaskParameters::viscosity)
179 .def_readwrite("shearActivationVolume",
181
182 py::class_<OxidationCouplingParameters>(module, "OxidationCouplingParameters",
183 py::module_local())
184 .def(py::init<>())
185 .def_readwrite("maxIterations",
187 .def_readwrite("tolerance", &OxidationCouplingParameters::tolerance)
188 .def_readwrite("relaxation", &OxidationCouplingParameters::relaxation);
189
190 py::class_<LOCOSConservationDiagnostics<T>>(
191 module, "LOCOSConservationDiagnostics", py::module_local())
192 .def(py::init<>())
193 .def_readwrite("siliconRecession",
195 .def_readwrite("ambientLift",
197 .def_readwrite("expectedAmbientLift",
199 .def_readwrite("ambientLiftRatio",
201 .def_readwrite("relativeError",
203 .def_readwrite("samples", &LOCOSConservationDiagnostics<T>::samples);
204}
205
206template <int D> void bindApi(py::module &module) {
207 // Also wrap hrleGrid so it can be used to create new LevelSets
208 py::class_<viennahrle::Grid<D>>(module, "hrleGrid");
209
210 // Domain
211 py::class_<Domain<T, D>, SmartPointer<Domain<T, D>>>(module, "Domain")
212 // constructors
213 .def(py::init(&SmartPointer<Domain<T, D>>::template New<>))
214 .def(
215 py::init(
216 &SmartPointer<Domain<T, D>>::template New<viennahrle::CoordType>),
217 py::arg("gridDelta") = 1.0)
218 // .def(py::init(
219 // &SmartPointer<Domain<T, D>>::New<viennahrle::CoordType *,
220 // BoundaryConditionEnum *>))
221 .def(py::init([](std::array<viennahrle::CoordType, 2 * D> bounds,
222 std::array<BoundaryConditionEnum, D> bcs,
223 viennahrle::CoordType gridDelta) {
224 return SmartPointer<Domain<T, D>>::New(bounds.data(), bcs.data(),
225 gridDelta);
226 }),
227 py::arg("bounds"), py::arg("boundaryConditions"),
228 py::arg("gridDelta") = 1.0)
229 .def(py::init(&SmartPointer<Domain<T, D>>::template New<
230 std::vector<viennahrle::CoordType>, std::vector<unsigned>,
231 viennahrle::CoordType>),
232 py::arg("bounds"), py::arg("boundaryConditions"),
233 py::arg("gridDelta") = 1.0)
234 // .def(py::init(
235 // &SmartPointer<Domain<T, D>>::New<Domain<T,
236 // D>::PointValueVectorType,
237 // viennahrle::CoordType *,
238 // BoundaryConditionEnum *>))
239 // .def(py::init(&SmartPointer<Domain<T, D>>::New<
240 // Domain<T, D>::PointValueVectorType,
241 // viennahrle::CoordType
242 // *, BoundaryConditionEnum *,
243 // viennahrle::CoordType>))
244 .def(py::init(&SmartPointer<Domain<T, D>>::template New<
245 SmartPointer<Domain<T, D>> &>))
246 .def(py::init(
247 &SmartPointer<Domain<T, D>>::template New<viennahrle::Grid<D> &>))
248 // methods
249 .def("deepCopy", &Domain<T, D>::deepCopy,
250 "Copy lsDomain in this lsDomain.")
251 .def("getNumberOfSegments", &Domain<T, D>::getNumberOfSegments,
252 "Get the number of segments, the level set structure is divided "
253 "into.")
254 .def("getNumberOfPoints", &Domain<T, D>::getNumberOfPoints,
255 "Get the number of defined level set values.")
256 .def("getLevelSetWidth", &Domain<T, D>::getLevelSetWidth,
257 "Get the number of layers of level set points around the explicit "
258 "surface.")
259 .def("setLevelSetWidth", &Domain<T, D>::setLevelSetWidth,
260 "Set the number of layers of level set points which should be "
261 "stored around the explicit surface.")
262 .def("clearMetaData", &Domain<T, D>::clearMetaData,
263 "Clear all metadata stored in the level set.")
264 // allow filehandle to be passed and default to python standard output
265 .def(
266 "print",
267 [](Domain<T, D> &d, py::object fileHandle) {
268 if (!(py::hasattr(fileHandle, "write") &&
269 py::hasattr(fileHandle, "flush"))) {
270 throw py::type_error(
271 "MyClass::read_from_file_like_object(file): incompatible "
272 "function argument: `file` must be a file-like object, but "
273 "`" +
274 (std::string)(py::repr(fileHandle)) + "` provided");
275 }
276 py::detail::pythonbuf buf(fileHandle);
277 std::ostream stream(&buf);
278 d.print(stream);
279 },
280 py::arg("stream") = py::module::import("sys").attr("stdout"));
281
282 // Advect
283 py::class_<Advect<T, D>, SmartPointer<Advect<T, D>>>(module, "Advect")
284 // constructors
285 .def(py::init(&SmartPointer<Advect<T, D>>::template New<>))
286 .def(py::init(&SmartPointer<Advect<T, D>>::template New<
287 SmartPointer<Domain<T, D>> &>))
288 .def(py::init(
289 &SmartPointer<Advect<T, D>>::template New<
290 SmartPointer<Domain<T, D>> &, SmartPointer<VelocityField<T>> &>))
291 // getters and setters
292 .def("insertNextLevelSet", &Advect<T, D>::insertNextLevelSet,
293 "Insert next level set to use for advection.")
294 .def("clearLevelSets", &Advect<T, D>::clearLevelSets,
295 "Clear all level sets used for advection.")
296 .def("setVelocityField", &Advect<T, D>::setVelocityField,
297 "Set the velocity to use for advection.")
298 .def("setAdvectionTime", &Advect<T, D>::setAdvectionTime,
299 "Set the time until when the level set should be advected.")
300 .def("setSingleStep", &Advect<T, D>::setSingleStep, py::arg("singleStep"),
301 "Set whether only a single advection step should be performed.")
302 .def("setTimeStepRatio", &Advect<T, D>::setTimeStepRatio,
303 "Set the maximum time step size relative to grid size. Advection is "
304 "only stable for <0.5.")
305 .def("setCalculateNormalVectors",
307 "Set whether normal vectors are needed for the supplied velocity "
308 "field.")
309 .def("setIgnoreVoids", &Advect<T, D>::setIgnoreVoids,
310 "Set whether voids in the geometry should be ignored during "
311 "advection or not.")
312 .def("setAdaptiveTimeStepping", &Advect<T, D>::setAdaptiveTimeStepping,
313 py::arg("enabled") = true, py::arg("subdivisions") = 20,
314 "Enable/disable adaptive time stepping and set the number of "
315 "subdivisions.")
316 .def(
317 "setSaveAdvectionVelocities",
319 "Set whether the velocities applied to each point should be saved in "
320 "the level set for debug purposes.")
321 .def("setCheckDissipation", &Advect<T, D>::setCheckDissipation,
322 py::arg("check"), "Enable/disable dissipation checking.")
323 .def("setUpdatePointData", &Advect<T, D>::setUpdatePointData,
324 py::arg("update"),
325 "Enable/disable updating point data after advection.")
326 .def("getAdvectedTime", &Advect<T, D>::getAdvectedTime,
327 "Get the time passed during advection.")
328 .def("getNumberOfTimeSteps", &Advect<T, D>::getNumberOfTimeSteps,
329 "Get how many advection steps were performed after the last apply() "
330 "call.")
331 .def("getTimeStepRatio", &Advect<T, D>::getTimeStepRatio,
332 "Get the time step ratio used for advection.")
333 .def("getCurrentTimeStep", &Advect<T, D>::getCurrentTimeStep,
334 "Get the current time step.")
335 .def("getCalculateNormalVectors",
337 "Get whether normal vectors are computed during advection.")
338 .def("setSpatialScheme", &Advect<T, D>::setSpatialScheme,
339 "Set the spatial discretization scheme to use during advection.")
340 .def("setTemporalScheme", &Advect<T, D>::setTemporalScheme,
341 "Set the time integration scheme to use during advection.")
342 .def("setIntegrationScheme", &Advect<T, D>::setIntegrationScheme,
343 "(DEPRECATED, use setSpatialScheme instead) Set the spatial "
344 "discretization scheme to use during advection.")
345 .def("setDissipationAlpha", &Advect<T, D>::setDissipationAlpha,
346 "Set the dissipation value to use for Lax Friedrichs spatial "
347 "discretization.")
348 .def("setUpdatePointData", &Advect<T, D>::setUpdatePointData,
349 "Set whether the point data in the old LS should be translated to "
350 "the advected LS. Defaults to true.")
351 .def(
352 "setVelocityUpdateCallback", &Advect<T, D>::setVelocityUpdateCallback,
353 "Set a callback function that is called after the level set has been "
354 "updated during intermediate time integration steps (e.g. RK2, RK3).")
355 .def("prepareLS", &Advect<T, D>::prepareLS, "Prepare the level-set.")
356 // need scoped release since we are calling a python method from
357 // parallelised C++ code here
358 .def("apply", &Advect<T, D>::apply,
359 py::call_guard<py::gil_scoped_release>(), "Perform advection.");
360
361 py::class_<lsInternal::StencilLocalLaxFriedrichsScalar<T, D, 1>>(
362 module, "StencilLocalLaxFriedrichsScalar")
363 .def_static(
364 "setMaxDissipation",
366 1>::setMaxDissipation,
367 py::arg("maxDissipation"));
368
369 module.def("PrepareStencilLocalLaxFriedrichs",
370 &PrepareStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"),
371 py::arg("isDepo"));
372
373 module.def("FinalizeStencilLocalLaxFriedrichs",
374 &FinalizeStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"));
375
376 // ReactionBoundarySample — sub-grid crossing info returned by
377 // OxidationDiffusion::getReactionBoundarySample
378 {
380 py::class_<RBS>(module, "ReactionBoundarySample")
381 .def(py::init<>())
382 .def_readwrite("found", &RBS::found)
383 .def_readwrite("distance", &RBS::distance)
384 .def_readwrite("concentration", &RBS::concentration)
385 .def_readwrite("crossingAxis", &RBS::crossingAxis)
386 .def_readwrite("crossingOffset", &RBS::crossingOffset)
387 .def_property(
388 "nodeIndex",
389 [](const RBS &s) {
390 std::array<viennahrle::IndexType, D> arr{};
391 for (unsigned i = 0; i < D; ++i)
392 arr[i] = s.nodeIndex[i];
393 return arr;
394 },
395 [](RBS &s, const std::array<viennahrle::IndexType, D> &arr) {
396 for (unsigned i = 0; i < D; ++i)
397 s.nodeIndex[i] = arr[i];
398 });
399 }
400
401 py::class_<OxidationDiffusion<T, D>, VelocityField<T>,
402 SmartPointer<OxidationDiffusion<T, D>>>(module,
403 "OxidationDiffusion")
404 .def(py::init([](SmartPointer<Domain<T, D>> &reactionInterface,
405 SmartPointer<Domain<T, D>> &ambientInterface,
406 OxidationParameters parameters) {
407 return OxidationDiffusion<T, D>::New(reactionInterface,
408 ambientInterface, parameters);
409 }),
410 py::arg("reactionInterface"), py::arg("ambientInterface"),
411 py::arg("parameters") = OxidationParameters())
412 .def("setReactionInterface",
414 .def("setAmbientInterface",
416 .def("setMaskInterface", &OxidationDiffusion<T, D>::setMaskInterface,
417 py::arg("maskInterface"), py::arg("maskSign") = 1)
418 .def("clearMaskInterface", &OxidationDiffusion<T, D>::clearMaskInterface)
419 .def("setParameters", &OxidationDiffusion<T, D>::setParameters)
420 .def("getParameters", &OxidationDiffusion<T, D>::getParameters)
421 .def("setOxideSigns", &OxidationDiffusion<T, D>::setOxideSigns)
422 .def(
423 "setSolveBounds",
424 [](OxidationDiffusion<T, D> &model,
425 std::array<viennahrle::IndexType, D> passedMinIndex,
426 std::array<viennahrle::IndexType, D> passedMaxIndex) {
427 viennahrle::Index<D> minIndex{};
428 viennahrle::Index<D> maxIndex{};
429 for (unsigned i = 0; i < D; ++i) {
430 minIndex[i] = passedMinIndex[i];
431 maxIndex[i] = passedMaxIndex[i];
432 }
433 model.setSolveBounds(minIndex, maxIndex);
434 },
435 py::arg("minIndex"), py::arg("maxIndex"))
436 .def("clearSolveBounds", &OxidationDiffusion<T, D>::clearSolveBounds)
437 .def("apply", &OxidationDiffusion<T, D>::apply)
438 .def("getConcentration",
439 (T(OxidationDiffusion<T, D>::*)(const Vec3D<T> &) const) &
441 .def("getEffectiveReactionRate",
442 (T(OxidationDiffusion<T, D>::*)(const Vec3D<T> &) const) &
444 .def("clearPressureField", &OxidationDiffusion<T, D>::clearPressureField)
445 .def("setStress", (void(OxidationDiffusion<T, D>::*)(
446 const Vec3D<T> &, const std::array<T, 9> &)) &
448 .def("setPressure",
449 (void(OxidationDiffusion<T, D>::*)(const Vec3D<T> &, T)) &
451 .def("getIterations", &OxidationDiffusion<T, D>::getIterations)
452 .def("getResidual", &OxidationDiffusion<T, D>::getResidual)
453 .def("getNumberOfSolutionNodes",
455 .def("getReactionBoundarySample",
457 .def("getScalarVelocityFromSample",
459 .def("markSolved", &OxidationDiffusion<T, D>::markSolved)
460 .def("markGeometryChanged",
462 .def("writePersistentFields",
464 .def("getConcentrationCache",
466 py::return_value_policy::copy)
467 .def("setConcentrationCache",
469
470 py::class_<OxidationDeformation<T, D>, VelocityField<T>,
471 SmartPointer<OxidationDeformation<T, D>>>(module,
472 "OxidationDeformation")
473 .def(py::init([](SmartPointer<Domain<T, D>> &reactionInterface,
474 SmartPointer<Domain<T, D>> &ambientInterface,
475 SmartPointer<OxidationDiffusion<T, D>> &diffusionField,
476 OxidationParameters oxidationParameters,
477 OxidationDeformationParameters deformationParameters) {
479 reactionInterface, ambientInterface, diffusionField,
480 oxidationParameters, deformationParameters);
481 }),
482 py::arg("reactionInterface"), py::arg("ambientInterface"),
483 py::arg("diffusionField"), py::arg("oxidationParameters"),
484 py::arg("deformationParameters") = OxidationDeformationParameters())
485 .def("setMaskInterface", &OxidationDeformation<T, D>::setMaskInterface,
486 py::arg("maskInterface"), py::arg("maskSign") = 1)
487 .def("clearMaskInterface",
489 .def(
490 "setSolveBounds",
492 std::array<viennahrle::IndexType, D> passedMinIndex,
493 std::array<viennahrle::IndexType, D> passedMaxIndex) {
494 viennahrle::Index<D> minIndex{};
495 viennahrle::Index<D> maxIndex{};
496 for (unsigned i = 0; i < D; ++i) {
497 minIndex[i] = passedMinIndex[i];
498 maxIndex[i] = passedMaxIndex[i];
499 }
500 model.setSolveBounds(minIndex, maxIndex);
501 },
502 py::arg("minIndex"), py::arg("maxIndex"))
503 .def("clearSolveBounds", &OxidationDeformation<T, D>::clearSolveBounds)
505 .def("getVelocity",
506 (Vec3D<T>(OxidationDeformation<T, D>::*)(const Vec3D<T> &) const) &
508 .def("getMaterialVelocity",
510 py::arg("coordinate"), py::arg("nitride"),
511 "Velocity of one material (oxide, or the nitride mask) for "
512 "advecting its surface.")
513 .def("getPressure",
514 (T(OxidationDeformation<T, D>::*)(const Vec3D<T> &) const) &
516 .def("getStrainTrace",
517 (T(OxidationDeformation<T, D>::*)(const Vec3D<T> &) const) &
519 .def("getStrainRateTensor",
520 (std::array<T, 9>(OxidationDeformation<T, D>::*)(const Vec3D<T> &)
521 const) &
523 .def("getStressTensor", (std::array<T, 9>(OxidationDeformation<T, D>::*)(
524 const Vec3D<T> &) const) &
526 .def("getVonMisesStress",
527 (T(OxidationDeformation<T, D>::*)(const Vec3D<T> &) const) &
529 .def("getIterations", &OxidationDeformation<T, D>::getIterations)
530 .def("getResidual", &OxidationDeformation<T, D>::getResidual)
531 .def("getNumberOfSolutionNodes",
533 .def("avgExpansionSpeed", &OxidationDeformation<T, D>::avgExpansionSpeed)
534 .def("setAmbientInterface",
536 .def("setOxidationParameters",
538 .def("setDeformationParameters",
540 .def("setOxideSigns", &OxidationDeformation<T, D>::setOxideSigns)
541 .def("setReactionInterface",
543 .def("setDiffusionField", &OxidationDeformation<T, D>::setDiffusionField)
544 .def("markGeometryChanged",
546 .def("writeFieldsToLevelSet",
548
549 py::class_<OxidationModel<T, D>, SmartPointer<OxidationModel<T, D>>>(
550 module, "OxidationModel")
551 .def(py::init(
552 [](SmartPointer<OxidationDiffusion<T, D>> &diffusionField,
553 SmartPointer<OxidationDeformation<T, D>> &deformationField,
554 OxidationCouplingParameters couplingParameters) {
556 diffusionField, deformationField, couplingParameters);
557 }),
558 py::arg("diffusionField"), py::arg("deformationField"),
559 py::arg("couplingParameters") = OxidationCouplingParameters())
560 .def("setDiffusionField", &OxidationModel<T, D>::setDiffusionField)
561 .def("setDeformationField", &OxidationModel<T, D>::setDeformationField)
562 .def("setParameters", &OxidationModel<T, D>::setParameters)
563 .def(
564 "setSolveBounds",
565 [](OxidationModel<T, D> &model,
566 std::array<viennahrle::IndexType, D> passedMinIndex,
567 std::array<viennahrle::IndexType, D> passedMaxIndex) {
568 viennahrle::Index<D> minIndex{};
569 viennahrle::Index<D> maxIndex{};
570 for (unsigned i = 0; i < D; ++i) {
571 minIndex[i] = passedMinIndex[i];
572 maxIndex[i] = passedMaxIndex[i];
573 }
574 model.setSolveBounds(minIndex, maxIndex);
575 },
576 py::arg("minIndex"), py::arg("maxIndex"))
577 .def("clearSolveBounds", &OxidationModel<T, D>::clearSolveBounds)
578 .def("apply", &OxidationModel<T, D>::apply)
579 .def("getIterations", &OxidationModel<T, D>::getIterations)
580 .def("getResidual", &OxidationModel<T, D>::getResidual);
581
582 py::class_<Oxidation<T, D>, SmartPointer<Oxidation<T, D>>>(module,
583 "Oxidation")
584 .def(py::init([](SmartPointer<Domain<T, D>> &siInterface,
585 SmartPointer<Domain<T, D>> &ambientInterface,
586 SmartPointer<Domain<T, D>> &maskInterface) {
587 return Oxidation<T, D>::New(siInterface, ambientInterface,
588 maskInterface);
589 }),
590 py::arg("siInterface"), py::arg("ambientInterface"),
591 py::arg("maskInterface"))
592 .def("setSiInterface", &Oxidation<T, D>::setSiInterface)
593 .def("setAmbientInterface", &Oxidation<T, D>::setAmbientInterface)
594 .def("setMaskInterface", &Oxidation<T, D>::setMaskInterface)
595 .def("setOxidationParameters", &Oxidation<T, D>::setOxidationParameters)
596 .def("setDeformationParameters",
598 .def("setCouplingParameters", &Oxidation<T, D>::setCouplingParameters)
599 .def("setMaskParameters", &Oxidation<T, D>::setMaskParameters)
600 .def("setSpatialScheme", &Oxidation<T, D>::setSpatialScheme)
601 .def("setTemporalScheme", &Oxidation<T, D>::setTemporalScheme)
602 .def("setGpuMode", &Oxidation<T, D>::setGpuMode, py::arg("mode"))
603 .def(
604 "setSolveBounds",
605 [](Oxidation<T, D> &model,
606 std::array<viennahrle::IndexType, D> passedMinIndex,
607 std::array<viennahrle::IndexType, D> passedMaxIndex) {
608 viennahrle::Index<D> minIndex{};
609 viennahrle::Index<D> maxIndex{};
610 for (unsigned i = 0; i < D; ++i) {
611 minIndex[i] = passedMinIndex[i];
612 maxIndex[i] = passedMaxIndex[i];
613 }
614 model.setSolveBounds(minIndex, maxIndex);
615 },
616 py::arg("minIndex"), py::arg("maxIndex"))
617 .def("apply", &Oxidation<T, D>::apply, py::arg("advectionTime"))
618 .def("applyCFLLimited", &Oxidation<T, D>::applyCFLLimited,
619 py::arg("requestedTime"), py::arg("cflFactor"),
620 "Execute one CFL-limited LOCOS step; returns the actual time "
621 "advanced.")
622 .def("getLastMaxVelocity", &Oxidation<T, D>::getLastMaxVelocity,
623 "Maximum interface velocity (µm/hr) from the most recent CFL step.")
624 .def("getDiffusionField", &Oxidation<T, D>::getDiffusionField)
625 .def("getDeformationField", &Oxidation<T, D>::getDeformationField);
626
627 if constexpr (D == 2) {
628 module.def(
629 "computeLOCOSOpenWindowConservation",
630 [](SmartPointer<Domain<T, D>> siInitial,
631 SmartPointer<Domain<T, D>> siAfter,
632 SmartPointer<Domain<T, D>> ambientInitial,
633 SmartPointer<Domain<T, D>> ambientAfter, T xMin, T xMax,
634 viennahrle::IndexType jMin, viennahrle::IndexType jMax,
635 T expansionCoefficient) {
636 return computeLOCOSOpenWindowConservation<T>(
637 siInitial, siAfter, ambientInitial, ambientAfter, xMin, xMax,
638 jMin, jMax, expansionCoefficient);
639 },
640 py::arg("siInitial"), py::arg("siAfter"), py::arg("ambientInitial"),
641 py::arg("ambientAfter"), py::arg("xMin"), py::arg("xMax"),
642 py::arg("jMin"), py::arg("jMax"), py::arg("expansionCoefficient"));
643 }
644
645 // BooleanOperation
646 py::class_<BooleanOperation<T, D>, SmartPointer<BooleanOperation<T, D>>>(
647 module, "BooleanOperation")
648 // constructors
649 .def(py::init(&SmartPointer<BooleanOperation<T, D>>::template New<>))
650 .def(py::init(&SmartPointer<BooleanOperation<T, D>>::template New<
651 SmartPointer<Domain<T, D>> &>))
652 .def(
653 py::init(&SmartPointer<BooleanOperation<T, D>>::template New<
654 SmartPointer<Domain<T, D>> &, SmartPointer<Domain<T, D>> &>))
655 // some constructors need lambda to work: seems to be an issue with
656 // implicit move constructor
657 .def(py::init(
658 [](SmartPointer<Domain<T, D>> &domain, BooleanOperationEnum op) {
659 return SmartPointer<BooleanOperation<T, D>>::New(domain, op);
660 }))
661 .def(py::init([](SmartPointer<Domain<T, D>> &domainA,
662 SmartPointer<Domain<T, D>> &domainB,
664 return SmartPointer<BooleanOperation<T, D>>::New(domainA, domainB, op);
665 }))
666 // methods
667 .def("setLevelset", &BooleanOperation<T, D>::setLevelSet,
668 "Set levelset on which the boolean operation should be performed.")
669 .def("setSecondLevelSet", &BooleanOperation<T, D>::setSecondLevelSet,
670 "Set second levelset for boolean operation.")
671 .def("setBooleanOperation", &BooleanOperation<T, D>::setBooleanOperation,
672 "Set which type of boolean operation should be performed.")
673 .def("apply", &BooleanOperation<T, D>::apply,
674 "Perform the boolean operation.");
675
676 py::class_<CalculateCurvatures<T, D>,
677 SmartPointer<CalculateCurvatures<T, D>>>(module,
678 "CalculateCurvatures")
679 // constructors
680 .def(py::init(&SmartPointer<CalculateCurvatures<T, D>>::template New<>))
681 .def(py::init(&SmartPointer<CalculateCurvatures<T, D>>::template New<
682 SmartPointer<Domain<T, D>> &>))
683 // some constructors need lambda to work: seems to be an issue with
684 // implicit move constructor
685 .def(py::init([](SmartPointer<Domain<T, D>> &domain, CurvatureEnum type) {
686 return SmartPointer<CalculateCurvatures<T, D>>::New(domain, type);
687 }))
688 // methods
689 .def("setLevelSet", &CalculateCurvatures<T, D>::setLevelSet,
690 "Set levelset for which to calculate the curvatures.")
691 .def("setCurvatureType", &CalculateCurvatures<T, D>::setCurvatureType,
692 "Set which method to use for calculation: Defaults to mean "
693 "curvature.")
694 .def("setMaxValue", &CalculateCurvatures<T, D>::setMaxValue,
695 "Curvatures will be calculated for all LS values < maxValue.")
697 "Perform normal vector calculation.");
698
699 // CalculateNormalVectors
700 py::class_<CalculateNormalVectors<T, D>,
701 SmartPointer<CalculateNormalVectors<T, D>>>(
702 module, "CalculateNormalVectors")
703 // constructors
704 .def(
705 py::init(&SmartPointer<CalculateNormalVectors<T, D>>::template New<>))
706 .def(py::init(&SmartPointer<CalculateNormalVectors<T, D>>::template New<
707 SmartPointer<Domain<T, D>> &>))
708 // methods
710 "Set levelset for which to calculate normal vectors.")
712 "Set the maximum value for which normals should be calculated.")
714 "Set the method to use for normal calculation.")
716 "Perform normal vector calculation.");
717
718 // CalculateVisibilities
719 py::class_<CalculateVisibilities<T, D>,
720 SmartPointer<CalculateVisibilities<T, D>>>(module,
721 "CalculateVisibilities")
722 .def(py::init(
723 &SmartPointer<CalculateVisibilities<T, D>>::template New<
724 SmartPointer<Domain<T, D>> &, const Vec3D<T> &, std::string>))
726
727 // Check
728 py::class_<Check<T, D>, SmartPointer<Check<T, D>>>(module, "Check")
729 // constructors
730 .def(py::init(&SmartPointer<Check<T, D>>::template New<>))
731 .def(py::init(&SmartPointer<Check<T, D>>::template New<
732 SmartPointer<Domain<T, D>> &>))
733 // methods
734 .def("setLevelSet", &Check<T, D>::setLevelSet,
735 "Set levelset for which to calculate normal vectors.")
736 .def("apply", &Check<T, D>::apply, "Perform check.");
737
738 // PointCloud
739 py::class_<PointCloud<T, D>, SmartPointer<PointCloud<T, D>>>(module,
740 "PointCloud")
741 // constructors
742 .def(py::init(&SmartPointer<PointCloud<T, D>>::template New<
743 const std::vector<VectorType<T, D>> &>))
744 // methods
745 .def("insertNextPoint",
746 (void(PointCloud<T, D>::*)(const VectorType<T, D> &)) &
748
749 // ConvexHull
750 py::class_<ConvexHull<T, D>, SmartPointer<ConvexHull<T, D>>>(module,
751 "ConvexHull")
752 // constructors
753 .def(py::init(&SmartPointer<ConvexHull<T, D>>::template New<>))
754 .def(py::init(&SmartPointer<ConvexHull<T, D>>::template New<
755 SmartPointer<Mesh<T>> &, SmartPointer<PointCloud<T, D>> &>))
756 // methods
757 .def("setMesh", &ConvexHull<T, D>::setMesh,
758 "Set mesh object where the generated mesh should be stored.")
759 .def("setPointCloud", &ConvexHull<T, D>::setPointCloud,
760 "Set point cloud used to generate mesh.")
761 .def("apply", &ConvexHull<T, D>::apply, "Generate Hull.");
762
763 // DetectFeatures
764 py::class_<DetectFeatures<T, D>, SmartPointer<DetectFeatures<T, D>>>(
765 module, "DetectFeatures")
766 // constructors
767 .def(py::init(&SmartPointer<DetectFeatures<T, D>>::template New<>))
768 .def(py::init(&SmartPointer<DetectFeatures<T, D>>::template New<
769 SmartPointer<Domain<T, D>> &>))
770 .def(py::init(&SmartPointer<DetectFeatures<T, D>>::template New<
771 SmartPointer<Domain<T, D>> &, T>))
772 // some constructors need lambda to work: seems to be an issue with
773 // implicit move constructor
774 .def(py::init([](SmartPointer<Domain<T, D>> &domain, T maxValue,
776 return SmartPointer<DetectFeatures<T, D>>::New(domain, maxValue, type);
777 }))
778 .def("setDetectionThreshold",
780 "Set the curvature value above which a point is considered a "
781 "feature.")
782 .def("setDetectionMethod", &DetectFeatures<T, D>::setDetectionMethod,
783 "Set which method to use to detect features. Defaults to Curvature.")
784 .def("apply", &DetectFeatures<T, D>::apply, "Detect features.");
785
786 // GeometricAdvect
787 py::class_<GeometricAdvect<T, D>, SmartPointer<GeometricAdvect<T, D>>>(
788 module, "GeometricAdvect")
789 // constructors
790 .def(py::init(&SmartPointer<GeometricAdvect<T, D>>::template New<>))
791 .def(py::init(
792 &SmartPointer<GeometricAdvect<T, D>>::template New<
793 SmartPointer<Domain<T, D>> &,
794 SmartPointer<
796 // methods
797 .def("setLevelSet", &GeometricAdvect<T, D>::setLevelSet,
798 "Set levelset to advect.")
799 .def(
800 "setAdvectionDistribution",
802 "Set advection distribution to use as kernel for the fast advection.")
803 .def("apply", &GeometricAdvect<T, D>::apply,
804 py::call_guard<py::gil_scoped_release>(), "Perform advection.");
805
806 // GeometricAdvectDistributions
807 py::class_<GeometricAdvectDistribution<T, D>,
808 SmartPointer<GeometricAdvectDistribution<T, D>>,
810 "GeometricAdvectDistribution")
811 // constructors
812 .def(py::init<>())
813 // methods
815 "Check whether passed point is inside the distribution.")
816 .def("getSignedDistance",
818 "Get the signed distance of the passed point to the surface of the "
819 "distribution.")
821 "Get the cartesian bounds of the distribution.")
823 "Prepare the distribution for use with the passed level set.")
825 "Finalize the distribution after use with the level set.");
826
827 py::class_<SphereDistribution<T, D>, SmartPointer<SphereDistribution<T, D>>,
828 GeometricAdvectDistribution<T, D>>(module, "SphereDistribution")
829 // constructors
830 .def(py::init(&SmartPointer<SphereDistribution<T, D>>::template New<T>))
831 // methods
832 .def("isInside", &SphereDistribution<T, D>::isInside,
833 "Check whether passed point is inside the distribution.")
834 .def("getSignedDistance", &SphereDistribution<T, D>::getSignedDistance,
835 "Get the signed distance of the passed point to the surface of the "
836 "distribution.")
837 .def("getBounds", &SphereDistribution<T, D>::getBounds,
838 "Get the cartesian bounds of the distribution.");
839
840 py::class_<BoxDistribution<T, D>, SmartPointer<BoxDistribution<T, D>>,
841 GeometricAdvectDistribution<T, D>>(module, "BoxDistribution")
842 // constructors
843 .def(py::init(&SmartPointer<BoxDistribution<T, D>>::template New<
844 const std::array<T, 3>>))
845 // methods
846 .def("isInside", &BoxDistribution<T, D>::isInside,
847 "Check whether passed point is inside the distribution.")
848 .def("getSignedDistance", &BoxDistribution<T, D>::getSignedDistance,
849 "Get the signed distance of the passed point to the surface of the "
850 "distribution.")
851 .def("getBounds", &BoxDistribution<T, D>::getBounds,
852 "Get the cartesian bounds of the distribution.");
853
854 py::class_<CustomSphereDistribution<T, D>,
855 SmartPointer<CustomSphereDistribution<T, D>>,
857 "CustomSphereDistribution")
858 // constructors
859 .def(py::init(&SmartPointer<CustomSphereDistribution<T, D>>::template New<
860 const std::vector<T> &>))
861 // methods
863 "Check whether passed point is inside the distribution.")
864 .def("getSignedDistance",
866 "Get the signed distance of the passed point to the surface of the "
867 "distribution.")
869 "Get the cartesian bounds of the distribution.");
870
871 // Expand
872 py::class_<Expand<T, D>, SmartPointer<Expand<T, D>>>(module, "Expand")
873 // constructors
874 .def(py::init(&SmartPointer<Expand<T, D>>::template New<>))
875 .def(py::init(&SmartPointer<Expand<T, D>>::template New<
876 SmartPointer<Domain<T, D>> &>))
877 .def(py::init(&SmartPointer<Expand<T, D>>::template New<
878 SmartPointer<Domain<T, D>> &, int>))
879 // methods
880 .def("setLevelSet", &Expand<T, D>::setLevelSet, "Set levelset to expand.")
881 .def("setWidth", &Expand<T, D>::setWidth, "Set the width to expand to.")
882 .def("apply", &Expand<T, D>::apply, "Perform expansion.");
883
884 // FromSurfaceMesh
885 py::class_<FromSurfaceMesh<T, D>, SmartPointer<FromSurfaceMesh<T, D>>>(
886 module, "FromSurfaceMesh")
887 // constructors
888 .def(py::init(&SmartPointer<FromSurfaceMesh<T, D>>::template New<>))
889 .def(py::init(&SmartPointer<FromSurfaceMesh<T, D>>::template New<
890 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &>))
891 .def(py::init(
892 &SmartPointer<FromSurfaceMesh<T, D>>::template New<
893 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &, bool>))
894 // methods
895 .def("setLevelSet", &FromSurfaceMesh<T, D>::setLevelSet,
896 "Set levelset to read into.")
897 .def("setMesh", &FromSurfaceMesh<T, D>::setMesh,
898 "Set the mesh to read from.")
899 .def("setRemoveBoundaryTriangles",
900 static_cast<void (FromSurfaceMesh<T, D>::*)(bool)>(
902 "Set whether to include mesh elements outside of the simulation "
903 "domain.")
904 .def("setRemoveBoundaryTriangles",
905 static_cast<void (FromSurfaceMesh<T, D>::*)(std::array<bool, 3>)>(
907 "Set whether to include mesh elements outside of the simulation "
908 "domain.")
909 .def("apply", &FromSurfaceMesh<T, D>::apply,
910 "Construct a levelset from a surface mesh.");
911
912 // FromVolumeMesh
913 py::class_<FromVolumeMesh<T, D>, SmartPointer<FromVolumeMesh<T, D>>>(
914 module, "FromVolumeMesh")
915 // constructors
916 .def(py::init(&SmartPointer<FromVolumeMesh<T, D>>::template New<>))
917 .def(py::init(&SmartPointer<FromVolumeMesh<T, D>>::template New<
919 SmartPointer<Mesh<T>> &>))
920 .def(py::init(&SmartPointer<FromVolumeMesh<T, D>>::template New<
922 SmartPointer<Mesh<T>> &, bool>))
923 // methods
924 .def("setGrid", &FromVolumeMesh<T, D>::setGrid,
925 "Set the grid used to read in the level sets.")
926 .def("setMesh", &FromVolumeMesh<T, D>::setMesh,
927 "Set the mesh to read from.")
928 .def("setRemoveBoundaryTriangles",
930 "Set whether to include mesh elements outside of the simulation "
931 "domain.")
932 .def("apply", &FromVolumeMesh<T, D>::apply,
933 "Construct a levelset from a volume mesh.");
934
935 // FromMesh
936 py::class_<FromMesh<T, D>, SmartPointer<FromMesh<T, D>>>(module, "FromMesh")
937 .def(py::init(&SmartPointer<FromMesh<T, D>>::template New<>))
938 .def(py::init(&SmartPointer<FromMesh<T, D>>::template New<
939 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &>))
940 .def("setMesh", &FromMesh<T, D>::setMesh, "Set the mesh to read from.")
941 .def("setSortPointList", &FromMesh<T, D>::setSortPointList)
942 .def("apply", &FromMesh<T, D>::apply);
943
944 // lsGeometries
945 // Sphere
946 py::class_<Sphere<T, D>, SmartPointer<Sphere<T, D>>>(module, "Sphere")
947 // constructors
948 .def(py::init(&SmartPointer<Sphere<T, D>>::template New<
949 const std::vector<T> & /*origin*/, T /*radius*/>),
950 py::arg("origin"), py::arg("radius"));
951 // Plane
952 py::class_<Plane<T, D>, SmartPointer<Plane<T, D>>>(module, "Plane")
953 // constructors
954 .def(py::init(&SmartPointer<Plane<T, D>>::template New<
955 const std::vector<T> & /*origin*/,
956 const std::vector<T> & /*normal*/>),
957 py::arg("origin"), py::arg("normal"));
958 // Box
959 py::class_<Box<T, D>, SmartPointer<Box<T, D>>>(module, "Box")
960 // constructors
961 .def(py::init(&SmartPointer<Box<T, D>>::template New<
962 const std::vector<T> & /*minPoint*/,
963 const std::vector<T> & /*maxPoint*/>),
964 py::arg("minPoint"), py::arg("maxPoint"));
965 // Cylinder
966 py::class_<Cylinder<T, D>, SmartPointer<Cylinder<T, D>>>(module, "Cylinder")
967 // constructors
968 .def(
969 py::init(&SmartPointer<Cylinder<T, D>>::template New<
970 const std::vector<T> & /*origin*/,
971 const std::vector<T> & /*axisDirection*/, const T /*height*/,
972 const T /*radius*/, const T /*topRadius*/>),
973 py::arg("origin"), py::arg("axisDirection"), py::arg("height"),
974 py::arg("radius"), py::arg("topRadius") = 0.);
975
976 // MakeGeometry
977 py::class_<MakeGeometry<T, D>, SmartPointer<MakeGeometry<T, D>>>(
978 module, "MakeGeometry")
979 // constructors
980 .def(py::init(&SmartPointer<MakeGeometry<T, D>>::template New<>))
981 .def(py::init(&SmartPointer<MakeGeometry<T, D>>::template New<
982 SmartPointer<Domain<T, D>> &>))
983 .def(
984 py::init(&SmartPointer<MakeGeometry<T, D>>::template New<
985 SmartPointer<Domain<T, D>> &, SmartPointer<Sphere<T, D>> &>))
986 .def(py::init(&SmartPointer<MakeGeometry<T, D>>::template New<
987 SmartPointer<Domain<T, D>> &, SmartPointer<Plane<T, D>> &>))
988 .def(py::init(&SmartPointer<MakeGeometry<T, D>>::template New<
989 SmartPointer<Domain<T, D>> &, SmartPointer<Box<T, D>> &>))
990 .def(py::init(
991 &SmartPointer<MakeGeometry<T, D>>::template New<
992 SmartPointer<Domain<T, D>> &, SmartPointer<Cylinder<T, D>> &>))
993 .def(py::init(
994 &SmartPointer<MakeGeometry<T, D>>::template New<
995 SmartPointer<Domain<T, D>> &, SmartPointer<PointCloud<T, D>> &>))
996 // methods
997 .def("setLevelSet", &MakeGeometry<T, D>::setLevelSet,
998 "Set the levelset in which to create the geometry.")
999 .def("setGeometry",
1000 (void(MakeGeometry<T, D>::*)(SmartPointer<Sphere<T, D>>)) &
1002 .def("setGeometry",
1003 (void(MakeGeometry<T, D>::*)(SmartPointer<Plane<T, D>>)) &
1005 .def("setGeometry",
1006 (void(MakeGeometry<T, D>::*)(SmartPointer<Box<T, D>>)) &
1008 .def("setGeometry",
1009 (void(MakeGeometry<T, D>::*)(SmartPointer<Cylinder<T, D>>)) &
1011 .def("setGeometry",
1012 (void(MakeGeometry<T, D>::*)(SmartPointer<PointCloud<T, D>>)) &
1014 .def("setIgnoreBoundaryConditions",
1015 (void(MakeGeometry<T, D>::*)(bool)) &
1017 .def("setIgnoreBoundaryConditions",
1018 (void(MakeGeometry<T, D>::*)(std::array<bool, 3>)) &
1020 .def("apply", &MakeGeometry<T, D>::apply, "Generate the geometry.");
1021
1022 // MarkVoidPoints
1023 py::class_<MarkVoidPoints<T, D>, SmartPointer<MarkVoidPoints<T, D>>>(
1024 module, "MarkVoidPoints")
1025 // constructors
1026 .def(py::init(&SmartPointer<MarkVoidPoints<T, D>>::template New<>))
1027 .def(py::init(&SmartPointer<MarkVoidPoints<T, D>>::template New<
1028 SmartPointer<Domain<T, D>> &>))
1029 .def(py::init(&SmartPointer<MarkVoidPoints<T, D>>::template New<
1030 SmartPointer<Domain<T, D>> &, bool &>))
1031 // methods
1032 .def("setLevelSet", &MarkVoidPoints<T, D>::setLevelSet,
1033 "Set the levelset to mark void points in.")
1034 .def("setReverseVoidDetection",
1036 "Reverse the logic of detecting the top surface.")
1037 .def("setDetectLargestSurface",
1039 "Set that the top surface should be the one with the most connected "
1040 "LS points.")
1041 .def("setVoidTopSurface", &MarkVoidPoints<T, D>::setVoidTopSurface,
1042 "Set the logic by which to choose the surface which is non-void. "
1043 "All other connected surfaces will then be marked as void points.")
1044 .def("setSaveComponentIds", &MarkVoidPoints<T, D>::setSaveComponentIds,
1045 "Save the connectivity information of all LS points in the "
1046 "pointData of the level set.")
1047 .def("getNumberOfComponents",
1049 "Get the number of connected components found in the level set.")
1050 .def("apply", &MarkVoidPoints<T, D>::apply, "Mark void points.");
1051
1052 // Prune
1053 py::class_<Prune<T, D>, SmartPointer<Prune<T, D>>>(module, "Prune")
1054 // constructors
1055 .def(py::init(&SmartPointer<Prune<T, D>>::template New<>))
1056 .def(py::init(&SmartPointer<Prune<T, D>>::template New<
1057 SmartPointer<Domain<T, D>> &>))
1058 // methods
1059 .def("setLevelSet", &Prune<T, D>::setLevelSet, "Set levelset to prune.")
1060 .def("apply", &Prune<T, D>::apply, "Perform pruning operation.");
1061
1062 // Reader
1063 py::class_<Reader<T, D>, SmartPointer<Reader<T, D>>>(module, "Reader")
1064 // constructors
1065 .def(py::init(&SmartPointer<Reader<T, D>>::template New<>))
1066 .def(py::init(&SmartPointer<Reader<T, D>>::template New<
1067 SmartPointer<Domain<T, D>> &>))
1068 .def(py::init(&SmartPointer<Reader<T, D>>::template New<
1069 SmartPointer<Domain<T, D>> &, std::string>))
1070 // methods
1071 .def("setLevelSet", &Reader<T, D>::setLevelSet,
1072 "Set levelset to write to file.")
1073 .def("setFileName", &Reader<T, D>::setFileName,
1074 "Set the filename for the output file.")
1075 .def("apply", &Reader<T, D>::apply, "Write to file.");
1076
1077 // Reduce
1078 py::class_<Reduce<T, D>, SmartPointer<Reduce<T, D>>>(module, "Reduce")
1079 // constructors
1080 .def(py::init(&SmartPointer<Reduce<T, D>>::template New<>))
1081 .def(py::init(&SmartPointer<Reduce<T, D>>::template New<
1082 SmartPointer<Domain<T, D>> &>))
1083 .def(py::init(&SmartPointer<Reduce<T, D>>::template New<
1084 SmartPointer<Domain<T, D>> &, int>))
1085 .def(py::init(&SmartPointer<Reduce<T, D>>::template New<
1086 SmartPointer<Domain<T, D>> &, int, bool>))
1087 // methods
1088 .def("setLevelSet", &Reduce<T, D>::setLevelSet, "Set levelset to reduce.")
1089 .def("setWidth", &Reduce<T, D>::setWidth, "Set the width to reduce to.")
1090 .def("setNoNewSegment", &Reduce<T, D>::setNoNewSegment,
1091 "Set whether the levelset should be segmented anew (balanced across "
1092 "cores) after reduction.")
1093 .def("apply", &Reduce<T, D>::apply, "Perform reduction.");
1094
1095 // RemoveStrayPoints
1096 py::class_<RemoveStrayPoints<T, D>, SmartPointer<RemoveStrayPoints<T, D>>>(
1097 module, "RemoveStrayPoints")
1098 // constructors
1099 .def(py::init(&SmartPointer<RemoveStrayPoints<T, D>>::template New<>))
1100 .def(py::init(&SmartPointer<RemoveStrayPoints<T, D>>::template New<
1101 SmartPointer<Domain<T, D>> &>))
1102 // methods
1103 .def("setLevelSet", &RemoveStrayPoints<T, D>::setLevelSet,
1104 "Set levelset for stray point removal.")
1105 .def("setVoidTopSurface", &RemoveStrayPoints<T, D>::setVoidTopSurface,
1106 "Set the logic by which to choose the surface which should be kept. "
1107 "All other LS values will be marked as stray points and removed.")
1108 .def("apply", &RemoveStrayPoints<T, D>::apply, "Remove stray points.");
1109
1110 // ToDiskMesh
1111 py::class_<ToDiskMesh<T, D>, SmartPointer<ToDiskMesh<T, D>>>(module,
1112 "ToDiskMesh")
1113 // constructors
1114 .def(py::init(&SmartPointer<ToDiskMesh<T, D>>::template New<>))
1115 .def(py::init(&SmartPointer<ToDiskMesh<T, D>>::template New<
1116 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &>))
1117 // methods
1118 .def("setLevelSet", &ToDiskMesh<T, D>::setLevelSet,
1119 "Set levelset to mesh.")
1120 .def("clearLevelSets", &ToDiskMesh<T, D>::clearLevelSets,
1121 "Clear all inserted level sets.")
1122 .def("insertNextLevelSet", &ToDiskMesh<T, D>::insertNextLevelSet,
1123 "Insert next level set to output in the disk mesh.")
1124 .def("setMesh", &ToDiskMesh<T, D>::setMesh, "Set the mesh to generate.")
1125 .def("setMaterialMap", &ToDiskMesh<T, D>::setMaterialMap,
1126 "Set the material map to use for the disk mesh.")
1127 .def("setMaxValue", &ToDiskMesh<T, D>::setMaxValue,
1128 "Set the maximum level set value to include in the disk mesh.")
1129 .def("apply", &ToDiskMesh<T, D>::apply,
1130 "Convert the levelset to a surface mesh.");
1131
1132 // ToMesh
1133 py::class_<ToMesh<T, D>, SmartPointer<ToMesh<T, D>>>(module, "ToMesh")
1134 // constructors
1135 .def(py::init(&SmartPointer<ToMesh<T, D>>::template New<>))
1136 .def(py::init(&SmartPointer<ToMesh<T, D>>::template New<
1137 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &>))
1138 .def(py::init(
1139 &SmartPointer<ToMesh<T, D>>::template New<
1140 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &, bool>))
1141 .def(py::init(&SmartPointer<ToMesh<T, D>>::template New<
1142 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &, bool,
1143 bool>))
1144 // methods
1145 .def("setLevelSet", &ToMesh<T, D>::setLevelSet, "Set levelset to mesh.")
1146 .def("setMesh", &ToMesh<T, D>::setMesh, "Set the mesh to generate.")
1147 .def("setOnlyDefined", &ToMesh<T, D>::setOnlyDefined,
1148 "Set whether only defined points should be output to the mesh.")
1149 .def("setOnlyActive", &ToMesh<T, D>::setOnlyActive,
1150 "Set whether only level set points <0.5 should be output.")
1151 .def("apply", &ToMesh<T, D>::apply,
1152 "Convert the levelset to a surface mesh.");
1153
1154 // ToSurfaceMesh
1155 py::class_<ToSurfaceMesh<T, D>, SmartPointer<ToSurfaceMesh<T, D>>>(
1156 module, "ToSurfaceMesh")
1157 // constructors
1158 .def(
1159 py::init(
1160 &SmartPointer<ToSurfaceMesh<T, D>>::template New<double, double>),
1161 py::arg("minNodeDistFactor") = 0.05, py::arg("eps") = 1e-12)
1162 .def(py::init(&SmartPointer<ToSurfaceMesh<T, D>>::template New<
1163 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &,
1164 double, double>),
1165 py::arg("domain"), py::arg("mesh"),
1166 py::arg("minNodeDistFactor") = 0.05, py::arg("eps") = 1e-12)
1167 // methods
1168 .def("setLevelSet", &ToSurfaceMesh<T, D>::setLevelSet,
1169 "Set levelset to mesh.")
1170 .def("setMesh", &ToSurfaceMesh<T, D>::setMesh,
1171 "Set the mesh to generate.")
1172 .def("setUpdatePointData", &ToSurfaceMesh<T, D>::setUpdatePointData,
1173 "Set whether to update point data. Defaults to true.")
1174 .def("setSharpCorners", &ToSurfaceMesh<T, D>::setSharpCorners,
1175 "Set whether to preserve sharp corners. Defaults to false.")
1176 .def("apply", &ToSurfaceMesh<T, D>::apply,
1177 "Convert the levelset to a surface mesh.");
1178
1179 // ToMultiSurfaceMesh
1180 py::class_<ToMultiSurfaceMesh<T, D>, SmartPointer<ToMultiSurfaceMesh<T, D>>>(
1181 module, "ToMultiSurfaceMesh")
1182 // constructors
1183 .def(py::init(
1184 &SmartPointer<ToMultiSurfaceMesh<T, D>>::template New<double,
1185 double>),
1186 py::arg("minNodeDistFactor") = 0.05, py::arg("eps") = 1e-12)
1187 .def(py::init(&SmartPointer<ToMultiSurfaceMesh<T, D>>::template New<
1188 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &,
1189 double, double>),
1190 py::arg("domain"), py::arg("mesh"),
1191 py::arg("minNodeDistFactor") = 0.05, py::arg("eps") = 1e-12)
1192 .def(py::init(&SmartPointer<ToMultiSurfaceMesh<T, D>>::template New<
1193 std::vector<SmartPointer<Domain<T, D>>> &,
1194 SmartPointer<Mesh<T>> &, double, double>),
1195 py::arg("domains"), py::arg("mesh"),
1196 py::arg("minNodeDistFactor") = 0.05, py::arg("eps") = 1e-12)
1197 .def(py::init(&SmartPointer<ToMultiSurfaceMesh<T, D>>::template New<
1198 SmartPointer<Mesh<T>> &, double, double>),
1199 py::arg("mesh"), py::arg("minNodeDistFactor") = 0.05,
1200 py::arg("eps") = 1e-12)
1201 // methods
1202 .def("insertNextLevelSet", &ToMultiSurfaceMesh<T, D>::insertNextLevelSet,
1203 "Insert next level set to output in the mesh.")
1204 .def("clearLevelSets", &ToMultiSurfaceMesh<T, D>::clearLevelSets,
1205 "Clear all inserted level sets.")
1206 .def("setMesh", &ToMultiSurfaceMesh<T, D>::setMesh,
1207 "Set the mesh to generate.")
1208 .def("setMaterialMap", &ToMultiSurfaceMesh<T, D>::setMaterialMap,
1209 "Set the material map to use for the multi surface mesh.")
1210 .def("setSharpCorners", &ToMultiSurfaceMesh<T, D>::setSharpCorners,
1211 "Set whether to preserve sharp corners. Defaults to false.")
1212 .def("apply", &ToMultiSurfaceMesh<T, D>::apply,
1213 "Convert the levelset to a surface mesh.");
1214
1215 // ToVoxelMesh
1216 py::class_<ToVoxelMesh<T, D>, SmartPointer<ToVoxelMesh<T, D>>>(module,
1217 "ToVoxelMesh")
1218 // constructors
1219 .def(py::init(&SmartPointer<ToVoxelMesh<T, D>>::template New<>))
1220 .def(py::init(&SmartPointer<ToVoxelMesh<T, D>>::template New<
1221 SmartPointer<Mesh<T>> &>))
1222 .def(py::init(&SmartPointer<ToVoxelMesh<T, D>>::template New<
1223 SmartPointer<Domain<T, D>> &, SmartPointer<Mesh<T>> &>))
1224 .def(py::init(&SmartPointer<ToVoxelMesh<T, D>>::template New<
1225 std::vector<SmartPointer<Domain<T, D>>> &,
1226 SmartPointer<Mesh<T>> &>))
1227 // methods
1228 .def("insertNextLevelSet", &ToVoxelMesh<T, D>::insertNextLevelSet,
1229 "Insert next level set to output in the mesh.")
1230 .def("clearLevelSets", &ToVoxelMesh<T, D>::clearLevelSets,
1231 "Clear all inserted level sets.")
1232 .def("setMesh", &ToVoxelMesh<T, D>::setMesh, "Set the mesh to generate.")
1233 .def("apply", &ToVoxelMesh<T, D>::apply,
1234 "Convert the levelset to a surface mesh.");
1235
1236 // Writer
1237 py::class_<Writer<T, D>, SmartPointer<Writer<T, D>>>(module, "Writer")
1238 // constructors
1239 .def(py::init(&SmartPointer<Writer<T, D>>::template New<>))
1240 .def(py::init(&SmartPointer<Writer<T, D>>::template New<
1241 SmartPointer<Domain<T, D>> &>))
1242 .def(py::init(&SmartPointer<Writer<T, D>>::template New<
1243 SmartPointer<Domain<T, D>> &, std::string>))
1244 // methods
1245 .def("setLevelSet", &Writer<T, D>::setLevelSet,
1246 "Set levelset to write to file.")
1247 .def("setFileName", &Writer<T, D>::setFileName,
1248 "Set the filename for the output file.")
1249 .def("apply", &Writer<T, D>::apply, "Write to file.");
1250
1251 // CompareSparseField
1252 py::class_<CompareSparseField<T, D>, SmartPointer<CompareSparseField<T, D>>>(
1253 module, "CompareSparseField")
1254 // constructors
1255 .def(py::init(&SmartPointer<CompareSparseField<T, D>>::template New<>))
1256 .def(
1257 py::init(&SmartPointer<CompareSparseField<T, D>>::template New<
1258 SmartPointer<Domain<T, D>> &, SmartPointer<Domain<T, D>> &>))
1259 // methods
1260 .def("setLevelSetExpanded",
1262 "Sets the expanded level set for comparison.")
1263 .def("setLevelSetIterated",
1265 "Sets the iterated level set to compare against the expanded one.")
1266 .def("setXRange", &CompareSparseField<T, D>::setXRange,
1267 "Set the x-coordinate range to restrict the comparison area")
1268 .def("setYRange", &CompareSparseField<T, D>::setYRange,
1269 "Set the y-coordinate range to restrict the comparison area")
1270 .def("clearXRange", &CompareSparseField<T, D>::clearXRange,
1271 "Clear the x-range restriction")
1272 .def("clearYRange", &CompareSparseField<T, D>::clearYRange,
1273 "Clear the y-range restriction")
1274 .def("setZRange", &CompareSparseField<T, D>::setZRange,
1275 "Set the z-coordinate range to restrict the comparison area")
1276 .def("clearZRange", &CompareSparseField<T, D>::clearZRange,
1277 "Clear the z-range restriction")
1278 .def("setOutputMesh", &CompareSparseField<T, D>::setOutputMesh,
1279 "Set the output mesh where difference values will be stored")
1280 .def("setFillIteratedWithDistances",
1282 "Set whether to fill the iterated level set with distance values")
1283 .def("setExpandedLevelSetWidth",
1285 "Set the expansion width for the expanded level set")
1286 .def("apply", &CompareSparseField<T, D>::apply,
1287 "Apply the comparison and calculate the sum of squared "
1288 "differences.")
1289 .def("getSumSquaredDifferences",
1291 "Return the sum of squared differences calculated by apply().")
1292 .def("getSumDifferences", &CompareSparseField<T, D>::getSumDifferences,
1293 "Return the sum of absolute differences calculated by apply().")
1294 .def("getNumPoints", &CompareSparseField<T, D>::getNumPoints,
1295 "Return the number of points used in the comparison.")
1296 .def("getNumSkippedPoints",
1298 "Return the number of points skipped during comparison.")
1299 .def("getRMSE", &CompareSparseField<T, D>::getRMSE,
1300 "Calculate the root mean square error from previously computed "
1301 "values.");
1302
1303// WriteVisualizationMesh
1304#ifdef VIENNALS_USE_VTK
1305 py::class_<WriteVisualizationMesh<T, D>,
1306 SmartPointer<WriteVisualizationMesh<T, D>>>(
1307 module, "WriteVisualizationMesh")
1308 // constructors
1309 .def(
1310 py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<>))
1311 .def(py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<
1312 SmartPointer<Domain<T, D>> &>))
1313 // methods
1314 .def("insertNextLevelSet",
1315 &WriteVisualizationMesh<T, D>::insertNextLevelSet,
1316 "Insert next level set to convert. Bigger level sets wrapping "
1317 "smaller ones, should be inserted last.")
1318 .def("setFileName", &WriteVisualizationMesh<T, D>::setFileName,
1319 "Set Name of File to write.")
1320 .def("setExtractHullMesh",
1321 &WriteVisualizationMesh<T, D>::setExtractHullMesh,
1322 "Whether to extract a hull mesh. Defaults to false.")
1323 .def("setExtractVolumeMesh",
1324 &WriteVisualizationMesh<T, D>::setExtractVolumeMesh,
1325 " Whether to extract a tetra volume mesh. Defaults to true.")
1326 .def("setMetaData", &WriteVisualizationMesh<T, D>::setMetaData,
1327 "Set the metadata to be written to the file.")
1328 .def("addMetaData",
1329 py::overload_cast<const std::string &, T>(
1330 &WriteVisualizationMesh<T, D>::addMetaData),
1331 "Add a single metadata entry to the file.")
1332 .def("addMetaData",
1333 py::overload_cast<const std::string &, const std::vector<T> &>(
1334 &WriteVisualizationMesh<T, D>::addMetaData),
1335 "Add a single metadata entry to the file.")
1336 .def("addMetaData",
1337 py::overload_cast<
1338 const std::unordered_map<std::string, std::vector<T>> &>(
1339 &WriteVisualizationMesh<T, D>::addMetaData),
1340 "Add metadata to the file.")
1341 .def("apply", &WriteVisualizationMesh<T, D>::apply,
1342 "Make and write mesh.");
1343#endif
1344
1345 // ToHullMesh
1346 py::class_<ToHullMesh<T, D>, SmartPointer<ToHullMesh<T, D>>>(module,
1347 "ToHullMesh")
1348 // constructors
1349 .def(py::init(&SmartPointer<ToHullMesh<T, D>>::template New<>))
1350 .def(py::init(&SmartPointer<ToHullMesh<T, D>>::template New<
1351 SmartPointer<Mesh<T>> &>))
1352 .def(py::init(&SmartPointer<ToHullMesh<T, D>>::template New<
1353 SmartPointer<Mesh<T>> &,
1354 std::vector<SmartPointer<Domain<T, D>>> &>))
1355 .def(py::init(&SmartPointer<ToHullMesh<T, D>>::template New<
1356 SmartPointer<Mesh<T>> &, SmartPointer<Domain<T, D>> &>))
1357 // methods
1358 .def("setMesh", &ToHullMesh<T, D>::setMesh, "Set the mesh to generate.")
1359 .def("insertNextLevelSet", &ToHullMesh<T, D>::insertNextLevelSet,
1360 "Insert next level set to convert. Bigger level sets wrapping "
1361 "smaller ones, should be inserted last.")
1362 .def("clearLevelSets", &ToHullMesh<T, D>::clearLevelSets,
1363 "Clear all inserted level sets.")
1364 .def("setSharpCorners", &ToHullMesh<T, D>::setSharpCorners,
1365 "Set whether to generate sharp corners. Defaults to false.")
1366 .def("setMaterialMap", &ToHullMesh<T, D>::setMaterialMap,
1367 "Set the material map to use for the hull mesh.")
1368 .def("setBottomExtension", &ToHullMesh<T, D>::setBottomExtension,
1369 "Set the bottom extension value for 2D hull meshes.")
1370 .def("apply", &ToHullMesh<T, D>::apply, "Generate hull mesh.");
1371
1372 // CompareVolume
1373 py::class_<CompareVolume<T, D>, SmartPointer<CompareVolume<T, D>>>(
1374 module, "CompareVolume")
1375 // constructors
1376 .def(py::init(&SmartPointer<CompareVolume<T, D>>::template New<>))
1377 .def(
1378 py::init(&SmartPointer<CompareVolume<T, D>>::template New<
1379 SmartPointer<Domain<T, D>> &, SmartPointer<Domain<T, D>> &>))
1380 // methods
1381 .def("setLevelSetTarget", &CompareVolume<T, D>::setLevelSetTarget,
1382 "Sets the target level set.")
1383 .def("setLevelSetSample", &CompareVolume<T, D>::setLevelSetSample,
1384 "Sets the sample level set.")
1385 .def("setDefaultIncrement", &CompareVolume<T, D>::setDefaultIncrement,
1386 "Set default increment value")
1387 .def("setXRangeAndIncrement", &CompareVolume<T, D>::setXRangeAndIncrement,
1388 "Sets the x-range and custom increment value")
1389 .def("setYRangeAndIncrement", &CompareVolume<T, D>::setYRangeAndIncrement,
1390 "Sets the y-range and custom increment value")
1391 .def("setZRangeAndIncrement", &CompareVolume<T, D>::setZRangeAndIncrement,
1392 "Sets the z-range and custom increment value")
1393 .def("setOutputMesh", &CompareVolume<T, D>::setOutputMesh,
1394 "Set the output mesh where difference areas will be stored")
1395 .def("getVolumeMismatch", &CompareVolume<T, D>::getVolumeMismatch,
1396 "Returns the computed volume mismatch.")
1397 .def("getAreaMismatch", &CompareVolume<T, D>::getAreaMismatch,
1398 "Returns the computed area mismatch.")
1399 .def("getCustomVolumeMismatch",
1401 "Returns the computed volume mismatch, with custom increments "
1402 "applied.")
1403 .def("getCustomAreaMismatch", &CompareVolume<T, D>::getCustomAreaMismatch,
1404 "Returns the computed area mismatch, with custom increments "
1405 "applied.")
1406 .def("getCellCount", &CompareVolume<T, D>::getCellCount,
1407 "Returns the number of cells where the level sets differ.")
1408 .def("getCustomCellCount", &CompareVolume<T, D>::getCustomCellCount,
1409 "Returns the number of cells where the level sets differ, with "
1410 "custom increments applied.")
1411 .def("apply", &CompareVolume<T, D>::apply,
1412 "Computes the volume difference between the two level sets.");
1413
1414 if constexpr (D == 2) {
1415 module.attr("CompareArea") = module.attr("CompareVolume");
1416 }
1417
1418 // CompareChamfer
1419 py::class_<CompareChamfer<T, D>, SmartPointer<CompareChamfer<T, D>>>(
1420 module, "CompareChamfer")
1421 // constructors
1422 .def(py::init(&SmartPointer<CompareChamfer<T, D>>::template New<>))
1423 .def(
1424 py::init(&SmartPointer<CompareChamfer<T, D>>::template New<
1425 SmartPointer<Domain<T, D>> &, SmartPointer<Domain<T, D>> &>))
1426 // methods
1427 .def("setLevelSetTarget", &CompareChamfer<T, D>::setLevelSetTarget,
1428 "Set the target level set.")
1429 .def("setLevelSetSample", &CompareChamfer<T, D>::setLevelSetSample,
1430 "Set the sample level set.")
1431 .def("setOutputMeshTarget", &CompareChamfer<T, D>::setOutputMeshTarget,
1432 "Set output mesh for target surface points with distance data.")
1433 .def("setOutputMeshSample", &CompareChamfer<T, D>::setOutputMeshSample,
1434 "Set output mesh for sample surface points with distance data.")
1435 .def("apply", &CompareChamfer<T, D>::apply,
1436 "Apply the Chamfer distance calculation.")
1437 .def("getForwardDistance", &CompareChamfer<T, D>::getForwardDistance,
1438 "Get the forward distance (average distance from target to "
1439 "sample).")
1440 .def("getBackwardDistance", &CompareChamfer<T, D>::getBackwardDistance,
1441 "Get the backward distance (average distance from sample to "
1442 "target).")
1443 .def("getChamferDistance", &CompareChamfer<T, D>::getChamferDistance,
1444 "Get the Chamfer distance (average of forward and backward).")
1445 .def("getRMSChamferDistance",
1447 "Get the RMS Chamfer distance.")
1448 .def("getMaxDistance", &CompareChamfer<T, D>::getMaxDistance,
1449 "Get the maximum nearest-neighbor distance.")
1450 .def("getNumTargetPoints", &CompareChamfer<T, D>::getNumTargetPoints,
1451 "Get the number of target surface points.")
1452 .def("getNumSamplePoints", &CompareChamfer<T, D>::getNumSamplePoints,
1453 "Get the number of sample surface points.");
1454
1455 // CompareCriticalDimensions
1456 py::class_<CompareCriticalDimensions<T, D>,
1457 SmartPointer<CompareCriticalDimensions<T, D>>>(
1458 module, "CompareCriticalDimensions")
1459 // constructors
1460 .def(py::init(
1461 &SmartPointer<CompareCriticalDimensions<T, D>>::template New<>))
1462 .def(
1463 py::init(&SmartPointer<CompareCriticalDimensions<T, D>>::template New<
1464 SmartPointer<Domain<T, D>> &, SmartPointer<Domain<T, D>> &>))
1465 // methods
1466 .def("setLevelSetTarget",
1468 "Sets the target level set.")
1469 .def("setLevelSetSample",
1471 "Sets the sample level set.")
1473 py::arg("measureDimension"), py::arg("minBounds"),
1474 py::arg("maxBounds"), py::arg("findMaximum") = true,
1475 "Add a generic range specification.")
1477 py::arg("minX"), py::arg("maxX"), py::arg("findMaximum") = true,
1478 "Add an X range to find maximum or minimum Y position.")
1480 py::arg("minY"), py::arg("maxY"), py::arg("findMaximum") = true,
1481 "Add a Y range to find maximum or minimum X position.")
1483 "Clear all range specifications.")
1485 "Set the output mesh where critical dimension locations will be "
1486 "stored.")
1488 "Apply the comparison.")
1489 .def("getNumCriticalDimensions",
1491 "Get the number of critical dimensions compared.")
1492 .def(
1493 "getCriticalDimensionResult",
1494 [](CompareCriticalDimensions<T, D> &self, size_t index) -> py::tuple {
1495 T posRef{}, posCmp{}, diff{};
1496 bool valid =
1497 self.getCriticalDimensionResult(index, posRef, posCmp, diff);
1498 if (valid)
1499 return py::make_tuple(true, posRef, posCmp, diff);
1500 return py::make_tuple(false, T(0), T(0), T(0));
1501 },
1502 py::arg("index"),
1503 "Get a specific critical dimension result. Returns (valid, "
1504 "positionTarget, positionSample, difference).")
1505 .def("getMeanDifference",
1507 "Get mean absolute difference across all valid critical "
1508 "dimensions.")
1509 .def("getMaxDifference",
1511 "Get maximum difference across all valid critical dimensions.")
1513 "Get RMSE across all valid critical dimensions.")
1514 .def("getAllDifferences",
1516 "Get all valid differences as a list.");
1517
1518 // CompareNarrowBand
1519 py::class_<CompareNarrowBand<T, D>, SmartPointer<CompareNarrowBand<T, D>>>(
1520 module, "CompareNarrowBand")
1521 // constructors
1522 .def(py::init(&SmartPointer<CompareNarrowBand<T, D>>::template New<>))
1523 .def(
1524 py::init(&SmartPointer<CompareNarrowBand<T, D>>::template New<
1525 SmartPointer<Domain<T, D>> &, SmartPointer<Domain<T, D>> &>))
1526 // methods
1527 .def("setLevelSetTarget", &CompareNarrowBand<T, D>::setLevelSetTarget,
1528 "Sets the target level set.")
1529 .def("setLevelSetSample", &CompareNarrowBand<T, D>::setLevelSetSample,
1530 "Sets the sample level set.")
1531 .def("setXRange", &CompareNarrowBand<T, D>::setXRange,
1532 "Set the x-coordinate range to restrict the comparison area")
1533 .def("setYRange", &CompareNarrowBand<T, D>::setYRange,
1534 "Set the y-coordinate range to restrict the comparison area")
1535 .def("clearXRange", &CompareNarrowBand<T, D>::clearXRange,
1536 "Clear the x-range restriction")
1537 .def("clearYRange", &CompareNarrowBand<T, D>::clearYRange,
1538 "Clear the y-range restriction")
1539 .def("setZRange", &CompareNarrowBand<T, D>::setZRange,
1540 "Set the z-coordinate range to restrict the comparison area")
1541 .def("clearZRange", &CompareNarrowBand<T, D>::clearZRange,
1542 "Clear the z-range restriction")
1543 .def("setOutputMesh", &CompareNarrowBand<T, D>::setOutputMesh,
1544 "Set the output mesh where difference values will be stored")
1545 .def("setOutputMeshSquaredDifferences",
1547 "Set whether to output squared differences (true) or absolute "
1548 "differences (false)")
1549 .def("apply", &CompareNarrowBand<T, D>::apply,
1550 "Apply the comparison and calculate the sum of squared "
1551 "differences.")
1552 .def("getSumSquaredDifferences",
1554 "Return the sum of squared differences calculated by apply().")
1555 .def("getSumDifferences", &CompareNarrowBand<T, D>::getSumDifferences,
1556 "Return the sum of absolute differences calculated by apply().")
1557 .def("getNumPoints", &CompareNarrowBand<T, D>::getNumPoints,
1558 "Return the number of points used in the comparison.")
1559 .def("getRMSE", &CompareNarrowBand<T, D>::getRMSE,
1560 "Calculate the root mean square error from previously computed "
1561 "values.");
1562}
constexpr int D
Definition Epitaxy.cpp:12
double T
Definition Epitaxy.cpp:13
double bounds[2 *D]
Definition OxidationNitride.cpp:40
constexpr T gridDelta
Definition OxidationNitride.cpp:35
Definition pyWrap.hpp:71
T getSignedDistance(const vectorType &initial, const vectorType &candidate, unsigned long initialPointId) const override
Definition pyWrap.hpp:83
bool isInside(const vectorType &initial, const vectorType &candidate, double eps=0.) const override
Definition pyWrap.hpp:78
boundsType getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition pyWrap.hpp:89
Stencil Local Lax Friedrichs Discretization Scheme. It uses a stencil of order around active points,...
Definition lsStencilLocalLaxFriedrichsScalar.hpp:33
This class is used to advance level sets over time. Level sets are passed to the constructor in a std...
Definition lsAdvect.hpp:54
void setVelocityField(SmartPointer< VelocityField< T > > passedVelocities)
Set the velocity field used for advection. This should be a concrete implementation of lsVelocityFiel...
Definition lsAdvect.hpp:851
void insertNextLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Pushes the passed level set to the back of the list of level sets used for advection.
Definition lsAdvect.hpp:843
void setVelocityUpdateCallback(std::function< bool(SmartPointer< Domain< T, D > >)> callback)
Set a callback function that is called after the level set has been updated during intermediate time ...
Definition lsAdvect.hpp:953
void setUpdatePointData(bool update)
Set whether the point data in the old LS should be translated to the advected LS. Defaults to true.
Definition lsAdvect.hpp:949
void setSpatialScheme(SpatialSchemeEnum scheme)
Set which spatial discretization scheme should be used out of the ones specified in SpatialSchemeEnum...
Definition lsAdvect.hpp:923
bool getCalculateNormalVectors() const
Get whether normal vectors were calculated.
Definition lsAdvect.hpp:919
void setIgnoreVoids(bool iV)
Set whether level set values, which are not part of the "top" geometrically connected part of values,...
Definition lsAdvect.hpp:886
void clearLevelSets()
Definition lsAdvect.hpp:847
void setCalculateNormalVectors(bool cnv)
Set whether normal vectors should be calculated at each level set point. Defaults to true....
Definition lsAdvect.hpp:878
void apply()
Definition lsAdvect.hpp:1004
void setSingleStep(bool singleStep)
If set to true, only a single advection step will be performed, even if the advection time set with s...
Definition lsAdvect.hpp:866
void prepareLS()
Definition lsAdvect.hpp:960
double getAdvectedTime() const
Get by how much the physical time was advanced during the last apply() call.
Definition lsAdvect.hpp:907
void setTemporalScheme(TemporalSchemeEnum scheme)
Set which time integration scheme should be used.
Definition lsAdvect.hpp:936
void setDissipationAlpha(const double &a)
Set the alpha dissipation coefficient. For lsLaxFriedrichs, this is used as the alpha value....
Definition lsAdvect.hpp:942
void setCheckDissipation(bool check)
Definition lsAdvect.hpp:945
void setIntegrationScheme(IntegrationSchemeEnum scheme)
Definition lsAdvect.hpp:928
double getCurrentTimeStep() const
Return the last applied time step.
Definition lsAdvect.hpp:910
void setAdvectionTime(double time)
Set the time until when the level set should be advected. If this takes more than one advection step,...
Definition lsAdvect.hpp:860
unsigned getNumberOfTimeSteps() const
Get how many advection steps were performed during the last apply() call.
Definition lsAdvect.hpp:913
void setAdaptiveTimeStepping(bool aTS=true, unsigned subdivisions=20)
Set whether adaptive time stepping should be used when approaching material boundaries during etching...
Definition lsAdvect.hpp:891
void setTimeStepRatio(const double &cfl)
Set the CFL condition to use during advection. The CFL condition sets the maximum distance a surface ...
Definition lsAdvect.hpp:872
double getTimeStepRatio() const
Get the value of the CFL number.
Definition lsAdvect.hpp:916
void setSaveAdvectionVelocities(bool sAV)
Set whether the velocities applied to each point should be saved in the level set for debug purposes.
Definition lsAdvect.hpp:903
This class is used to perform boolean operations on two level sets and write the resulting level set ...
Definition lsBooleanOperation.hpp:45
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Set which level set to perform the boolean operation on.
Definition lsBooleanOperation.hpp:290
void setSecondLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Set the level set which will be used to modify the first level set.
Definition lsBooleanOperation.hpp:296
void setBooleanOperation(BooleanOperationEnum passedOperation)
Set which of the operations of BooleanOperationEnum to perform.
Definition lsBooleanOperation.hpp:301
void apply()
Perform operation.
Definition lsBooleanOperation.hpp:319
Concrete implementation of GeometricAdvectDistribution for a rectangular box distribution.
Definition lsGeometricAdvectDistributions.hpp:129
bool isInside(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, double eps) const override
Quick check whether a point relative to the distributions center is inside the distribution....
Definition lsGeometricAdvectDistributions.hpp:136
std::array< viennahrle::CoordType, 6 > getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition lsGeometricAdvectDistributions.hpp:159
T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long) const override
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
Definition lsGeometricAdvectDistributions.hpp:148
Class describing a square box from one coordinate to another.
Definition lsGeometries.hpp:71
Definition lsCalculateCurvatures.hpp:24
void setCurvatureType(CurvatureEnum passedType)
Definition lsCalculateCurvatures.hpp:46
void setMaxValue(const T passedMaxValue)
Definition lsCalculateCurvatures.hpp:59
void apply()
Definition lsCalculateCurvatures.hpp:61
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCalculateCurvatures.hpp:42
This algorithm is used to compute the normal vectors for all points with level set values <= maxValue...
Definition lsCalculateNormalVectors.hpp:40
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCalculateNormalVectors.hpp:63
void apply()
Definition lsCalculateNormalVectors.hpp:95
void setMethod(NormalCalculationMethodEnum passedMethod)
Definition lsCalculateNormalVectors.hpp:79
void setMaxValue(const T passedMaxValue)
Definition lsCalculateNormalVectors.hpp:67
Definition lsCalculateVisibilities.hpp:10
void apply()
Definition lsCalculateVisibilities.hpp:25
This class is used to find errors in the underlying level set structure, like invalid neighbours of d...
Definition lsCheck.hpp:22
void apply()
Definition lsCheck.hpp:78
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCheck.hpp:66
Calculate Chamfer distance between two level sets by comparing their zero-level-set surfaces....
Definition lsCompareChamfer.hpp:39
unsigned getNumSamplePoints() const
Get the number of sample surface points.
Definition lsCompareChamfer.hpp:332
void apply()
Apply the Chamfer distance calculation.
Definition lsCompareChamfer.hpp:104
T getMaxDistance() const
Get the maximum nearest-neighbor distance.
Definition lsCompareChamfer.hpp:326
T getBackwardDistance() const
Get the backward distance (average distance from sample to target).
Definition lsCompareChamfer.hpp:317
void setOutputMeshSample(SmartPointer< Mesh< T > > passedMesh)
Set output mesh for sample surface points with distance data.
Definition lsCompareChamfer.hpp:99
T getRMSChamferDistance() const
Get the RMS Chamfer distance.
Definition lsCompareChamfer.hpp:323
T getChamferDistance() const
Get the Chamfer distance (average of forward and backward).
Definition lsCompareChamfer.hpp:320
T getForwardDistance() const
Get the forward distance (average distance from target to sample).
Definition lsCompareChamfer.hpp:314
void setOutputMeshTarget(SmartPointer< Mesh< T > > passedMesh)
Set output mesh for target surface points with distance data.
Definition lsCompareChamfer.hpp:94
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Set the target level set.
Definition lsCompareChamfer.hpp:84
unsigned getNumTargetPoints() const
Get the number of target surface points.
Definition lsCompareChamfer.hpp:329
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Set the sample level set.
Definition lsCompareChamfer.hpp:89
Compares critical dimensions (surface positions) between two level sets. Critical dimensions are defi...
Definition lsCompareCriticalDimensions.hpp:33
void apply()
Apply the comparison.
Definition lsCompareCriticalDimensions.hpp:197
std::vector< T > getAllDifferences() const
Get all valid results.
Definition lsCompareCriticalDimensions.hpp:309
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh)
Set the output mesh where critical dimension locations will be stored.
Definition lsCompareCriticalDimensions.hpp:192
bool getCriticalDimensionResult(size_t index, T &positionTarget, T &positionSample, T &difference) const
Get a specific critical dimension result.
Definition lsCompareCriticalDimensions.hpp:259
size_t getNumCriticalDimensions() const
Get the number of critical dimensions compared.
Definition lsCompareCriticalDimensions.hpp:256
void addRange(int measureDimension, const std::array< T, D > &minBounds, const std::array< T, D > &maxBounds, bool findMaximum=true)
Add a generic range specification.
Definition lsCompareCriticalDimensions.hpp:154
void addYRange(T minY, T maxY, bool findMaximum=true)
Add a Y range to find maximum or minimum X position.
Definition lsCompareCriticalDimensions.hpp:177
void clearRanges()
Clear all range specifications.
Definition lsCompareCriticalDimensions.hpp:189
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareCriticalDimensions.hpp:145
T getMeanDifference() const
Get mean absolute difference across all valid critical dimensions.
Definition lsCompareCriticalDimensions.hpp:271
T getMaxDifference() const
Get maximum difference across all valid critical dimensions.
Definition lsCompareCriticalDimensions.hpp:284
void addXRange(T minX, T maxX, bool findMaximum=true)
Add an X range to find maximum or minimum Y position.
Definition lsCompareCriticalDimensions.hpp:165
T getRMSE() const
Get RMSE across all valid critical dimensions.
Definition lsCompareCriticalDimensions.hpp:295
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareCriticalDimensions.hpp:149
Calculate distance measure between two level sets by comparing their SDF values on a narrow band....
Definition lsCompareNarrowBand.hpp:19
void setYRange(T minYRange, T maxYRange)
Set the y-coordinate range to restrict the comparison area.
Definition lsCompareNarrowBand.hpp:164
void setOutputMeshSquaredDifferences(bool value)
Set whether to output squared differences (true) or absolute differences (false).
Definition lsCompareNarrowBand.hpp:207
void setXRange(T minXRange, T maxXRange)
Set the x-coordinate range to restrict the comparison area.
Definition lsCompareNarrowBand.hpp:157
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh, bool outputMeshSquaredDiffs=true)
Set the output mesh where difference values will be stored.
Definition lsCompareNarrowBand.hpp:199
void clearZRange()
Clear the z-range restriction.
Definition lsCompareNarrowBand.hpp:192
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareNarrowBand.hpp:148
T getRMSE() const
Calculate the root mean square error from previously computed values.
Definition lsCompareNarrowBand.hpp:387
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareNarrowBand.hpp:152
unsigned getNumPoints() const
Return the number of points used in the comparison.
Definition lsCompareNarrowBand.hpp:384
void clearYRange()
Clear the y-range restriction.
Definition lsCompareNarrowBand.hpp:178
T getSumSquaredDifferences() const
Return the sum of squared differences calculated by apply().
Definition lsCompareNarrowBand.hpp:378
void apply()
Apply the comparison and calculate the sum of squared differences.
Definition lsCompareNarrowBand.hpp:212
void clearXRange()
Clear the x-range restriction.
Definition lsCompareNarrowBand.hpp:171
T getSumDifferences() const
Definition lsCompareNarrowBand.hpp:381
void setZRange(T minZRange, T maxZRange)
Set the z-coordinate range to restrict the comparison area.
Definition lsCompareNarrowBand.hpp:185
Calculate distance measure between two level sets by comparing their SDF values on a sparse field....
Definition lsCompareSparseField.hpp:34
unsigned getNumPoints() const
Return the number of points used in the comparison.
Definition lsCompareSparseField.hpp:398
T getRMSE() const
Calculate the root mean square error from previously computed values.
Definition lsCompareSparseField.hpp:404
void setXRange(T minXRange, T maxXRange)
Set the x-coordinate range to restrict the comparison area.
Definition lsCompareSparseField.hpp:155
void setExpandedLevelSetWidth(int width)
Set the expansion width for the expanded level set This value will be used if the expanded level set ...
Definition lsCompareSparseField.hpp:209
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh)
Set the output mesh where difference values will be stored.
Definition lsCompareSparseField.hpp:197
void setLevelSetIterated(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareSparseField.hpp:150
unsigned getNumSkippedPoints() const
Return the number of skipped points during the comparison.
Definition lsCompareSparseField.hpp:401
void setYRange(T minYRange, T maxYRange)
Set the y-coordinate range to restrict the comparison area.
Definition lsCompareSparseField.hpp:162
void setLevelSetExpanded(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareSparseField.hpp:146
void setFillIteratedWithDistances(bool fill)
Set whether to fill the iterated level set with distances.
Definition lsCompareSparseField.hpp:202
T getSumSquaredDifferences() const
Return the sum of squared differences calculated by apply().
Definition lsCompareSparseField.hpp:392
T getSumDifferences() const
Return the sum of differences calculated by apply().
Definition lsCompareSparseField.hpp:395
void clearZRange()
Clear the z-range restriction.
Definition lsCompareSparseField.hpp:190
void clearYRange()
Clear the y-range restriction.
Definition lsCompareSparseField.hpp:176
void apply()
Apply the comparison and calculate the sum of squared differences.
Definition lsCompareSparseField.hpp:220
void clearXRange()
Clear the x-range restriction.
Definition lsCompareSparseField.hpp:169
void setZRange(T minZRange, T maxZRange)
Set the z-coordinate range to restrict the comparison area.
Definition lsCompareSparseField.hpp:183
Computes an estimate of the volume/area where two level sets differ. The volume is calculated by iter...
Definition lsCompareVolume.hpp:25
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh)
Set the output mesh where difference areas will be stored for visualization. Each cell in the mesh wi...
Definition lsCompareVolume.hpp:171
unsigned long int getCellCount() const
Returns the number of cells where the level sets differ.
Definition lsCompareVolume.hpp:193
void setXRangeAndIncrement(hrleIndexType minXRange, hrleIndexType maxXRange, unsigned short int Xincrement)
Sets the x-range and custom increment value.
Definition lsCompareVolume.hpp:141
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Sets the target level set.
Definition lsCompareVolume.hpp:126
void apply()
Computes the volume/area difference between the two level sets.
Definition lsCompareVolume.hpp:202
double getAreaMismatch() const
Alias for getVolumeMismatch for 2D compatibility.
Definition lsCompareVolume.hpp:181
void setYRangeAndIncrement(hrleIndexType minYRange, hrleIndexType maxYRange, unsigned short int Yincrement)
Sets the y-range and custom increment value.
Definition lsCompareVolume.hpp:150
void setZRangeAndIncrement(hrleIndexType minZRange, hrleIndexType maxZRange, unsigned short int Zincrement)
Sets the z-range and custom increment value.
Definition lsCompareVolume.hpp:159
void setDefaultIncrement(unsigned short int increment)
Set default increment value.
Definition lsCompareVolume.hpp:136
double getCustomVolumeMismatch() const
Returns the computed volume/area mismatch, with custom increments applied.
Definition lsCompareVolume.hpp:184
unsigned long int getCustomCellCount() const
Returns the number of cells where the level sets differ, with custom increments applied.
Definition lsCompareVolume.hpp:197
double getVolumeMismatch() const
Returns the computed volume/area mismatch.
Definition lsCompareVolume.hpp:176
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Sets the sample level set.
Definition lsCompareVolume.hpp:131
double getCustomAreaMismatch() const
Alias for getCustomVolumeMismatch for 2D compatibility.
Definition lsCompareVolume.hpp:190
This algorithm creates a convex hull mesh from a point cloud. This is done using the gift wrapping ap...
Definition lsConvexHull.hpp:23
void apply()
Definition lsConvexHull.hpp:332
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsConvexHull.hpp:326
void setPointCloud(SmartPointer< PointCloud< T, D > > passedPointCloud)
Definition lsConvexHull.hpp:328
Definition lsGeometricAdvectDistributions.hpp:185
T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long pointId) const override
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
Definition lsGeometricAdvectDistributions.hpp:198
std::array< viennahrle::CoordType, 6 > getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition lsGeometricAdvectDistributions.hpp:242
Class describing a square box from one coordinate to another.
Definition lsGeometries.hpp:100
This class detects features of the level set function. This class offers two methods to determine fea...
Definition lsDetectFeatures.hpp:26
void apply()
Execute the algorithm.
Definition lsDetectFeatures.hpp:64
void setDetectionThreshold(T threshold)
Definition lsDetectFeatures.hpp:51
void setDetectionMethod(FeatureDetectionEnum passedMethod)
Set which algorithm to use to detect features. The curvature-based algorithm should always be preferr...
Definition lsDetectFeatures.hpp:59
Class containing all information about the level set, including the dimensions of the domain,...
Definition lsDomain.hpp:27
void clearMetaData()
Definition lsDomain.hpp:163
void deepCopy(const SmartPointer< Domain< T, D > > passedDomain)
copy all values of "passedDomain" to this Domain
Definition lsDomain.hpp:124
unsigned getNumberOfSegments() const
returns the number of segments, the levelset is split into. This is useful for algorithm parallelisat...
Definition lsDomain.hpp:153
void print(std::ostream &out=std::cout)
prints basic information and all memebers of the levelset structure
Definition lsDomain.hpp:178
int getLevelSetWidth() const
Definition lsDomain.hpp:158
unsigned getNumberOfPoints() const
returns the number of defined points
Definition lsDomain.hpp:156
void setLevelSetWidth(int width)
Definition lsDomain.hpp:160
Expands the levelSet to the specified number of layers. The largest value in the levelset is thus wid...
Definition lsExpand.hpp:17
void apply()
Apply the expansion to the specified width.
Definition lsExpand.hpp:44
void setWidth(int passedWidth)
Set how far the level set should be extended. Points with value width*0.5 will be added by this algor...
Definition lsExpand.hpp:37
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsExpand.hpp:31
Import the regular grid, on which the level set values are defined, from an explicit Mesh<>....
Definition lsFromMesh.hpp:16
void setMesh(const SmartPointer< Mesh< T > > passedMesh)
Definition lsFromMesh.hpp:34
void setSortPointList(bool passedSortPointList)
Definition lsFromMesh.hpp:36
void apply()
Definition lsFromMesh.hpp:40
Construct a level set from an explicit mesh.
Definition lsFromSurfaceMesh.hpp:15
void setRemoveBoundaryTriangles(bool passedRemoveBoundaryTriangles)
Set whether all triangles outside the domain should be ignored (=true) or whether boundary conditions...
Definition lsFromSurfaceMesh.hpp:227
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsFromSurfaceMesh.hpp:218
void apply()
Definition lsFromSurfaceMesh.hpp:243
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsFromSurfaceMesh.hpp:222
This class creates a level set from a tetrahedral mesh. If the mesh contains a scalar data array call...
Definition lsFromVolumeMesh.hpp:22
typename Domain< T, D >::GridType GridType
Definition lsFromVolumeMesh.hpp:26
void apply()
Definition lsFromVolumeMesh.hpp:56
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsFromVolumeMesh.hpp:48
void setGrid(const GridType &passedGrid)
Definition lsFromVolumeMesh.hpp:43
void setRemoveBoundaryTriangles(bool passedRemoveBoundaryTriangles)
Definition lsFromVolumeMesh.hpp:50
Base class for distributions used by lsGeometricAdvect. All functions are pure virtual and must be im...
Definition lsGeometricAdvectDistributions.hpp:15
virtual void prepare(SmartPointer< Domain< T, D > > domain)
Definition lsGeometricAdvectDistributions.hpp:43
virtual bool isInside(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, double eps) const
Quick check whether a point relative to the distributions center is inside the distribution....
Definition lsGeometricAdvectDistributions.hpp:23
virtual T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long pointId) const =0
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
virtual void finalize()
Definition lsGeometricAdvectDistributions.hpp:44
virtual std::array< viennahrle::CoordType, 6 > getBounds() const =0
Sets bounds to the bounding box of the distribution.
This class advects the level set according to a given distribution. This distribution is overlayed at...
Definition lsGeometricAdvect.hpp:35
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Set the levelset which should be advected.
Definition lsGeometricAdvect.hpp:76
void apply()
Perform geometrical advection.
Definition lsGeometricAdvect.hpp:95
void setAdvectionDistribution(SmartPointer< GeometricAdvectDistribution< T, D > > passedDist)
Set which advection distribution to use. Must be derived from GeometricAdvectDistribution.
Definition lsGeometricAdvect.hpp:82
Create level sets describing basic geometric forms.
Definition lsMakeGeometry.hpp:27
void setIgnoreBoundaryConditions(bool passedIgnoreBoundaryConditions)
Ignore boundary conditions, meaning the parts of the generated geometry which are outside of the doma...
Definition lsMakeGeometry.hpp:127
void apply()
Definition lsMakeGeometry.hpp:144
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsMakeGeometry.hpp:87
void setGeometry(SmartPointer< Sphere< T, D > > passedSphere)
Set sphere as geometry to be created in the level set.
Definition lsMakeGeometry.hpp:92
This class is used to mark points of the level set which are enclosed in a void.
Definition lsMarkVoidPoints.hpp:28
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsMarkVoidPoints.hpp:95
void setReverseVoidDetection(bool passedReverseVoidDetection)
Set whether the "top" level set should be the most positive(default) connected chain of level set val...
Definition lsMarkVoidPoints.hpp:103
void apply()
Definition lsMarkVoidPoints.hpp:154
void setSaveComponentIds(bool scid)
Set whether the connected component IDs used to generate the void points should be saved....
Definition lsMarkVoidPoints.hpp:150
void setDetectLargestSurface(bool passedDetect)
Set whether the number of points of one connected surface should be used to detect void points....
Definition lsMarkVoidPoints.hpp:113
void setVoidTopSurface(VoidTopSurfaceEnum topSurface)
Set which connected component to use as the top surface and mark all other components as void points.
Definition lsMarkVoidPoints.hpp:119
std::size_t getNumberOfComponents() const
Definition lsMarkVoidPoints.hpp:152
This class holds an explicit mesh, which is always given in 3 dimensions. If it describes a 2D mesh,...
Definition lsMesh.hpp:25
Propagates the volume expansion generated at the Si/SiO2 interface through the oxide as a Cartesian-g...
Definition lsOxidationDeformation.hpp:112
std::array< T, 9 > getStressTensor(const Vec3D< T > &coordinate) const
Definition lsOxidationDeformation.hpp:1016
std::size_t getNumberOfSolutionNodes() const
Definition lsOxidationDeformation.hpp:1063
Vec3D< T > getMaterialVelocity(const Vec3D< T > &coordinate, bool nitride)
Monolithic contact: the velocity of one material only (oxide or nitride), for advecting that material...
Definition lsOxidationDeformation.hpp:939
void setMaskInterface(SmartPointer< Domain< T, D > > passedInterface, int passedMaskSign=1)
Definition lsOxidationDeformation.hpp:262
T getResidual() const
Definition lsOxidationDeformation.hpp:1037
void setReactionInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDeformation.hpp:250
unsigned getIterations() const
Definition lsOxidationDeformation.hpp:1036
void markGeometryChanged()
Definition lsOxidationDeformation.hpp:326
void setDeformationParameters(OxidationDeformationParameters passedParameters)
Definition lsOxidationDeformation.hpp:288
static auto New(Args &&...args)
Definition lsOxidationDeformation.hpp:246
T getVonMisesStress(const Vec3D< T > &coordinate) const
Definition lsOxidationDeformation.hpp:1026
void apply()
Definition lsOxidationDeformation.hpp:696
void clearSolveBounds()
Definition lsOxidationDeformation.hpp:320
void setOxidationParameters(OxidationParameters passedParameters)
Definition lsOxidationDeformation.hpp:282
void writeFieldsToLevelSet()
Write velocity (Vec3D) and viscoelastic stress history (3 tensor-row vectors) into ambientInterface->...
Definition lsOxidationDeformation.hpp:1081
std::array< T, 9 > getStrainRateTensor(const Vec3D< T > &coordinate) const
Definition lsOxidationDeformation.hpp:1006
void setOxideSigns(int passedReactionSign, int passedAmbientSign)
Definition lsOxidationDeformation.hpp:305
void setDiffusionField(SmartPointer< OxidationDiffusion< T, D > > passedDiffusionField)
Definition lsOxidationDeformation.hpp:276
T getPressure(const Vec3D< T > &coordinate) const
Definition lsOxidationDeformation.hpp:989
void setAmbientInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDeformation.hpp:256
void clearMaskInterface()
Definition lsOxidationDeformation.hpp:270
T avgExpansionSpeed()
Definition lsOxidationDeformation.hpp:1064
T getStrainTrace(const Vec3D< T > &coordinate) const
Definition lsOxidationDeformation.hpp:997
Vec3D< T > getVelocity(const Vec3D< T > &coordinate) const
Definition lsOxidationDeformation.hpp:885
Solves the oxidant diffusion step of the Suvorov et al. (10.1007/s10825-006-0003-z) oxidation model o...
Definition lsOxidationDiffusion.hpp:126
void markGeometryChanged()
Call after any in-place modification of the level sets (e.g. after ls::Advect) so that the next apply...
Definition lsOxidationDiffusion.hpp:280
void setConcentrationCache(std::unordered_map< std::size_t, T > cache)
Definition lsOxidationDiffusion.hpp:709
void setMaskInterface(SmartPointer< Domain< T, D > > passedInterface, int passedMaskSign=1)
Definition lsOxidationDiffusion.hpp:297
T getEffectiveReactionRate(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:318
void markSolved()
Mark the current solution as valid without re-solving. Call this before any parallel advection (lsAdv...
Definition lsOxidationDiffusion.hpp:720
const std::unordered_map< std::size_t, T > & getConcentrationCache() const
Definition lsOxidationDiffusion.hpp:705
T getResidual() const
Definition lsOxidationDiffusion.hpp:694
void apply()
Definition lsOxidationDiffusion.hpp:501
std::size_t getNumberOfSolutionNodes() const
Definition lsOxidationDiffusion.hpp:697
void setParameters(OxidationParameters passedParameters)
Definition lsOxidationDiffusion.hpp:311
void clearSolveBounds()
Definition lsOxidationDiffusion.hpp:495
void clearPressureField()
Definition lsOxidationDiffusion.hpp:325
static auto New(Args &&...args)
Definition lsOxidationDiffusion.hpp:274
void setSolveBounds(const IndexType &passedMinIndex, const IndexType &passedMaxIndex)
Restrict the dense Cartesian diffusion solve to a finite index box. This is useful for level sets wit...
Definition lsOxidationDiffusion.hpp:486
T getScalarVelocityFromSample(const ReactionBoundarySample &sample) const
Absolute scalar velocity derived from an already-computed boundary sample, avoiding a second call to ...
Definition lsOxidationDiffusion.hpp:789
void setPressure(const IndexType &index, T pressure)
Definition lsOxidationDiffusion.hpp:460
unsigned getIterations() const
Definition lsOxidationDiffusion.hpp:693
void setAmbientInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:291
OxidationParameters getParameters() const
Definition lsOxidationDiffusion.hpp:316
void setReactionInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:285
void setOxideSigns(int passedReactionSign, int passedAmbientSign)
Set signs defining the oxide band. A node is inside oxide if reactionSign * reactionPhi >= 0 and ambi...
Definition lsOxidationDiffusion.hpp:478
ReactionBoundarySample getReactionBoundarySample(const Vec3D< T > &coordinate) const
Return the reaction boundary sample for the grid node nearest to coordinate. Used by the deformation ...
Definition lsOxidationDiffusion.hpp:780
void clearMaskInterface()
Definition lsOxidationDiffusion.hpp:305
T getConcentration(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:663
void setStress(const IndexType &index, const std::array< T, 9 > &stress)
Oxide Cauchy stress (Pa, tension positive, row-major 3x3) at a node, for the normal-stress reaction l...
Definition lsOxidationDiffusion.hpp:333
void writePersistentFields()
Convenience wrapper: persist both concentration and pressure in one call.
Definition lsOxidationDiffusion.hpp:771
Iterates diffusion, oxide deformation, and the stress feedback (normal stress on the reaction rate,...
Definition lsOxidationModel.hpp:23
void setDeformationField(SmartPointer< OxidationDeformation< T, D > > passedDeformationField)
Definition lsOxidationModel.hpp:57
static auto New(Args &&...args)
Definition lsOxidationModel.hpp:48
T getResidual() const
Definition lsOxidationModel.hpp:345
void setDiffusionField(SmartPointer< OxidationDiffusion< T, D > > passedDiffusionField)
Definition lsOxidationModel.hpp:52
unsigned getIterations() const
Definition lsOxidationModel.hpp:344
void clearSolveBounds()
Definition lsOxidationModel.hpp:73
void apply()
Definition lsOxidationModel.hpp:75
void setParameters(OxidationCouplingParameters passedParameters)
Definition lsOxidationModel.hpp:62
Definition lsOxidation.hpp:383
void setCouplingParameters(OxidationCouplingParameters params)
Definition lsOxidation.hpp:459
static auto New(Args &&...args)
Definition lsOxidation.hpp:439
SmartPointer< OxidationDeformation< T, D > > getDeformationField() const
Return the deformation field populated by the most recent apply() call.
Definition lsOxidation.hpp:489
void setDeformationParameters(OxidationDeformationParameters params)
Definition lsOxidation.hpp:456
T applyCFLLimited(T requestedTime, T cflFactor)
Execute one CFL-limited oxidation step; returns the actual time advanced.
Definition lsOxidation.hpp:500
void setSpatialScheme(SpatialSchemeEnum scheme)
Set the spatial integration scheme for all advections.
Definition lsOxidation.hpp:467
void setMaskInterface(SmartPointer< Domain< T, D > > mask)
Definition lsOxidation.hpp:449
void setMaskParameters(OxidationMaskParameters params)
Definition lsOxidation.hpp:462
void setGpuMode(GpuMode mode)
Definition lsOxidation.hpp:443
void setSiInterface(SmartPointer< Domain< T, D > > si)
Definition lsOxidation.hpp:445
SmartPointer< OxidationDiffusion< T, D > > getDiffusionField() const
Return the diffusion field populated by the most recent apply() call.
Definition lsOxidation.hpp:484
void setAmbientInterface(SmartPointer< Domain< T, D > > ambient)
Definition lsOxidation.hpp:446
void setTemporalScheme(TemporalSchemeEnum scheme)
Set the temporal integration scheme for all advections.
Definition lsOxidation.hpp:472
void setOxidationParameters(OxidationParameters params)
Definition lsOxidation.hpp:453
void apply(T advectionTime)
Execute one oxidation time step of duration advectionTime.
Definition lsOxidation.hpp:497
T getLastMaxVelocity() const
Maximum interface velocity (µm/hr) from the most recent CFL-limited step.
Definition lsOxidation.hpp:494
Class describing a plane via a point in it and the plane normal.
Definition lsGeometries.hpp:42
Class describing a point cloud, which can be used to create geometries from its convex hull mesh.
Definition lsGeometries.hpp:145
void insertNextPoint(T *newPoint)
Definition lsGeometries.hpp:154
Removes all level set points, which do not have at least one oppositely signed neighbour (Meaning the...
Definition lsPrune.hpp:17
void apply()
removes all grid points, which do not have at least one opposite signed neighbour returns the number ...
Definition lsPrune.hpp:74
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsPrune.hpp:59
Definition lsReader.hpp:13
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsReader.hpp:26
void apply()
Definition lsReader.hpp:35
void setFileName(std::string passedFileName)
set file name for file to write
Definition lsReader.hpp:31
Reduce the level set size to the specified width. This means all level set points with value <= 0....
Definition lsReduce.hpp:14
void apply()
Reduces the leveleSet to the specified number of layers. The largest value in the levelset is thus wi...
Definition lsReduce.hpp:55
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsReduce.hpp:32
void setWidth(int passedWidth)
Set which level set points should be kept. All points with a level set value >0.5*width will be remov...
Definition lsReduce.hpp:39
void setNoNewSegment(bool passedNoNewSegment)
Set whether to segment the level set after algorithm is finished. This means points will be evenly di...
Definition lsReduce.hpp:44
This algorithm can be used to remove all LS values which are not part of a so-called top surface....
Definition lsRemoveStrayPoints.hpp:17
void setVoidTopSurface(VoidTopSurfaceEnum topSurface)
Set how the algorithm should pick the surface which will not be removed. Defaults to the surface with...
Definition lsRemoveStrayPoints.hpp:33
void apply()
Definition lsRemoveStrayPoints.hpp:37
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsRemoveStrayPoints.hpp:27
Concrete implementation of GeometricAdvectDistribution for a spherical advection distribution.
Definition lsGeometricAdvectDistributions.hpp:50
bool isInside(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, double eps) const override
Quick check whether a point relative to the distributions center is inside the distribution....
Definition lsGeometricAdvectDistributions.hpp:60
std::array< viennahrle::CoordType, 6 > getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition lsGeometricAdvectDistributions.hpp:110
T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long) const override
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
Definition lsGeometricAdvectDistributions.hpp:75
Class describing a sphere via origin and radius.
Definition lsGeometries.hpp:15
This class creates a mesh from the level set with all grid points with a level set value <= 0....
Definition lsToDiskMesh.hpp:24
void clearLevelSets()
Definition lsToDiskMesh.hpp:83
void setMesh(SmartPointer< Mesh< N > > passedMesh)
Definition lsToDiskMesh.hpp:70
void setMaterialMap(SmartPointer< MaterialMap > passedMaterialMap)
Definition lsToDiskMesh.hpp:77
void apply()
Definition lsToDiskMesh.hpp:85
void insertNextLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Pushes the passed level set to the back of the list of level sets.
Definition lsToDiskMesh.hpp:66
void setMaxValue(const T passedMaxValue)
Definition lsToDiskMesh.hpp:81
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsToDiskMesh.hpp:61
Extracts a hull (surface outline) mesh from a stack of level sets using ToMultiSurfaceMesh with close...
Definition lsToHullMesh.hpp:22
void setMaterialMap(SmartPointer< MaterialMap > passedMaterialMap)
Definition lsToHullMesh.hpp:431
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToHullMesh.hpp:418
void clearLevelSets()
Definition lsToHullMesh.hpp:425
void insertNextLevelSet(SmartPointer< Domain< T, D > > levelSet)
Level sets wrapping other level sets have to be inserted last.
Definition lsToHullMesh.hpp:421
void apply()
Definition lsToHullMesh.hpp:460
void setSharpCorners(bool passedSharpCorners)
Definition lsToHullMesh.hpp:427
void setBottomExtension(T extension)
Definition lsToHullMesh.hpp:435
Extract the regular grid, on which the level set values are defined, to an explicit Mesh<>....
Definition lsToMesh.hpp:19
void setOnlyDefined(bool passedOnlyDefined)
Definition lsToMesh.hpp:43
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsToMesh.hpp:37
void apply()
Definition lsToMesh.hpp:49
void setOnlyActive(bool passedOnlyActive)
Definition lsToMesh.hpp:47
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToMesh.hpp:41
Definition lsToMultiSurfaceMesh.hpp:11
void apply() override
Definition lsToMultiSurfaceMesh.hpp:622
void setMaterialMap(SmartPointer< MaterialMap > passedMaterialMap)
Definition lsToMultiSurfaceMesh.hpp:618
void clearLevelSets()
Definition lsToMultiSurfaceMesh.hpp:616
void insertNextLevelSet(SmartPointer< lsDomainType > passedLevelSet)
Definition lsToMultiSurfaceMesh.hpp:612
Extract an explicit Mesh<> instance from an lsDomain. The interface is then described by explicit sur...
Definition lsToSurfaceMesh.hpp:25
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToSurfaceMesh.hpp:96
void setUpdatePointData(bool update)
Definition lsToSurfaceMesh.hpp:98
void setSharpCorners(bool check)
Definition lsToSurfaceMesh.hpp:100
virtual void apply()
Definition lsToSurfaceMesh.hpp:102
void setLevelSet(SmartPointer< lsDomainType > passedlsDomain)
Definition lsToSurfaceMesh.hpp:91
Creates a mesh, which consists only of quads/hexas for completely filled grid cells in the level set....
Definition lsToVoxelMesh.hpp:20
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToVoxelMesh.hpp:76
void clearLevelSets()
Definition lsToVoxelMesh.hpp:74
void insertNextLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Push level set to the list of level sets used for output. If more than one are specified,...
Definition lsToVoxelMesh.hpp:70
void apply()
Definition lsToVoxelMesh.hpp:82
Abstract class defining the interface for the velocity field used during advection using lsAdvect.
Definition lsVelocityField.hpp:11
Definition lsWriter.hpp:13
void setFileName(std::string passedFileName)
set file name for file to write
Definition lsWriter.hpp:31
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsWriter.hpp:26
void apply()
Definition lsWriter.hpp:35
Definition lsAdvect.hpp:41
@ Auto
Definition lsOxidationDiffusion.hpp:51
@ Gpu
Always use GPU; fail if unavailable or unsuccessful Use the GPU when it is usable,...
Definition lsOxidationDiffusion.hpp:45
@ Cpu
Always use CPU (default).
Definition lsOxidationDiffusion.hpp:44
FeatureDetectionEnum
Definition lsDetectFeatures.hpp:16
BooleanOperationEnum
Enumeration for the different types of boolean operations which are supported. When INVERT,...
Definition lsBooleanOperation.hpp:27
CurvatureEnum
Definition lsCalculateCurvatures.hpp:15
void bindApi(py::module &module)
Definition pyWrap.hpp:206
PYBIND11_DECLARE_HOLDER_TYPE(TemplateType, SmartPointer< TemplateType >)
void bindOxidationSharedTypes(py::module &module)
Definition pyWrap.hpp:94
T ambientLiftRatio
Definition lsOxidation.hpp:31
T siliconRecession
Definition lsOxidation.hpp:28
T relativeError
Definition lsOxidation.hpp:32
unsigned samples
Definition lsOxidation.hpp:33
T ambientLift
Definition lsOxidation.hpp:29
T expectedAmbientLift
Definition lsOxidation.hpp:30
Definition lsOxidationModel.hpp:14
double tolerance
Definition lsOxidationModel.hpp:16
double relaxation
Definition lsOxidationModel.hpp:17
unsigned maxIterations
Definition lsOxidationModel.hpp:15
Parameters for the Cartesian-grid oxide deformation model.
Definition lsOxidationDeformation.hpp:38
double viscosity
Definition lsOxidationDeformation.hpp:39
double shearActivationVolume
Definition lsOxidationDeformation.hpp:65
double shearModulus
Definition lsOxidationDeformation.hpp:52
double stressRelaxationTime
Definition lsOxidationDeformation.hpp:53
double minMechanicsBoundaryDistance
Definition lsOxidationDeformation.hpp:45
unsigned mechanicsIterations
Definition lsOxidationDeformation.hpp:70
double mechanicsTolerance
Definition lsOxidationDeformation.hpp:71
double stressTimeStep
Definition lsOxidationDeformation.hpp:54
int material
Definition lsOxidationDeformation.hpp:91
double ambientPressure
Definition lsOxidationDeformation.hpp:40
std::size_t maxGridPoints
Definition lsOxidationDeformation.hpp:90
Sub-grid accurate sample of the reaction boundary crossing closest to a given grid node....
Definition lsOxidationDiffusion.hpp:256
double poissonRatio
Definition lsOxidationMask.hpp:22
double shearActivationVolume
Definition lsOxidationMask.hpp:27
double viscosity
Definition lsOxidationMask.hpp:26
double youngModulus
Definition lsOxidationMask.hpp:21
Parameters for the steady oxidant diffusion model used by OxidationDiffusion.
Definition lsOxidationDiffusion.hpp:56
double maskConcentration
Definition lsOxidationDiffusion.hpp:92
double maskTransferCoefficient
Definition lsOxidationDiffusion.hpp:91
double transferCoefficient
Definition lsOxidationDiffusion.hpp:59
double temperature
Definition lsOxidationDiffusion.hpp:74
double minBoundaryDistance
Definition lsOxidationDiffusion.hpp:101
double relaxation
Definition lsOxidationDiffusion.hpp:104
Vec3D< double > crystalAxis
Definition lsOxidationDiffusion.hpp:89
double reactionActivationVolume
Definition lsOxidationDiffusion.hpp:75
double diffusionActivationVolume
Definition lsOxidationDiffusion.hpp:80
double reactionRateRatio111
Definition lsOxidationDiffusion.hpp:88
double diffusionCoefficient
Definition lsOxidationDiffusion.hpp:57
int material
Definition lsOxidationDiffusion.hpp:106
double velocitySign
Definition lsOxidationDiffusion.hpp:63
double reactionRate
Definition lsOxidationDiffusion.hpp:58
double oxidantMoleculeDensity
Definition lsOxidationDiffusion.hpp:61
double equilibriumConcentration
Definition lsOxidationDiffusion.hpp:60
double referencePressure
Definition lsOxidationDiffusion.hpp:76
double tolerance
Definition lsOxidationDiffusion.hpp:103
std::size_t maxGridPoints
Definition lsOxidationDiffusion.hpp:105
double expansionCoefficient
Definition lsOxidationDiffusion.hpp:62
unsigned maxIterations
Definition lsOxidationDiffusion.hpp:102
static OxidationMaskParameters siliconNitrideMask(double temperatureCelsius)
LPCVD Si3N4 mask: E = 270 GPa, nu = 0.27, and Maxwell creep with an Eyring viscosity from Senez et al...
Definition lsOxidationPresets.hpp:61
static OxidationMaskParameters siliconNitrideMask1000C()
Definition lsOxidationPresets.hpp:87
static OxidationDeformationParameters oxideMechanics1000C(double timeStep)
Thermal SiO2 viscoelastic mechanics at 1000 °C. Viscosity ~1×10¹⁰ Pa·hr (Irene 1978),...
Definition lsOxidationPresets.hpp:45
static OxidationParameters wet1000CDealGrove100()
Wet oxidation at 1000 °C (Deal-Grove linear-parabolic coefficients). B/2 = D_eff = 0....
Definition lsOxidationPresets.hpp:28