@@ -17,6 +17,101 @@ namespace viennaps {
1717
1818using namespace viennacore ;
1919
20+ #ifdef VIENNACORE_COMPILE_GPU
21+ namespace gpu {
22+ // / GPU Version of the SF6/C4F8 plasma etching model
23+ template <typename NumericType, int D>
24+ class SF6C4F8Etching final : public ProcessModelGPU<NumericType, D> {
25+ public:
26+ explicit SF6C4F8Etching (const PlasmaEtchingParameters<NumericType> &pParams)
27+ : params(pParams), deviceParams(pParams.convertToFloat()) {
28+ initializeModel ();
29+ }
30+
31+ ~SF6C4F8Etching () override { this ->processData .free (); }
32+
33+ private:
34+ void initializeModel () {
35+ // particles
36+ viennaray::gpu::Particle<NumericType> ion;
37+ ion.name = " Ion" ; // name for shader programs postfix
38+ ion.dataLabels .push_back (" ionSputterFlux" );
39+ ion.dataLabels .push_back (" ionEnhancedFlux" );
40+ ion.dataLabels .push_back (" ionEnhancedPassivationFlux" );
41+ ion.sticking = 0 .f ;
42+ ion.cosineExponent = params.Ions .exponent ;
43+
44+ viennaray::gpu::Particle<NumericType> etchant;
45+ etchant.name = " Etchant" ;
46+ etchant.dataLabels .push_back (" etchantFlux" );
47+ etchant.cosineExponent = 1 .f ;
48+ etchant.materialSticking = params.beta_E ;
49+
50+ // No oxygen/passivation particle for SF6C4F8
51+
52+ // surface model
53+ auto surfModel = SmartPointer<
54+ viennaps::impl::PlasmaEtchingSurfaceModel<NumericType, D>>::New (params);
55+
56+ // velocity field
57+ auto velField = SmartPointer<DefaultVelocityField<NumericType, D>>::New ();
58+
59+ this ->setSurfaceModel (surfModel);
60+ this ->setVelocityField (velField);
61+ this ->setProcessName (" SF6C4F8Etching" );
62+ this ->getParticleTypes ().clear ();
63+
64+ this ->insertNextParticleType (ion);
65+ this ->insertNextParticleType (etchant);
66+
67+ std::unordered_map<std::string, unsigned > pMap = {{" Ion" , 0 },
68+ {" Etchant" , 1 }};
69+ std::vector<viennaray::gpu::CallableConfig> cMap = {
70+ {0 , viennaray::gpu::CallableSlot::COLLISION ,
71+ " __direct_callable__plasmaIonCollision" },
72+ {0 , viennaray::gpu::CallableSlot::REFLECTION ,
73+ " __direct_callable__plasmaIonReflection" },
74+ {0 , viennaray::gpu::CallableSlot::INIT ,
75+ " __direct_callable__plasmaIonInit" },
76+ {1 , viennaray::gpu::CallableSlot::COLLISION ,
77+ " __direct_callable__plasmaNeutralCollision" },
78+ {1 , viennaray::gpu::CallableSlot::REFLECTION ,
79+ " __direct_callable__plasmaNeutralReflectionNoPassivation" }};
80+ this ->setParticleCallableMap (pMap, cMap);
81+ this ->setCallableFileName (" CallableWrapper" );
82+
83+ this ->setUseMaterialIds (true );
84+ precomputeSqrtEnergies ();
85+ this ->processData .alloc (sizeof (PlasmaEtchingParameters<float >));
86+ this ->processData .upload (&deviceParams, 1 );
87+ this ->hasGPU = true ;
88+
89+ this ->processMetaData = params.toProcessMetaData ();
90+ }
91+
92+ void setParameters (const PlasmaEtchingParameters<NumericType> &pParams) {
93+ params = pParams;
94+ deviceParams = pParams.convertToFloat ();
95+ precomputeSqrtEnergies ();
96+ this ->processData .upload (&deviceParams, 1 );
97+ }
98+
99+ private:
100+ PlasmaEtchingParameters<NumericType> params;
101+ PlasmaEtchingParameters<float > deviceParams;
102+
103+ void precomputeSqrtEnergies () {
104+ deviceParams.Substrate .Eth_ie = std::sqrt (deviceParams.Substrate .Eth_ie );
105+ deviceParams.Passivation .Eth_ie =
106+ std::sqrt (deviceParams.Passivation .Eth_ie );
107+ deviceParams.Substrate .Eth_sp = std::sqrt (deviceParams.Substrate .Eth_sp );
108+ deviceParams.Mask .Eth_sp = std::sqrt (deviceParams.Mask .Eth_sp );
109+ deviceParams.Polymer .Eth_sp = std::sqrt (deviceParams.Polymer .Eth_sp );
110+ }
111+ };
112+ } // namespace gpu
113+ #endif
114+
20115// / Model for etching Si in a SF6/C4F8 plasma. This model extends the SF6O2
21116// / etching model to include polymer etching. The polymer layer is deposited
22117// / by a separate process and etched by sputtering similarly to the mask
@@ -50,6 +145,12 @@ class SF6C4F8Etching : public ProcessModelCPU<NumericType, D> {
50145 initializeModel ();
51146 }
52147
148+ #ifdef VIENNACORE_COMPILE_GPU
149+ SmartPointer<ProcessModelBase<NumericType, D>> getGPUModel () override {
150+ return SmartPointer<gpu::SF6C4F8Etching<NumericType, D>>::New (params);
151+ }
152+ #endif
153+
53154 void setParameters (const PlasmaEtchingParameters<NumericType> &pParams) {
54155 params = pParams;
55156 initializeModel ();
@@ -147,6 +248,7 @@ class SF6C4F8Etching : public ProcessModelCPU<NumericType, D> {
147248 this ->setVelocityField (velField);
148249
149250 this ->setProcessName (" SF6C4F8Etching" );
251+ this ->hasGPU = true ;
150252
151253 processMetaData = params.toProcessMetaData ();
152254 // add units
0 commit comments