@@ -6,6 +6,8 @@ namespace viennaps {
66
77VIENNAPS_TEMPLATE_ND (NumericType, D)
88class GeometricProcessStrategy : public ProcessStrategy <NumericType, D> {
9+ using GeometricKernel = viennals::GeometricAdvect<NumericType, D>;
10+
911public:
1012 DEFINE_CLASS_NAME (GeometricProcessStrategy)
1113
@@ -94,17 +96,19 @@ class GeometricProcessStrategy : public ProcessStrategy<NumericType, D> {
9496 }
9597 }
9698
97- viennals::GeometricAdvect<NumericType, D>(
98- context.domain ->getLevelSets ().back (), dist, mask)
99- .apply ();
100-
101- // Intersect all other level sets with the last one to keep them consistent
102- for (int i = context.domain ->getNumberOfLevelSets () - 1 ; i >= 0 ; --i) {
103- viennals::BooleanOperation<NumericType, D>(
104- context.domain ->getLevelSets ()[i],
105- context.domain ->getLevelSets ().back (),
106- viennals::BooleanOperationEnum::INTERSECT )
107- .apply ();
99+ GeometricKernel (context.domain ->getSurface (), dist, mask).apply ();
100+
101+ if (!geometricModel->isDeposition ()) {
102+ // If the top level set was etched, we need to make sure that the
103+ // other level sets are still consistent by intersecting them with the
104+ // last level set.
105+ for (int i = context.domain ->getNumberOfLevelSets () - 1 ; i >= 0 ; --i) {
106+ viennals::BooleanOperation<NumericType, D>(
107+ context.domain ->getLevelSets ()[i],
108+ context.domain ->getLevelSets ().back (),
109+ viennals::BooleanOperationEnum::INTERSECT )
110+ .apply ();
111+ }
108112 }
109113
110114 return ProcessResult::SUCCESS ;
0 commit comments