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::class_<OxidationParameters>(module,
"OxidationParameters",
104 .def_readwrite(
"diffusionCoefficient",
107 .def_readwrite(
"transferCoefficient",
109 .def_readwrite(
"equilibriumConcentration",
111 .def_readwrite(
"oxidantMoleculeDensity",
113 .def_readwrite(
"expansionCoefficient",
117 .def_readwrite(
"reactionActivationVolume",
119 .def_readwrite(
"referencePressure",
121 .def_readwrite(
"diffusionActivationVolume",
123 .def_readwrite(
"reactionRateRatio111",
126 .def_readwrite(
"maskTransferCoefficient",
128 .def_readwrite(
"maskConcentration",
130 .def_readwrite(
"minBoundaryDistance",
138 py::class_<OxidationPresets>(module,
"OxidationPresets", py::module_local())
140 .def_static(
"wet1000CDealGrove100",
143 .def_static(
"siliconNitrideMask1000C",
146 py::arg(
"temperatureCelsius"));
148 py::class_<OxidationDeformationParameters>(
149 module,
"OxidationDeformationParameters", py::module_local())
152 .def_readwrite(
"ambientPressure",
155 "minMechanicsBoundaryDistance",
157 .def_readwrite(
"shearModulus",
159 .def_readwrite(
"stressRelaxationTime",
161 .def_readwrite(
"shearActivationVolume",
163 .def_readwrite(
"stressTimeStep",
165 .def_readwrite(
"mechanicsIterations",
167 .def_readwrite(
"mechanicsTolerance",
169 .def_readwrite(
"maxGridPoints",
173 py::class_<OxidationMaskParameters>(module,
"OxidationMaskParameters",
179 .def_readwrite(
"shearActivationVolume",
182 py::class_<OxidationCouplingParameters>(module,
"OxidationCouplingParameters",
185 .def_readwrite(
"maxIterations",
190 py::class_<LOCOSConservationDiagnostics<T>>(
191 module,
"LOCOSConservationDiagnostics", py::module_local())
193 .def_readwrite(
"siliconRecession",
195 .def_readwrite(
"ambientLift",
197 .def_readwrite(
"expectedAmbientLift",
199 .def_readwrite(
"ambientLiftRatio",
201 .def_readwrite(
"relativeError",
206template <
int D>
void bindApi(py::module &module) {
208 py::class_<viennahrle::Grid<D>>(module,
"hrleGrid");
211 py::class_<Domain<T, D>, SmartPointer<Domain<T, D>>>(module,
"Domain")
213 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<>))
216 &SmartPointer<
Domain<T, D>>::template New<viennahrle::CoordType>),
217 py::arg(
"gridDelta") = 1.0)
221 .def(py::init([](std::array<viennahrle::CoordType, 2 * D>
bounds,
222 std::array<BoundaryConditionEnum, D> bcs,
224 return SmartPointer<Domain<T, D>>::New(
bounds.data(), bcs.data(),
227 py::arg(
"bounds"), py::arg(
"boundaryConditions"),
228 py::arg(
"gridDelta") = 1.0)
229 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<
230 std::vector<viennahrle::CoordType>, std::vector<unsigned>,
231 viennahrle::CoordType>),
232 py::arg(
"bounds"), py::arg(
"boundaryConditions"),
233 py::arg(
"gridDelta") = 1.0)
244 .def(py::init(&SmartPointer<
Domain<T, D>>::template New<
247 &SmartPointer<
Domain<T, D>>::template New<viennahrle::Grid<D> &>))
250 "Copy lsDomain in this lsDomain.")
252 "Get the number of segments, the level set structure is divided "
255 "Get the number of defined level set values.")
257 "Get the number of layers of level set points around the explicit "
260 "Set the number of layers of level set points which should be "
261 "stored around the explicit surface.")
263 "Clear all metadata stored in the level set.")
268 if (!(py::hasattr(fileHandle,
"write") &&
269 py::hasattr(fileHandle,
"flush"))) {
270 throw py::type_error(
271 "MyClass::read_from_file_like_object(file): incompatible "
272 "function argument: `file` must be a file-like object, but "
274 (std::string)(py::repr(fileHandle)) +
"` provided");
276 py::detail::pythonbuf buf(fileHandle);
277 std::ostream stream(&buf);
280 py::arg(
"stream") = py::module::import(
"sys").attr(
"stdout"));
283 py::class_<Advect<T, D>, SmartPointer<Advect<T, D>>>(module,
"Advect")
285 .def(py::init(&SmartPointer<
Advect<T, D>>::template New<>))
286 .def(py::init(&SmartPointer<
Advect<T, D>>::template New<
293 "Insert next level set to use for advection.")
295 "Clear all level sets used for advection.")
297 "Set the velocity to use for advection.")
299 "Set the time until when the level set should be advected.")
301 "Set whether only a single advection step should be performed.")
303 "Set the maximum time step size relative to grid size. Advection is "
304 "only stable for <0.5.")
305 .def(
"setCalculateNormalVectors",
307 "Set whether normal vectors are needed for the supplied velocity "
310 "Set whether voids in the geometry should be ignored during "
313 py::arg(
"enabled") =
true, py::arg(
"subdivisions") = 20,
314 "Enable/disable adaptive time stepping and set the number of "
317 "setSaveAdvectionVelocities",
319 "Set whether the velocities applied to each point should be saved in "
320 "the level set for debug purposes.")
322 py::arg(
"check"),
"Enable/disable dissipation checking.")
325 "Enable/disable updating point data after advection.")
327 "Get the time passed during advection.")
329 "Get how many advection steps were performed after the last apply() "
332 "Get the time step ratio used for advection.")
334 "Get the current time step.")
335 .def(
"getCalculateNormalVectors",
337 "Get whether normal vectors are computed during advection.")
339 "Set the spatial discretization scheme to use during advection.")
341 "Set the time integration scheme to use during advection.")
343 "(DEPRECATED, use setSpatialScheme instead) Set the spatial "
344 "discretization scheme to use during advection.")
346 "Set the dissipation value to use for Lax Friedrichs spatial "
349 "Set whether the point data in the old LS should be translated to "
350 "the advected LS. Defaults to true.")
353 "Set a callback function that is called after the level set has been "
354 "updated during intermediate time integration steps (e.g. RK2, RK3).")
359 py::call_guard<py::gil_scoped_release>(),
"Perform advection.");
361 py::class_<lsInternal::StencilLocalLaxFriedrichsScalar<T, D, 1>>(
362 module,
"StencilLocalLaxFriedrichsScalar")
366 1>::setMaxDissipation,
367 py::arg(
"maxDissipation"));
369 module.def("PrepareStencilLocalLaxFriedrichs",
370 &PrepareStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"),
373 module.def("FinalizeStencilLocalLaxFriedrichs",
374 &FinalizeStencilLocalLaxFriedrichs<T, D>, py::arg("levelSets"));
380 py::class_<RBS>(module,
"ReactionBoundarySample")
382 .def_readwrite(
"found", &RBS::found)
383 .def_readwrite(
"distance", &RBS::distance)
384 .def_readwrite(
"concentration", &RBS::concentration)
385 .def_readwrite(
"crossingAxis", &RBS::crossingAxis)
386 .def_readwrite(
"crossingOffset", &RBS::crossingOffset)
390 std::array<viennahrle::IndexType, D> arr{};
391 for (
unsigned i = 0; i <
D; ++i)
392 arr[i] = s.nodeIndex[i];
395 [](RBS &s,
const std::array<viennahrle::IndexType, D> &arr) {
396 for (
unsigned i = 0; i <
D; ++i)
397 s.nodeIndex[i] = arr[i];
402 SmartPointer<OxidationDiffusion<T, D>>>(module,
403 "OxidationDiffusion")
404 .def(py::init([](SmartPointer<
Domain<T, D>> &reactionInterface,
408 ambientInterface, parameters);
410 py::arg(
"reactionInterface"), py::arg(
"ambientInterface"),
412 .def(
"setReactionInterface",
414 .def(
"setAmbientInterface",
417 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
425 std::array<viennahrle::IndexType, D> passedMinIndex,
426 std::array<viennahrle::IndexType, D> passedMaxIndex) {
427 viennahrle::Index<D> minIndex{};
428 viennahrle::Index<D> maxIndex{};
429 for (
unsigned i = 0; i <
D; ++i) {
430 minIndex[i] = passedMinIndex[i];
431 maxIndex[i] = passedMaxIndex[i];
435 py::arg(
"minIndex"), py::arg(
"maxIndex"))
438 .def(
"getConcentration",
441 .def(
"getEffectiveReactionRate",
446 const Vec3D<T> &,
const std::array<T, 9> &)) &
453 .def(
"getNumberOfSolutionNodes",
455 .def(
"getReactionBoundarySample",
457 .def(
"getScalarVelocityFromSample",
460 .def(
"markGeometryChanged",
462 .def(
"writePersistentFields",
464 .def(
"getConcentrationCache",
466 py::return_value_policy::copy)
467 .def(
"setConcentrationCache",
471 SmartPointer<OxidationDeformation<T, D>>>(module,
472 "OxidationDeformation")
473 .def(py::init([](SmartPointer<
Domain<T, D>> &reactionInterface,
479 reactionInterface, ambientInterface, diffusionField,
480 oxidationParameters, deformationParameters);
482 py::arg(
"reactionInterface"), py::arg(
"ambientInterface"),
483 py::arg(
"diffusionField"), py::arg(
"oxidationParameters"),
486 py::arg(
"maskInterface"), py::arg(
"maskSign") = 1)
487 .def(
"clearMaskInterface",
492 std::array<viennahrle::IndexType, D> passedMinIndex,
493 std::array<viennahrle::IndexType, D> passedMaxIndex) {
494 viennahrle::Index<D> minIndex{};
495 viennahrle::Index<D> maxIndex{};
496 for (
unsigned i = 0; i <
D; ++i) {
497 minIndex[i] = passedMinIndex[i];
498 maxIndex[i] = passedMaxIndex[i];
502 py::arg(
"minIndex"), py::arg(
"maxIndex"))
508 .def(
"getMaterialVelocity",
510 py::arg(
"coordinate"), py::arg(
"nitride"),
511 "Velocity of one material (oxide, or the nitride mask) for "
512 "advecting its surface.")
516 .def(
"getStrainTrace",
519 .def(
"getStrainRateTensor",
524 const Vec3D<T> &)
const) &
526 .def(
"getVonMisesStress",
531 .def(
"getNumberOfSolutionNodes",
534 .def(
"setAmbientInterface",
536 .def(
"setOxidationParameters",
538 .def(
"setDeformationParameters",
541 .def(
"setReactionInterface",
544 .def(
"markGeometryChanged",
546 .def(
"writeFieldsToLevelSet",
549 py::class_<OxidationModel<T, D>, SmartPointer<OxidationModel<T, D>>>(
550 module,
"OxidationModel")
556 diffusionField, deformationField, couplingParameters);
558 py::arg(
"diffusionField"), py::arg(
"deformationField"),
566 std::array<viennahrle::IndexType, D> passedMinIndex,
567 std::array<viennahrle::IndexType, D> passedMaxIndex) {
568 viennahrle::Index<D> minIndex{};
569 viennahrle::Index<D> maxIndex{};
570 for (
unsigned i = 0; i <
D; ++i) {
571 minIndex[i] = passedMinIndex[i];
572 maxIndex[i] = passedMaxIndex[i];
576 py::arg(
"minIndex"), py::arg(
"maxIndex"))
582 py::class_<Oxidation<T, D>, SmartPointer<Oxidation<T, D>>>(module,
584 .def(py::init([](SmartPointer<
Domain<T, D>> &siInterface,
590 py::arg(
"siInterface"), py::arg(
"ambientInterface"),
591 py::arg(
"maskInterface"))
596 .def(
"setDeformationParameters",
606 std::array<viennahrle::IndexType, D> passedMinIndex,
607 std::array<viennahrle::IndexType, D> passedMaxIndex) {
608 viennahrle::Index<D> minIndex{};
609 viennahrle::Index<D> maxIndex{};
610 for (
unsigned i = 0; i <
D; ++i) {
611 minIndex[i] = passedMinIndex[i];
612 maxIndex[i] = passedMaxIndex[i];
616 py::arg(
"minIndex"), py::arg(
"maxIndex"))
619 py::arg(
"requestedTime"), py::arg(
"cflFactor"),
620 "Execute one CFL-limited LOCOS step; returns the actual time "
623 "Maximum interface velocity (µm/hr) from the most recent CFL step.")
627 if constexpr (
D == 2) {
629 "computeLOCOSOpenWindowConservation",
630 [](SmartPointer<Domain<T, D>> siInitial,
631 SmartPointer<Domain<T, D>> siAfter,
632 SmartPointer<Domain<T, D>> ambientInitial,
633 SmartPointer<Domain<T, D>> ambientAfter, T xMin, T xMax,
634 viennahrle::IndexType jMin, viennahrle::IndexType jMax,
635 T expansionCoefficient) {
636 return computeLOCOSOpenWindowConservation<T>(
637 siInitial, siAfter, ambientInitial, ambientAfter, xMin, xMax,
638 jMin, jMax, expansionCoefficient);
640 py::arg(
"siInitial"), py::arg(
"siAfter"), py::arg(
"ambientInitial"),
641 py::arg(
"ambientAfter"), py::arg(
"xMin"), py::arg(
"xMax"),
642 py::arg(
"jMin"), py::arg(
"jMax"), py::arg(
"expansionCoefficient"));
646 py::class_<BooleanOperation<T, D>, SmartPointer<BooleanOperation<T, D>>>(
647 module,
"BooleanOperation")
659 return SmartPointer<BooleanOperation<T, D>>::New(domain, op);
664 return SmartPointer<BooleanOperation<T, D>>::New(domainA, domainB, op);
668 "Set levelset on which the boolean operation should be performed.")
670 "Set second levelset for boolean operation.")
672 "Set which type of boolean operation should be performed.")
674 "Perform the boolean operation.");
676 py::class_<CalculateCurvatures<T, D>,
677 SmartPointer<CalculateCurvatures<T, D>>>(module,
678 "CalculateCurvatures")
686 return SmartPointer<CalculateCurvatures<T, D>>::New(domain, type);
690 "Set levelset for which to calculate the curvatures.")
692 "Set which method to use for calculation: Defaults to mean "
695 "Curvatures will be calculated for all LS values < maxValue.")
697 "Perform normal vector calculation.");
700 py::class_<CalculateNormalVectors<T, D>,
701 SmartPointer<CalculateNormalVectors<T, D>>>(
702 module,
"CalculateNormalVectors")
710 "Set levelset for which to calculate normal vectors.")
712 "Set the maximum value for which normals should be calculated.")
714 "Set the method to use for normal calculation.")
716 "Perform normal vector calculation.");
719 py::class_<CalculateVisibilities<T, D>,
720 SmartPointer<CalculateVisibilities<T, D>>>(module,
721 "CalculateVisibilities")
724 SmartPointer<
Domain<T, D>> &,
const Vec3D<T> &, std::string>))
728 py::class_<Check<T, D>, SmartPointer<Check<T, D>>>(module,
"Check")
730 .def(py::init(&SmartPointer<
Check<T, D>>::template New<>))
731 .def(py::init(&SmartPointer<
Check<T, D>>::template New<
735 "Set levelset for which to calculate normal vectors.")
739 py::class_<PointCloud<T, D>, SmartPointer<PointCloud<T, D>>>(module,
743 const std::vector<VectorType<T, D>> &>))
745 .def(
"insertNextPoint",
750 py::class_<ConvexHull<T, D>, SmartPointer<ConvexHull<T, D>>>(module,
758 "Set mesh object where the generated mesh should be stored.")
760 "Set point cloud used to generate mesh.")
764 py::class_<DetectFeatures<T, D>, SmartPointer<DetectFeatures<T, D>>>(
765 module,
"DetectFeatures")
774 .def(py::init([](SmartPointer<
Domain<T, D>> &domain,
T maxValue,
776 return SmartPointer<DetectFeatures<T, D>>::New(domain, maxValue, type);
778 .def(
"setDetectionThreshold",
780 "Set the curvature value above which a point is considered a "
783 "Set which method to use to detect features. Defaults to Curvature.")
787 py::class_<GeometricAdvect<T, D>, SmartPointer<GeometricAdvect<T, D>>>(
788 module,
"GeometricAdvect")
798 "Set levelset to advect.")
800 "setAdvectionDistribution",
802 "Set advection distribution to use as kernel for the fast advection.")
804 py::call_guard<py::gil_scoped_release>(),
"Perform advection.");
807 py::class_<GeometricAdvectDistribution<T, D>,
808 SmartPointer<GeometricAdvectDistribution<T, D>>,
810 "GeometricAdvectDistribution")
815 "Check whether passed point is inside the distribution.")
816 .def(
"getSignedDistance",
818 "Get the signed distance of the passed point to the surface of the "
821 "Get the cartesian bounds of the distribution.")
823 "Prepare the distribution for use with the passed level set.")
825 "Finalize the distribution after use with the level set.");
827 py::class_<SphereDistribution<T, D>, SmartPointer<SphereDistribution<T, D>>,
833 "Check whether passed point is inside the distribution.")
835 "Get the signed distance of the passed point to the surface of the "
838 "Get the cartesian bounds of the distribution.");
840 py::class_<BoxDistribution<T, D>, SmartPointer<BoxDistribution<T, D>>,
844 const std::array<T, 3>>))
847 "Check whether passed point is inside the distribution.")
849 "Get the signed distance of the passed point to the surface of the "
852 "Get the cartesian bounds of the distribution.");
854 py::class_<CustomSphereDistribution<T, D>,
855 SmartPointer<CustomSphereDistribution<T, D>>,
857 "CustomSphereDistribution")
860 const std::vector<T> &>))
863 "Check whether passed point is inside the distribution.")
864 .def(
"getSignedDistance",
866 "Get the signed distance of the passed point to the surface of the "
869 "Get the cartesian bounds of the distribution.");
872 py::class_<Expand<T, D>, SmartPointer<Expand<T, D>>>(module,
"Expand")
874 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<>))
875 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<
877 .def(py::init(&SmartPointer<
Expand<T, D>>::template New<
885 py::class_<FromSurfaceMesh<T, D>, SmartPointer<FromSurfaceMesh<T, D>>>(
886 module,
"FromSurfaceMesh")
896 "Set levelset to read into.")
898 "Set the mesh to read from.")
899 .def(
"setRemoveBoundaryTriangles",
902 "Set whether to include mesh elements outside of the simulation "
904 .def(
"setRemoveBoundaryTriangles",
907 "Set whether to include mesh elements outside of the simulation "
910 "Construct a levelset from a surface mesh.");
913 py::class_<FromVolumeMesh<T, D>, SmartPointer<FromVolumeMesh<T, D>>>(
914 module,
"FromVolumeMesh")
922 SmartPointer<
Mesh<T>> &,
bool>))
925 "Set the grid used to read in the level sets.")
927 "Set the mesh to read from.")
928 .def(
"setRemoveBoundaryTriangles",
930 "Set whether to include mesh elements outside of the simulation "
933 "Construct a levelset from a volume mesh.");
936 py::class_<FromMesh<T, D>, SmartPointer<FromMesh<T, D>>>(module,
"FromMesh")
946 py::class_<Sphere<T, D>, SmartPointer<Sphere<T, D>>>(module,
"Sphere")
948 .def(py::init(&SmartPointer<
Sphere<T, D>>::template New<
949 const std::vector<T> & ,
T >),
950 py::arg(
"origin"), py::arg(
"radius"));
952 py::class_<Plane<T, D>, SmartPointer<Plane<T, D>>>(module,
"Plane")
954 .def(py::init(&SmartPointer<
Plane<T, D>>::template New<
955 const std::vector<T> & ,
956 const std::vector<T> & >),
957 py::arg(
"origin"), py::arg(
"normal"));
959 py::class_<Box<T, D>, SmartPointer<Box<T, D>>>(module,
"Box")
961 .def(py::init(&SmartPointer<
Box<T, D>>::template New<
962 const std::vector<T> & ,
963 const std::vector<T> & >),
964 py::arg(
"minPoint"), py::arg(
"maxPoint"));
966 py::class_<Cylinder<T, D>, SmartPointer<Cylinder<T, D>>>(module,
"Cylinder")
970 const std::vector<T> & ,
971 const std::vector<T> & ,
const T ,
972 const T ,
const T >),
973 py::arg(
"origin"), py::arg(
"axisDirection"), py::arg(
"height"),
974 py::arg(
"radius"), py::arg(
"topRadius") = 0.);
977 py::class_<MakeGeometry<T, D>, SmartPointer<MakeGeometry<T, D>>>(
978 module,
"MakeGeometry")
998 "Set the levelset in which to create the geometry.")
1014 .def(
"setIgnoreBoundaryConditions",
1017 .def(
"setIgnoreBoundaryConditions",
1023 py::class_<MarkVoidPoints<T, D>, SmartPointer<MarkVoidPoints<T, D>>>(
1024 module,
"MarkVoidPoints")
1033 "Set the levelset to mark void points in.")
1034 .def(
"setReverseVoidDetection",
1036 "Reverse the logic of detecting the top surface.")
1037 .def(
"setDetectLargestSurface",
1039 "Set that the top surface should be the one with the most connected "
1042 "Set the logic by which to choose the surface which is non-void. "
1043 "All other connected surfaces will then be marked as void points.")
1045 "Save the connectivity information of all LS points in the "
1046 "pointData of the level set.")
1047 .def(
"getNumberOfComponents",
1049 "Get the number of connected components found in the level set.")
1053 py::class_<Prune<T, D>, SmartPointer<Prune<T, D>>>(module,
"Prune")
1055 .def(py::init(&SmartPointer<
Prune<T, D>>::template New<>))
1056 .def(py::init(&SmartPointer<
Prune<T, D>>::template New<
1063 py::class_<Reader<T, D>, SmartPointer<Reader<T, D>>>(module,
"Reader")
1065 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<>))
1066 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<
1068 .def(py::init(&SmartPointer<
Reader<T, D>>::template New<
1072 "Set levelset to write to file.")
1074 "Set the filename for the output file.")
1078 py::class_<Reduce<T, D>, SmartPointer<Reduce<T, D>>>(module,
"Reduce")
1080 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<>))
1081 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1083 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1085 .def(py::init(&SmartPointer<
Reduce<T, D>>::template New<
1091 "Set whether the levelset should be segmented anew (balanced across "
1092 "cores) after reduction.")
1096 py::class_<RemoveStrayPoints<T, D>, SmartPointer<RemoveStrayPoints<T, D>>>(
1097 module,
"RemoveStrayPoints")
1104 "Set levelset for stray point removal.")
1106 "Set the logic by which to choose the surface which should be kept. "
1107 "All other LS values will be marked as stray points and removed.")
1111 py::class_<ToDiskMesh<T, D>, SmartPointer<ToDiskMesh<T, D>>>(module,
1119 "Set levelset to mesh.")
1121 "Clear all inserted level sets.")
1123 "Insert next level set to output in the disk mesh.")
1126 "Set the material map to use for the disk mesh.")
1128 "Set the maximum level set value to include in the disk mesh.")
1130 "Convert the levelset to a surface mesh.");
1133 py::class_<ToMesh<T, D>, SmartPointer<ToMesh<T, D>>>(module,
"ToMesh")
1135 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<>))
1136 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<
1141 .def(py::init(&SmartPointer<
ToMesh<T, D>>::template New<
1148 "Set whether only defined points should be output to the mesh.")
1150 "Set whether only level set points <0.5 should be output.")
1152 "Convert the levelset to a surface mesh.");
1155 py::class_<ToSurfaceMesh<T, D>, SmartPointer<ToSurfaceMesh<T, D>>>(
1156 module,
"ToSurfaceMesh")
1161 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1165 py::arg(
"domain"), py::arg(
"mesh"),
1166 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1169 "Set levelset to mesh.")
1171 "Set the mesh to generate.")
1173 "Set whether to update point data. Defaults to true.")
1175 "Set whether to preserve sharp corners. Defaults to false.")
1177 "Convert the levelset to a surface mesh.");
1180 py::class_<ToMultiSurfaceMesh<T, D>, SmartPointer<ToMultiSurfaceMesh<T, D>>>(
1181 module,
"ToMultiSurfaceMesh")
1186 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1190 py::arg(
"domain"), py::arg(
"mesh"),
1191 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1194 SmartPointer<
Mesh<T>> &,
double,
double>),
1195 py::arg(
"domains"), py::arg(
"mesh"),
1196 py::arg(
"minNodeDistFactor") = 0.05, py::arg(
"eps") = 1e-12)
1198 SmartPointer<
Mesh<T>> &,
double,
double>),
1199 py::arg(
"mesh"), py::arg(
"minNodeDistFactor") = 0.05,
1200 py::arg(
"eps") = 1e-12)
1203 "Insert next level set to output in the mesh.")
1205 "Clear all inserted level sets.")
1207 "Set the mesh to generate.")
1209 "Set the material map to use for the multi surface mesh.")
1211 "Set whether to preserve sharp corners. Defaults to false.")
1213 "Convert the levelset to a surface mesh.");
1216 py::class_<ToVoxelMesh<T, D>, SmartPointer<ToVoxelMesh<T, D>>>(module,
1229 "Insert next level set to output in the mesh.")
1231 "Clear all inserted level sets.")
1234 "Convert the levelset to a surface mesh.");
1237 py::class_<Writer<T, D>, SmartPointer<Writer<T, D>>>(module,
"Writer")
1239 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<>))
1240 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<
1242 .def(py::init(&SmartPointer<
Writer<T, D>>::template New<
1246 "Set levelset to write to file.")
1248 "Set the filename for the output file.")
1252 py::class_<CompareSparseField<T, D>, SmartPointer<CompareSparseField<T, D>>>(
1253 module,
"CompareSparseField")
1260 .def(
"setLevelSetExpanded",
1262 "Sets the expanded level set for comparison.")
1263 .def(
"setLevelSetIterated",
1265 "Sets the iterated level set to compare against the expanded one.")
1267 "Set the x-coordinate range to restrict the comparison area")
1269 "Set the y-coordinate range to restrict the comparison area")
1271 "Clear the x-range restriction")
1273 "Clear the y-range restriction")
1275 "Set the z-coordinate range to restrict the comparison area")
1277 "Clear the z-range restriction")
1279 "Set the output mesh where difference values will be stored")
1280 .def(
"setFillIteratedWithDistances",
1282 "Set whether to fill the iterated level set with distance values")
1283 .def(
"setExpandedLevelSetWidth",
1285 "Set the expansion width for the expanded level set")
1287 "Apply the comparison and calculate the sum of squared "
1289 .def(
"getSumSquaredDifferences",
1291 "Return the sum of squared differences calculated by apply().")
1293 "Return the sum of absolute differences calculated by apply().")
1295 "Return the number of points used in the comparison.")
1296 .def(
"getNumSkippedPoints",
1298 "Return the number of points skipped during comparison.")
1300 "Calculate the root mean square error from previously computed "
1304#ifdef VIENNALS_USE_VTK
1305 py::class_<WriteVisualizationMesh<T, D>,
1306 SmartPointer<WriteVisualizationMesh<T, D>>>(
1307 module,
"WriteVisualizationMesh")
1310 py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<>))
1311 .def(py::init(&SmartPointer<WriteVisualizationMesh<T, D>>::template New<
1314 .def(
"insertNextLevelSet",
1315 &WriteVisualizationMesh<T, D>::insertNextLevelSet,
1316 "Insert next level set to convert. Bigger level sets wrapping "
1317 "smaller ones, should be inserted last.")
1318 .def(
"setFileName", &WriteVisualizationMesh<T, D>::setFileName,
1319 "Set Name of File to write.")
1320 .def(
"setExtractHullMesh",
1321 &WriteVisualizationMesh<T, D>::setExtractHullMesh,
1322 "Whether to extract a hull mesh. Defaults to false.")
1323 .def(
"setExtractVolumeMesh",
1324 &WriteVisualizationMesh<T, D>::setExtractVolumeMesh,
1325 " Whether to extract a tetra volume mesh. Defaults to true.")
1326 .def(
"setMetaData", &WriteVisualizationMesh<T, D>::setMetaData,
1327 "Set the metadata to be written to the file.")
1329 py::overload_cast<const std::string &, T>(
1330 &WriteVisualizationMesh<T, D>::addMetaData),
1331 "Add a single metadata entry to the file.")
1333 py::overload_cast<
const std::string &,
const std::vector<T> &>(
1334 &WriteVisualizationMesh<T, D>::addMetaData),
1335 "Add a single metadata entry to the file.")
1338 const std::unordered_map<std::string, std::vector<T>> &>(
1339 &WriteVisualizationMesh<T, D>::addMetaData),
1340 "Add metadata to the file.")
1341 .def(
"apply", &WriteVisualizationMesh<T, D>::apply,
1342 "Make and write mesh.");
1346 py::class_<ToHullMesh<T, D>, SmartPointer<ToHullMesh<T, D>>>(module,
1360 "Insert next level set to convert. Bigger level sets wrapping "
1361 "smaller ones, should be inserted last.")
1363 "Clear all inserted level sets.")
1365 "Set whether to generate sharp corners. Defaults to false.")
1367 "Set the material map to use for the hull mesh.")
1369 "Set the bottom extension value for 2D hull meshes.")
1373 py::class_<CompareVolume<T, D>, SmartPointer<CompareVolume<T, D>>>(
1374 module,
"CompareVolume")
1382 "Sets the target level set.")
1384 "Sets the sample level set.")
1386 "Set default increment value")
1388 "Sets the x-range and custom increment value")
1390 "Sets the y-range and custom increment value")
1392 "Sets the z-range and custom increment value")
1394 "Set the output mesh where difference areas will be stored")
1396 "Returns the computed volume mismatch.")
1398 "Returns the computed area mismatch.")
1399 .def(
"getCustomVolumeMismatch",
1401 "Returns the computed volume mismatch, with custom increments "
1404 "Returns the computed area mismatch, with custom increments "
1407 "Returns the number of cells where the level sets differ.")
1409 "Returns the number of cells where the level sets differ, with "
1410 "custom increments applied.")
1412 "Computes the volume difference between the two level sets.");
1414 if constexpr (
D == 2) {
1415 module.attr("CompareArea") = module.attr("CompareVolume");
1419 py::class_<CompareChamfer<T, D>, SmartPointer<CompareChamfer<T, D>>>(
1420 module,
"CompareChamfer")
1428 "Set the target level set.")
1430 "Set the sample level set.")
1432 "Set output mesh for target surface points with distance data.")
1434 "Set output mesh for sample surface points with distance data.")
1436 "Apply the Chamfer distance calculation.")
1438 "Get the forward distance (average distance from target to "
1441 "Get the backward distance (average distance from sample to "
1444 "Get the Chamfer distance (average of forward and backward).")
1445 .def(
"getRMSChamferDistance",
1447 "Get the RMS Chamfer distance.")
1449 "Get the maximum nearest-neighbor distance.")
1451 "Get the number of target surface points.")
1453 "Get the number of sample surface points.");
1456 py::class_<CompareCriticalDimensions<T, D>,
1457 SmartPointer<CompareCriticalDimensions<T, D>>>(
1458 module,
"CompareCriticalDimensions")
1466 .def(
"setLevelSetTarget",
1468 "Sets the target level set.")
1469 .def(
"setLevelSetSample",
1471 "Sets the sample level set.")
1473 py::arg(
"measureDimension"), py::arg(
"minBounds"),
1474 py::arg(
"maxBounds"), py::arg(
"findMaximum") =
true,
1475 "Add a generic range specification.")
1477 py::arg(
"minX"), py::arg(
"maxX"), py::arg(
"findMaximum") =
true,
1478 "Add an X range to find maximum or minimum Y position.")
1480 py::arg(
"minY"), py::arg(
"maxY"), py::arg(
"findMaximum") =
true,
1481 "Add a Y range to find maximum or minimum X position.")
1483 "Clear all range specifications.")
1485 "Set the output mesh where critical dimension locations will be "
1488 "Apply the comparison.")
1489 .def(
"getNumCriticalDimensions",
1491 "Get the number of critical dimensions compared.")
1493 "getCriticalDimensionResult",
1495 T posRef{}, posCmp{}, diff{};
1499 return py::make_tuple(
true, posRef, posCmp, diff);
1500 return py::make_tuple(
false,
T(0),
T(0),
T(0));
1503 "Get a specific critical dimension result. Returns (valid, "
1504 "positionTarget, positionSample, difference).")
1505 .def(
"getMeanDifference",
1507 "Get mean absolute difference across all valid critical "
1509 .def(
"getMaxDifference",
1511 "Get maximum difference across all valid critical dimensions.")
1513 "Get RMSE across all valid critical dimensions.")
1514 .def(
"getAllDifferences",
1516 "Get all valid differences as a list.");
1519 py::class_<CompareNarrowBand<T, D>, SmartPointer<CompareNarrowBand<T, D>>>(
1520 module,
"CompareNarrowBand")
1528 "Sets the target level set.")
1530 "Sets the sample level set.")
1532 "Set the x-coordinate range to restrict the comparison area")
1534 "Set the y-coordinate range to restrict the comparison area")
1536 "Clear the x-range restriction")
1538 "Clear the y-range restriction")
1540 "Set the z-coordinate range to restrict the comparison area")
1542 "Clear the z-range restriction")
1544 "Set the output mesh where difference values will be stored")
1545 .def(
"setOutputMeshSquaredDifferences",
1547 "Set whether to output squared differences (true) or absolute "
1548 "differences (false)")
1550 "Apply the comparison and calculate the sum of squared "
1552 .def(
"getSumSquaredDifferences",
1554 "Return the sum of squared differences calculated by apply().")
1556 "Return the sum of absolute differences calculated by apply().")
1558 "Return the number of points used in the comparison.")
1560 "Calculate the root mean square error from previously computed "
constexpr int D
Definition Epitaxy.cpp:12
double T
Definition Epitaxy.cpp:13
double bounds[2 *D]
Definition OxidationNitride.cpp:40
constexpr T gridDelta
Definition OxidationNitride.cpp:35
T getSignedDistance(const vectorType &initial, const vectorType &candidate, unsigned long initialPointId) const override
Definition pyWrap.hpp:83
bool isInside(const vectorType &initial, const vectorType &candidate, double eps=0.) const override
Definition pyWrap.hpp:78
boundsType getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition pyWrap.hpp:89
Stencil Local Lax Friedrichs Discretization Scheme. It uses a stencil of order around active points,...
Definition lsStencilLocalLaxFriedrichsScalar.hpp:33
This class is used to advance level sets over time. Level sets are passed to the constructor in a std...
Definition lsAdvect.hpp:54
void setVelocityField(SmartPointer< VelocityField< T > > passedVelocities)
Set the velocity field used for advection. This should be a concrete implementation of lsVelocityFiel...
Definition lsAdvect.hpp:851
void insertNextLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Pushes the passed level set to the back of the list of level sets used for advection.
Definition lsAdvect.hpp:843
void setVelocityUpdateCallback(std::function< bool(SmartPointer< Domain< T, D > >)> callback)
Set a callback function that is called after the level set has been updated during intermediate time ...
Definition lsAdvect.hpp:953
void setUpdatePointData(bool update)
Set whether the point data in the old LS should be translated to the advected LS. Defaults to true.
Definition lsAdvect.hpp:949
void setSpatialScheme(SpatialSchemeEnum scheme)
Set which spatial discretization scheme should be used out of the ones specified in SpatialSchemeEnum...
Definition lsAdvect.hpp:923
bool getCalculateNormalVectors() const
Get whether normal vectors were calculated.
Definition lsAdvect.hpp:919
void setIgnoreVoids(bool iV)
Set whether level set values, which are not part of the "top" geometrically connected part of values,...
Definition lsAdvect.hpp:886
void clearLevelSets()
Definition lsAdvect.hpp:847
void setCalculateNormalVectors(bool cnv)
Set whether normal vectors should be calculated at each level set point. Defaults to true....
Definition lsAdvect.hpp:878
void apply()
Definition lsAdvect.hpp:1004
void setSingleStep(bool singleStep)
If set to true, only a single advection step will be performed, even if the advection time set with s...
Definition lsAdvect.hpp:866
void prepareLS()
Definition lsAdvect.hpp:960
double getAdvectedTime() const
Get by how much the physical time was advanced during the last apply() call.
Definition lsAdvect.hpp:907
void setTemporalScheme(TemporalSchemeEnum scheme)
Set which time integration scheme should be used.
Definition lsAdvect.hpp:936
void setDissipationAlpha(const double &a)
Set the alpha dissipation coefficient. For lsLaxFriedrichs, this is used as the alpha value....
Definition lsAdvect.hpp:942
void setCheckDissipation(bool check)
Definition lsAdvect.hpp:945
void setIntegrationScheme(IntegrationSchemeEnum scheme)
Definition lsAdvect.hpp:928
double getCurrentTimeStep() const
Return the last applied time step.
Definition lsAdvect.hpp:910
void setAdvectionTime(double time)
Set the time until when the level set should be advected. If this takes more than one advection step,...
Definition lsAdvect.hpp:860
unsigned getNumberOfTimeSteps() const
Get how many advection steps were performed during the last apply() call.
Definition lsAdvect.hpp:913
void setAdaptiveTimeStepping(bool aTS=true, unsigned subdivisions=20)
Set whether adaptive time stepping should be used when approaching material boundaries during etching...
Definition lsAdvect.hpp:891
void setTimeStepRatio(const double &cfl)
Set the CFL condition to use during advection. The CFL condition sets the maximum distance a surface ...
Definition lsAdvect.hpp:872
double getTimeStepRatio() const
Get the value of the CFL number.
Definition lsAdvect.hpp:916
void setSaveAdvectionVelocities(bool sAV)
Set whether the velocities applied to each point should be saved in the level set for debug purposes.
Definition lsAdvect.hpp:903
This class is used to perform boolean operations on two level sets and write the resulting level set ...
Definition lsBooleanOperation.hpp:45
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Set which level set to perform the boolean operation on.
Definition lsBooleanOperation.hpp:290
void setSecondLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Set the level set which will be used to modify the first level set.
Definition lsBooleanOperation.hpp:296
void setBooleanOperation(BooleanOperationEnum passedOperation)
Set which of the operations of BooleanOperationEnum to perform.
Definition lsBooleanOperation.hpp:301
void apply()
Perform operation.
Definition lsBooleanOperation.hpp:319
Concrete implementation of GeometricAdvectDistribution for a rectangular box distribution.
Definition lsGeometricAdvectDistributions.hpp:129
bool isInside(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, double eps) const override
Quick check whether a point relative to the distributions center is inside the distribution....
Definition lsGeometricAdvectDistributions.hpp:136
std::array< viennahrle::CoordType, 6 > getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition lsGeometricAdvectDistributions.hpp:159
T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long) const override
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
Definition lsGeometricAdvectDistributions.hpp:148
Class describing a square box from one coordinate to another.
Definition lsGeometries.hpp:71
Definition lsCalculateCurvatures.hpp:24
void setCurvatureType(CurvatureEnum passedType)
Definition lsCalculateCurvatures.hpp:46
void setMaxValue(const T passedMaxValue)
Definition lsCalculateCurvatures.hpp:59
void apply()
Definition lsCalculateCurvatures.hpp:61
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCalculateCurvatures.hpp:42
This algorithm is used to compute the normal vectors for all points with level set values <= maxValue...
Definition lsCalculateNormalVectors.hpp:40
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCalculateNormalVectors.hpp:63
void apply()
Definition lsCalculateNormalVectors.hpp:95
void setMethod(NormalCalculationMethodEnum passedMethod)
Definition lsCalculateNormalVectors.hpp:79
void setMaxValue(const T passedMaxValue)
Definition lsCalculateNormalVectors.hpp:67
Definition lsCalculateVisibilities.hpp:10
void apply()
Definition lsCalculateVisibilities.hpp:25
This class is used to find errors in the underlying level set structure, like invalid neighbours of d...
Definition lsCheck.hpp:22
void apply()
Definition lsCheck.hpp:78
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCheck.hpp:66
Calculate Chamfer distance between two level sets by comparing their zero-level-set surfaces....
Definition lsCompareChamfer.hpp:39
unsigned getNumSamplePoints() const
Get the number of sample surface points.
Definition lsCompareChamfer.hpp:332
void apply()
Apply the Chamfer distance calculation.
Definition lsCompareChamfer.hpp:104
T getMaxDistance() const
Get the maximum nearest-neighbor distance.
Definition lsCompareChamfer.hpp:326
T getBackwardDistance() const
Get the backward distance (average distance from sample to target).
Definition lsCompareChamfer.hpp:317
void setOutputMeshSample(SmartPointer< Mesh< T > > passedMesh)
Set output mesh for sample surface points with distance data.
Definition lsCompareChamfer.hpp:99
T getRMSChamferDistance() const
Get the RMS Chamfer distance.
Definition lsCompareChamfer.hpp:323
T getChamferDistance() const
Get the Chamfer distance (average of forward and backward).
Definition lsCompareChamfer.hpp:320
T getForwardDistance() const
Get the forward distance (average distance from target to sample).
Definition lsCompareChamfer.hpp:314
void setOutputMeshTarget(SmartPointer< Mesh< T > > passedMesh)
Set output mesh for target surface points with distance data.
Definition lsCompareChamfer.hpp:94
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Set the target level set.
Definition lsCompareChamfer.hpp:84
unsigned getNumTargetPoints() const
Get the number of target surface points.
Definition lsCompareChamfer.hpp:329
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Set the sample level set.
Definition lsCompareChamfer.hpp:89
Compares critical dimensions (surface positions) between two level sets. Critical dimensions are defi...
Definition lsCompareCriticalDimensions.hpp:33
void apply()
Apply the comparison.
Definition lsCompareCriticalDimensions.hpp:197
std::vector< T > getAllDifferences() const
Get all valid results.
Definition lsCompareCriticalDimensions.hpp:309
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh)
Set the output mesh where critical dimension locations will be stored.
Definition lsCompareCriticalDimensions.hpp:192
bool getCriticalDimensionResult(size_t index, T &positionTarget, T &positionSample, T &difference) const
Get a specific critical dimension result.
Definition lsCompareCriticalDimensions.hpp:259
size_t getNumCriticalDimensions() const
Get the number of critical dimensions compared.
Definition lsCompareCriticalDimensions.hpp:256
void addRange(int measureDimension, const std::array< T, D > &minBounds, const std::array< T, D > &maxBounds, bool findMaximum=true)
Add a generic range specification.
Definition lsCompareCriticalDimensions.hpp:154
void addYRange(T minY, T maxY, bool findMaximum=true)
Add a Y range to find maximum or minimum X position.
Definition lsCompareCriticalDimensions.hpp:177
void clearRanges()
Clear all range specifications.
Definition lsCompareCriticalDimensions.hpp:189
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareCriticalDimensions.hpp:145
T getMeanDifference() const
Get mean absolute difference across all valid critical dimensions.
Definition lsCompareCriticalDimensions.hpp:271
T getMaxDifference() const
Get maximum difference across all valid critical dimensions.
Definition lsCompareCriticalDimensions.hpp:284
void addXRange(T minX, T maxX, bool findMaximum=true)
Add an X range to find maximum or minimum Y position.
Definition lsCompareCriticalDimensions.hpp:165
T getRMSE() const
Get RMSE across all valid critical dimensions.
Definition lsCompareCriticalDimensions.hpp:295
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareCriticalDimensions.hpp:149
Calculate distance measure between two level sets by comparing their SDF values on a narrow band....
Definition lsCompareNarrowBand.hpp:19
void setYRange(T minYRange, T maxYRange)
Set the y-coordinate range to restrict the comparison area.
Definition lsCompareNarrowBand.hpp:164
void setOutputMeshSquaredDifferences(bool value)
Set whether to output squared differences (true) or absolute differences (false).
Definition lsCompareNarrowBand.hpp:207
void setXRange(T minXRange, T maxXRange)
Set the x-coordinate range to restrict the comparison area.
Definition lsCompareNarrowBand.hpp:157
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh, bool outputMeshSquaredDiffs=true)
Set the output mesh where difference values will be stored.
Definition lsCompareNarrowBand.hpp:199
void clearZRange()
Clear the z-range restriction.
Definition lsCompareNarrowBand.hpp:192
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareNarrowBand.hpp:148
T getRMSE() const
Calculate the root mean square error from previously computed values.
Definition lsCompareNarrowBand.hpp:387
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareNarrowBand.hpp:152
unsigned getNumPoints() const
Return the number of points used in the comparison.
Definition lsCompareNarrowBand.hpp:384
void clearYRange()
Clear the y-range restriction.
Definition lsCompareNarrowBand.hpp:178
T getSumSquaredDifferences() const
Return the sum of squared differences calculated by apply().
Definition lsCompareNarrowBand.hpp:378
void apply()
Apply the comparison and calculate the sum of squared differences.
Definition lsCompareNarrowBand.hpp:212
void clearXRange()
Clear the x-range restriction.
Definition lsCompareNarrowBand.hpp:171
T getSumDifferences() const
Definition lsCompareNarrowBand.hpp:381
void setZRange(T minZRange, T maxZRange)
Set the z-coordinate range to restrict the comparison area.
Definition lsCompareNarrowBand.hpp:185
Calculate distance measure between two level sets by comparing their SDF values on a sparse field....
Definition lsCompareSparseField.hpp:34
unsigned getNumPoints() const
Return the number of points used in the comparison.
Definition lsCompareSparseField.hpp:398
T getRMSE() const
Calculate the root mean square error from previously computed values.
Definition lsCompareSparseField.hpp:404
void setXRange(T minXRange, T maxXRange)
Set the x-coordinate range to restrict the comparison area.
Definition lsCompareSparseField.hpp:155
void setExpandedLevelSetWidth(int width)
Set the expansion width for the expanded level set This value will be used if the expanded level set ...
Definition lsCompareSparseField.hpp:209
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh)
Set the output mesh where difference values will be stored.
Definition lsCompareSparseField.hpp:197
void setLevelSetIterated(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareSparseField.hpp:150
unsigned getNumSkippedPoints() const
Return the number of skipped points during the comparison.
Definition lsCompareSparseField.hpp:401
void setYRange(T minYRange, T maxYRange)
Set the y-coordinate range to restrict the comparison area.
Definition lsCompareSparseField.hpp:162
void setLevelSetExpanded(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsCompareSparseField.hpp:146
void setFillIteratedWithDistances(bool fill)
Set whether to fill the iterated level set with distances.
Definition lsCompareSparseField.hpp:202
T getSumSquaredDifferences() const
Return the sum of squared differences calculated by apply().
Definition lsCompareSparseField.hpp:392
T getSumDifferences() const
Return the sum of differences calculated by apply().
Definition lsCompareSparseField.hpp:395
void clearZRange()
Clear the z-range restriction.
Definition lsCompareSparseField.hpp:190
void clearYRange()
Clear the y-range restriction.
Definition lsCompareSparseField.hpp:176
void apply()
Apply the comparison and calculate the sum of squared differences.
Definition lsCompareSparseField.hpp:220
void clearXRange()
Clear the x-range restriction.
Definition lsCompareSparseField.hpp:169
void setZRange(T minZRange, T maxZRange)
Set the z-coordinate range to restrict the comparison area.
Definition lsCompareSparseField.hpp:183
Computes an estimate of the volume/area where two level sets differ. The volume is calculated by iter...
Definition lsCompareVolume.hpp:25
void setOutputMesh(SmartPointer< Mesh< T > > passedMesh)
Set the output mesh where difference areas will be stored for visualization. Each cell in the mesh wi...
Definition lsCompareVolume.hpp:171
unsigned long int getCellCount() const
Returns the number of cells where the level sets differ.
Definition lsCompareVolume.hpp:193
void setXRangeAndIncrement(hrleIndexType minXRange, hrleIndexType maxXRange, unsigned short int Xincrement)
Sets the x-range and custom increment value.
Definition lsCompareVolume.hpp:141
void setLevelSetTarget(SmartPointer< Domain< T, D > > passedLevelSet)
Sets the target level set.
Definition lsCompareVolume.hpp:126
void apply()
Computes the volume/area difference between the two level sets.
Definition lsCompareVolume.hpp:202
double getAreaMismatch() const
Alias for getVolumeMismatch for 2D compatibility.
Definition lsCompareVolume.hpp:181
void setYRangeAndIncrement(hrleIndexType minYRange, hrleIndexType maxYRange, unsigned short int Yincrement)
Sets the y-range and custom increment value.
Definition lsCompareVolume.hpp:150
void setZRangeAndIncrement(hrleIndexType minZRange, hrleIndexType maxZRange, unsigned short int Zincrement)
Sets the z-range and custom increment value.
Definition lsCompareVolume.hpp:159
void setDefaultIncrement(unsigned short int increment)
Set default increment value.
Definition lsCompareVolume.hpp:136
double getCustomVolumeMismatch() const
Returns the computed volume/area mismatch, with custom increments applied.
Definition lsCompareVolume.hpp:184
unsigned long int getCustomCellCount() const
Returns the number of cells where the level sets differ, with custom increments applied.
Definition lsCompareVolume.hpp:197
double getVolumeMismatch() const
Returns the computed volume/area mismatch.
Definition lsCompareVolume.hpp:176
void setLevelSetSample(SmartPointer< Domain< T, D > > passedLevelSet)
Sets the sample level set.
Definition lsCompareVolume.hpp:131
double getCustomAreaMismatch() const
Alias for getCustomVolumeMismatch for 2D compatibility.
Definition lsCompareVolume.hpp:190
This algorithm creates a convex hull mesh from a point cloud. This is done using the gift wrapping ap...
Definition lsConvexHull.hpp:23
void apply()
Definition lsConvexHull.hpp:332
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsConvexHull.hpp:326
void setPointCloud(SmartPointer< PointCloud< T, D > > passedPointCloud)
Definition lsConvexHull.hpp:328
Definition lsGeometricAdvectDistributions.hpp:185
T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long pointId) const override
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
Definition lsGeometricAdvectDistributions.hpp:198
std::array< viennahrle::CoordType, 6 > getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition lsGeometricAdvectDistributions.hpp:242
Class describing a square box from one coordinate to another.
Definition lsGeometries.hpp:100
This class detects features of the level set function. This class offers two methods to determine fea...
Definition lsDetectFeatures.hpp:26
void apply()
Execute the algorithm.
Definition lsDetectFeatures.hpp:64
void setDetectionThreshold(T threshold)
Definition lsDetectFeatures.hpp:51
void setDetectionMethod(FeatureDetectionEnum passedMethod)
Set which algorithm to use to detect features. The curvature-based algorithm should always be preferr...
Definition lsDetectFeatures.hpp:59
Class containing all information about the level set, including the dimensions of the domain,...
Definition lsDomain.hpp:27
void clearMetaData()
Definition lsDomain.hpp:163
void deepCopy(const SmartPointer< Domain< T, D > > passedDomain)
copy all values of "passedDomain" to this Domain
Definition lsDomain.hpp:124
unsigned getNumberOfSegments() const
returns the number of segments, the levelset is split into. This is useful for algorithm parallelisat...
Definition lsDomain.hpp:153
void print(std::ostream &out=std::cout)
prints basic information and all memebers of the levelset structure
Definition lsDomain.hpp:178
int getLevelSetWidth() const
Definition lsDomain.hpp:158
unsigned getNumberOfPoints() const
returns the number of defined points
Definition lsDomain.hpp:156
void setLevelSetWidth(int width)
Definition lsDomain.hpp:160
Expands the levelSet to the specified number of layers. The largest value in the levelset is thus wid...
Definition lsExpand.hpp:17
void apply()
Apply the expansion to the specified width.
Definition lsExpand.hpp:44
void setWidth(int passedWidth)
Set how far the level set should be extended. Points with value width*0.5 will be added by this algor...
Definition lsExpand.hpp:37
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsExpand.hpp:31
Import the regular grid, on which the level set values are defined, from an explicit Mesh<>....
Definition lsFromMesh.hpp:16
void setMesh(const SmartPointer< Mesh< T > > passedMesh)
Definition lsFromMesh.hpp:34
void setSortPointList(bool passedSortPointList)
Definition lsFromMesh.hpp:36
void apply()
Definition lsFromMesh.hpp:40
Construct a level set from an explicit mesh.
Definition lsFromSurfaceMesh.hpp:15
void setRemoveBoundaryTriangles(bool passedRemoveBoundaryTriangles)
Set whether all triangles outside the domain should be ignored (=true) or whether boundary conditions...
Definition lsFromSurfaceMesh.hpp:227
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsFromSurfaceMesh.hpp:218
void apply()
Definition lsFromSurfaceMesh.hpp:243
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsFromSurfaceMesh.hpp:222
This class creates a level set from a tetrahedral mesh. If the mesh contains a scalar data array call...
Definition lsFromVolumeMesh.hpp:22
typename Domain< T, D >::GridType GridType
Definition lsFromVolumeMesh.hpp:26
void apply()
Definition lsFromVolumeMesh.hpp:56
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsFromVolumeMesh.hpp:48
void setGrid(const GridType &passedGrid)
Definition lsFromVolumeMesh.hpp:43
void setRemoveBoundaryTriangles(bool passedRemoveBoundaryTriangles)
Definition lsFromVolumeMesh.hpp:50
Base class for distributions used by lsGeometricAdvect. All functions are pure virtual and must be im...
Definition lsGeometricAdvectDistributions.hpp:15
virtual void prepare(SmartPointer< Domain< T, D > > domain)
Definition lsGeometricAdvectDistributions.hpp:43
virtual bool isInside(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, double eps) const
Quick check whether a point relative to the distributions center is inside the distribution....
Definition lsGeometricAdvectDistributions.hpp:23
virtual T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long pointId) const =0
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
virtual void finalize()
Definition lsGeometricAdvectDistributions.hpp:44
virtual std::array< viennahrle::CoordType, 6 > getBounds() const =0
Sets bounds to the bounding box of the distribution.
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:25
Solves the oxidant diffusion step of the Suvorov et al. (10.1007/s10825-006-0003-z) oxidation model o...
Definition lsOxidationDiffusion.hpp:126
void markGeometryChanged()
Call after any in-place modification of the level sets (e.g. after ls::Advect) so that the next apply...
Definition lsOxidationDiffusion.hpp:280
void setConcentrationCache(std::unordered_map< std::size_t, T > cache)
Definition lsOxidationDiffusion.hpp:709
void setMaskInterface(SmartPointer< Domain< T, D > > passedInterface, int passedMaskSign=1)
Definition lsOxidationDiffusion.hpp:297
T getEffectiveReactionRate(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:318
void markSolved()
Mark the current solution as valid without re-solving. Call this before any parallel advection (lsAdv...
Definition lsOxidationDiffusion.hpp:720
const std::unordered_map< std::size_t, T > & getConcentrationCache() const
Definition lsOxidationDiffusion.hpp:705
T getResidual() const
Definition lsOxidationDiffusion.hpp:694
void apply()
Definition lsOxidationDiffusion.hpp:501
std::size_t getNumberOfSolutionNodes() const
Definition lsOxidationDiffusion.hpp:697
void setParameters(OxidationParameters passedParameters)
Definition lsOxidationDiffusion.hpp:311
void clearSolveBounds()
Definition lsOxidationDiffusion.hpp:495
void clearPressureField()
Definition lsOxidationDiffusion.hpp:325
static auto New(Args &&...args)
Definition lsOxidationDiffusion.hpp:274
void setSolveBounds(const IndexType &passedMinIndex, const IndexType &passedMaxIndex)
Restrict the dense Cartesian diffusion solve to a finite index box. This is useful for level sets wit...
Definition lsOxidationDiffusion.hpp:486
T getScalarVelocityFromSample(const ReactionBoundarySample &sample) const
Absolute scalar velocity derived from an already-computed boundary sample, avoiding a second call to ...
Definition lsOxidationDiffusion.hpp:789
void setPressure(const IndexType &index, T pressure)
Definition lsOxidationDiffusion.hpp:460
unsigned getIterations() const
Definition lsOxidationDiffusion.hpp:693
void setAmbientInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:291
OxidationParameters getParameters() const
Definition lsOxidationDiffusion.hpp:316
void setReactionInterface(SmartPointer< Domain< T, D > > passedInterface)
Definition lsOxidationDiffusion.hpp:285
void setOxideSigns(int passedReactionSign, int passedAmbientSign)
Set signs defining the oxide band. A node is inside oxide if reactionSign * reactionPhi >= 0 and ambi...
Definition lsOxidationDiffusion.hpp:478
ReactionBoundarySample getReactionBoundarySample(const Vec3D< T > &coordinate) const
Return the reaction boundary sample for the grid node nearest to coordinate. Used by the deformation ...
Definition lsOxidationDiffusion.hpp:780
void clearMaskInterface()
Definition lsOxidationDiffusion.hpp:305
T getConcentration(const Vec3D< T > &coordinate) const
Definition lsOxidationDiffusion.hpp:663
void setStress(const IndexType &index, const std::array< T, 9 > &stress)
Oxide Cauchy stress (Pa, tension positive, row-major 3x3) at a node, for the normal-stress reaction l...
Definition lsOxidationDiffusion.hpp:333
void writePersistentFields()
Convenience wrapper: persist both concentration and pressure in one call.
Definition lsOxidationDiffusion.hpp:771
Iterates diffusion, oxide deformation, and the stress feedback (normal stress on the reaction rate,...
Definition lsOxidationModel.hpp:23
void setDeformationField(SmartPointer< OxidationDeformation< T, D > > passedDeformationField)
Definition lsOxidationModel.hpp:57
static auto New(Args &&...args)
Definition lsOxidationModel.hpp:48
T getResidual() const
Definition lsOxidationModel.hpp:345
void setDiffusionField(SmartPointer< OxidationDiffusion< T, D > > passedDiffusionField)
Definition lsOxidationModel.hpp:52
unsigned getIterations() const
Definition lsOxidationModel.hpp:344
void clearSolveBounds()
Definition lsOxidationModel.hpp:73
void apply()
Definition lsOxidationModel.hpp:75
void setParameters(OxidationCouplingParameters passedParameters)
Definition lsOxidationModel.hpp:62
Definition lsOxidation.hpp:383
void setCouplingParameters(OxidationCouplingParameters params)
Definition lsOxidation.hpp:459
static auto New(Args &&...args)
Definition lsOxidation.hpp:439
SmartPointer< OxidationDeformation< T, D > > getDeformationField() const
Return the deformation field populated by the most recent apply() call.
Definition lsOxidation.hpp:489
void setDeformationParameters(OxidationDeformationParameters params)
Definition lsOxidation.hpp:456
T applyCFLLimited(T requestedTime, T cflFactor)
Execute one CFL-limited oxidation step; returns the actual time advanced.
Definition lsOxidation.hpp:500
void setSpatialScheme(SpatialSchemeEnum scheme)
Set the spatial integration scheme for all advections.
Definition lsOxidation.hpp:467
void setMaskInterface(SmartPointer< Domain< T, D > > mask)
Definition lsOxidation.hpp:449
void setMaskParameters(OxidationMaskParameters params)
Definition lsOxidation.hpp:462
void setGpuMode(GpuMode mode)
Definition lsOxidation.hpp:443
void setSiInterface(SmartPointer< Domain< T, D > > si)
Definition lsOxidation.hpp:445
SmartPointer< OxidationDiffusion< T, D > > getDiffusionField() const
Return the diffusion field populated by the most recent apply() call.
Definition lsOxidation.hpp:484
void setAmbientInterface(SmartPointer< Domain< T, D > > ambient)
Definition lsOxidation.hpp:446
void setTemporalScheme(TemporalSchemeEnum scheme)
Set the temporal integration scheme for all advections.
Definition lsOxidation.hpp:472
void setOxidationParameters(OxidationParameters params)
Definition lsOxidation.hpp:453
void apply(T advectionTime)
Execute one oxidation time step of duration advectionTime.
Definition lsOxidation.hpp:497
T getLastMaxVelocity() const
Maximum interface velocity (µm/hr) from the most recent CFL-limited step.
Definition lsOxidation.hpp:494
Class describing a plane via a point in it and the plane normal.
Definition lsGeometries.hpp:42
Class describing a point cloud, which can be used to create geometries from its convex hull mesh.
Definition lsGeometries.hpp:145
void insertNextPoint(T *newPoint)
Definition lsGeometries.hpp:154
Removes all level set points, which do not have at least one oppositely signed neighbour (Meaning the...
Definition lsPrune.hpp:17
void apply()
removes all grid points, which do not have at least one opposite signed neighbour returns the number ...
Definition lsPrune.hpp:74
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsPrune.hpp:59
Definition lsReader.hpp:13
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsReader.hpp:26
void apply()
Definition lsReader.hpp:35
void setFileName(std::string passedFileName)
set file name for file to write
Definition lsReader.hpp:31
Reduce the level set size to the specified width. This means all level set points with value <= 0....
Definition lsReduce.hpp:14
void apply()
Reduces the leveleSet to the specified number of layers. The largest value in the levelset is thus wi...
Definition lsReduce.hpp:55
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsReduce.hpp:32
void setWidth(int passedWidth)
Set which level set points should be kept. All points with a level set value >0.5*width will be remov...
Definition lsReduce.hpp:39
void setNoNewSegment(bool passedNoNewSegment)
Set whether to segment the level set after algorithm is finished. This means points will be evenly di...
Definition lsReduce.hpp:44
This algorithm can be used to remove all LS values which are not part of a so-called top surface....
Definition lsRemoveStrayPoints.hpp:17
void setVoidTopSurface(VoidTopSurfaceEnum topSurface)
Set how the algorithm should pick the surface which will not be removed. Defaults to the surface with...
Definition lsRemoveStrayPoints.hpp:33
void apply()
Definition lsRemoveStrayPoints.hpp:37
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsRemoveStrayPoints.hpp:27
Concrete implementation of GeometricAdvectDistribution for a spherical advection distribution.
Definition lsGeometricAdvectDistributions.hpp:50
bool isInside(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, double eps) const override
Quick check whether a point relative to the distributions center is inside the distribution....
Definition lsGeometricAdvectDistributions.hpp:60
std::array< viennahrle::CoordType, 6 > getBounds() const override
Sets bounds to the bounding box of the distribution.
Definition lsGeometricAdvectDistributions.hpp:110
T getSignedDistance(const Vec3D< viennahrle::CoordType > &initial, const Vec3D< viennahrle::CoordType > &candidate, unsigned long) const override
Returns the signed distance of a point relative to the distributions center. This is the signed manha...
Definition lsGeometricAdvectDistributions.hpp:75
Class describing a sphere via origin and radius.
Definition lsGeometries.hpp:15
This class creates a mesh from the level set with all grid points with a level set value <= 0....
Definition lsToDiskMesh.hpp:24
void clearLevelSets()
Definition lsToDiskMesh.hpp:83
void setMesh(SmartPointer< Mesh< N > > passedMesh)
Definition lsToDiskMesh.hpp:70
void setMaterialMap(SmartPointer< MaterialMap > passedMaterialMap)
Definition lsToDiskMesh.hpp:77
void apply()
Definition lsToDiskMesh.hpp:85
void insertNextLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Pushes the passed level set to the back of the list of level sets.
Definition lsToDiskMesh.hpp:66
void setMaxValue(const T passedMaxValue)
Definition lsToDiskMesh.hpp:81
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsToDiskMesh.hpp:61
Extracts a hull (surface outline) mesh from a stack of level sets using ToMultiSurfaceMesh with close...
Definition lsToHullMesh.hpp:22
void setMaterialMap(SmartPointer< MaterialMap > passedMaterialMap)
Definition lsToHullMesh.hpp:431
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToHullMesh.hpp:418
void clearLevelSets()
Definition lsToHullMesh.hpp:425
void insertNextLevelSet(SmartPointer< Domain< T, D > > levelSet)
Level sets wrapping other level sets have to be inserted last.
Definition lsToHullMesh.hpp:421
void apply()
Definition lsToHullMesh.hpp:460
void setSharpCorners(bool passedSharpCorners)
Definition lsToHullMesh.hpp:427
void setBottomExtension(T extension)
Definition lsToHullMesh.hpp:435
Extract the regular grid, on which the level set values are defined, to an explicit Mesh<>....
Definition lsToMesh.hpp:19
void setOnlyDefined(bool passedOnlyDefined)
Definition lsToMesh.hpp:43
void setLevelSet(SmartPointer< Domain< T, D > > passedlsDomain)
Definition lsToMesh.hpp:37
void apply()
Definition lsToMesh.hpp:49
void setOnlyActive(bool passedOnlyActive)
Definition lsToMesh.hpp:47
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToMesh.hpp:41
Definition lsToMultiSurfaceMesh.hpp:11
void apply() override
Definition lsToMultiSurfaceMesh.hpp:622
void setMaterialMap(SmartPointer< MaterialMap > passedMaterialMap)
Definition lsToMultiSurfaceMesh.hpp:618
void clearLevelSets()
Definition lsToMultiSurfaceMesh.hpp:616
void insertNextLevelSet(SmartPointer< lsDomainType > passedLevelSet)
Definition lsToMultiSurfaceMesh.hpp:612
Extract an explicit Mesh<> instance from an lsDomain. The interface is then described by explicit sur...
Definition lsToSurfaceMesh.hpp:25
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToSurfaceMesh.hpp:96
void setUpdatePointData(bool update)
Definition lsToSurfaceMesh.hpp:98
void setSharpCorners(bool check)
Definition lsToSurfaceMesh.hpp:100
virtual void apply()
Definition lsToSurfaceMesh.hpp:102
void setLevelSet(SmartPointer< lsDomainType > passedlsDomain)
Definition lsToSurfaceMesh.hpp:91
Creates a mesh, which consists only of quads/hexas for completely filled grid cells in the level set....
Definition lsToVoxelMesh.hpp:20
void setMesh(SmartPointer< Mesh< T > > passedMesh)
Definition lsToVoxelMesh.hpp:76
void clearLevelSets()
Definition lsToVoxelMesh.hpp:74
void insertNextLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Push level set to the list of level sets used for output. If more than one are specified,...
Definition lsToVoxelMesh.hpp:70
void apply()
Definition lsToVoxelMesh.hpp:82
Abstract class defining the interface for the velocity field used during advection using lsAdvect.
Definition lsVelocityField.hpp:11
Definition lsWriter.hpp:13
void setFileName(std::string passedFileName)
set file name for file to write
Definition lsWriter.hpp:31
void setLevelSet(SmartPointer< Domain< T, D > > passedLevelSet)
Definition lsWriter.hpp:26
void apply()
Definition lsWriter.hpp:35
Definition lsAdvect.hpp:41
@ Auto
Definition lsOxidationDiffusion.hpp:51
@ Gpu
Always use GPU; fail if unavailable or unsuccessful Use the GPU when it is usable,...
Definition lsOxidationDiffusion.hpp:45
@ Cpu
Always use CPU (default).
Definition lsOxidationDiffusion.hpp:44
FeatureDetectionEnum
Definition lsDetectFeatures.hpp:16
BooleanOperationEnum
Enumeration for the different types of boolean operations which are supported. When INVERT,...
Definition lsBooleanOperation.hpp:27
CurvatureEnum
Definition lsCalculateCurvatures.hpp:15
void bindApi(py::module &module)
Definition pyWrap.hpp:206
PYBIND11_DECLARE_HOLDER_TYPE(TemplateType, SmartPointer< TemplateType >)
void bindOxidationSharedTypes(py::module &module)
Definition pyWrap.hpp:94
T ambientLiftRatio
Definition lsOxidation.hpp:31
T siliconRecession
Definition lsOxidation.hpp:28
T relativeError
Definition lsOxidation.hpp:32
unsigned samples
Definition lsOxidation.hpp:33
T ambientLift
Definition lsOxidation.hpp:29
T expectedAmbientLift
Definition lsOxidation.hpp:30
Definition lsOxidationModel.hpp:14
double tolerance
Definition lsOxidationModel.hpp:16
double relaxation
Definition lsOxidationModel.hpp:17
unsigned maxIterations
Definition lsOxidationModel.hpp:15
Sub-grid accurate sample of the reaction boundary crossing closest to a given grid node....
Definition lsOxidationDiffusion.hpp:256
double poissonRatio
Definition lsOxidationMask.hpp:22
double shearActivationVolume
Definition lsOxidationMask.hpp:27
double viscosity
Definition lsOxidationMask.hpp:26
double youngModulus
Definition lsOxidationMask.hpp:21
Parameters for the steady oxidant diffusion model used by OxidationDiffusion.
Definition lsOxidationDiffusion.hpp:56
double maskConcentration
Definition lsOxidationDiffusion.hpp:92
double maskTransferCoefficient
Definition lsOxidationDiffusion.hpp:91
double transferCoefficient
Definition lsOxidationDiffusion.hpp:59
double temperature
Definition lsOxidationDiffusion.hpp:74
double minBoundaryDistance
Definition lsOxidationDiffusion.hpp:101
double relaxation
Definition lsOxidationDiffusion.hpp:104
Vec3D< double > crystalAxis
Definition lsOxidationDiffusion.hpp:89
double reactionActivationVolume
Definition lsOxidationDiffusion.hpp:75
double diffusionActivationVolume
Definition lsOxidationDiffusion.hpp:80
double reactionRateRatio111
Definition lsOxidationDiffusion.hpp:88
double diffusionCoefficient
Definition lsOxidationDiffusion.hpp:57
int material
Definition lsOxidationDiffusion.hpp:106
double velocitySign
Definition lsOxidationDiffusion.hpp:63
double reactionRate
Definition lsOxidationDiffusion.hpp:58
double oxidantMoleculeDensity
Definition lsOxidationDiffusion.hpp:61
double equilibriumConcentration
Definition lsOxidationDiffusion.hpp:60
double referencePressure
Definition lsOxidationDiffusion.hpp:76
double tolerance
Definition lsOxidationDiffusion.hpp:103
std::size_t maxGridPoints
Definition lsOxidationDiffusion.hpp:105
double expansionCoefficient
Definition lsOxidationDiffusion.hpp:62
unsigned maxIterations
Definition lsOxidationDiffusion.hpp:102
static OxidationMaskParameters siliconNitrideMask(double temperatureCelsius)
LPCVD Si3N4 mask: E = 270 GPa, nu = 0.27, and Maxwell creep with an Eyring viscosity from Senez et al...
Definition lsOxidationPresets.hpp:61
static OxidationMaskParameters siliconNitrideMask1000C()
Definition lsOxidationPresets.hpp:87
static OxidationDeformationParameters oxideMechanics1000C(double timeStep)
Thermal SiO2 viscoelastic mechanics at 1000 °C. Viscosity ~1×10¹⁰ Pa·hr (Irene 1978),...
Definition lsOxidationPresets.hpp:45
static OxidationParameters wet1000CDealGrove100()
Wet oxidation at 1000 °C (Deal-Grove linear-parabolic coefficients). B/2 = D_eff = 0....
Definition lsOxidationPresets.hpp:28