1#include <pybind11/functional.h>
2#include <pybind11/iostream.h>
3#include <pybind11/pybind11.h>
4#include <pybind11/stl.h>
57#include <vcLogger.hpp>
58#include <vcSmartPointer.hpp>
61namespace py = pybind11;
72 typedef std::array<viennahrle::CoordType, 3> vectorType;
73 typedef std::array<viennahrle::CoordType, 6> boundsType;
78 bool isInside(
const vectorType &initial,
const vectorType &candidate,
79 double eps = 0.)
const override {
80 PYBIND11_OVERLOAD(
bool, ClassType,
isInside, initial, candidate, eps);
84 unsigned long initialPointId)
const override {
90 PYBIND11_OVERLOAD_PURE(boundsType, ClassType,
getBounds);
95 py::enum_<GpuMode>(module,
"GpuMode", py::module_local())
101 py::enum_<GpuPreconditioner>(module,
"GpuPreconditioner", py::module_local())
106 py::class_<OxidationParameters>(module,
"OxidationParameters",
109 .def_readwrite(
"diffusionCoefficient",
112 .def_readwrite(
"transferCoefficient",
114 .def_readwrite(
"equilibriumConcentration",
116 .def_readwrite(
"oxidantMoleculeDensity",
118 .def_readwrite(
"expansionCoefficient",
122 .def_readwrite(
"reactionActivationVolume",
124 .def_readwrite(
"referencePressure",
126 .def_readwrite(
"diffusionActivationVolume",
128 .def_readwrite(
"reactionRateRatio111",
131 .def_readwrite(
"maskTransferCoefficient",
133 .def_readwrite(
"maskConcentration",
135 .def_readwrite(
"minBoundaryDistance",
143 py::class_<OxidationPresets>(module,
"OxidationPresets", py::module_local())
145 .def_static(
"wet1000CDealGrove100",
148 .def_static(
"siliconNitrideMask1000C",
151 py::class_<OxidationDeformationParameters>(
152 module,
"OxidationDeformationParameters", py::module_local())
155 .def_readwrite(
"bulkModulus",
157 .def_readwrite(
"ambientPressure",
159 .def_readwrite(
"pressureRelaxation",
161 .def_readwrite(
"pressureTolerance",
164 "minMechanicsBoundaryDistance",
166 .def_readwrite(
"shearModulus",
168 .def_readwrite(
"stressRelaxationTime",
170 .def_readwrite(
"stressTimeStep",
172 .def_readwrite(
"harmonicIterations",
174 .def_readwrite(
"mechanicsIterations",
176 .def_readwrite(
"pressureIterations",
178 .def_readwrite(
"stokesIterations",
180 .def_readwrite(
"mechanicsTolerance",
182 .def_readwrite(
"stokesTolerance",
186 .def_readwrite(
"maxGridPoints",
190 py::class_<OxidationMaskParameters>(module,
"OxidationMaskParameters",
195 .def_readwrite(
"referenceTemperature",
197 .def_readwrite(
"referenceViscosity",
199 .def_readwrite(
"creepActivationEnergy",
203 .def_readwrite(
"unilateralContact",
206 .def_readwrite(
"contactLoadRelaxation",
208 .def_readwrite(
"contactReleaseFraction",
210 .def_readwrite(
"multigridSmootherOmega",
213 .def_readwrite(
"minBoundaryDistance",
218 .def_readwrite(
"anchorBoundaryDirection",
220 .def_readwrite(
"anchorBoundarySide",
222 .def_readwrite(
"anchorBoundaryLayers",
225 py::class_<OxidationCouplingParameters>(module,
"OxidationCouplingParameters",
228 .def_readwrite(
"maxIterations",
233 py::class_<LOCOSConservationDiagnostics<T>>(
234 module,
"LOCOSConservationDiagnostics", py::module_local())
236 .def_readwrite(
"siliconRecession",
238 .def_readwrite(
"ambientLift",
240 .def_readwrite(
"expectedAmbientLift",
242 .def_readwrite(
"ambientLiftRatio",
244 .def_readwrite(
"relativeError",
249template <
int D>
void bindApi(py::module &module) {
251 py::class_<viennahrle::Grid<D>>(module,
"hrleGrid");
254 py::class_<Domain<T, D>, SmartPointer<Domain<T, D>>>(module,
"Domain")
256 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<>))
259 &SmartPointer<
Domain<T, D>>::template New<viennahrle::CoordType>),
260 py::arg(
"gridDelta") = 1.0)
264 .def(py::init([](std::array<viennahrle::CoordType, 2 * D> bounds,
265 std::array<BoundaryConditionEnum, D> bcs,
266 viennahrle::CoordType gridDelta) {
267 return SmartPointer<Domain<T, D>>::New(bounds.data(), bcs.data(),
270 py::arg(
"bounds"), py::arg(
"boundaryConditions"),
271 py::arg(
"gridDelta") = 1.0)
272 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<
273 std::vector<viennahrle::CoordType>, std::vector<unsigned>,
274 viennahrle::CoordType>),
275 py::arg(
"bounds"), py::arg(
"boundaryConditions"),
276 py::arg(
"gridDelta") = 1.0)
287 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<
290 &SmartPointer<
Domain<T, D>>::template New<viennahrle::Grid<D> &>))
293 "Copy lsDomain in this lsDomain.")
295 "Get the number of segments, the level set structure is divided "
298 "Get the number of defined level set values.")
300 "Get the number of layers of level set points around the explicit "
303 "Set the number of layers of level set points which should be "
304 "stored around the explicit surface.")
306 "Clear all metadata stored in the level set.")
311 if (!(py::hasattr(fileHandle,
"write") &&
312 py::hasattr(fileHandle,
"flush"))) {
313 throw py::type_error(
314 "MyClass::read_from_file_like_object(file): incompatible "
315 "function argument: `file` must be a file-like object, but "
317 (std::string)(py::repr(fileHandle)) +
"` provided");
319 py::detail::pythonbuf buf(fileHandle);
320 std::ostream stream(&buf);
323 py::arg(
"stream") = py::module::import(
"sys").attr(
"stdout"));
326 py::class_<Advect<T, D>, SmartPointer<Advect<T, D>>>(module,
"Advect")
328 .def(py::init(&SmartPointer<
Advect<T, D>>::template New<>))
329 .def(py::init(&SmartPointer<
Advect<T, D>>::template New<
336 "Insert next level set to use for advection.")
338 "Clear all level sets used for advection.")
340 "Set the velocity to use for advection.")
342 "Set the time until when the level set should be advected.")
344 "Set whether only a single advection step should be performed.")
346 "Set the maximum time step size relative to grid size. Advection is "
347 "only stable for <0.5.")
348 .def(
"setCalculateNormalVectors",
350 "Set whether normal vectors are needed for the supplied velocity "
353 "Set whether voids in the geometry should be ignored during "
356 py::arg(
"enabled") =
true, py::arg(
"subdivisions") = 20,
357 "Enable/disable adaptive time stepping and set the number of "
360 "setSaveAdvectionVelocities",
362 "Set whether the velocities applied to each point should be saved in "
363 "the level set for debug purposes.")
365 py::arg(
"check"),
"Enable/disable dissipation checking.")
368 "Enable/disable updating point data after advection.")
370 "Get the time passed during advection.")
372 "Get how many advection steps were performed after the last apply() "
375 "Get the time step ratio used for advection.")
377 "Get the current time step.")
378 .def(
"getCalculateNormalVectors",
380 "Get whether normal vectors are computed during advection.")
382 "Set the spatial discretization scheme to use during advection.")
384 "Set the time integration scheme to use during advection.")
386 "(DEPRECATED, use setSpatialScheme instead) Set the spatial "
387 "discretization scheme to use during advection.")
389 "Set the dissipation value to use for Lax Friedrichs spatial "
392 "Set whether the point data in the old LS should be translated to "
393 "the advected LS. Defaults to true.")
396 "Set a callback function that is called after the level set has been "
397 "updated during intermediate time integration steps (e.g. RK2, RK3).")
402 py::call_guard<py::gil_scoped_release>(),
"Perform advection.");
404 py::class_<lsInternal::StencilLocalLaxFriedrichsScalar<T, D, 1>>(
405 module,
"StencilLocalLaxFriedrichsScalar")
409 1>::setMaxDissipation,
410 py::arg(
"maxDissipation"));
412 module.def("PrepareStencilLocalLaxFriedrichs",
413 &PrepareStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"),
416 module.def("FinalizeStencilLocalLaxFriedrichs",
417 &FinalizeStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"));
423 py::class_<RBS>(module,
"ReactionBoundarySample")
425 .def_readwrite(
"found", &RBS::found)
426 .def_readwrite(
"distance", &RBS::distance)
427 .def_readwrite(
"concentration", &RBS::concentration)
428 .def_readwrite(
"crossingAxis", &RBS::crossingAxis)
429 .def_readwrite(
"crossingOffset", &RBS::crossingOffset)
433 std::array<viennahrle::IndexType, D> arr{};
434 for (
unsigned i = 0; i <
D; ++i)
435 arr[i] = s.nodeIndex[i];
438 [](RBS &s,
const std::array<viennahrle::IndexType, D> &arr) {
439 for (
unsigned i = 0; i <
D; ++i)
440 s.nodeIndex[i] = arr[i];
445 SmartPointer<OxidationDiffusion<T, D>>>(module,
446 "OxidationDiffusion")
447 .def(py::init([](SmartPointer<
Domain<T, D>> &reactionInterface,
451 ambientInterface, parameters);
453 py::arg(
"reactionInterface"), py::arg(
"ambientInterface"),
455 .def(
"setReactionInterface",
457 .def(
"setAmbientInterface",
460 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
468 std::array<viennahrle::IndexType, D> passedMinIndex,
469 std::array<viennahrle::IndexType, D> passedMaxIndex) {
470 viennahrle::Index<D> minIndex{};
471 viennahrle::Index<D> maxIndex{};
472 for (
unsigned i = 0; i <
D; ++i) {
473 minIndex[i] = passedMinIndex[i];
474 maxIndex[i] = passedMaxIndex[i];
478 py::arg(
"minIndex"), py::arg(
"maxIndex"))
481 .def(
"getConcentration",
484 .def(
"getEffectiveReactionRate",
493 .def(
"getNumberOfSolutionNodes",
495 .def(
"getReactionBoundarySample",
497 .def(
"getScalarVelocityFromSample",
500 .def(
"markGeometryChanged",
502 .def(
"writePersistentFields",
504 .def(
"getConcentrationCache",
506 py::return_value_policy::copy)
507 .def(
"setConcentrationCache",
511 SmartPointer<OxidationDeformation<T, D>>>(module,
512 "OxidationDeformation")
513 .def(py::init([](SmartPointer<
Domain<T, D>> &reactionInterface,
519 reactionInterface, ambientInterface, diffusionField,
520 oxidationParameters, deformationParameters);
522 py::arg(
"reactionInterface"), py::arg(
"ambientInterface"),
523 py::arg(
"diffusionField"), py::arg(
"oxidationParameters"),
526 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
527 .def(
"clearMaskInterface",
532 std::array<viennahrle::IndexType, D> passedMinIndex,
533 std::array<viennahrle::IndexType, D> passedMaxIndex) {
534 viennahrle::Index<D> minIndex{};
535 viennahrle::Index<D> maxIndex{};
536 for (
unsigned i = 0; i <
D; ++i) {
537 minIndex[i] = passedMinIndex[i];
538 maxIndex[i] = passedMaxIndex[i];
542 py::arg(
"minIndex"), py::arg(
"maxIndex"))
551 .def(
"getStrainTrace",
554 .def(
"getStrainRateTensor",
559 const Vec3D<T> &)
const) &
561 .def(
"getVonMisesStress",
566 .def(
"getNumberOfSolutionNodes",
569 .def(
"setAmbientInterface",
571 .def(
"setOxidationParameters",
573 .def(
"setDeformationParameters",
576 .def(
"setReactionInterface",
579 .def(
"setMaskVelocityField",
581 .def(
"clearMaskVelocityField",
583 .def(
"markGeometryChanged",
585 .def(
"writeFieldsToLevelSet",
589 SmartPointer<OxidationMaskBending<T, D>>>(module,
590 "OxidationMaskBending")
597 py::arg(
"deformationField"),
604 deformationField, maskInterface, maskParameters, maskSign);
606 py::arg(
"deformationField"), py::arg(
"maskInterface"),
608 py::arg(
"maskSign") = 1)
610 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
611 .def(
"setAmbientInterface",
613 py::arg(
"ambientInterface"), py::arg(
"ambientSign") = -1)
617 std::array<viennahrle::IndexType, D> passedMinIndex,
618 std::array<viennahrle::IndexType, D> passedMaxIndex) {
619 viennahrle::Index<D> minIndex{};
620 viennahrle::Index<D> maxIndex{};
621 for (
unsigned i = 0; i <
D; ++i) {
622 minIndex[i] = passedMinIndex[i];
623 maxIndex[i] = passedMaxIndex[i];
627 py::arg(
"minIndex"), py::arg(
"maxIndex"))
634 .def(
"getLastApplyVelocityChange",
636 .def(
"getNumberOfSolutionNodes",
638 .def(
"getNumberOfContactNodes",
640 .def(
"getNumberOfFixedNodes",
642 .def(
"writeFieldsToLevelSet",
646 SmartPointer<OxidationConstrainedAmbient<T, D>>>(
647 module,
"OxidationConstrainedAmbient")
651 SmartPointer<
Domain<T, D>> &maskInterface,
int maskSign) {
653 deformationField, maskVelocityField, maskInterface,
656 py::arg(
"deformationField"), py::arg(
"maskVelocityField"),
657 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1);
659 py::class_<OxidationModel<T, D>, SmartPointer<OxidationModel<T, D>>>(
660 module,
"OxidationModel")
666 diffusionField, deformationField, couplingParameters);
668 py::arg(
"diffusionField"), py::arg(
"deformationField"),
676 std::array<viennahrle::IndexType, D> passedMinIndex,
677 std::array<viennahrle::IndexType, D> passedMaxIndex) {
678 viennahrle::Index<D> minIndex{};
679 viennahrle::Index<D> maxIndex{};
680 for (
unsigned i = 0; i <
D; ++i) {
681 minIndex[i] = passedMinIndex[i];
682 maxIndex[i] = passedMaxIndex[i];
686 py::arg(
"minIndex"), py::arg(
"maxIndex"))
692 py::class_<Oxidation<T, D>, SmartPointer<Oxidation<T, D>>>(module,
694 .def(py::init([](SmartPointer<
Domain<T, D>> &siInterface,
700 py::arg(
"siInterface"), py::arg(
"ambientInterface"),
701 py::arg(
"maskInterface"))
706 .def(
"setDeformationParameters",
714 py::arg(
"preconditioner"))
715 .def(
"setMaskCouplingIterations",
717 .def(
"setMaskCouplingTolerance",
722 std::array<viennahrle::IndexType, D> passedMinIndex,
723 std::array<viennahrle::IndexType, D> passedMaxIndex) {
724 viennahrle::Index<D> minIndex{};
725 viennahrle::Index<D> maxIndex{};
726 for (
unsigned i = 0; i <
D; ++i) {
727 minIndex[i] = passedMinIndex[i];
728 maxIndex[i] = passedMaxIndex[i];
732 py::arg(
"minIndex"), py::arg(
"maxIndex"))
734 "setMaskBendingBounds",
736 std::array<viennahrle::IndexType, D> passedMinIndex,
737 std::array<viennahrle::IndexType, D> passedMaxIndex) {
738 viennahrle::Index<D> minIndex{};
739 viennahrle::Index<D> maxIndex{};
740 for (
unsigned i = 0; i <
D; ++i) {
741 minIndex[i] = passedMinIndex[i];
742 maxIndex[i] = passedMaxIndex[i];
744 model.setMaskBendingBounds(minIndex, maxIndex);
746 py::arg(
"minIndex"), py::arg(
"maxIndex"))
749 py::arg(
"requestedTime"), py::arg(
"cflFactor"),
750 "Execute one CFL-limited LOCOS step; returns the actual time "
753 "Maximum interface velocity (µm/hr) from the most recent CFL step.")
757 .def(
"getMaskCouplingIterations",
759 .def(
"getMaskCouplingResidual",
762 if constexpr (
D == 2) {
764 "computeLOCOSOpenWindowConservation",
765 [](SmartPointer<Domain<T, D>> siInitial,
766 SmartPointer<Domain<T, D>> siAfter,
767 SmartPointer<Domain<T, D>> ambientInitial,
768 SmartPointer<Domain<T, D>> ambientAfter, T xMin, T xMax,
769 viennahrle::IndexType jMin, viennahrle::IndexType jMax,
770 T expansionCoefficient) {
771 return computeLOCOSOpenWindowConservation<T>(
772 siInitial, siAfter, ambientInitial, ambientAfter, xMin, xMax,
773 jMin, jMax, expansionCoefficient);
775 py::arg(
"siInitial"), py::arg(
"siAfter"), py::arg(
"ambientInitial"),
776 py::arg(
"ambientAfter"), py::arg(
"xMin"), py::arg(
"xMax"),
777 py::arg(
"jMin"), py::arg(
"jMax"), py::arg(
"expansionCoefficient"));
781 py::class_<BooleanOperation<T, D>, SmartPointer<BooleanOperation<T, D>>>(
782 module,
"BooleanOperation")
794 return SmartPointer<BooleanOperation<T, D>>::New(domain, op);
799 return SmartPointer<BooleanOperation<T, D>>::New(domainA, domainB, op);
803 "Set levelset on which the boolean operation should be performed.")
805 "Set second levelset for boolean operation.")
807 "Set which type of boolean operation should be performed.")
809 "Perform the boolean operation.");
811 py::class_<CalculateCurvatures<T, D>,
812 SmartPointer<CalculateCurvatures<T, D>>>(module,
813 "CalculateCurvatures")
821 return SmartPointer<CalculateCurvatures<T, D>>::New(domain, type);
825 "Set levelset for which to calculate the curvatures.")
827 "Set which method to use for calculation: Defaults to mean "
830 "Curvatures will be calculated for all LS values < maxValue.")
832 "Perform normal vector calculation.");
835 py::class_<CalculateNormalVectors<T, D>,
836 SmartPointer<CalculateNormalVectors<T, D>>>(
837 module,
"CalculateNormalVectors")
845 "Set levelset for which to calculate normal vectors.")
847 "Set the maximum value for which normals should be calculated.")
849 "Set the method to use for normal calculation.")
851 "Perform normal vector calculation.");
854 py::class_<CalculateVisibilities<T, D>,
855 SmartPointer<CalculateVisibilities<T, D>>>(module,
856 "CalculateVisibilities")
859 SmartPointer<
Domain<T, D>> &,
const Vec3D<T> &, std::string>))
863 py::class_<Check<T, D>, SmartPointer<Check<T, D>>>(module,
"Check")
865 .def(py::init(&SmartPointer<
Check<T, D>>::template New<>))
866 .def(py::init(&SmartPointer<
Check<T, D>>::template New<
870 "Set levelset for which to calculate normal vectors.")
874 py::class_<PointCloud<T, D>, SmartPointer<PointCloud<T, D>>>(module,
878 const std::vector<VectorType<T, D>> &>))
880 .def(
"insertNextPoint",
885 py::class_<ConvexHull<T, D>, SmartPointer<ConvexHull<T, D>>>(module,
893 "Set mesh object where the generated mesh should be stored.")
895 "Set point cloud used to generate mesh.")
899 py::class_<DetectFeatures<T, D>, SmartPointer<DetectFeatures<T, D>>>(
900 module,
"DetectFeatures")
909 .def(py::init([](SmartPointer<
Domain<T, D>> &domain,
T maxValue,
911 return SmartPointer<DetectFeatures<T, D>>::New(domain, maxValue, type);
913 .def(
"setDetectionThreshold",
915 "Set the curvature value above which a point is considered a "
918 "Set which method to use to detect features. Defaults to Curvature.")
922 py::class_<GeometricAdvect<T, D>, SmartPointer<GeometricAdvect<T, D>>>(
923 module,
"GeometricAdvect")
933 "Set levelset to advect.")
935 "setAdvectionDistribution",
937 "Set advection distribution to use as kernel for the fast advection.")
939 py::call_guard<py::gil_scoped_release>(),
"Perform advection.");
942 py::class_<GeometricAdvectDistribution<T, D>,
943 SmartPointer<GeometricAdvectDistribution<T, D>>,
945 "GeometricAdvectDistribution")
950 "Check whether passed point is inside the distribution.")
951 .def(
"getSignedDistance",
953 "Get the signed distance of the passed point to the surface of the "
956 "Get the cartesian bounds of the distribution.")
958 "Prepare the distribution for use with the passed level set.")
960 "Finalize the distribution after use with the level set.");
962 py::class_<SphereDistribution<T, D>, SmartPointer<SphereDistribution<T, D>>,
968 "Check whether passed point is inside the distribution.")
970 "Get the signed distance of the passed point to the surface of the "
973 "Get the cartesian bounds of the distribution.");
975 py::class_<BoxDistribution<T, D>, SmartPointer<BoxDistribution<T, D>>,
979 const std::array<T, 3>>))
982 "Check whether passed point is inside the distribution.")
984 "Get the signed distance of the passed point to the surface of the "
987 "Get the cartesian bounds of the distribution.");
989 py::class_<CustomSphereDistribution<T, D>,
990 SmartPointer<CustomSphereDistribution<T, D>>,
992 "CustomSphereDistribution")
995 const std::vector<T> &>))
998 "Check whether passed point is inside the distribution.")
999 .def(
"getSignedDistance",
1001 "Get the signed distance of the passed point to the surface of the "
1004 "Get the cartesian bounds of the distribution.");
1007 py::class_<Expand<T, D>, SmartPointer<Expand<T, D>>>(module,
"Expand")
1009 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<>))
1010 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<
1012 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<
1020 py::class_<FromSurfaceMesh<T, D>, SmartPointer<FromSurfaceMesh<T, D>>>(
1021 module,
"FromSurfaceMesh")
1031 "Set levelset to read into.")
1033 "Set the mesh to read from.")
1034 .def(
"setRemoveBoundaryTriangles",
1037 "Set whether to include mesh elements outside of the simulation "
1039 .def(
"setRemoveBoundaryTriangles",
1042 "Set whether to include mesh elements outside of the simulation "
1045 "Construct a levelset from a surface mesh.");
1048 py::class_<FromVolumeMesh<T, D>, SmartPointer<FromVolumeMesh<T, D>>>(
1049 module,
"FromVolumeMesh")
1057 SmartPointer<
Mesh<T>> &,
bool>))
1060 "Set the grid used to read in the level sets.")
1062 "Set the mesh to read from.")
1063 .def(
"setRemoveBoundaryTriangles",
1065 "Set whether to include mesh elements outside of the simulation "
1068 "Construct a levelset from a volume mesh.");
1071 py::class_<FromMesh<T, D>, SmartPointer<FromMesh<T, D>>>(module,
"FromMesh")
1081 py::class_<Sphere<T, D>, SmartPointer<Sphere<T, D>>>(module,
"Sphere")
1083 .def(py::init(&SmartPointer<
Sphere<T, D>>::template New<
1084 const std::vector<T> & ,
T >),
1085 py::arg(
"origin"), py::arg(
"radius"));
1087 py::class_<Plane<T, D>, SmartPointer<Plane<T, D>>>(module,
"Plane")
1089 .def(py::init(&SmartPointer<
Plane<T, D>>::template New<
1090 const std::vector<T> & ,
1091 const std::vector<T> & >),
1092 py::arg(
"origin"), py::arg(
"normal"));
1094 py::class_<Box<T, D>, SmartPointer<Box<T, D>>>(module,
"Box")
1096 .def(py::init(&SmartPointer<
Box<T, D>>::template New<
1097 const std::vector<T> & ,
1098 const std::vector<T> & >),
1099 py::arg(
"minPoint"), py::arg(
"maxPoint"));
1101 py::class_<Cylinder<T, D>, SmartPointer<Cylinder<T, D>>>(module,
"Cylinder")
1105 const std::vector<T> & ,
1106 const std::vector<T> & ,
const T ,
1107 const T ,
const T >),
1108 py::arg(
"origin"), py::arg(
"axisDirection"), py::arg(
"height"),
1109 py::arg(
"radius"), py::arg(
"topRadius") = 0.);
1112 py::class_<MakeGeometry<T, D>, SmartPointer<MakeGeometry<T, D>>>(
1113 module,
"MakeGeometry")
1133 "Set the levelset in which to create the geometry.")
1149 .def(
"setIgnoreBoundaryConditions",
1152 .def(
"setIgnoreBoundaryConditions",
1158 py::class_<MarkVoidPoints<T, D>, SmartPointer<MarkVoidPoints<T, D>>>(
1159 module,
"MarkVoidPoints")
1168 "Set the levelset to mark void points in.")
1169 .def(
"setReverseVoidDetection",
1171 "Reverse the logic of detecting the top surface.")
1172 .def(
"setDetectLargestSurface",
1174 "Set that the top surface should be the one with the most connected "
1177 "Set the logic by which to choose the surface which is non-void. "
1178 "All other connected surfaces will then be marked as void points.")
1180 "Save the connectivity information of all LS points in the "
1181 "pointData of the level set.")
1182 .def(
"getNumberOfComponents",
1184 "Get the number of connected components found in the level set.")
1188 py::class_<Prune<T, D>, SmartPointer<Prune<T, D>>>(module,
"Prune")
1190 .def(py::init(&SmartPointer<
Prune<T, D>>::template New<>))
1191 .def(py::init(&SmartPointer<
Prune<T, D>>::template New<
1198 py::class_<Reader<T, D>, SmartPointer<Reader<T, D>>>(module,
"Reader")
1200 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<>))
1201 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<
1203 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<
1207 "Set levelset to write to file.")
1209 "Set the filename for the output file.")
1213 py::class_<Reduce<T, D>, SmartPointer<Reduce<T, D>>>(module,
"Reduce")
1215 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<>))
1216 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1218 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1220 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1226 "Set whether the levelset should be segmented anew (balanced across "
1227 "cores) after reduction.")
1231 py::class_<RemoveStrayPoints<T, D>, SmartPointer<RemoveStrayPoints<T, D>>>(
1232 module,
"RemoveStrayPoints")
1239 "Set levelset for stray point removal.")
1241 "Set the logic by which to choose the surface which should be kept. "
1242 "All other LS values will be marked as stray points and removed.")
1246 py::class_<ToDiskMesh<T, D>, SmartPointer<ToDiskMesh<T, D>>>(module,
1254 "Set levelset to mesh.")
1256 "Clear all inserted level sets.")
1258 "Insert next level set to output in the disk mesh.")
1261 "Set the material map to use for the disk mesh.")
1263 "Set the maximum level set value to include in the disk mesh.")
1265 "Convert the levelset to a surface mesh.");
1268 py::class_<ToMesh<T, D>, SmartPointer<ToMesh<T, D>>>(module,
"ToMesh")
1270 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<>))
1271 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<
1276 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<
1283 "Set whether only defined points should be output to the mesh.")
1285 "Set whether only level set points <0.5 should be output.")
1287 "Convert the levelset to a surface mesh.");
1290 py::class_<ToSurfaceMesh<T, D>, SmartPointer<ToSurfaceMesh<T, D>>>(
1291 module,
"ToSurfaceMesh")
1296 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1300 py::arg(
"domain"), py::arg(
"mesh"),
1301 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1304 "Set levelset to mesh.")
1306 "Set the mesh to generate.")
1308 "Set whether to update point data. Defaults to true.")
1310 "Set whether to preserve sharp corners. Defaults to false.")
1312 "Convert the levelset to a surface mesh.");
1315 py::class_<ToMultiSurfaceMesh<T, D>, SmartPointer<ToMultiSurfaceMesh<T, D>>>(
1316 module,
"ToMultiSurfaceMesh")
1321 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1325 py::arg(
"domain"), py::arg(
"mesh"),
1326 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1329 SmartPointer<
Mesh<T>> &,
double,
double>),
1330 py::arg(
"domains"), py::arg(
"mesh"),
1331 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1333 SmartPointer<
Mesh<T>> &,
double,
double>),
1334 py::arg(
"mesh"), py::arg(
"minNodeDistFactor") = 0.05,
1335 py::arg(
"eps") = 1e-12)
1338 "Insert next level set to output in the mesh.")
1340 "Clear all inserted level sets.")
1342 "Set the mesh to generate.")
1344 "Set the material map to use for the multi surface mesh.")
1346 "Set whether to preserve sharp corners. Defaults to false.")
1348 "Convert the levelset to a surface mesh.");
1351 py::class_<ToVoxelMesh<T, D>, SmartPointer<ToVoxelMesh<T, D>>>(module,
1364 "Insert next level set to output in the mesh.")
1366 "Clear all inserted level sets.")
1369 "Convert the levelset to a surface mesh.");
1372 py::class_<Writer<T, D>, SmartPointer<Writer<T, D>>>(module,
"Writer")
1374 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<>))
1375 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<
1377 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<
1381 "Set levelset to write to file.")
1383 "Set the filename for the output file.")
1387 py::class_<CompareSparseField<T, D>, SmartPointer<CompareSparseField<T, D>>>(
1388 module,
"CompareSparseField")
1395 .def(
"setLevelSetExpanded",
1397 "Sets the expanded level set for comparison.")
1398 .def(
"setLevelSetIterated",
1400 "Sets the iterated level set to compare against the expanded one.")
1402 "Set the x-coordinate range to restrict the comparison area")
1404 "Set the y-coordinate range to restrict the comparison area")
1406 "Clear the x-range restriction")
1408 "Clear the y-range restriction")
1410 "Set the z-coordinate range to restrict the comparison area")
1412 "Clear the z-range restriction")
1414 "Set the output mesh where difference values will be stored")
1415 .def(
"setFillIteratedWithDistances",
1417 "Set whether to fill the iterated level set with distance values")
1418 .def(
"setExpandedLevelSetWidth",
1420 "Set the expansion width for the expanded level set")
1422 "Apply the comparison and calculate the sum of squared "
1424 .def(
"getSumSquaredDifferences",
1426 "Return the sum of squared differences calculated by apply().")
1428 "Return the sum of absolute differences calculated by apply().")
1430 "Return the number of points used in the comparison.")
1431 .def(
"getNumSkippedPoints",
1433 "Return the number of points skipped during comparison.")
1435 "Calculate the root mean square error from previously computed "
1439#ifdef VIENNALS_USE_VTK
1440 py::class_<WriteVisualizationMesh<T, D>,
1441 SmartPointer<WriteVisualizationMesh<T, D>>>(
1442 module,
"WriteVisualizationMesh")
1445 py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<>))
1446 .def(py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<
1449 .def(
"insertNextLevelSet",
1450 &WriteVisualizationMesh<T, D>::insertNextLevelSet,
1451 "Insert next level set to convert. Bigger level sets wrapping "
1452 "smaller ones, should be inserted last.")
1453 .def(
"setFileName", &WriteVisualizationMesh<T, D>::setFileName,
1454 "Set Name of File to write.")
1455 .def(
"setExtractHullMesh",
1456 &WriteVisualizationMesh<T, D>::setExtractHullMesh,
1457 "Whether to extract a hull mesh. Defaults to false.")
1458 .def(
"setExtractVolumeMesh",
1459 &WriteVisualizationMesh<T, D>::setExtractVolumeMesh,
1460 " Whether to extract a tetra volume mesh. Defaults to true.")
1461 .def(
"setMetaData", &WriteVisualizationMesh<T, D>::setMetaData,
1462 "Set the metadata to be written to the file.")
1464 py::overload_cast<const std::string &, T>(
1465 &WriteVisualizationMesh<T, D>::addMetaData),
1466 "Add a single metadata entry to the file.")
1468 py::overload_cast<
const std::string &,
const std::vector<T> &>(
1469 &WriteVisualizationMesh<T, D>::addMetaData),
1470 "Add a single metadata entry to the file.")
1473 const std::unordered_map<std::string, std::vector<T>> &>(
1474 &WriteVisualizationMesh<T, D>::addMetaData),
1475 "Add metadata to the file.")
1476 .def(
"apply", &WriteVisualizationMesh<T, D>::apply,
1477 "Make and write mesh.");
1481 py::class_<ToHullMesh<T, D>, SmartPointer<ToHullMesh<T, D>>>(module,
1495 "Insert next level set to convert. Bigger level sets wrapping "
1496 "smaller ones, should be inserted last.")
1498 "Clear all inserted level sets.")
1500 "Set whether to generate sharp corners. Defaults to false.")
1502 "Set the material map to use for the hull mesh.")
1504 "Set the bottom extension value for 2D hull meshes.")
1508 py::class_<CompareVolume<T, D>, SmartPointer<CompareVolume<T, D>>>(
1509 module,
"CompareVolume")
1517 "Sets the target level set.")
1519 "Sets the sample level set.")
1521 "Set default increment value")
1523 "Sets the x-range and custom increment value")
1525 "Sets the y-range and custom increment value")
1527 "Sets the z-range and custom increment value")
1529 "Set the output mesh where difference areas will be stored")
1531 "Returns the computed volume mismatch.")
1533 "Returns the computed area mismatch.")
1534 .def(
"getCustomVolumeMismatch",
1536 "Returns the computed volume mismatch, with custom increments "
1539 "Returns the computed area mismatch, with custom increments "
1542 "Returns the number of cells where the level sets differ.")
1544 "Returns the number of cells where the level sets differ, with "
1545 "custom increments applied.")
1547 "Computes the volume difference between the two level sets.");
1549 if constexpr (
D == 2) {
1550 module.attr("CompareArea") = module.attr("CompareVolume");
1554 py::class_<CompareChamfer<T, D>, SmartPointer<CompareChamfer<T, D>>>(
1555 module,
"CompareChamfer")
1563 "Set the target level set.")
1565 "Set the sample level set.")
1567 "Set output mesh for target surface points with distance data.")
1569 "Set output mesh for sample surface points with distance data.")
1571 "Apply the Chamfer distance calculation.")
1573 "Get the forward distance (average distance from target to "
1576 "Get the backward distance (average distance from sample to "
1579 "Get the Chamfer distance (average of forward and backward).")
1580 .def(
"getRMSChamferDistance",
1582 "Get the RMS Chamfer distance.")
1584 "Get the maximum nearest-neighbor distance.")
1586 "Get the number of target surface points.")
1588 "Get the number of sample surface points.");
1591 py::class_<CompareCriticalDimensions<T, D>,
1592 SmartPointer<CompareCriticalDimensions<T, D>>>(
1593 module,
"CompareCriticalDimensions")
1601 .def(
"setLevelSetTarget",
1603 "Sets the target level set.")
1604 .def(
"setLevelSetSample",
1606 "Sets the sample level set.")
1608 py::arg(
"measureDimension"), py::arg(
"minBounds"),
1609 py::arg(
"maxBounds"), py::arg(
"findMaximum") =
true,
1610 "Add a generic range specification.")
1612 py::arg(
"minX"), py::arg(
"maxX"), py::arg(
"findMaximum") =
true,
1613 "Add an X range to find maximum or minimum Y position.")
1615 py::arg(
"minY"), py::arg(
"maxY"), py::arg(
"findMaximum") =
true,
1616 "Add a Y range to find maximum or minimum X position.")
1618 "Clear all range specifications.")
1620 "Set the output mesh where critical dimension locations will be "
1623 "Apply the comparison.")
1624 .def(
"getNumCriticalDimensions",
1626 "Get the number of critical dimensions compared.")
1628 "getCriticalDimensionResult",
1630 T posRef{}, posCmp{}, diff{};
1634 return py::make_tuple(
true, posRef, posCmp, diff);
1635 return py::make_tuple(
false,
T(0),
T(0),
T(0));
1638 "Get a specific critical dimension result. Returns (valid, "
1639 "positionTarget, positionSample, difference).")
1640 .def(
"getMeanDifference",
1642 "Get mean absolute difference across all valid critical "
1644 .def(
"getMaxDifference",
1646 "Get maximum difference across all valid critical dimensions.")
1648 "Get RMSE across all valid critical dimensions.")
1649 .def(
"getAllDifferences",
1651 "Get all valid differences as a list.");
1654 py::class_<CompareNarrowBand<T, D>, SmartPointer<CompareNarrowBand<T, D>>>(
1655 module,
"CompareNarrowBand")
1663 "Sets the target level set.")
1665 "Sets the sample level set.")
1667 "Set the x-coordinate range to restrict the comparison area")
1669 "Set the y-coordinate range to restrict the comparison area")
1671 "Clear the x-range restriction")
1673 "Clear the y-range restriction")
1675 "Set the z-coordinate range to restrict the comparison area")
1677 "Clear the z-range restriction")
1679 "Set the output mesh where difference values will be stored")
1680 .def(
"setOutputMeshSquaredDifferences",
1682 "Set whether to output squared differences (true) or absolute "
1683 "differences (false)")
1685 "Apply the comparison and calculate the sum of squared "
1687 .def(
"getSumSquaredDifferences",
1689 "Return the sum of squared differences calculated by apply().")
1691 "Return the sum of absolute differences calculated by apply().")
1693 "Return the number of points used in the comparison.")
1695 "Calculate the root mean square error from previously computed "
constexpr int D
Definition Epitaxy.cpp:12
double T
Definition Epitaxy.cpp:13
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:864
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:856
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:966
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:962
void setSpatialScheme(SpatialSchemeEnum scheme)
Set which spatial discretization scheme should be used out of the ones specified in SpatialSchemeEnum...
Definition lsAdvect.hpp:936
bool getCalculateNormalVectors() const
Get whether normal vectors were calculated.
Definition lsAdvect.hpp:932
void setIgnoreVoids(bool iV)
Set whether level set values, which are not part of the "top" geometrically connected part of values,...
Definition lsAdvect.hpp:899
void clearLevelSets()
Definition lsAdvect.hpp:860
void setCalculateNormalVectors(bool cnv)
Set whether normal vectors should be calculated at each level set point. Defaults to true....
Definition lsAdvect.hpp:891
void apply()
Definition lsAdvect.hpp:1017
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:879
void prepareLS()
Definition lsAdvect.hpp:973
double getAdvectedTime() const
Get by how much the physical time was advanced during the last apply() call.
Definition lsAdvect.hpp:920
void setTemporalScheme(TemporalSchemeEnum scheme)
Set which time integration scheme should be used.
Definition lsAdvect.hpp:949
void setDissipationAlpha(const double &a)
Set the alpha dissipation coefficient. For lsLaxFriedrichs, this is used as the alpha value....
Definition lsAdvect.hpp:955
void setCheckDissipation(bool check)
Definition lsAdvect.hpp:958
void setIntegrationScheme(IntegrationSchemeEnum scheme)
Definition lsAdvect.hpp:941
double getCurrentTimeStep() const
Return the last applied time step.
Definition lsAdvect.hpp:923
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:873
unsigned getNumberOfTimeSteps() const
Get how many advection steps were performed during the last apply() call.
Definition lsAdvect.hpp:926
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:904
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:885
double getTimeStepRatio() const
Get the value of the CFL number.
Definition lsAdvect.hpp:929
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:916
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:298
void setSecondLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Set the level set which will be used to modify the first level set.
Definition lsBooleanOperation.hpp:304
void setBooleanOperation(BooleanOperationEnum passedOperation)
Set which of the operations of BooleanOperationEnum to perform.
Definition lsBooleanOperation.hpp:309
void apply()
Perform operation.
Definition lsBooleanOperation.hpp:327
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:329
void apply()
Apply the Chamfer distance calculation.
Definition lsCompareChamfer.hpp:104
T getMaxDistance() const
Get the maximum nearest-neighbor distance.
Definition lsCompareChamfer.hpp:323
T getBackwardDistance() const
Get the backward distance (average distance from sample to target).
Definition lsCompareChamfer.hpp:314
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:320
T getChamferDistance() const
Get the Chamfer distance (average of forward and backward).
Definition lsCompareChamfer.hpp:317
T getForwardDistance() const
Get the forward distance (average distance from target to sample).
Definition lsCompareChamfer.hpp:311
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:326
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.
GeometricAdvectDistribution()=default
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:21
static auto New(Args &&...args)
Definition lsOxidationMask.hpp:2266
Solves the oxidant diffusion step of the Suvorov et al. (10.1007/s10825-006-0003-z) oxidation model o...
Definition lsOxidationDiffusion.hpp:98
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:220
void setConcentrationCache(std::unordered_map< std::size_t, T > cache)
Definition lsOxidationDiffusion.hpp:439
void setMaskInterface(SmartPointer< Domain< T, D > > passedInterface, int passedMaskSign=1)
Definition lsOxidationDiffusion.hpp:237
T getEffectiveReactionRate(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:258
void markSolved()
Mark the current solution as valid without re-solving. Call this before any parallel advection (lsAdv...
Definition lsOxidationDiffusion.hpp:454
const std::unordered_map< std::size_t, T > & getConcentrationCache() const
Definition lsOxidationDiffusion.hpp:435
T getResidual() const
Definition lsOxidationDiffusion.hpp:424
void apply()
Definition lsOxidationDiffusion.hpp:311
std::size_t getNumberOfSolutionNodes() const
Definition lsOxidationDiffusion.hpp:427
void setParameters(OxidationParameters passedParameters)
Definition lsOxidationDiffusion.hpp:251
void clearSolveBounds()
Definition lsOxidationDiffusion.hpp:305
void clearPressureField()
Definition lsOxidationDiffusion.hpp:265
static auto New(Args &&...args)
Definition lsOxidationDiffusion.hpp:214
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:296
T getScalarVelocityFromSample(const ReactionBoundarySample &sample) const
Absolute scalar velocity derived from an already-computed boundary sample, avoiding a second call to ...
Definition lsOxidationDiffusion.hpp:523
void setPressure(const IndexType &index, T pressure)
Definition lsOxidationDiffusion.hpp:270
unsigned getIterations() const
Definition lsOxidationDiffusion.hpp:423
void setAmbientInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:231
OxidationParameters getParameters() const
Definition lsOxidationDiffusion.hpp:256
void setReactionInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:225
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:288
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:514
void clearMaskInterface()
Definition lsOxidationDiffusion.hpp:245
T getConcentration(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:393
void writePersistentFields()
Convenience wrapper: persist both concentration and pressure in one call.
Definition lsOxidationDiffusion.hpp:505
Vector velocity field for a compliant oxidation mask driven by solved oxide traction....
Definition lsOxidationMask.hpp:91
void apply()
Definition lsOxidationMask.hpp:268
void setMaskInterface(SmartPointer< Domain< T, D > > passedMaskInterface, int passedMaskSign=1)
Definition lsOxidationMask.hpp:221
std::size_t getNumberOfSolutionNodes() const
Definition lsOxidationMask.hpp:260
void setAmbientInterface(SmartPointer< Domain< T, D > > passedAmbientInterface, int passedAmbientSign=-1)
Provide the SiO₂/ambient interface so that contact faces can be detected on any mask face that border...
Definition lsOxidationMask.hpp:232
std::size_t getNumberOfFixedNodes() const
Definition lsOxidationMask.hpp:262
static SmartPointer< OxidationMaskBending > New(SmartPointer< OxidationDeformation< T, D > > passedDeformation, OxidationMaskParameters passedParameters={})
Definition lsOxidationMask.hpp:206
T getLastApplyVelocityChange() const
Definition lsOxidationMask.hpp:263
unsigned getIterations() const
Definition lsOxidationMask.hpp:258
std::size_t getNumberOfContactNodes() const
Definition lsOxidationMask.hpp:261
void writeFieldsToLevelSet()
Write mask bending velocity into maskInterface->getPointData() so that lsInterior + lsAdvect carry it...
Definition lsOxidationMask.hpp:424
OxidationMaskParameters getParameters() const
Definition lsOxidationMask.hpp:257
void clearSolveBounds()
Definition lsOxidationMask.hpp:252
void setParameters(OxidationMaskParameters passedParameters)
Definition lsOxidationMask.hpp:239
T getResidual() const
Definition lsOxidationMask.hpp:259
Iterates diffusion, oxide deformation, and pressure-dependent reaction-rate feedback on the shared Ca...
Definition lsOxidationModel.hpp:21
void setDeformationField(SmartPointer< OxidationDeformation< T, D > > passedDeformationField)
Definition lsOxidationModel.hpp:55
static auto New(Args &&...args)
Definition lsOxidationModel.hpp:46
T getResidual() const
Definition lsOxidationModel.hpp:245
void setDiffusionField(SmartPointer< OxidationDiffusion< T, D > > passedDiffusionField)
Definition lsOxidationModel.hpp:50
unsigned getIterations() const
Definition lsOxidationModel.hpp:244
void clearSolveBounds()
Definition lsOxidationModel.hpp:71
void apply()
Definition lsOxidationModel.hpp:73
void setParameters(OxidationCouplingParameters passedParameters)
Definition lsOxidationModel.hpp:60
Unified oxidation time-step orchestrator.
Definition lsOxidation.hpp:151
T getMaskCouplingResidual() const
Definition lsOxidation.hpp:295
void setMaskCouplingTolerance(T tolerance)
Definition lsOxidation.hpp:255
void setCouplingParameters(OxidationCouplingParameters params)
Definition lsOxidation.hpp:238
void setGpuPreconditioner(GpuPreconditioner preconditioner)
Definition lsOxidation.hpp:220
static auto New(Args &&...args)
Definition lsOxidation.hpp:215
SmartPointer< OxidationDeformation< T, D > > getDeformationField() const
Return the deformation field populated by the most recent apply() call.
Definition lsOxidation.hpp:282
void setDeformationParameters(OxidationDeformationParameters params)
Definition lsOxidation.hpp:235
T applyCFLLimited(T requestedTime, T cflFactor)
Execute one CFL-limited oxidation step; returns the actual time advanced.
Definition lsOxidation.hpp:304
void setSpatialScheme(SpatialSchemeEnum scheme)
Set the spatial integration scheme for all advections.
Definition lsOxidation.hpp:246
void setMaskInterface(SmartPointer< Domain< T, D > > mask)
Definition lsOxidation.hpp:228
void setMaskParameters(OxidationMaskParameters params)
Definition lsOxidation.hpp:241
unsigned getMaskCouplingIterations() const
Definition lsOxidation.hpp:291
void setGpuMode(GpuMode mode)
Definition lsOxidation.hpp:219
void setSiInterface(SmartPointer< Domain< T, D > > si)
Definition lsOxidation.hpp:224
void setMaskCouplingIterations(unsigned iterations)
Definition lsOxidation.hpp:251
SmartPointer< OxidationDiffusion< T, D > > getDiffusionField() const
Return the diffusion field populated by the most recent apply() call.
Definition lsOxidation.hpp:277
SmartPointer< OxidationMaskBending< T, D > > getMaskBendingField() const
Return the mask bending field (null when no mask is set).
Definition lsOxidation.hpp:287
void setAmbientInterface(SmartPointer< Domain< T, D > > ambient)
Definition lsOxidation.hpp:225
void setTemporalScheme(TemporalSchemeEnum scheme)
Set the temporal integration scheme for all advections.
Definition lsOxidation.hpp:249
void setOxidationParameters(OxidationParameters params)
Definition lsOxidation.hpp:232
void apply(T advectionTime)
Execute one oxidation time step of duration advectionTime.
Definition lsOxidation.hpp:301
T getLastMaxVelocity() const
Maximum interface velocity (µm/hr) from the most recent CFL-limited step.
Definition lsOxidation.hpp:298
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:34
@ Gpu
Always use GPU; fail if unavailable or unsuccessful Use the GPU when it is usable,...
Definition lsOxidationDiffusion.hpp:28
@ Cpu
Always use CPU (default).
Definition lsOxidationDiffusion.hpp:27
FeatureDetectionEnum
Definition lsDetectFeatures.hpp:16
BooleanOperationEnum
Enumeration for the different types of boolean operations which are supported. When INVERT,...
Definition lsBooleanOperation.hpp:27
@ ILU0
Definition lsOxidationDiffusion.hpp:41
@ Jacobi
Definition lsOxidationDiffusion.hpp:41
CurvatureEnum
Definition lsCalculateCurvatures.hpp:15
void bindApi(py::module &module)
Definition pyWrap.hpp:249
PYBIND11_DECLARE_HOLDER_TYPE(TemplateType, SmartPointer< TemplateType >)
void bindOxidationSharedTypes(py::module &module)
Definition pyWrap.hpp:94
T ambientLiftRatio
Definition lsOxidation.hpp:29
T siliconRecession
Definition lsOxidation.hpp:26
T relativeError
Definition lsOxidation.hpp:30
unsigned samples
Definition lsOxidation.hpp:31
T ambientLift
Definition lsOxidation.hpp:27
T expectedAmbientLift
Definition lsOxidation.hpp:28
Definition lsOxidationModel.hpp:13
double tolerance
Definition lsOxidationModel.hpp:15
double relaxation
Definition lsOxidationModel.hpp:16
unsigned maxIterations
Definition lsOxidationModel.hpp:14
Sub-grid accurate sample of the reaction boundary crossing closest to a given grid node....
Definition lsOxidationDiffusion.hpp:189
Definition lsOxidationMask.hpp:17
double creepActivationEnergy
Definition lsOxidationMask.hpp:37
int anchorBoundarySide
Definition lsOxidationMask.hpp:80
int contactMode
Definition lsOxidationMask.hpp:30
std::size_t maxGridPoints
Definition lsOxidationMask.hpp:73
unsigned anchorBoundaryLayers
Definition lsOxidationMask.hpp:81
double minBoundaryDistance
Definition lsOxidationMask.hpp:71
double referenceViscosity
Definition lsOxidationMask.hpp:36
double contactReleaseFraction
Definition lsOxidationMask.hpp:61
double multigridSmootherOmega
Definition lsOxidationMask.hpp:65
int material
Definition lsOxidationMask.hpp:74
double poissonRatio
Definition lsOxidationMask.hpp:45
double referenceTemperature
Definition lsOxidationMask.hpp:35
int anchorBoundaryDirection
Definition lsOxidationMask.hpp:79
double tolerance
Definition lsOxidationMask.hpp:66
unsigned maxIterations
Definition lsOxidationMask.hpp:72
double youngModulus
Definition lsOxidationMask.hpp:40
bool unilateralContact
Definition lsOxidationMask.hpp:48
double relaxation
Definition lsOxidationMask.hpp:51
double temperature
Definition lsOxidationMask.hpp:34
double contactLoadRelaxation
Definition lsOxidationMask.hpp:56
Parameters for the steady oxidant diffusion model used by OxidationDiffusion.
Definition lsOxidationDiffusion.hpp:45
double maskConcentration
Definition lsOxidationDiffusion.hpp:72
double maskTransferCoefficient
Definition lsOxidationDiffusion.hpp:71
double transferCoefficient
Definition lsOxidationDiffusion.hpp:48
double temperature
Definition lsOxidationDiffusion.hpp:57
double minBoundaryDistance
Definition lsOxidationDiffusion.hpp:73
double relaxation
Definition lsOxidationDiffusion.hpp:76
Vec3D< double > crystalAxis
Definition lsOxidationDiffusion.hpp:69
double reactionActivationVolume
Definition lsOxidationDiffusion.hpp:58
double diffusionActivationVolume
Definition lsOxidationDiffusion.hpp:63
double reactionRateRatio111
Definition lsOxidationDiffusion.hpp:68
double diffusionCoefficient
Definition lsOxidationDiffusion.hpp:46
int material
Definition lsOxidationDiffusion.hpp:78
double velocitySign
Definition lsOxidationDiffusion.hpp:52
double reactionRate
Definition lsOxidationDiffusion.hpp:47
double oxidantMoleculeDensity
Definition lsOxidationDiffusion.hpp:50
double equilibriumConcentration
Definition lsOxidationDiffusion.hpp:49
double referencePressure
Definition lsOxidationDiffusion.hpp:59
double tolerance
Definition lsOxidationDiffusion.hpp:75
std::size_t maxGridPoints
Definition lsOxidationDiffusion.hpp:77
double expansionCoefficient
Definition lsOxidationDiffusion.hpp:51
unsigned maxIterations
Definition lsOxidationDiffusion.hpp:74
static OxidationMaskParameters siliconNitrideMask1000C()
LPCVD Si3N4 mask creep at 1000 °C (Hu 1991; Senez et al. 1994). referenceViscosity = 5×10¹¹ Pa·hr at ...
Definition lsOxidationPresets.hpp:63
static OxidationDeformationParameters oxideMechanics1000C(double timeStep)
Thermal SiO2 viscoelastic mechanics at 1000 °C. Viscosity ~1×10¹⁰ Pa·hr (Irene 1978),...
Definition lsOxidationPresets.hpp:42
static OxidationParameters wet1000CDealGrove100()
Wet oxidation at 1000 °C (Deal-Grove linear-parabolic coefficients). B/2 = D_eff = 0....
Definition lsOxidationPresets.hpp:25