Skip to content

Commit 5bb8042

Browse files
committed
fix: correct parameters in surface mesh generation
1 parent ff98ad1 commit 5bb8042

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

examples/holeEtching/holeEtching.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int main(int argc, char *argv[]) {
9494
} else {
9595
outputFile += suffix;
9696
}
97-
geometry->saveSurfaceMesh(outputFile, true, 0.01, true);
97+
geometry->saveSurfaceMesh(outputFile);
9898
};
9999

100100
std::cout << "Running simulation without intermediate velocity calculation..."

include/viennaps/psDomain.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,11 @@ VIENNAPS_TEMPLATE_ND(NumericType, D) class Domain {
469469

470470
SmartPointer<viennals::Mesh<NumericType>>
471471
getSurfaceMesh(bool addInterfaces = false, bool sharpCorners = false,
472-
double wrappingLayerEpsilon = 0.01) const {
472+
double minNodeDistanceFactor = 0.01) const {
473473
auto mesh = viennals::Mesh<NumericType>::New();
474474
if (addInterfaces) {
475475
viennals::ToMultiSurfaceMesh<NumericType, D> meshConverter(
476-
mesh, 1e-12, wrappingLayerEpsilon);
476+
mesh, minNodeDistanceFactor);
477477
for (const auto &ls : levelSets_) {
478478
meshConverter.insertNextLevelSet(ls);
479479
}
@@ -532,9 +532,9 @@ VIENNAPS_TEMPLATE_ND(NumericType, D) class Domain {
532532
// Print the top Level-Set (surface) in a VTK file format (vtp).
533533
void saveSurfaceMesh(const std::string &fileName, bool addInterfaces = true,
534534
bool sharpCorners = false,
535-
double wrappingLayerEpsilon = 0.01) const {
535+
double minNodeDistanceFactor = 0.01) const {
536536
auto mesh =
537-
getSurfaceMesh(addInterfaces, sharpCorners, wrappingLayerEpsilon);
537+
getSurfaceMesh(addInterfaces, sharpCorners, minNodeDistanceFactor);
538538
viennals::VTKWriter<NumericType> writer(mesh, fileName);
539539
writer.setMetaData(metaData_);
540540
writer.apply();

python/pyWrapDimension.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ template <int D> void bindApi(py::module &module) {
538538
"Get the level set grids of layers in the domain.")
539539
.def("getSurfaceMesh", &Domain<T, D>::getSurfaceMesh,
540540
py::arg("addInterfaces") = false, py::arg("sharpCorners") = false,
541-
py::arg("wrappingLayerEpsilon") = 0.01,
541+
py::arg("minNodeDistanceFactor") = 0.01,
542542
"Get the surface mesh of the domain")
543543
.def("getHullMesh", &Domain<T, D>::getHullMesh,
544544
py::arg("bottomExtension") = 0.0, py::arg("sharpCorners") = false)
@@ -549,7 +549,7 @@ template <int D> void bindApi(py::module &module) {
549549
.def("saveSurfaceMesh", &Domain<T, D>::saveSurfaceMesh,
550550
py::arg("filename"), py::arg("addInterfaces") = false,
551551
py::arg("sharpCorners") = false,
552-
py::arg("wrappingLayerEpsilon") = 1e-2,
552+
py::arg("minNodeDistanceFactor") = 0.01,
553553
"Save the surface of the domain.")
554554
.def("saveHullMesh", &Domain<T, D>::saveHullMesh, py::arg("filename"),
555555
py::arg("bottomExtension") = 0.0, py::arg("sharpCorners") = false,

python/viennaps/_core/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import collections.abc
66
import enum
77
import typing
88
import viennals._core
9-
from viennaps import d2
109
import viennaps.d2
11-
import viennaps.d3
10+
from viennaps import d2
1211
from viennaps import d3
12+
import viennaps.d3
1313
from . import constants
1414
from . import gpu
1515
from . import util

python/viennaps/d2/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class Domain:
332332
"""
333333
Get the surface level set.
334334
"""
335-
def getSurfaceMesh(self, addInterfaces: bool = False, sharpCorners: bool = False, wrappingLayerEpsilon: typing.SupportsFloat | typing.SupportsIndex = 0.01) -> viennals._core.Mesh:
335+
def getSurfaceMesh(self, addInterfaces: bool = False, sharpCorners: bool = False, minNodeDistanceFactor: typing.SupportsFloat | typing.SupportsIndex = 0.01) -> viennals._core.Mesh:
336336
"""
337337
Get the surface mesh of the domain
338338
"""
@@ -362,7 +362,7 @@ class Domain:
362362
"""
363363
def saveLevelSets(self, filename: str) -> None:
364364
...
365-
def saveSurfaceMesh(self, filename: str, addInterfaces: bool = False, sharpCorners: typing.SupportsFloat | typing.SupportsIndex = False, wrappingLayerEpsilon: bool = 0.01) -> None:
365+
def saveSurfaceMesh(self, filename: str, addInterfaces: bool = False, sharpCorners: bool = False, minNodeDistanceFactor: typing.SupportsFloat | typing.SupportsIndex = 0.01) -> None:
366366
"""
367367
Save the surface of the domain.
368368
"""

python/viennaps/d3/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class Domain:
332332
"""
333333
Get the surface level set.
334334
"""
335-
def getSurfaceMesh(self, addInterfaces: bool = False, sharpCorners: bool = False, wrappingLayerEpsilon: typing.SupportsFloat | typing.SupportsIndex = 0.01) -> viennals._core.Mesh:
335+
def getSurfaceMesh(self, addInterfaces: bool = False, sharpCorners: bool = False, minNodeDistanceFactor: typing.SupportsFloat | typing.SupportsIndex = 0.01) -> viennals._core.Mesh:
336336
"""
337337
Get the surface mesh of the domain
338338
"""
@@ -362,7 +362,7 @@ class Domain:
362362
"""
363363
def saveLevelSets(self, filename: str) -> None:
364364
...
365-
def saveSurfaceMesh(self, filename: str, addInterfaces: bool = False, sharpCorners: typing.SupportsFloat | typing.SupportsIndex = False, wrappingLayerEpsilon: bool = 0.01) -> None:
365+
def saveSurfaceMesh(self, filename: str, addInterfaces: bool = False, sharpCorners: bool = False, minNodeDistanceFactor: typing.SupportsFloat | typing.SupportsIndex = 0.01) -> None:
366366
"""
367367
Save the surface of the domain.
368368
"""

0 commit comments

Comments
 (0)