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())
100 py::enum_<GpuPreconditioner>(module,
"GpuPreconditioner", py::module_local())
105 py::class_<OxidationParameters>(module,
"OxidationParameters",
108 .def_readwrite(
"diffusionCoefficient",
111 .def_readwrite(
"transferCoefficient",
113 .def_readwrite(
"equilibriumConcentration",
115 .def_readwrite(
"oxidantMoleculeDensity",
117 .def_readwrite(
"expansionCoefficient",
121 .def_readwrite(
"reactionActivationVolume",
123 .def_readwrite(
"referencePressure",
125 .def_readwrite(
"diffusionActivationVolume",
127 .def_readwrite(
"reactionRateRatio111",
130 .def_readwrite(
"maskTransferCoefficient",
132 .def_readwrite(
"maskConcentration",
134 .def_readwrite(
"minBoundaryDistance",
142 py::class_<OxidationPresets>(module,
"OxidationPresets", py::module_local())
144 .def_static(
"wet1000CDealGrove100",
147 .def_static(
"siliconNitrideMask1000C",
150 py::class_<OxidationDeformationParameters>(
151 module,
"OxidationDeformationParameters", py::module_local())
154 .def_readwrite(
"bulkModulus",
156 .def_readwrite(
"ambientPressure",
158 .def_readwrite(
"pressureRelaxation",
160 .def_readwrite(
"pressureTolerance",
163 "minMechanicsBoundaryDistance",
165 .def_readwrite(
"shearModulus",
167 .def_readwrite(
"stressRelaxationTime",
169 .def_readwrite(
"stressTimeStep",
171 .def_readwrite(
"harmonicIterations",
173 .def_readwrite(
"mechanicsIterations",
175 .def_readwrite(
"pressureIterations",
177 .def_readwrite(
"stokesIterations",
179 .def_readwrite(
"mechanicsTolerance",
181 .def_readwrite(
"stokesTolerance",
185 .def_readwrite(
"maxGridPoints",
189 py::class_<OxidationMaskParameters>(module,
"OxidationMaskParameters",
194 .def_readwrite(
"referenceTemperature",
196 .def_readwrite(
"referenceViscosity",
198 .def_readwrite(
"creepActivationEnergy",
202 .def_readwrite(
"unilateralContact",
205 .def_readwrite(
"contactLoadRelaxation",
207 .def_readwrite(
"contactReleaseFraction",
209 .def_readwrite(
"multigridSmootherOmega",
212 .def_readwrite(
"minBoundaryDistance",
217 .def_readwrite(
"anchorBoundaryDirection",
219 .def_readwrite(
"anchorBoundarySide",
221 .def_readwrite(
"anchorBoundaryLayers",
224 py::class_<OxidationCouplingParameters>(module,
"OxidationCouplingParameters",
227 .def_readwrite(
"maxIterations",
232 py::class_<LOCOSConservationDiagnostics<T>>(
233 module,
"LOCOSConservationDiagnostics", py::module_local())
235 .def_readwrite(
"siliconRecession",
237 .def_readwrite(
"ambientLift",
239 .def_readwrite(
"expectedAmbientLift",
241 .def_readwrite(
"ambientLiftRatio",
243 .def_readwrite(
"relativeError",
248template <
int D>
void bindApi(py::module &module) {
250 py::class_<viennahrle::Grid<D>>(module,
"hrleGrid");
253 py::class_<Domain<T, D>, SmartPointer<Domain<T, D>>>(module,
"Domain")
255 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<>))
258 &SmartPointer<
Domain<T, D>>::template New<viennahrle::CoordType>),
259 py::arg(
"gridDelta") = 1.0)
263 .def(py::init([](std::array<viennahrle::CoordType, 2 * D> bounds,
264 std::array<BoundaryConditionEnum, D> bcs,
265 viennahrle::CoordType gridDelta) {
266 return SmartPointer<Domain<T, D>>::New(bounds.data(), bcs.data(),
269 py::arg(
"bounds"), py::arg(
"boundaryConditions"),
270 py::arg(
"gridDelta") = 1.0)
271 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<
272 std::vector<viennahrle::CoordType>, std::vector<unsigned>,
273 viennahrle::CoordType>),
274 py::arg(
"bounds"), py::arg(
"boundaryConditions"),
275 py::arg(
"gridDelta") = 1.0)
286 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<
289 &SmartPointer<
Domain<T, D>>::template New<viennahrle::Grid<D> &>))
292 "Copy lsDomain in this lsDomain.")
294 "Get the number of segments, the level set structure is divided "
297 "Get the number of defined level set values.")
299 "Get the number of layers of level set points around the explicit "
302 "Set the number of layers of level set points which should be "
303 "stored around the explicit surface.")
305 "Clear all metadata stored in the level set.")
310 if (!(py::hasattr(fileHandle,
"write") &&
311 py::hasattr(fileHandle,
"flush"))) {
312 throw py::type_error(
313 "MyClass::read_from_file_like_object(file): incompatible "
314 "function argument: `file` must be a file-like object, but "
316 (std::string)(py::repr(fileHandle)) +
"` provided");
318 py::detail::pythonbuf buf(fileHandle);
319 std::ostream stream(&buf);
322 py::arg(
"stream") = py::module::import(
"sys").attr(
"stdout"));
325 py::class_<Advect<T, D>, SmartPointer<Advect<T, D>>>(module,
"Advect")
327 .def(py::init(&SmartPointer<
Advect<T, D>>::template New<>))
328 .def(py::init(&SmartPointer<
Advect<T, D>>::template New<
335 "Insert next level set to use for advection.")
337 "Clear all level sets used for advection.")
339 "Set the velocity to use for advection.")
341 "Set the time until when the level set should be advected.")
343 "Set whether only a single advection step should be performed.")
345 "Set the maximum time step size relative to grid size. Advection is "
346 "only stable for <0.5.")
347 .def(
"setCalculateNormalVectors",
349 "Set whether normal vectors are needed for the supplied velocity "
352 "Set whether voids in the geometry should be ignored during "
355 py::arg(
"enabled") =
true, py::arg(
"subdivisions") = 20,
356 "Enable/disable adaptive time stepping and set the number of "
359 "setSaveAdvectionVelocities",
361 "Set whether the velocities applied to each point should be saved in "
362 "the level set for debug purposes.")
364 py::arg(
"check"),
"Enable/disable dissipation checking.")
367 "Enable/disable updating point data after advection.")
369 "Get the time passed during advection.")
371 "Get how many advection steps were performed after the last apply() "
374 "Get the time step ratio used for advection.")
376 "Get the current time step.")
377 .def(
"getCalculateNormalVectors",
379 "Get whether normal vectors are computed during advection.")
381 "Set the spatial discretization scheme to use during advection.")
383 "Set the time integration scheme to use during advection.")
385 "(DEPRECATED, use setSpatialScheme instead) Set the spatial "
386 "discretization scheme to use during advection.")
388 "Set the dissipation value to use for Lax Friedrichs spatial "
391 "Set whether the point data in the old LS should be translated to "
392 "the advected LS. Defaults to true.")
395 "Set a callback function that is called after the level set has been "
396 "updated during intermediate time integration steps (e.g. RK2, RK3).")
401 py::call_guard<py::gil_scoped_release>(),
"Perform advection.");
403 py::class_<lsInternal::StencilLocalLaxFriedrichsScalar<T, D, 1>>(
404 module,
"StencilLocalLaxFriedrichsScalar")
408 1>::setMaxDissipation,
409 py::arg(
"maxDissipation"));
411 module.def("PrepareStencilLocalLaxFriedrichs",
412 &PrepareStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"),
415 module.def("FinalizeStencilLocalLaxFriedrichs",
416 &FinalizeStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"));
422 py::class_<RBS>(module,
"ReactionBoundarySample")
424 .def_readwrite(
"found", &RBS::found)
425 .def_readwrite(
"distance", &RBS::distance)
426 .def_readwrite(
"concentration", &RBS::concentration)
427 .def_readwrite(
"crossingAxis", &RBS::crossingAxis)
428 .def_readwrite(
"crossingOffset", &RBS::crossingOffset)
432 std::array<viennahrle::IndexType, D> arr{};
433 for (
unsigned i = 0; i <
D; ++i)
434 arr[i] = s.nodeIndex[i];
437 [](RBS &s,
const std::array<viennahrle::IndexType, D> &arr) {
438 for (
unsigned i = 0; i <
D; ++i)
439 s.nodeIndex[i] = arr[i];
444 SmartPointer<OxidationDiffusion<T, D>>>(module,
445 "OxidationDiffusion")
446 .def(py::init([](SmartPointer<
Domain<T, D>> &reactionInterface,
450 ambientInterface, parameters);
452 py::arg(
"reactionInterface"), py::arg(
"ambientInterface"),
454 .def(
"setReactionInterface",
456 .def(
"setAmbientInterface",
459 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
467 std::array<viennahrle::IndexType, D> passedMinIndex,
468 std::array<viennahrle::IndexType, D> passedMaxIndex) {
469 viennahrle::Index<D> minIndex{};
470 viennahrle::Index<D> maxIndex{};
471 for (
unsigned i = 0; i <
D; ++i) {
472 minIndex[i] = passedMinIndex[i];
473 maxIndex[i] = passedMaxIndex[i];
477 py::arg(
"minIndex"), py::arg(
"maxIndex"))
480 .def(
"getConcentration",
483 .def(
"getEffectiveReactionRate",
492 .def(
"getNumberOfSolutionNodes",
494 .def(
"getReactionBoundarySample",
496 .def(
"getScalarVelocityFromSample",
499 .def(
"markGeometryChanged",
501 .def(
"writePersistentFields",
503 .def(
"getConcentrationCache",
505 py::return_value_policy::copy)
506 .def(
"setConcentrationCache",
510 SmartPointer<OxidationDeformation<T, D>>>(module,
511 "OxidationDeformation")
512 .def(py::init([](SmartPointer<
Domain<T, D>> &reactionInterface,
518 reactionInterface, ambientInterface, diffusionField,
519 oxidationParameters, deformationParameters);
521 py::arg(
"reactionInterface"), py::arg(
"ambientInterface"),
522 py::arg(
"diffusionField"), py::arg(
"oxidationParameters"),
525 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
526 .def(
"clearMaskInterface",
531 std::array<viennahrle::IndexType, D> passedMinIndex,
532 std::array<viennahrle::IndexType, D> passedMaxIndex) {
533 viennahrle::Index<D> minIndex{};
534 viennahrle::Index<D> maxIndex{};
535 for (
unsigned i = 0; i <
D; ++i) {
536 minIndex[i] = passedMinIndex[i];
537 maxIndex[i] = passedMaxIndex[i];
541 py::arg(
"minIndex"), py::arg(
"maxIndex"))
550 .def(
"getStrainTrace",
553 .def(
"getStrainRateTensor",
558 const Vec3D<T> &)
const) &
560 .def(
"getVonMisesStress",
565 .def(
"getNumberOfSolutionNodes",
568 .def(
"setAmbientInterface",
570 .def(
"setOxidationParameters",
572 .def(
"setDeformationParameters",
575 .def(
"setReactionInterface",
578 .def(
"setMaskVelocityField",
580 .def(
"clearMaskVelocityField",
582 .def(
"markGeometryChanged",
584 .def(
"writeFieldsToLevelSet",
588 SmartPointer<OxidationMaskBending<T, D>>>(module,
589 "OxidationMaskBending")
596 py::arg(
"deformationField"),
603 deformationField, maskInterface, maskParameters, maskSign);
605 py::arg(
"deformationField"), py::arg(
"maskInterface"),
607 py::arg(
"maskSign") = 1)
609 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
610 .def(
"setAmbientInterface",
612 py::arg(
"ambientInterface"), py::arg(
"ambientSign") = -1)
616 std::array<viennahrle::IndexType, D> passedMinIndex,
617 std::array<viennahrle::IndexType, D> passedMaxIndex) {
618 viennahrle::Index<D> minIndex{};
619 viennahrle::Index<D> maxIndex{};
620 for (
unsigned i = 0; i <
D; ++i) {
621 minIndex[i] = passedMinIndex[i];
622 maxIndex[i] = passedMaxIndex[i];
626 py::arg(
"minIndex"), py::arg(
"maxIndex"))
633 .def(
"getLastApplyVelocityChange",
635 .def(
"getNumberOfSolutionNodes",
637 .def(
"getNumberOfContactNodes",
639 .def(
"getNumberOfFixedNodes",
641 .def(
"writeFieldsToLevelSet",
645 SmartPointer<OxidationConstrainedAmbient<T, D>>>(
646 module,
"OxidationConstrainedAmbient")
650 SmartPointer<
Domain<T, D>> &maskInterface,
int maskSign) {
652 deformationField, maskVelocityField, maskInterface,
655 py::arg(
"deformationField"), py::arg(
"maskVelocityField"),
656 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1);
658 py::class_<OxidationModel<T, D>, SmartPointer<OxidationModel<T, D>>>(
659 module,
"OxidationModel")
665 diffusionField, deformationField, couplingParameters);
667 py::arg(
"diffusionField"), py::arg(
"deformationField"),
675 std::array<viennahrle::IndexType, D> passedMinIndex,
676 std::array<viennahrle::IndexType, D> passedMaxIndex) {
677 viennahrle::Index<D> minIndex{};
678 viennahrle::Index<D> maxIndex{};
679 for (
unsigned i = 0; i <
D; ++i) {
680 minIndex[i] = passedMinIndex[i];
681 maxIndex[i] = passedMaxIndex[i];
685 py::arg(
"minIndex"), py::arg(
"maxIndex"))
691 py::class_<Oxidation<T, D>, SmartPointer<Oxidation<T, D>>>(module,
693 .def(py::init([](SmartPointer<
Domain<T, D>> &siInterface,
699 py::arg(
"siInterface"), py::arg(
"ambientInterface"),
700 py::arg(
"maskInterface"))
705 .def(
"setDeformationParameters",
713 py::arg(
"preconditioner"))
714 .def(
"setMaskCouplingIterations",
716 .def(
"setMaskCouplingTolerance",
721 std::array<viennahrle::IndexType, D> passedMinIndex,
722 std::array<viennahrle::IndexType, D> passedMaxIndex) {
723 viennahrle::Index<D> minIndex{};
724 viennahrle::Index<D> maxIndex{};
725 for (
unsigned i = 0; i <
D; ++i) {
726 minIndex[i] = passedMinIndex[i];
727 maxIndex[i] = passedMaxIndex[i];
731 py::arg(
"minIndex"), py::arg(
"maxIndex"))
733 "setMaskBendingBounds",
735 std::array<viennahrle::IndexType, D> passedMinIndex,
736 std::array<viennahrle::IndexType, D> passedMaxIndex) {
737 viennahrle::Index<D> minIndex{};
738 viennahrle::Index<D> maxIndex{};
739 for (
unsigned i = 0; i <
D; ++i) {
740 minIndex[i] = passedMinIndex[i];
741 maxIndex[i] = passedMaxIndex[i];
743 model.setMaskBendingBounds(minIndex, maxIndex);
745 py::arg(
"minIndex"), py::arg(
"maxIndex"))
748 py::arg(
"requestedTime"), py::arg(
"cflFactor"),
749 "Execute one CFL-limited LOCOS step; returns the actual time "
752 "Maximum interface velocity (µm/hr) from the most recent CFL step.")
756 .def(
"getMaskCouplingIterations",
758 .def(
"getMaskCouplingResidual",
761 if constexpr (
D == 2) {
763 "computeLOCOSOpenWindowConservation",
764 [](SmartPointer<Domain<T, D>> siInitial,
765 SmartPointer<Domain<T, D>> siAfter,
766 SmartPointer<Domain<T, D>> ambientInitial,
767 SmartPointer<Domain<T, D>> ambientAfter, T xMin, T xMax,
768 viennahrle::IndexType jMin, viennahrle::IndexType jMax,
769 T expansionCoefficient) {
770 return computeLOCOSOpenWindowConservation<T>(
771 siInitial, siAfter, ambientInitial, ambientAfter, xMin, xMax,
772 jMin, jMax, expansionCoefficient);
774 py::arg(
"siInitial"), py::arg(
"siAfter"), py::arg(
"ambientInitial"),
775 py::arg(
"ambientAfter"), py::arg(
"xMin"), py::arg(
"xMax"),
776 py::arg(
"jMin"), py::arg(
"jMax"), py::arg(
"expansionCoefficient"));
780 py::class_<BooleanOperation<T, D>, SmartPointer<BooleanOperation<T, D>>>(
781 module,
"BooleanOperation")
793 return SmartPointer<BooleanOperation<T, D>>::New(domain, op);
798 return SmartPointer<BooleanOperation<T, D>>::New(domainA, domainB, op);
802 "Set levelset on which the boolean operation should be performed.")
804 "Set second levelset for boolean operation.")
806 "Set which type of boolean operation should be performed.")
808 "Perform the boolean operation.");
810 py::class_<CalculateCurvatures<T, D>,
811 SmartPointer<CalculateCurvatures<T, D>>>(module,
812 "CalculateCurvatures")
820 return SmartPointer<CalculateCurvatures<T, D>>::New(domain, type);
824 "Set levelset for which to calculate the curvatures.")
826 "Set which method to use for calculation: Defaults to mean "
829 "Curvatures will be calculated for all LS values < maxValue.")
831 "Perform normal vector calculation.");
834 py::class_<CalculateNormalVectors<T, D>,
835 SmartPointer<CalculateNormalVectors<T, D>>>(
836 module,
"CalculateNormalVectors")
844 "Set levelset for which to calculate normal vectors.")
846 "Set the maximum value for which normals should be calculated.")
848 "Set the method to use for normal calculation.")
850 "Perform normal vector calculation.");
853 py::class_<CalculateVisibilities<T, D>,
854 SmartPointer<CalculateVisibilities<T, D>>>(module,
855 "CalculateVisibilities")
858 SmartPointer<
Domain<T, D>> &,
const Vec3D<T> &, std::string>))
862 py::class_<Check<T, D>, SmartPointer<Check<T, D>>>(module,
"Check")
864 .def(py::init(&SmartPointer<
Check<T, D>>::template New<>))
865 .def(py::init(&SmartPointer<
Check<T, D>>::template New<
869 "Set levelset for which to calculate normal vectors.")
873 py::class_<PointCloud<T, D>, SmartPointer<PointCloud<T, D>>>(module,
877 const std::vector<VectorType<T, D>> &>))
879 .def(
"insertNextPoint",
884 py::class_<ConvexHull<T, D>, SmartPointer<ConvexHull<T, D>>>(module,
892 "Set mesh object where the generated mesh should be stored.")
894 "Set point cloud used to generate mesh.")
898 py::class_<DetectFeatures<T, D>, SmartPointer<DetectFeatures<T, D>>>(
899 module,
"DetectFeatures")
908 .def(py::init([](SmartPointer<
Domain<T, D>> &domain,
T maxValue,
910 return SmartPointer<DetectFeatures<T, D>>::New(domain, maxValue, type);
912 .def(
"setDetectionThreshold",
914 "Set the curvature value above which a point is considered a "
917 "Set which method to use to detect features. Defaults to Curvature.")
921 py::class_<GeometricAdvect<T, D>, SmartPointer<GeometricAdvect<T, D>>>(
922 module,
"GeometricAdvect")
932 "Set levelset to advect.")
934 "setAdvectionDistribution",
936 "Set advection distribution to use as kernel for the fast advection.")
938 py::call_guard<py::gil_scoped_release>(),
"Perform advection.");
941 py::class_<GeometricAdvectDistribution<T, D>,
942 SmartPointer<GeometricAdvectDistribution<T, D>>,
944 "GeometricAdvectDistribution")
949 "Check whether passed point is inside the distribution.")
950 .def(
"getSignedDistance",
952 "Get the signed distance of the passed point to the surface of the "
955 "Get the cartesian bounds of the distribution.")
957 "Prepare the distribution for use with the passed level set.")
959 "Finalize the distribution after use with the level set.");
961 py::class_<SphereDistribution<T, D>, SmartPointer<SphereDistribution<T, D>>,
967 "Check whether passed point is inside the distribution.")
969 "Get the signed distance of the passed point to the surface of the "
972 "Get the cartesian bounds of the distribution.");
974 py::class_<BoxDistribution<T, D>, SmartPointer<BoxDistribution<T, D>>,
978 const std::array<T, 3>>))
981 "Check whether passed point is inside the distribution.")
983 "Get the signed distance of the passed point to the surface of the "
986 "Get the cartesian bounds of the distribution.");
988 py::class_<CustomSphereDistribution<T, D>,
989 SmartPointer<CustomSphereDistribution<T, D>>,
991 "CustomSphereDistribution")
994 const std::vector<T> &>))
997 "Check whether passed point is inside the distribution.")
998 .def(
"getSignedDistance",
1000 "Get the signed distance of the passed point to the surface of the "
1003 "Get the cartesian bounds of the distribution.");
1006 py::class_<Expand<T, D>, SmartPointer<Expand<T, D>>>(module,
"Expand")
1008 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<>))
1009 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<
1011 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<
1019 py::class_<FromSurfaceMesh<T, D>, SmartPointer<FromSurfaceMesh<T, D>>>(
1020 module,
"FromSurfaceMesh")
1030 "Set levelset to read into.")
1032 "Set the mesh to read from.")
1033 .def(
"setRemoveBoundaryTriangles",
1036 "Set whether to include mesh elements outside of the simulation "
1038 .def(
"setRemoveBoundaryTriangles",
1041 "Set whether to include mesh elements outside of the simulation "
1044 "Construct a levelset from a surface mesh.");
1047 py::class_<FromVolumeMesh<T, D>, SmartPointer<FromVolumeMesh<T, D>>>(
1048 module,
"FromVolumeMesh")
1056 SmartPointer<
Mesh<T>> &,
bool>))
1059 "Set the grid used to read in the level sets.")
1061 "Set the mesh to read from.")
1062 .def(
"setRemoveBoundaryTriangles",
1064 "Set whether to include mesh elements outside of the simulation "
1067 "Construct a levelset from a volume mesh.");
1070 py::class_<FromMesh<T, D>, SmartPointer<FromMesh<T, D>>>(module,
"FromMesh")
1080 py::class_<Sphere<T, D>, SmartPointer<Sphere<T, D>>>(module,
"Sphere")
1082 .def(py::init(&SmartPointer<
Sphere<T, D>>::template New<
1083 const std::vector<T> & ,
T >),
1084 py::arg(
"origin"), py::arg(
"radius"));
1086 py::class_<Plane<T, D>, SmartPointer<Plane<T, D>>>(module,
"Plane")
1088 .def(py::init(&SmartPointer<
Plane<T, D>>::template New<
1089 const std::vector<T> & ,
1090 const std::vector<T> & >),
1091 py::arg(
"origin"), py::arg(
"normal"));
1093 py::class_<Box<T, D>, SmartPointer<Box<T, D>>>(module,
"Box")
1095 .def(py::init(&SmartPointer<
Box<T, D>>::template New<
1096 const std::vector<T> & ,
1097 const std::vector<T> & >),
1098 py::arg(
"minPoint"), py::arg(
"maxPoint"));
1100 py::class_<Cylinder<T, D>, SmartPointer<Cylinder<T, D>>>(module,
"Cylinder")
1104 const std::vector<T> & ,
1105 const std::vector<T> & ,
const T ,
1106 const T ,
const T >),
1107 py::arg(
"origin"), py::arg(
"axisDirection"), py::arg(
"height"),
1108 py::arg(
"radius"), py::arg(
"topRadius") = 0.);
1111 py::class_<MakeGeometry<T, D>, SmartPointer<MakeGeometry<T, D>>>(
1112 module,
"MakeGeometry")
1132 "Set the levelset in which to create the geometry.")
1148 .def(
"setIgnoreBoundaryConditions",
1151 .def(
"setIgnoreBoundaryConditions",
1157 py::class_<MarkVoidPoints<T, D>, SmartPointer<MarkVoidPoints<T, D>>>(
1158 module,
"MarkVoidPoints")
1167 "Set the levelset to mark void points in.")
1168 .def(
"setReverseVoidDetection",
1170 "Reverse the logic of detecting the top surface.")
1171 .def(
"setDetectLargestSurface",
1173 "Set that the top surface should be the one with the most connected "
1176 "Set the logic by which to choose the surface which is non-void. "
1177 "All other connected surfaces will then be marked as void points.")
1179 "Save the connectivity information of all LS points in the "
1180 "pointData of the level set.")
1181 .def(
"getNumberOfComponents",
1183 "Get the number of connected components found in the level set.")
1187 py::class_<Prune<T, D>, SmartPointer<Prune<T, D>>>(module,
"Prune")
1189 .def(py::init(&SmartPointer<
Prune<T, D>>::template New<>))
1190 .def(py::init(&SmartPointer<
Prune<T, D>>::template New<
1197 py::class_<Reader<T, D>, SmartPointer<Reader<T, D>>>(module,
"Reader")
1199 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<>))
1200 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<
1202 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<
1206 "Set levelset to write to file.")
1208 "Set the filename for the output file.")
1212 py::class_<Reduce<T, D>, SmartPointer<Reduce<T, D>>>(module,
"Reduce")
1214 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<>))
1215 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1217 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1219 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1225 "Set whether the levelset should be segmented anew (balanced across "
1226 "cores) after reduction.")
1230 py::class_<RemoveStrayPoints<T, D>, SmartPointer<RemoveStrayPoints<T, D>>>(
1231 module,
"RemoveStrayPoints")
1238 "Set levelset for stray point removal.")
1240 "Set the logic by which to choose the surface which should be kept. "
1241 "All other LS values will be marked as stray points and removed.")
1245 py::class_<ToDiskMesh<T, D>, SmartPointer<ToDiskMesh<T, D>>>(module,
1253 "Set levelset to mesh.")
1255 "Clear all inserted level sets.")
1257 "Insert next level set to output in the disk mesh.")
1260 "Set the material map to use for the disk mesh.")
1262 "Set the maximum level set value to include in the disk mesh.")
1264 "Convert the levelset to a surface mesh.");
1267 py::class_<ToMesh<T, D>, SmartPointer<ToMesh<T, D>>>(module,
"ToMesh")
1269 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<>))
1270 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<
1275 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<
1282 "Set whether only defined points should be output to the mesh.")
1284 "Set whether only level set points <0.5 should be output.")
1286 "Convert the levelset to a surface mesh.");
1289 py::class_<ToSurfaceMesh<T, D>, SmartPointer<ToSurfaceMesh<T, D>>>(
1290 module,
"ToSurfaceMesh")
1295 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1299 py::arg(
"domain"), py::arg(
"mesh"),
1300 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1303 "Set levelset to mesh.")
1305 "Set the mesh to generate.")
1307 "Set whether to update point data. Defaults to true.")
1309 "Set whether to preserve sharp corners. Defaults to false.")
1311 "Convert the levelset to a surface mesh.");
1314 py::class_<ToMultiSurfaceMesh<T, D>, SmartPointer<ToMultiSurfaceMesh<T, D>>>(
1315 module,
"ToMultiSurfaceMesh")
1320 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1324 py::arg(
"domain"), py::arg(
"mesh"),
1325 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1328 SmartPointer<
Mesh<T>> &,
double,
double>),
1329 py::arg(
"domains"), py::arg(
"mesh"),
1330 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1332 SmartPointer<
Mesh<T>> &,
double,
double>),
1333 py::arg(
"mesh"), py::arg(
"minNodeDistFactor") = 0.05,
1334 py::arg(
"eps") = 1e-12)
1337 "Insert next level set to output in the mesh.")
1339 "Clear all inserted level sets.")
1341 "Set the mesh to generate.")
1343 "Set the material map to use for the multi surface mesh.")
1345 "Set whether to preserve sharp corners. Defaults to false.")
1347 "Convert the levelset to a surface mesh.");
1350 py::class_<ToVoxelMesh<T, D>, SmartPointer<ToVoxelMesh<T, D>>>(module,
1363 "Insert next level set to output in the mesh.")
1365 "Clear all inserted level sets.")
1368 "Convert the levelset to a surface mesh.");
1371 py::class_<Writer<T, D>, SmartPointer<Writer<T, D>>>(module,
"Writer")
1373 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<>))
1374 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<
1376 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<
1380 "Set levelset to write to file.")
1382 "Set the filename for the output file.")
1386 py::class_<CompareSparseField<T, D>, SmartPointer<CompareSparseField<T, D>>>(
1387 module,
"CompareSparseField")
1394 .def(
"setLevelSetExpanded",
1396 "Sets the expanded level set for comparison.")
1397 .def(
"setLevelSetIterated",
1399 "Sets the iterated level set to compare against the expanded one.")
1401 "Set the x-coordinate range to restrict the comparison area")
1403 "Set the y-coordinate range to restrict the comparison area")
1405 "Clear the x-range restriction")
1407 "Clear the y-range restriction")
1409 "Set the z-coordinate range to restrict the comparison area")
1411 "Clear the z-range restriction")
1413 "Set the output mesh where difference values will be stored")
1414 .def(
"setFillIteratedWithDistances",
1416 "Set whether to fill the iterated level set with distance values")
1417 .def(
"setExpandedLevelSetWidth",
1419 "Set the expansion width for the expanded level set")
1421 "Apply the comparison and calculate the sum of squared "
1423 .def(
"getSumSquaredDifferences",
1425 "Return the sum of squared differences calculated by apply().")
1427 "Return the sum of absolute differences calculated by apply().")
1429 "Return the number of points used in the comparison.")
1430 .def(
"getNumSkippedPoints",
1432 "Return the number of points skipped during comparison.")
1434 "Calculate the root mean square error from previously computed "
1438#ifdef VIENNALS_USE_VTK
1439 py::class_<WriteVisualizationMesh<T, D>,
1440 SmartPointer<WriteVisualizationMesh<T, D>>>(
1441 module,
"WriteVisualizationMesh")
1444 py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<>))
1445 .def(py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<
1448 .def(
"insertNextLevelSet",
1449 &WriteVisualizationMesh<T, D>::insertNextLevelSet,
1450 "Insert next level set to convert. Bigger level sets wrapping "
1451 "smaller ones, should be inserted last.")
1452 .def(
"setFileName", &WriteVisualizationMesh<T, D>::setFileName,
1453 "Set Name of File to write.")
1454 .def(
"setExtractHullMesh",
1455 &WriteVisualizationMesh<T, D>::setExtractHullMesh,
1456 "Whether to extract a hull mesh. Defaults to false.")
1457 .def(
"setExtractVolumeMesh",
1458 &WriteVisualizationMesh<T, D>::setExtractVolumeMesh,
1459 " Whether to extract a tetra volume mesh. Defaults to true.")
1460 .def(
"setMetaData", &WriteVisualizationMesh<T, D>::setMetaData,
1461 "Set the metadata to be written to the file.")
1463 py::overload_cast<const std::string &, T>(
1464 &WriteVisualizationMesh<T, D>::addMetaData),
1465 "Add a single metadata entry to the file.")
1467 py::overload_cast<
const std::string &,
const std::vector<T> &>(
1468 &WriteVisualizationMesh<T, D>::addMetaData),
1469 "Add a single metadata entry to the file.")
1472 const std::unordered_map<std::string, std::vector<T>> &>(
1473 &WriteVisualizationMesh<T, D>::addMetaData),
1474 "Add metadata to the file.")
1475 .def(
"apply", &WriteVisualizationMesh<T, D>::apply,
1476 "Make and write mesh.");
1480 py::class_<ToHullMesh<T, D>, SmartPointer<ToHullMesh<T, D>>>(module,
1494 "Insert next level set to convert. Bigger level sets wrapping "
1495 "smaller ones, should be inserted last.")
1497 "Clear all inserted level sets.")
1499 "Set whether to generate sharp corners. Defaults to false.")
1501 "Set the material map to use for the hull mesh.")
1503 "Set the bottom extension value for 2D hull meshes.")
1507 py::class_<CompareVolume<T, D>, SmartPointer<CompareVolume<T, D>>>(
1508 module,
"CompareVolume")
1516 "Sets the target level set.")
1518 "Sets the sample level set.")
1520 "Set default increment value")
1522 "Sets the x-range and custom increment value")
1524 "Sets the y-range and custom increment value")
1526 "Sets the z-range and custom increment value")
1528 "Set the output mesh where difference areas will be stored")
1530 "Returns the computed volume mismatch.")
1532 "Returns the computed area mismatch.")
1533 .def(
"getCustomVolumeMismatch",
1535 "Returns the computed volume mismatch, with custom increments "
1538 "Returns the computed area mismatch, with custom increments "
1541 "Returns the number of cells where the level sets differ.")
1543 "Returns the number of cells where the level sets differ, with "
1544 "custom increments applied.")
1546 "Computes the volume difference between the two level sets.");
1548 if constexpr (
D == 2) {
1549 module.attr("CompareArea") = module.attr("CompareVolume");
1553 py::class_<CompareChamfer<T, D>, SmartPointer<CompareChamfer<T, D>>>(
1554 module,
"CompareChamfer")
1562 "Set the target level set.")
1564 "Set the sample level set.")
1566 "Set output mesh for target surface points with distance data.")
1568 "Set output mesh for sample surface points with distance data.")
1570 "Apply the Chamfer distance calculation.")
1572 "Get the forward distance (average distance from target to "
1575 "Get the backward distance (average distance from sample to "
1578 "Get the Chamfer distance (average of forward and backward).")
1579 .def(
"getRMSChamferDistance",
1581 "Get the RMS Chamfer distance.")
1583 "Get the maximum nearest-neighbor distance.")
1585 "Get the number of target surface points.")
1587 "Get the number of sample surface points.");
1590 py::class_<CompareCriticalDimensions<T, D>,
1591 SmartPointer<CompareCriticalDimensions<T, D>>>(
1592 module,
"CompareCriticalDimensions")
1600 .def(
"setLevelSetTarget",
1602 "Sets the target level set.")
1603 .def(
"setLevelSetSample",
1605 "Sets the sample level set.")
1607 py::arg(
"measureDimension"), py::arg(
"minBounds"),
1608 py::arg(
"maxBounds"), py::arg(
"findMaximum") =
true,
1609 "Add a generic range specification.")
1611 py::arg(
"minX"), py::arg(
"maxX"), py::arg(
"findMaximum") =
true,
1612 "Add an X range to find maximum or minimum Y position.")
1614 py::arg(
"minY"), py::arg(
"maxY"), py::arg(
"findMaximum") =
true,
1615 "Add a Y range to find maximum or minimum X position.")
1617 "Clear all range specifications.")
1619 "Set the output mesh where critical dimension locations will be "
1622 "Apply the comparison.")
1623 .def(
"getNumCriticalDimensions",
1625 "Get the number of critical dimensions compared.")
1627 "getCriticalDimensionResult",
1629 T posRef{}, posCmp{}, diff{};
1633 return py::make_tuple(
true, posRef, posCmp, diff);
1634 return py::make_tuple(
false,
T(0),
T(0),
T(0));
1637 "Get a specific critical dimension result. Returns (valid, "
1638 "positionTarget, positionSample, difference).")
1639 .def(
"getMeanDifference",
1641 "Get mean absolute difference across all valid critical "
1643 .def(
"getMaxDifference",
1645 "Get maximum difference across all valid critical dimensions.")
1647 "Get RMSE across all valid critical dimensions.")
1648 .def(
"getAllDifferences",
1650 "Get all valid differences as a list.");
1653 py::class_<CompareNarrowBand<T, D>, SmartPointer<CompareNarrowBand<T, D>>>(
1654 module,
"CompareNarrowBand")
1662 "Sets the target level set.")
1664 "Sets the sample level set.")
1666 "Set the x-coordinate range to restrict the comparison area")
1668 "Set the y-coordinate range to restrict the comparison area")
1670 "Clear the x-range restriction")
1672 "Clear the y-range restriction")
1674 "Set the z-coordinate range to restrict the comparison area")
1676 "Clear the z-range restriction")
1678 "Set the output mesh where difference values will be stored")
1679 .def(
"setOutputMeshSquaredDifferences",
1681 "Set whether to output squared differences (true) or absolute "
1682 "differences (false)")
1684 "Apply the comparison and calculate the sum of squared "
1686 .def(
"getSumSquaredDifferences",
1688 "Return the sum of squared differences calculated by apply().")
1690 "Return the sum of absolute differences calculated by apply().")
1692 "Return the number of points used in the comparison.")
1694 "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:92
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:214
void setConcentrationCache(std::unordered_map< std::size_t, T > cache)
Definition lsOxidationDiffusion.hpp:433
void setMaskInterface(SmartPointer< Domain< T, D > > passedInterface, int passedMaskSign=1)
Definition lsOxidationDiffusion.hpp:231
T getEffectiveReactionRate(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:252
void markSolved()
Mark the current solution as valid without re-solving. Call this before any parallel advection (lsAdv...
Definition lsOxidationDiffusion.hpp:448
const std::unordered_map< std::size_t, T > & getConcentrationCache() const
Definition lsOxidationDiffusion.hpp:429
T getResidual() const
Definition lsOxidationDiffusion.hpp:418
void apply()
Definition lsOxidationDiffusion.hpp:305
std::size_t getNumberOfSolutionNodes() const
Definition lsOxidationDiffusion.hpp:421
void setParameters(OxidationParameters passedParameters)
Definition lsOxidationDiffusion.hpp:245
void clearSolveBounds()
Definition lsOxidationDiffusion.hpp:299
void clearPressureField()
Definition lsOxidationDiffusion.hpp:259
static auto New(Args &&...args)
Definition lsOxidationDiffusion.hpp:208
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:290
T getScalarVelocityFromSample(const ReactionBoundarySample &sample) const
Absolute scalar velocity derived from an already-computed boundary sample, avoiding a second call to ...
Definition lsOxidationDiffusion.hpp:517
void setPressure(const IndexType &index, T pressure)
Definition lsOxidationDiffusion.hpp:264
unsigned getIterations() const
Definition lsOxidationDiffusion.hpp:417
void setAmbientInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:225
OxidationParameters getParameters() const
Definition lsOxidationDiffusion.hpp:250
void setReactionInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:219
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:282
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:508
void clearMaskInterface()
Definition lsOxidationDiffusion.hpp:239
T getConcentration(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:387
void writePersistentFields()
Convenience wrapper: persist both concentration and pressure in one call.
Definition lsOxidationDiffusion.hpp:499
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
@ Gpu
Always use GPU; fail if unavailable or unsuccessful.
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:35
@ Jacobi
Definition lsOxidationDiffusion.hpp:35
CurvatureEnum
Definition lsCalculateCurvatures.hpp:15
void bindApi(py::module &module)
Definition pyWrap.hpp:248
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:183
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:39
double maskConcentration
Definition lsOxidationDiffusion.hpp:66
double maskTransferCoefficient
Definition lsOxidationDiffusion.hpp:65
double transferCoefficient
Definition lsOxidationDiffusion.hpp:42
double temperature
Definition lsOxidationDiffusion.hpp:51
double minBoundaryDistance
Definition lsOxidationDiffusion.hpp:67
double relaxation
Definition lsOxidationDiffusion.hpp:70
Vec3D< double > crystalAxis
Definition lsOxidationDiffusion.hpp:63
double reactionActivationVolume
Definition lsOxidationDiffusion.hpp:52
double diffusionActivationVolume
Definition lsOxidationDiffusion.hpp:57
double reactionRateRatio111
Definition lsOxidationDiffusion.hpp:62
double diffusionCoefficient
Definition lsOxidationDiffusion.hpp:40
int material
Definition lsOxidationDiffusion.hpp:72
double velocitySign
Definition lsOxidationDiffusion.hpp:46
double reactionRate
Definition lsOxidationDiffusion.hpp:41
double oxidantMoleculeDensity
Definition lsOxidationDiffusion.hpp:44
double equilibriumConcentration
Definition lsOxidationDiffusion.hpp:43
double referencePressure
Definition lsOxidationDiffusion.hpp:53
double tolerance
Definition lsOxidationDiffusion.hpp:69
std::size_t maxGridPoints
Definition lsOxidationDiffusion.hpp:71
double expansionCoefficient
Definition lsOxidationDiffusion.hpp:45
unsigned maxIterations
Definition lsOxidationDiffusion.hpp:68
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