-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathpyWrap.cpp
More file actions
2316 lines (2176 loc) · 114 KB
/
Copy pathpyWrap.cpp
File metadata and controls
2316 lines (2176 loc) · 114 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
This file is used to generate the python module of ViennaPS.
It uses pybind11 to create the modules.
*/
#define PYBIND11_DETAILED_ERROR_MESSAGES
#define VIENNAPS_PYTHON_BUILD
// correct module name macro
#define TOKENPASTE_INTERNAL(x, y, z) x##y##z
#define TOKENPASTE(x, y, z) TOKENPASTE_INTERNAL(x, y, z)
#define STRINGIZE2(s) #s
#define STRINGIZE(s) STRINGIZE2(s)
#define VIENNAPS_MODULE_VERSION STRINGIZE(VIENNAPS_VERSION)
#include <optional>
#include <vector>
#include <pybind11/functional.h>
#include <pybind11/iostream.h>
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
// all header files which define API functions
#include <psAtomicLayerProcess.hpp>
#include <psConstants.hpp>
#include <psDomain.hpp>
#include <psDomainSetup.hpp>
#include <psExtrude.hpp>
#include <psGDSGeometry.hpp>
#include <psGDSReader.hpp>
#include <psPlanarize.hpp>
#include <psProcess.hpp>
#include <psRateGrid.hpp>
#include <psReader.hpp>
#include <psUnits.hpp>
#include <psWriter.hpp>
// geometries
#include <geometries/psGeometryFactory.hpp>
#include <geometries/psMakeFin.hpp>
#include <geometries/psMakeHole.hpp>
#include <geometries/psMakePlane.hpp>
#include <geometries/psMakeStack.hpp>
#include <geometries/psMakeTrench.hpp>
// model framework
#include <psAdvectionCallback.hpp>
#include <psProcessModel.hpp>
#include <psProcessParams.hpp>
#include <psSurfaceModel.hpp>
#include <psVelocityField.hpp>
// models
#include <models/psAnisotropicProcess.hpp>
#include <models/psCF4O2Etching.hpp>
#include <models/psCSVFileProcess.hpp>
#include <models/psDirectionalProcess.hpp>
#include <models/psFaradayCageEtching.hpp>
#include <models/psFluorocarbonEtching.hpp>
#include <models/psGeometricDistributionModels.hpp>
#include <models/psHBrO2Etching.hpp>
#include <models/psIonBeamEtching.hpp>
#include <models/psIsotropicProcess.hpp>
#include <models/psMultiParticleProcess.hpp>
#include <models/psOxideRegrowth.hpp>
#include <models/psSF6C4F8Etching.hpp>
#include <models/psSF6O2Etching.hpp>
#include <models/psSingleParticleALD.hpp>
#include <models/psSingleParticleProcess.hpp>
#include <models/psTEOSDeposition.hpp>
#include <models/psTEOSPECVD.hpp>
// visualization
#include <psToDiskMesh.hpp>
// other
#include <csDenseCellSet.hpp>
#include <psUtil.hpp>
#include <rayParticle.hpp>
#include <rayReflection.hpp>
#include <rayUtil.hpp>
#include <vcLogger.hpp>
// GPU
#ifdef VIENNAPS_USE_GPU
#include <vcContext.hpp>
#include <vcCudaBuffer.hpp>
#include <models/psgFaradayCageEtching.hpp>
#include <models/psgHBrO2Etching.hpp>
#include <models/psgMultiParticleProcess.hpp>
#include <models/psgSF6O2Etching.hpp>
#include <models/psgSingleParticleProcess.hpp>
#include <psgProcess.hpp>
#endif
using namespace viennaps;
// always use double for python export
typedef double T;
// get dimension from cmake define
constexpr int D = VIENNAPS_PYTHON_DIMENSION;
typedef SmartPointer<Domain<T, D>> DomainType;
PYBIND11_DECLARE_HOLDER_TYPE(Types, SmartPointer<Types>)
// NOTES:
// PYBIND11_MAKE_OPAQUE(std::vector<T, std::allocator<T>>) can not be used
// constructors with custom enum need lambda to work: seems to be an issue
// with implicit move constructor
// define trampoline classes for interface functions
// ALSO NEED TO ADD TRAMPOLINE CLASSES FOR CLASSES
// WHICH HOLD REFERENCES TO INTERFACE(ABSTRACT) CLASSES
// class PypsSurfaceModel : public SurfaceModel<T> {
// using SurfaceModel<T>::coverages;
// using SurfaceModel<T>::processParams;
// using SurfaceModel<T>::getCoverages;
// using SurfaceModel<T>::getProcessParameters;
// typedef std::vector<T> vect_type;
// public:
// void initializeCoverages(unsigned numGeometryPoints) override {
// PYBIND11_OVERRIDE(void, SurfaceModel<T>, initializeCoverages,
// numGeometryPoints);
// }
// void initializeProcessParameters() override {
// PYBIND11_OVERRIDE(void, SurfaceModel<T>, initializeProcessParameters,
// );
// }
// SmartPointer<std::vector<T>>
// calculateVelocities(SmartPointer<psPointData<T>> rates,
// const std::vector<std::array<T, 3>> &coordinates,
// const std::vector<T> &materialIds) override {
// PYBIND11_OVERRIDE(SmartPointer<std::vector<T>>, SurfaceModel<T>,
// calculateVelocities, rates, coordinates, materialIds);
// }
// void updateCoverages(SmartPointer<psPointData<T>> rates,
// const std::vector<T> &materialIds) override {
// PYBIND11_OVERRIDE(void, SurfaceModel<T>, updateCoverages, rates,
// materialIds);
// }
// };
// AdvectionCallback
class PyAdvectionCallback : public AdvectionCallback<T, D> {
protected:
using ClassName = AdvectionCallback<T, D>;
public:
using ClassName::domain;
bool applyPreAdvect(const T processTime) override {
PYBIND11_OVERRIDE(bool, ClassName, applyPreAdvect, processTime);
}
bool applyPostAdvect(const T advectionTime) override {
PYBIND11_OVERRIDE(bool, ClassName, applyPostAdvect, advectionTime);
}
};
// Particle Class
template <int D>
class psParticle : public viennaray::Particle<psParticle<D>, T> {
using ClassName = viennaray::Particle<psParticle<D>, T>;
public:
void surfaceCollision(T rayWeight, const Vec3D<T> &rayDir,
const Vec3D<T> &geomNormal, const unsigned int primID,
const int materialID,
viennaray::TracingData<T> &localData,
const viennaray::TracingData<T> *globalData,
RNG &Rng) final {
PYBIND11_OVERRIDE(void, ClassName, surfaceCollision, rayWeight, rayDir,
geomNormal, primID, materialID, localData, globalData,
Rng);
}
std::pair<T, Vec3D<T>> surfaceReflection(
T rayWeight, const Vec3D<T> &rayDir, const Vec3D<T> &geomNormal,
const unsigned int primID, const int materialID,
const viennaray::TracingData<T> *globalData, RNG &Rng) final {
using Pair = std::pair<T, Vec3D<T>>;
PYBIND11_OVERRIDE(Pair, ClassName, surfaceReflection, rayWeight, rayDir,
geomNormal, primID, materialID, globalData, Rng);
}
void initNew(RNG &RNG) final {
PYBIND11_OVERRIDE(void, ClassName, initNew, RNG);
}
T getSourceDistributionPower() const final {
PYBIND11_OVERRIDE(T, ClassName, getSourceDistributionPower);
}
std::vector<std::string> getLocalDataLabels() const final {
PYBIND11_OVERRIDE(std::vector<std::string>, ClassName, getLocalDataLabels);
}
};
// Default particle classes
// template <int D>
// class psDiffuseParticle : public rayParticle<psDiffuseParticle<D>, T> {
// using ClassName = rayParticle<psDiffuseParticle<D>, T>;
// public:
// psDiffuseParticle(const T pStickingProbability, const T pCosineExponent,
// const std::string &pDataLabel)
// : stickingProbability(pStickingProbability),
// cosineExponent(pCosineExponent), dataLabel(pDataLabel) {}
// void surfaceCollision(T rayWeight, const Vec3D<T> &rayDir,
// const Vec3D<T> &geomNormal,
// const unsigned int primID, const int materialID,
// viennaray::TracingData<T> &localData,
// const viennaray::TracingData<T> *globalData,
// RNG &Rng) override final {
// localData.getVectorData(0)[primID] += rayWeight;
// }
// std::pair<T, Vec3D<T>>
// surfaceReflection(T rayWeight, const Vec3D<T> &rayDir,
// const Vec3D<T> &geomNormal, const unsigned int
// primID, const int materialID, const
// viennaray::TracingData<T> *globalData, RNG &Rng)
// override final {
// auto direction = rayReflectionDiffuse<T, D>(geomNormal, Rng);
// return {stickingProbability, direction};
// }
// void initNew(RNG &RNG) override final {}
// T getSourceDistributionPower() const override final { return
// cosineExponent; }
// std::vector<std::string> getLocalDataLabels() const override final {
// return {dataLabel};
// }
// private:
// const T stickingProbability = 1.;
// const T cosineExponent = 1.;
// const std::string dataLabel = "flux";
// };
// class psSpecularParticle : public rayParticle<psSpecularParticle, T> {
// using ClassName = rayParticle<psSpecularParticle, T>;
// public:
// psSpecularParticle(const T pStickingProbability, const T pCosineExponent,
// const std::string &pDataLabel)
// : stickingProbability(pStickingProbability),
// cosineExponent(pCosineExponent), dataLabel(pDataLabel) {}
// void surfaceCollision(T rayWeight, const Vec3D<T> &rayDir,
// const Vec3D<T> &geomNormal,
// const unsigned int primID, const int materialID,
// viennaray::TracingData<T> &localData,
// const viennaray::TracingData<T> *globalData,
// RNG &Rng) override final {
// localData.getVectorData(0)[primID] += rayWeight;
// }
// std::pair<T, Vec3D<T>>
// surfaceReflection(T rayWeight, const Vec3D<T> &rayDir,
// const Vec3D<T> &geomNormal, const unsigned int
// primID, const int materialID, const
// viennaray::TracingData<T> *globalData, RNG &Rng)
// override final {
// auto direction = rayReflectionSpecular<T>(rayDir, geomNormal);
// return {stickingProbability, direction};
// }
// void initNew(RNG &RNG) override final {}
// T getSourceDistributionPower() const override final { return
// cosineExponent; }
// std::vector<std::string> getLocalDataLabels() const override final {
// return {dataLabel};
// }
// private:
// const T stickingProbability = 1.;
// const T cosineExponent = 1.;
// const std::string dataLabel = "flux";
// };
// VelocityField
// class PyVelocityField : public VelocityField<T> {
// using VelocityField<T>::psVelocityField;
// public:
// T getScalarVelocity(const std::array<T, 3> &coordinate, int material,
// const std::array<T, 3> &normalVector,
// unsigned long pointId) override {
// PYBIND11_OVERRIDE(T, VelocityField<T>, getScalarVelocity, coordinate,
// material, normalVector, pointId);
// }
// // if we declare a typedef for std::array<T,3>, we will no longer get this
// // error: the compiler doesn't understand why std::array gets 2 template
// // arguments
// // add template argument as the preprocessor becomes confused with the
// comma
// // in std::array<T, 3>
// typedef std::array<T, 3> arrayType;
// std::array<T, 3> getVectorVelocity(const std::array<T, 3> &coordinate,
// int material,
// const std::array<T, 3> &normalVector,
// unsigned long pointId) override {
// PYBIND11_OVERRIDE(
// arrayType, // add template argument here, as the preprocessor becomes
// // confused with the comma in std::array<T, 3>
// VelocityField<T>, getVectorVelocity, coordinate, material,
// normalVector, pointId);
// }
// T getDissipationAlpha(int direction, int material,
// const std::array<T, 3> ¢ralDifferences) override
// {
// PYBIND11_OVERRIDE(T, VelocityField<T>, getDissipationAlpha, direction,
// material, centralDifferences);
// }
// void setVelocities(SmartPointer<std::vector<T>> passedVelocities)
// override {
// PYBIND11_OVERRIDE(void, VelocityField<T>, setVelocities,
// passedVelocities);
// }
// int getTranslationFieldOptions() const override {
// PYBIND11_OVERRIDE(int, VelocityField<T>, getTranslationFieldOptions, );
// }
// };
// a function to declare GeometricDistributionModel of type DistType
// template <typename NumericType, int D, typename DistType>
// void declare_GeometricDistributionModel(pybind11::module &m,
// const std::string &typestr) {
// using Class = psGeometricDistributionModel<NumericType, D, DistType>;
// pybind11::class_<Class, SmartPointer<Class>>(m, typestr.c_str())
// .def(pybind11::init<SmartPointer<DistType>>(), pybind11::arg("dist"))
// .def(pybind11::init<SmartPointer<DistType>,
// SmartPointer<viennals::Domain<NumericType, D>>>(),
// pybind11::arg("dist"), pybind11::arg("mask"))
// .def("apply", &Class::apply);
// }
PYBIND11_MODULE(VIENNAPS_MODULE_NAME, module) {
module.doc() =
"ViennaPS is a header-only C++ process simulation library which "
"includes surface and volume representations, a ray tracer, and physical "
"models for the simulation of microelectronic fabrication processes. The "
"main design goals are simplicity and efficiency, tailored towards "
"scientific simulations.";
// set version string of python module
module.attr("__version__") =
VIENNAPS_MODULE_VERSION; // for some reason this string does not show
module.attr("version") = VIENNAPS_MODULE_VERSION;
// set dimension
module.attr("D") = D;
// wrap omp_set_num_threads to control number of threads
module.def("setNumThreads", &omp_set_num_threads);
// Logger
pybind11::enum_<LogLevel>(module, "LogLevel", pybind11::module_local())
.value("ERROR", LogLevel::ERROR)
.value("WARNING", LogLevel::WARNING)
.value("INFO", LogLevel::INFO)
.value("TIMING", LogLevel::TIMING)
.value("INTERMEDIATE", LogLevel::INTERMEDIATE)
.value("DEBUG", LogLevel::DEBUG);
pybind11::class_<Logger, SmartPointer<Logger>>(module, "Logger",
pybind11::module_local())
.def_static("setLogLevel", &Logger::setLogLevel)
.def_static("getLogLevel", &Logger::getLogLevel)
.def_static("getInstance", &Logger::getInstance,
pybind11::return_value_policy::reference)
.def("addDebug", &Logger::addDebug)
.def("addTiming", (Logger & (Logger::*)(const std::string &, double)) &
Logger::addTiming)
.def("addTiming",
(Logger & (Logger::*)(const std::string &, double, double)) &
Logger::addTiming)
.def("addInfo", &Logger::addInfo)
.def("addWarning", &Logger::addWarning)
.def("addError", &Logger::addError, pybind11::arg("s"),
pybind11::arg("shouldAbort") = true)
.def("print", [](Logger &instance) { instance.print(std::cout); });
/****************************************************************************
* MODEL FRAMEWORK *
****************************************************************************/
// Units
// Length
// enum not necessary, as we can use a string to set the unit
// pybind11::enum_<decltype(units::Length::METER)>(module, "LengthUnit")
// .value("METER", units::Length::METER)
// .value("CENTIMETER", units::Length::CENTIMETER)
// .value("MILLIMETER", units::Length::MILLIMETER)
// .value("MICROMETER", units::Length::MICROMETER)
// .value("NANOMETER", units::Length::NANOMETER)
// .value("ANGSTROM", units::Length::ANGSTROM)
// .value("UNDEFINED", units::Length::UNDEFINED)
// .export_values();
pybind11::class_<units::Length>(module, "Length")
.def_static("setUnit", pybind11::overload_cast<const std::string &>(
&units::Length::setUnit))
.def_static("getInstance", &units::Length::getInstance,
pybind11::return_value_policy::reference)
.def("convertMeter", &units::Length::convertMeter)
.def("convertCentimeter", &units::Length::convertCentimeter)
.def("convertMillimeter", &units::Length::convertMillimeter)
.def("convertMicrometer", &units::Length::convertMicrometer)
.def("convertNanometer", &units::Length::convertNanometer)
.def("convertAngstrom", &units::Length::convertAngstrom)
.def("toString", &units::Length::toString)
.def("toShortString", &units::Length::toShortString);
// Time
// pybind11::enum_<decltype(units::Time::MINUTE)>(module, "TimeUnit")
// .value("MINUTE", units::Time::MINUTE)
// .value("SECOND", units::Time::SECOND)
// .value("MILLISECOND", units::Time::MILLISECOND)
// .value("UNDEFINED", units::Time::UNDEFINED)
// .export_values();
pybind11::class_<units::Time>(module, "Time")
.def_static("setUnit", pybind11::overload_cast<const std::string &>(
&units::Time::setUnit))
.def_static("getInstance", &units::Time::getInstance,
pybind11::return_value_policy::reference)
.def("convertMinute", &units::Time::convertMinute)
.def("convertSecond", &units::Time::convertSecond)
.def("convertMillisecond", &units::Time::convertMillisecond)
.def("toString", &units::Time::toString)
.def("toShortString", &units::Time::toShortString);
// ProcessModel
pybind11::class_<ProcessModel<T, D>, SmartPointer<ProcessModel<T, D>>>
processModel(module, "ProcessModel", pybind11::module_local());
// constructors
processModel
.def(pybind11::init<>())
// methods
.def("setProcessName", &ProcessModel<T, D>::setProcessName)
.def("getProcessName", &ProcessModel<T, D>::getProcessName)
.def("getSurfaceModel", &ProcessModel<T, D>::getSurfaceModel)
.def("getAdvectionCallback", &ProcessModel<T, D>::getAdvectionCallback)
.def("getGeometricModel", &ProcessModel<T, D>::getGeometricModel)
.def("getVelocityField", &ProcessModel<T, D>::getVelocityField)
.def("getParticleLogSize", &ProcessModel<T, D>::getParticleLogSize)
.def("getParticleTypes",
[](ProcessModel<T, D> &pm) {
// Get smart pointer to vector of unique_ptr from the process
// model
auto &unique_ptrs = pm.getParticleTypes();
// Create vector to hold shared_ptr
std::vector<std::shared_ptr<viennaray::AbstractParticle<T>>>
shared_ptrs;
// Loop over unique_ptrs and create shared_ptrs from them
for (auto &uptr : unique_ptrs) {
shared_ptrs.push_back(
std::shared_ptr<viennaray::AbstractParticle<T>>(
uptr.release()));
}
// Return the new vector of shared_ptr
return shared_ptrs;
})
.def("setSurfaceModel",
[](ProcessModel<T, D> &pm, SmartPointer<SurfaceModel<T>> &sm) {
pm.setSurfaceModel(sm);
})
.def("setAdvectionCallback",
[](ProcessModel<T, D> &pm,
SmartPointer<AdvectionCallback<T, D>> &ac) {
pm.setAdvectionCallback(ac);
})
.def("insertNextParticleType",
[](ProcessModel<T, D> &pm,
SmartPointer<psParticle<D>> &passedParticle) {
if (passedParticle) {
auto particle =
std::make_unique<psParticle<D>>(*passedParticle.get());
pm.insertNextParticleType(particle);
}
})
// IMPORTANT: here it may be needed to write this function for any
// type of passed Particle
.def("setGeometricModel",
[](ProcessModel<T, D> &pm, SmartPointer<GeometricModel<T, D>> &gm) {
pm.setGeometricModel(gm);
})
.def("setVelocityField",
[](ProcessModel<T, D> &pm, SmartPointer<VelocityField<T, D>> &vf) {
pm.setVelocityField(vf);
})
.def("setPrimaryDirection", &ProcessModel<T, D>::setPrimaryDirection)
.def("getPrimaryDirection", &ProcessModel<T, D>::getPrimaryDirection);
// AdvectionCallback
pybind11::class_<AdvectionCallback<T, D>,
SmartPointer<AdvectionCallback<T, D>>, PyAdvectionCallback>(
module, "AdvectionCallback")
// constructors
.def(pybind11::init<>())
// methods
.def("applyPreAdvect", &AdvectionCallback<T, D>::applyPreAdvect)
.def("applyPostAdvect", &AdvectionCallback<T, D>::applyPostAdvect)
.def_readwrite("domain", &PyAdvectionCallback::domain);
// ProcessParams
pybind11::class_<ProcessParams<T>, SmartPointer<ProcessParams<T>>>(
module, "ProcessParams")
.def(pybind11::init<>())
.def("insertNextScalar", &ProcessParams<T>::insertNextScalar)
.def("getScalarData",
(T & (ProcessParams<T>::*)(int)) & ProcessParams<T>::getScalarData)
.def("getScalarData", (const T &(ProcessParams<T>::*)(int) const) &
ProcessParams<T>::getScalarData)
.def("getScalarData", (T & (ProcessParams<T>::*)(const std::string &)) &
ProcessParams<T>::getScalarData)
.def("getScalarDataIndex", &ProcessParams<T>::getScalarDataIndex)
.def("getScalarData", (std::vector<T> & (ProcessParams<T>::*)()) &
ProcessParams<T>::getScalarData)
.def("getScalarData",
(const std::vector<T> &(ProcessParams<T>::*)() const) &
ProcessParams<T>::getScalarData)
.def("getScalarDataLabel", &ProcessParams<T>::getScalarDataLabel);
// SurfaceModel
// pybind11::class_<SurfaceModel<T>, SmartPointer<SurfaceModel<T>>,
// PypsSurfaceModel>(module, "SurfaceModel")
// .def(pybind11::init<>())
// .def("initializeCoverages", &SurfaceModel<T>::initializeCoverages)
// .def("initializeProcessParameters",
// &SurfaceModel<T>::initializeProcessParameters)
// .def("getCoverages", &SurfaceModel<T>::getCoverages)
// .def("getProcessParameters",
// &SurfaceModel<T>::getProcessParameters) .def("calculateVelocities",
// &SurfaceModel<T>::calculateVelocities) .def("updateCoverages",
// &SurfaceModel<T>::updateCoverages);
// VelocityField
// pybind11::class_<VelocityField<T>, SmartPointer<VelocityField<T>>,
// PyVelocityField>
// velocityField(module, "VelocityField");
// // constructors
// velocityField
// .def(pybind11::init<>())
// // methods
// .def("getScalarVelocity", &VelocityField<T>::getScalarVelocity)
// .def("getVectorVelocity", &VelocityField<T>::getVectorVelocity)
// .def("getDissipationAlpha", &VelocityField<T>::getDissipationAlpha)
// .def("getTranslationFieldOptions",
// &VelocityField<T>::getTranslationFieldOptions)
// .def("setVelocities", &VelocityField<T>::setVelocities);
// pybind11::class_<psDefaultVelocityField<T>,
// SmartPointer<psDefaultVelocityField<T>>>(
// module, "DefaultVelocityField", velocityField)
// // constructors
// .def(pybind11::init<>())
// // methods
// .def("getScalarVelocity",
// &psDefaultVelocityField<T>::getScalarVelocity)
// .def("getVectorVelocity",
// &psDefaultVelocityField<T>::getVectorVelocity)
// .def("getDissipationAlpha",
// &psDefaultVelocityField<T>::getDissipationAlpha)
// .def("getTranslationFieldOptions",
// &psDefaultVelocityField<T>::getTranslationFieldOptions)
// .def("setVelocities", &psDefaultVelocityField<T>::setVelocities);
// Shim to instantiate the particle class
pybind11::class_<psParticle<D>, SmartPointer<psParticle<D>>> particle(
module, "Particle");
particle.def("surfaceCollision", &psParticle<D>::surfaceCollision)
.def("surfaceReflection", &psParticle<D>::surfaceReflection)
.def("initNew", &psParticle<D>::initNew)
.def("getLocalDataLabels", &psParticle<D>::getLocalDataLabels)
.def("getSourceDistributionPower",
&psParticle<D>::getSourceDistributionPower);
// predefined particles
// pybind11::class_<psDiffuseParticle<D>,
// SmartPointer<psDiffuseParticle<D>>>(
// module, "DiffuseParticle", particle)
// .def(pybind11::init(
// &SmartPointer<psDiffuseParticle<D>>::New<const T, const T,
// const std::string
// &>),
// pybind11::arg("stickingProbability") = 1.0,
// pybind11::arg("cosineExponent") = 1.,
// pybind11::arg("dataLabel") = "flux")
// .def("surfaceCollision", &psDiffuseParticle<D>::surfaceCollision)
// .def("surfaceReflection", &psDiffuseParticle<D>::surfaceReflection)
// .def("initNew", &psDiffuseParticle<D>::initNew)
// .def("getLocalDataLabels", &psDiffuseParticle<D>::getLocalDataLabels)
// .def("getSourceDistributionPower",
// &psDiffuseParticle<D>::getSourceDistributionPower);
// pybind11::class_<psSpecularParticle, SmartPointer<psSpecularParticle>>(
// module, "SpecularParticle", particle)
// .def(pybind11::init(
// &SmartPointer<psSpecularParticle>::New<const T, const T,
// const std::string
// &>),
// pybind11::arg("stickingProbability") = 1.0,
// pybind11::arg("cosineExponent") = 1.,
// pybind11::arg("dataLabel") = "flux")
// .def("surfaceCollision", &psSpecularParticle::surfaceCollision)
// .def("surfaceReflection", &psSpecularParticle::surfaceReflection)
// .def("initNew", &psSpecularParticle::initNew)
// .def("getLocalDataLabels", &psSpecularParticle::getLocalDataLabels)
// .def("getSourceDistributionPower",
// &psSpecularParticle::getSourceDistributionPower);
// ***************************************************************************
// Dense Cell Set from ViennaCS
// ***************************************************************************
pybind11::class_<viennacs::DenseCellSet<T, D>,
SmartPointer<viennacs::DenseCellSet<T, D>>>(module,
"DenseCellSet")
.def(pybind11::init())
.def("fromLevelSets", &viennacs::DenseCellSet<T, D>::fromLevelSets,
pybind11::arg("levelSets"), pybind11::arg("materialMap") = nullptr,
pybind11::arg("depth") = 0.)
.def("getBoundingBox", &viennacs::DenseCellSet<T, D>::getBoundingBox)
.def(
"addScalarData",
[](viennacs::DenseCellSet<T, D> &cellSet, std::string name,
T initValue) {
cellSet.addScalarData(name, initValue);
// discard return value
},
"Add a scalar value to be stored and modified in each cell.")
.def("getDepth", &viennacs::DenseCellSet<T, D>::getDepth,
"Get the depth of the cell set.")
.def("getGridDelta", &viennacs::DenseCellSet<T, D>::getGridDelta,
"Get the cell size.")
.def("getNodes", &viennacs::DenseCellSet<T, D>::getNodes,
"Get the nodes of the cell set which correspond to the corner "
"points of the cells.")
.def("getNode", &viennacs::DenseCellSet<T, D>::getNode,
"Get the node at the given index.")
.def("getElements", &viennacs::DenseCellSet<T, D>::getElements,
"Get elements (cells). The indicies in the elements correspond to "
"the corner nodes.")
.def("getElement", &viennacs::DenseCellSet<T, D>::getElement,
"Get the element at the given index.")
.def("getSurface", &viennacs::DenseCellSet<T, D>::getSurface,
"Get the surface level-set.")
.def("getCellGrid", &viennacs::DenseCellSet<T, D>::getCellGrid,
"Get the underlying mesh of the cell set.")
.def("getNumberOfCells", &viennacs::DenseCellSet<T, D>::getNumberOfCells,
"Get the number of cells.")
.def("getFillingFraction",
&viennacs::DenseCellSet<T, D>::getFillingFraction,
"Get the filling fraction of the cell containing the point.")
.def("getFillingFractions",
&viennacs::DenseCellSet<T, D>::getFillingFractions,
"Get the filling fractions of all cells.")
.def("getAverageFillingFraction",
&viennacs::DenseCellSet<T, D>::getAverageFillingFraction,
"Get the average filling at a point in some radius.")
.def("getCellCenter", &viennacs::DenseCellSet<T, D>::getCellCenter,
"Get the center of a cell with given index")
.def("getScalarData", &viennacs::DenseCellSet<T, D>::getScalarData,
"Get the data stored at each cell. WARNING: This function only "
"returns a copy of the data")
.def("getScalarDataLabels",
&viennacs::DenseCellSet<T, D>::getScalarDataLabels,
"Get the labels of the scalar data stored in the cell set.")
.def("getIndex", &viennacs::DenseCellSet<T, D>::getIndex,
"Get the index of the cell containing the given point.")
.def("setCellSetPosition",
&viennacs::DenseCellSet<T, D>::setCellSetPosition,
"Set whether the cell set should be created below (false) or above "
"(true) the surface.")
.def(
"setCoverMaterial", &viennacs::DenseCellSet<T, D>::setCoverMaterial,
"Set the material of the cells which are above or below the surface.")
.def("setPeriodicBoundary",
&viennacs::DenseCellSet<T, D>::setPeriodicBoundary,
"Enable periodic boundary conditions in specified dimensions.")
.def("setFillingFraction",
pybind11::overload_cast<const int, const T>(
&viennacs::DenseCellSet<T, D>::setFillingFraction),
"Sets the filling fraction at given cell index.")
.def("setFillingFraction",
pybind11::overload_cast<const std::array<T, 3> &, const T>(
&viennacs::DenseCellSet<T, D>::setFillingFraction),
"Sets the filling fraction for cell which contains given point.")
.def("addFillingFraction",
pybind11::overload_cast<const int, const T>(
&viennacs::DenseCellSet<T, D>::addFillingFraction),
"Add to the filling fraction at given cell index.")
.def("addFillingFraction",
pybind11::overload_cast<const std::array<T, 3> &, const T>(
&viennacs::DenseCellSet<T, D>::addFillingFraction),
"Add to the filling fraction for cell which contains given point.")
.def("addFillingFractionInMaterial",
&viennacs::DenseCellSet<T, D>::addFillingFractionInMaterial,
"Add to the filling fraction for cell which contains given point "
"only if the cell has the specified material ID.")
.def("writeVTU", &viennacs::DenseCellSet<T, D>::writeVTU,
"Write the cell set as .vtu file")
.def("writeCellSetData", &viennacs::DenseCellSet<T, D>::writeCellSetData,
"Save cell set data in simple text format.")
.def("readCellSetData", &viennacs::DenseCellSet<T, D>::readCellSetData,
"Read cell set data from text.")
.def("clear", &viennacs::DenseCellSet<T, D>::clear,
"Clear the filling fractions.")
.def("updateMaterials", &viennacs::DenseCellSet<T, D>::updateMaterials,
"Update the material IDs of the cell set. This function should be "
"called if the level sets, the cell set is made out of, have "
"changed. This does not work if the surface of the volume has "
"changed. In this case, call the function 'updateSurface' first.")
.def("updateSurface", &viennacs::DenseCellSet<T, D>::updateSurface,
"Updates the surface of the cell set. The new surface should be "
"below the old surface as this function can only remove cells from "
"the cell set.")
.def("buildNeighborhood",
&viennacs::DenseCellSet<T, D>::buildNeighborhood,
"Generate fast neighbor access for each cell.",
pybind11::arg("forceRebuild") = false)
.def("getNeighbors", &viennacs::DenseCellSet<T, D>::getNeighbors,
"Get the neighbor indices for a cell.");
// ***************************************************************************
// MODELS
// ***************************************************************************
// Enum Material
pybind11::enum_<Material>(module, "Material")
.value("Undefined", Material::Undefined) // -1
.value("Mask", Material::Mask) // 0
.value("Si", Material::Si)
.value("SiO2", Material::SiO2)
.value("Si3N4", Material::Si3N4) // 3
.value("SiN", Material::SiN)
.value("SiON", Material::SiON)
.value("SiC", Material::SiC)
.value("SiGe", Material::SiGe)
.value("PolySi", Material::PolySi) // 8
.value("GaN", Material::GaN)
.value("W", Material::W)
.value("Al2O3", Material::Al2O3)
.value("HfO2", Material::HfO2)
.value("TiN", Material::TiN) // 13
.value("Cu", Material::Cu)
.value("Polymer", Material::Polymer)
.value("Dielectric", Material::Dielectric)
.value("Metal", Material::Metal)
.value("Air", Material::Air) // 18
.value("GAS", Material::GAS);
// Single Particle Process
pybind11::class_<SingleParticleProcess<T, D>,
SmartPointer<SingleParticleProcess<T, D>>>(
module, "SingleParticleProcess", processModel, pybind11::module_local())
.def(pybind11::init([](const T rate, const T sticking, const T power,
const Material mask) {
return SmartPointer<SingleParticleProcess<T, D>>::New(
rate, sticking, power, mask);
}),
pybind11::arg("rate") = 1.,
pybind11::arg("stickingProbability") = 1.,
pybind11::arg("sourceExponent") = 1.,
pybind11::arg("maskMaterial") = Material::Undefined)
.def(pybind11::init([](const T rate, const T sticking, const T power,
const std::vector<Material> &mask) {
return SmartPointer<SingleParticleProcess<T, D>>::New(
rate, sticking, power, mask);
}),
pybind11::arg("rate"), pybind11::arg("stickingProbability"),
pybind11::arg("sourceExponent"), pybind11::arg("maskMaterials"))
.def(pybind11::init<std::unordered_map<Material, T>, T, T>(),
pybind11::arg("materialRates"), pybind11::arg("stickingProbability"),
pybind11::arg("sourceExponent"));
// Multi Particle Process
pybind11::class_<MultiParticleProcess<T, D>,
SmartPointer<MultiParticleProcess<T, D>>>(
module, "MultiParticleProcess", processModel)
.def(pybind11::init())
.def("addNeutralParticle",
pybind11::overload_cast<T, const std::string &>(
&MultiParticleProcess<T, D>::addNeutralParticle),
pybind11::arg("stickingProbability"),
pybind11::arg("label") = "neutralFlux")
.def("addNeutralParticle",
pybind11::overload_cast<std::unordered_map<Material, T>, T,
const std::string &>(
&MultiParticleProcess<T, D>::addNeutralParticle),
pybind11::arg("materialSticking"),
pybind11::arg("defaultStickingProbability") = 1.,
pybind11::arg("label") = "neutralFlux")
.def("addIonParticle", &MultiParticleProcess<T, D>::addIonParticle,
pybind11::arg("sourcePower"), pybind11::arg("thetaRMin") = 0.,
pybind11::arg("thetaRMax") = 90., pybind11::arg("minAngle") = 0.,
pybind11::arg("B_sp") = -1., pybind11::arg("meanEnergy") = 0.,
pybind11::arg("sigmaEnergy") = 0.,
pybind11::arg("thresholdEnergy") = 0.,
pybind11::arg("inflectAngle") = 0., pybind11::arg("n") = 1,
pybind11::arg("label") = "ionFlux")
.def("setRateFunction", &MultiParticleProcess<T, D>::setRateFunction);
// TEOS Deposition
pybind11::class_<TEOSDeposition<T, D>, SmartPointer<TEOSDeposition<T, D>>>(
module, "TEOSDeposition", processModel)
.def(pybind11::init(
&SmartPointer<TEOSDeposition<T, D>>::New<
const T /*st1*/, const T /*rate1*/, const T /*order1*/,
const T /*st2*/, const T /*rate2*/, const T /*order2*/>),
pybind11::arg("stickingProbabilityP1"), pybind11::arg("rateP1"),
pybind11::arg("orderP1"),
pybind11::arg("stickingProbabilityP2") = 0.,
pybind11::arg("rateP2") = 0., pybind11::arg("orderP2") = 0.);
// TEOS PE-CVD
pybind11::class_<TEOSPECVD<T, D>, SmartPointer<TEOSPECVD<T, D>>>(
module, "TEOSPECVD", processModel)
.def(
pybind11::init(&SmartPointer<TEOSPECVD<T, D>>::New<
const T /*stR*/, const T /*rateR*/, const T /*orderR*/,
const T /*stI*/, const T /*rateI*/, const T /*orderI*/,
const T /*exponentI*/, const T /*minAngleIon*/>),
pybind11::arg("stickingProbabilityRadical"),
pybind11::arg("depositionRateRadical"),
pybind11::arg("depositionRateIon"), pybind11::arg("exponentIon"),
pybind11::arg("stickingProbabilityIon") = 1.,
pybind11::arg("reactionOrderRadical") = 1.,
pybind11::arg("reactionOrderIon") = 1.,
pybind11::arg("minAngleIon") = 0.);
// Plasma Etching Parameters
pybind11::class_<PlasmaEtchingParameters<T>::MaskType>(
module, "PlasmaEtchingParametersMask")
.def(pybind11::init<>())
.def_readwrite("rho", &PlasmaEtchingParameters<T>::MaskType::rho)
.def_readwrite("A_sp", &PlasmaEtchingParameters<T>::MaskType::A_sp)
.def_readwrite("B_sp", &PlasmaEtchingParameters<T>::MaskType::B_sp)
.def_readwrite("Eth_sp", &PlasmaEtchingParameters<T>::MaskType::Eth_sp);
pybind11::class_<PlasmaEtchingParameters<T>::PolymerType>(
module, "PlasmaEtchingParametersPolymer")
.def(pybind11::init<>())
.def_readwrite("rho", &PlasmaEtchingParameters<T>::PolymerType::rho)
.def_readwrite("A_sp", &PlasmaEtchingParameters<T>::PolymerType::A_sp)
.def_readwrite("B_sp", &PlasmaEtchingParameters<T>::PolymerType::B_sp)
.def_readwrite("Eth_sp",
&PlasmaEtchingParameters<T>::PolymerType::Eth_sp);
pybind11::class_<PlasmaEtchingParameters<T>::MaterialType>(
module, "PlasmaEtchingParametersSubstrate")
.def(pybind11::init<>())
.def_readwrite("rho", &PlasmaEtchingParameters<T>::MaterialType::rho)
.def_readwrite("k_sigma",
&PlasmaEtchingParameters<T>::MaterialType::k_sigma)
.def_readwrite("beta_sigma",
&PlasmaEtchingParameters<T>::MaterialType::beta_sigma)
.def_readwrite("Eth_sp",
&PlasmaEtchingParameters<T>::MaterialType::Eth_sp)
.def_readwrite("A_sp", &PlasmaEtchingParameters<T>::MaterialType::A_sp)
.def_readwrite("B_sp", &PlasmaEtchingParameters<T>::MaterialType::B_sp)
// .def_readwrite("theta_g_sp",
// &PlasmaEtchingParameters<T>::MaterialType::theta_g_sp)
.def_readwrite("Eth_ie",
&PlasmaEtchingParameters<T>::MaterialType::Eth_ie)
.def_readwrite("A_ie", &PlasmaEtchingParameters<T>::MaterialType::A_ie)
.def_readwrite("B_ie", &PlasmaEtchingParameters<T>::MaterialType::B_ie);
// .def_readwrite("theta_g_ie",
// &PlasmaEtchingParameters<T>::MaterialType::theta_g_ie);
pybind11::class_<PlasmaEtchingParameters<T>::PassivationType>(
module, "PlasmaEtchingParametersPassivation")
.def(pybind11::init<>())
.def_readwrite("Eth_ie",
&PlasmaEtchingParameters<T>::PassivationType::Eth_ie)
.def_readwrite("A_ie",
&PlasmaEtchingParameters<T>::PassivationType::A_ie);
pybind11::class_<PlasmaEtchingParameters<T>::IonType>(
module, "PlasmaEtchingParametersIons")
.def(pybind11::init<>())
.def_readwrite("meanEnergy",
&PlasmaEtchingParameters<T>::IonType::meanEnergy)
.def_readwrite("sigmaEnergy",
&PlasmaEtchingParameters<T>::IonType::sigmaEnergy)
.def_readwrite("exponent", &PlasmaEtchingParameters<T>::IonType::exponent)
.def_readwrite("inflectAngle",
&PlasmaEtchingParameters<T>::IonType::inflectAngle)
.def_readwrite("n_l", &PlasmaEtchingParameters<T>::IonType::n_l)
.def_readwrite("minAngle", &PlasmaEtchingParameters<T>::IonType::minAngle)
.def_readwrite("thetaRMin",
&PlasmaEtchingParameters<T>::IonType::thetaRMin)
.def_readwrite("thetaRMax",
&PlasmaEtchingParameters<T>::IonType::thetaRMax);
pybind11::class_<PlasmaEtchingParameters<T>>(module,
"PlasmaEtchingParameters")
.def(pybind11::init<>())
.def_readwrite("ionFlux", &PlasmaEtchingParameters<T>::ionFlux)
.def_readwrite("etchantFlux", &PlasmaEtchingParameters<T>::etchantFlux)
.def_readwrite("passivationFlux",
&PlasmaEtchingParameters<T>::passivationFlux)
.def_readwrite("etchStopDepth",
&PlasmaEtchingParameters<T>::etchStopDepth)
.def_readwrite("beta_E", &PlasmaEtchingParameters<T>::beta_E)
.def_readwrite("beta_P", &PlasmaEtchingParameters<T>::beta_P)
.def_readwrite("Mask", &PlasmaEtchingParameters<T>::Mask)
.def_readwrite("Substrate", &PlasmaEtchingParameters<T>::Substrate)
.def_readwrite("Passivation", &PlasmaEtchingParameters<T>::Passivation)
.def_readwrite("Ions", &PlasmaEtchingParameters<T>::Ions);
// SF6O2 Etching
pybind11::class_<SF6O2Etching<T, D>, SmartPointer<SF6O2Etching<T, D>>>(
module, "SF6O2Etching", processModel)
.def(pybind11::init<>())
.def(pybind11::init(
&SmartPointer<SF6O2Etching<T, D>>::New<
const double /*ionFlux*/, const double /*etchantFlux*/,
const double /*oxygenFlux*/, const T /*meanIonEnergy*/,
const T /*sigmaIonEnergy*/, const T /*ionExponent*/,
const T /*oxySputterYield*/, const T /*etchStopDepth*/>),
pybind11::arg("ionFlux"), pybind11::arg("etchantFlux"),
pybind11::arg("oxygenFlux"), pybind11::arg("meanIonEnergy") = 100.,
pybind11::arg("sigmaIonEnergy") = 10.,
pybind11::arg("ionExponent") = 100.,
pybind11::arg("oxySputterYield") = 3.,
pybind11::arg("etchStopDepth") = std::numeric_limits<T>::lowest())
.def(pybind11::init(&SmartPointer<SF6O2Etching<T, D>>::New<
const PlasmaEtchingParameters<T> &>),
pybind11::arg("parameters"))
.def("setParameters", &SF6O2Etching<T, D>::setParameters)
.def("getParameters", &SF6O2Etching<T, D>::getParameters,
pybind11::return_value_policy::reference)
.def_static("defaultParameters", &SF6O2Etching<T, D>::defaultParameters);
// HBrO2 Etching
pybind11::class_<HBrO2Etching<T, D>, SmartPointer<HBrO2Etching<T, D>>>(
module, "HBrO2Etching", processModel)
.def(pybind11::init<>())
.def(pybind11::init(
&SmartPointer<HBrO2Etching<T, D>>::New<
const double /*ionFlux*/, const double /*etchantFlux*/,
const double /*oxygenFlux*/, const T /*meanIonEnergy*/,
const T /*sigmaIonEnergy*/, const T /*ionExponent*/,
const T /*oxySputterYield*/, const T /*etchStopDepth*/>),
pybind11::arg("ionFlux"), pybind11::arg("etchantFlux"),
pybind11::arg("oxygenFlux"), pybind11::arg("meanIonEnergy") = 100.,
pybind11::arg("sigmaIonEnergy") = 10.,
pybind11::arg("ionExponent") = 100.,
pybind11::arg("oxySputterYield") = 3.,
pybind11::arg("etchStopDepth") = std::numeric_limits<T>::lowest())
.def(pybind11::init(&SmartPointer<HBrO2Etching<T, D>>::New<
const PlasmaEtchingParameters<T> &>),
pybind11::arg("parameters"))
.def("setParameters", &HBrO2Etching<T, D>::setParameters)
.def("getParameters", &HBrO2Etching<T, D>::getParameters,
pybind11::return_value_policy::reference)
.def_static("defaultParameters", &HBrO2Etching<T, D>::defaultParameters);
// SF6C4F8 Etching
pybind11::class_<SF6C4F8Etching<T, D>, SmartPointer<SF6C4F8Etching<T, D>>>(
module, "SF6C4F8Etching", processModel)
.def(pybind11::init<>())
.def(
pybind11::init(&SmartPointer<SF6C4F8Etching<T, D>>::New<
const double /*ionFlux*/, const double /*etchantFlux*/,
const T /*meanEnergy*/, const T /*sigmaEnergy*/,
const T /*ionExponent*/, const T /*etchStopDepth*/>),
pybind11::arg("ionFlux"), pybind11::arg("etchantFlux"),
pybind11::arg("meanEnergy"), pybind11::arg("sigmaEnergy"),
pybind11::arg("ionExponent") = 300.,
pybind11::arg("etchStopDepth") = std::numeric_limits<T>::lowest())
.def(pybind11::init(&SmartPointer<SF6C4F8Etching<T, D>>::New<
const PlasmaEtchingParameters<T> &>),
pybind11::arg("parameters"))
.def("setParameters", &SF6C4F8Etching<T, D>::setParameters)
.def("getParameters", &SF6C4F8Etching<T, D>::getParameters,
pybind11::return_value_policy::reference)
.def_static("defaultParameters",
&SF6C4F8Etching<T, D>::defaultParameters);
// CF4O2 Parameters
pybind11::class_<CF4O2Parameters<T>::MaskType>(module, "CF4O2ParametersMask")
.def(pybind11::init<>())
.def_readwrite("rho", &CF4O2Parameters<T>::MaskType::rho)
.def_readwrite("A_sp", &CF4O2Parameters<T>::MaskType::A_sp)
.def_readwrite("Eth_sp", &CF4O2Parameters<T>::MaskType::Eth_sp);
pybind11::class_<CF4O2Parameters<T>::SiType>(module, "CF4O2ParametersSi")
.def(pybind11::init<>())
.def_readwrite("rho", &CF4O2Parameters<T>::SiType::rho)
.def_readwrite("k_sigma", &CF4O2Parameters<T>::SiType::k_sigma)
.def_readwrite("beta_sigma", &CF4O2Parameters<T>::SiType::beta_sigma)
.def_readwrite("Eth_sp", &CF4O2Parameters<T>::SiType::Eth_sp)
.def_readwrite("A_sp", &CF4O2Parameters<T>::SiType::A_sp)
.def_readwrite("Eth_ie", &CF4O2Parameters<T>::SiType::Eth_ie)
.def_readwrite("A_ie", &CF4O2Parameters<T>::SiType::A_ie);
pybind11::class_<CF4O2Parameters<T>::SiGeType>(module, "CF4O2ParametersSiGe")
.def(pybind11::init<>())
.def_readwrite("x", &CF4O2Parameters<T>::SiGeType::x)
.def_readwrite("rho", &CF4O2Parameters<T>::SiGeType::rho)
.def_readwrite("k_sigma", &CF4O2Parameters<T>::SiGeType::k_sigma)
.def_readwrite("beta_sigma", &CF4O2Parameters<T>::SiGeType::beta_sigma)
.def_readwrite("Eth_sp", &CF4O2Parameters<T>::SiGeType::Eth_sp)