milupHPC documentation
  • include
particles.cuh
Go to the documentation of this file.
1
18#ifndef MILUPHPC_PARTICLES_CUH
19#define MILUPHPC_PARTICLES_CUH
20
21#include "parameter.h"
22#include "cuda_utils/cuda_utilities.cuh"
23#include <cmath>
24#include <assert.h>
25
26
50class Particles {
51
52public:
53
55 integer *numParticles;
57 integer *numNodes;
58
60 real *mass;
62 real *x;
64 real *vx;
66 real *ax;
67 real *ax_old;
68#if DIM > 1
70 real *y;
72 real *vy;
74 real *ay;
75 real *ay_old;
76#if DIM == 3
78 real *z;
80 real *vz;
82 real *az;
83 real *az_old;
84#endif
85#endif
86
88 real *g_ax;
89 real *g_ax_old;
90#if DIM > 1
92 real *g_ay;
93 real *g_ay_old;
94#if DIM == 3
96 real *g_az;
97 real *g_az_old;
98#endif
99#endif
100
101
103 integer *nodeType;
104
106 integer *level;
107
109 idInteger *uid; // unique identifier (unsigned int/long?)
111 integer *materialId; // material identfier (e.g.: ice, basalt, ...)
113 real *sml; // smoothing length
114
116 integer *nnl; // max(number of interactions)
118 integer *noi; // number of interactions (alternatively initialize nnl with -1, ...)
119
121 real *e; // internal energy
123 real *dedt;
124
126 real *u;
127
129 real *cs; // soundspeed
130
131 // simplest hydro
133 real *rho; // density
135 real *p; // pressure
136
138 real *muijmax;
139
140#if NAVIER_STOKES
141 real *Tshear;
142 real *eta;
143#endif
144
145//#if INTEGRATE_DENSITY
146 // integrated density
148 real *drhodt;
149//#endif
150
151#if VARIABLE_SML || INTEGRATE_SML
152 // integrate/variable smoothing length
154 real *dsmldt;
155#endif
156
157#if SML_CORRECTION
158 real *sml_omega;
159#endif
160
161#if SOLID
163 real *S; // deviatoric stress tensor (DIM * DIM)
165 real *dSdt;
167 real *localStrain; // local strain
168#endif
169
170#if BALSARA_SWITCH
171 real *divv;
172 real *curlv;
173#endif
174
175#if SOLID || NAVIER_STOKES
177 real *sigma; // stress tensor (DIM * DIM)
178#endif
179
180#if ARTIFICIAL_STRESS
182 real *R; // tensile instability, tensor for correction (DIM * DIM)
183#endif
184
185#if POROSITY
187 real *pold;
189 real *alpha_jutzi;
191 real *alpha_jutzi_old;
193 real *dalphadt;
195 real *dalphadp;
197 real *dp;
199 real *dalphadrho;
201 real *f;
203 real *delpdelrho;
205 real *delpdele;
207 real *cs_old;
208
210 real *alpha_epspor;
212 real *dalpha_epspordt;
214 real *epsilon_v;
216 real *depsilon_vdt;
217#endif
218
219#if ZERO_CONSISTENCY
221 real *shepardCorrection;
222#endif
223
224#if LINEAR_CONSISTENCY
226 real *tensorialCorrectionMatrix;
227#endif
228
229#if FRAGMENTATION
231 real *d;
233 real *damage_total; // tensile damage + porous damage (directly, not DIM-root)
235 real *dddt; // the time derivative of DIM-root of (tensile) damage
237 integer *numFlaws; // the total number of flaws
239 integer *maxNumFlaws; // the maximum number of flaws allowed per particle
241 integer *numActiveFlaws; // the current number of activated flaws
243 real *flaws; // the values for the strain for each flaw (array of size maxNumFlaws)
244#if PALPHA_POROSITY
246 real *damage_porjutzi; // DIM-root of porous damage
248 real *ddamage_porjutzidt; // time derivative of DIM-root of porous damage
249#endif
250#endif
251
255 CUDA_CALLABLE_MEMBER Particles();
256
257 //TODO: constructors and setter only for specific dimension (#if , #else if, #else)
258#if DIM == 1
259
260 CUDA_CALLABLE_MEMBER Particles(integer *numParticles, integer *numNodes, real *mass, real *x, real *vx, real *ax,
261 integer *level, idInteger *uid, integer *materialId, real *sml,
262 integer *nnl, integer *noi, real *e, real *dedt, real *cs, real *rho, real *p);
263
264 CUDA_CALLABLE_MEMBER void set(integer *numParticles, integer *numNodes, real *mass, real *x, real *vx, real *ax,
265 integer *level, idInteger *uid, integer *materialId, real *sml,
266 integer *nnl, integer *noi, real *e, real *dedt, real *cs, real *rho, real *p);
267#elif DIM == 2
268
269 CUDA_CALLABLE_MEMBER Particles(integer *numParticles, integer *numNodes, real *mass, real *x, real *y, real *vx,
270 real *vy, real *ax, real *ay, idInteger *uid,
271 integer *materialId, real *sml, integer *nnl, integer *noi, real *e, real *dedt,
272 real *cs, real *rho, real *p);
273
274
275 CUDA_CALLABLE_MEMBER void set(integer *numParticles, integer *numNodes, real *mass, real *x, real *y, real *vx,
276 real *vy, real *ax, real *ay, integer *level, idInteger *uid,
277 integer *materialId, real *sml, integer *nnl, integer *noi, real *e, real *dedt,
278 real *cs, real *rho, real *p);
279#else
280
307 CUDA_CALLABLE_MEMBER Particles(integer *numParticles, integer *numNodes, real *mass, real *x, real *y, real *z,
308 real *vx, real *vy, real *vz, real *ax, real *ay, real *az,
309 idInteger *uid, integer *materialId, real *sml,
310 integer *nnl, integer *noi, real *e, real *dedt,
311 real *cs, real *rho, real *p);
312
313
343 CUDA_CALLABLE_MEMBER void set(integer *numParticles, integer *numNodes, real *mass, real *x, real *y, real *z,
344 real *vx, real *vy, real *vz, real *ax, real *ay, real *az,
345 integer *level, idInteger *uid, integer *materialId,
346 real *sml, integer *nnl, integer *noi, real *e, real *dedt, real *cs,
347 real *rho, real *p);
348#endif
349
350#if DIM == 1
351 CUDA_CALLABLE_MEMBER void setGravity(real *g_ax);
352#elif DIM == 2
353 CUDA_CALLABLE_MEMBER void setGravity(real *g_ax, real *g_ay);
354#else
364 CUDA_CALLABLE_MEMBER void setGravity(real *g_ax, real *g_ay, real *g_az);
365#endif
366
367#if DIM == 1
368 CUDA_CALLABLE_MEMBER void setLeapfrog(real *ax_old, real *g_ax_old);
369#elif DIM == 2
370 CUDA_CALLABLE_MEMBER void setLeapfrog(real *ax_old, real *ay_old, real *g_ax_old, real *g_ay_old);
371#else
372
373 CUDA_CALLABLE_MEMBER void setLeapfrog(real *ax_old, real *ay_old, real *az_old, real *g_ax_old, real *g_ay_old,
374 real *g_az_old);
375#endif
376
382 CUDA_CALLABLE_MEMBER void setU(real *u);
383
395 CUDA_CALLABLE_MEMBER void setNodeType(integer *nodeType);
396
402 CUDA_CALLABLE_MEMBER void setArtificialViscosity(real *muijmax);
403
404#if BALSARA_SWITCH
405 CUDA_CALLABLE_MEMBER void setDivCurl(real *divv, real *curlv);
406#endif
407
408//#if INTEGRATE_DENSITY
414 CUDA_CALLABLE_MEMBER void setIntegrateDensity(real *drhodt);
415//#endif
416#if VARIABLE_SML || INTEGRATE_SML
422 CUDA_CALLABLE_MEMBER void setVariableSML(real *dsmldt);
423#endif
424#if SML_CORRECTION
425 CUDA_CALLABLE_MEMBER void setSMLCorrection(real *sml_omega);
426#endif
427#if NAVIER_STOKES
428 CUDA_CALLABLE_MEMBER void setNavierStokes(real *Tshear, real *eta);
429#endif
430#if SOLID
438 CUDA_CALLABLE_MEMBER void setSolid(real *S, real *dSdt, real *localStrain);
439#endif
440#if SOLID || NAVIER_STOKES
446 CUDA_CALLABLE_MEMBER void setSolidNavierStokes(real *sigma);
447#endif
448#if ARTIFICIAL_STRESS
454 CUDA_CALLABLE_MEMBER void setArtificialStress(real *R);
455#endif
456#if POROSITY
476 CUDA_CALLABLE_MEMBER void setPorosity(real *pold, real *alpha_jutzi, real *alpha_jutzi_old, real *dalphadt,
477 real *dalphadp, real *dp, real *dalphadrho, real *f, real *delpdelrho,
478 real *delpdele, real *cs_old, real *alpha_epspor, real *dalpha_epspordt,
479 real *epsilon_v, real *depsilon_vdt);
480#endif
481#if ZERO_CONSISTENCY
487 CUDA_CALLABLE_MEMBER void setZeroConsistency(real *shepardCorrection);
488#endif
489#if LINEAR_CONSISTENCY
495 CUDA_CALLABLE_MEMBER void setLinearConsistency(real *tensorialCorrectionMatrix);
496#endif
497#if FRAGMENTATION
509 CUDA_CALLABLE_MEMBER void setFragmentation(real *d, real *damage_total, real *dddt, integer *numFlaws,
510 integer *maxNumFlaws, integer *numActiveFlaws, real *flaws);
511#if PALPHA_POROSITY
518 CUDA_CALLABLE_MEMBER void setPalphaPorosity(real *damage_porjutzi, real *ddamage_porjutzidt);
519#endif
520#endif
521
529 CUDA_CALLABLE_MEMBER void reset(integer index);
530
541 CUDA_CALLABLE_MEMBER real distance(integer index_1, integer index_2);
542
543 CUDA_CALLABLE_MEMBER real weightedEntry(integer index, Entry::Name entry);
544
548 CUDA_CALLABLE_MEMBER ~Particles();
549
550};
551
552namespace ParticlesNS {
553
554 namespace Kernel {
555
562 __global__ void check4nans(Particles *particles, integer n);
563
572 __global__ void info(Particles *particles, integer n, integer m, integer k);
573
574 namespace Launch {
575
581 real check4nans(Particles *particles, integer n);
582
592 real info(Particles *particles, integer n, integer m, integer k);
593 }
594
595#if DIM == 1
596
597 __global__ void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x,
598 real *vx, real *ax, integer *level, idInteger *uid, integer *materialId,
599 real *sml, integer *nnl, integer *noi, real *e, real *dedt, real *cs, real *rho, real *p);
600
601 namespace Launch {
602
603 void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x, real *vx,
604 real *ax, integer *level, idInteger *uid, integer *materialId, real *sml, integer *nnl,
605 integer *noi, real *e, real *dedt, real *cs, real *rho, real *p);
606 }
607
608#elif DIM == 2
609
610 __global__ void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x,
611 real *y, real *vx, real *vy, real *ax, real *ay, integer *level,
612 idInteger *uid, integer *materialId, real *sml, integer *nnl, integer *noi, real *e,
613 real *dedt, real *cs, real *rho, real *p);
614
615 namespace Launch {
616
617 void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x, real *y,
618 real *vx, real *vy, real *ax, real *ay, integer *level, idInteger *id,
619 integer *materialId, real *sml, integer *nnl, integer *noi, real *e, real *dedt, real *cs,
620 real *rho, real *p);
621 }
622
623#else
624
625 __global__ void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x,
626 real *y, real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az,
627 integer *level, idInteger *uid, integer *materialId, real *sml,
628 integer *nnl, integer *noi, real *e,
629 real *dedt, real *cs, real *rho, real *p);
630
631 namespace Launch {
632
633 void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x, real *y,
634 real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az,
635 integer *level, idInteger *uid, integer *materialId, real *sml,
636 integer *nnl, integer *noi, real *e, real *dedt, real *cs, real *rho, real *p);
637 }
638
639#endif
640
641#if DIM == 1
642 __global__ void setGravity(Particles *particles, real *g_ax);
643
644 namespace Launch {
645 void setGravity(Particles *particles, real *g_ax);
646 }
647
648#elif DIM == 2
649 __global__ void setGravity(Particles *particles, real *g_ax, real *g_ay);
650
651 namespace Launch {
652 void setGravity(Particles *particles, real *g_ax, real *g_ay);
653 }
654#else
655 __global__ void setGravity(Particles *particles, real *g_ax, real *g_ay, real *g_az);
656
657 namespace Launch {
658 void setGravity(Particles *particles, real *g_ax, real *g_ay, real *g_az);
659 }
660#endif
661
662#if DIM == 1
663 __global__ void setLeapfrog(Particles *particles, real *ax_old, real *g_ax_old);
664
665 namespace Launch {
666 void setLeapfrog(Particles *particles, real *ax_old, real *g_ax_old);
667 }
668
669#elif DIM == 2
670 __global__ void setLeapfrog(Particles *particles, real *ax_old, real *ay_old, real *g_ax_old, real *g_ay_old);
671
672 namespace Launch {
673 void setLeapfrog(Particles *particles, real *ax_old, real *ay_old, real *g_ax_old, real *g_ay_old);
674 }
675#else
676 __global__ void setLeapfrog(Particles *particles, real *ax_old, real *ay_old, real *az_old, real *g_ax_old,
677 real *g_ay_old, real *g_az_old);
678
679 namespace Launch {
680 void setLeapfrog(Particles *particles, real *ax_old, real *ay_old, real *az_old, real *g_ax_old,
681 real *g_ay_old, real *g_az_old);
682 }
683#endif
684
685 __global__ void setU(Particles *particles, real *u);
686 namespace Launch {
687 void setU(Particles *particles, real *u);
688 }
689
690 __global__ void setNodeType(Particles *particles, integer *nodeType);
691 namespace Launch {
692 void setNodeType(Particles *particles, integer *nodeType);
693 }
694
695 __global__ void setArtificialViscosity(Particles *particles, real *muijmax);
696 namespace Launch {
697 void setArtificialViscosity(Particles *particles, real *muijmax);
698 }
699
700#if BALSARA_SWITCH
701 __global__ void setDivCurl(Particles *particles, real *divv, real *curlv);
702 namespace Launch {
703 void setDivCurl(Particles *particles, real *divv, real *curlv);
704 }
705#endif
706
707//#if INTEGRATE_DENSITY
714 __global__ void setIntegrateDensity(Particles *particles, real *drhodt);
715 namespace Launch {
722 void setIntegrateDensity(Particles *particles, real *drhodt);
723 }
724//#endif
725#if VARIABLE_SML || INTEGRATE_SML
732 __global__ void setVariableSML(Particles *particles, real *dsmldt);
733 namespace Launch {
740 void setVariableSML(Particles *particles, real *dsmldt);
741 }
742#endif
743#if SML_CORRECTION
744 __global__ void setSMLCorrection(Particles *particles, real *sml_omega);
745
746 namespace Launch {
747 void setSMLCorrection(Particles *particles, real *sml_omega);
748 }
749#endif
750#if NAVIER_STOKES
751 __global__ void setNavierStokes(Particles *particles, real *Tshear, real *eta);
752 namespace Launch {
753 void setNavierStokes(Particles *particles, real *Tshear, real *eta);
754 }
755#endif
756#if SOLID
765 __global__ void setSolid(Particles *particles, real *S, real *dSdt, real *localStrain);
766 namespace Launch {
775 void setSolid(Particles *particles, real *S, real *dSdt, real *localStrain);
776 }
777#endif
778#if SOLID || NAVIER_STOKES
785 __global__ void setSolidNavierStokes(Particles *particles, real *sigma);
786 namespace Launch {
793 void setSolidNavierStokes(Particles *particles, real *sigma);
794 }
795#endif
796#if ARTIFICIAL_STRESS
803 __global__ void setArtificialStress(Particles *particles, real *R);
804 namespace Launch {
811 void setArtificialStress(Particles *particles, real *R);
812 }
813#endif
814#if POROSITY
835 __global__ void setPorosity(Particles *particles, real *pold, real *alpha_jutzi, real *alpha_jutzi_old, real *dalphadt,
836 real *dalphadp, real *dp, real *dalphadrho, real *f, real *delpdelrho,
837 real *delpdele, real *cs_old, real *alpha_epspor, real *dalpha_epspordt,
838 real *epsilon_v, real *depsilon_vdt);
839 namespace Launch {
860 void setPorosity(Particles *particles, real *pold, real *alpha_jutzi, real *alpha_jutzi_old, real *dalphadt,
861 real *dalphadp, real *dp, real *dalphadrho, real *f, real *delpdelrho,
862 real *delpdele, real *cs_old, real *alpha_epspor, real *dalpha_epspordt,
863 real *epsilon_v, real *depsilon_vdt);
864 }
865#endif
866#if ZERO_CONSISTENCY
873 __global__ void setZeroConsistency(Particles *particles, real *shepardCorrection);
874 namespace Launch {
881 void setZeroConsistency(Particles *particles, real *shepardCorrection);
882 }
883#endif
884#if LINEAR_CONSISTENCY
891 __global__ void setLinearConsistency(Particles *particles, real *tensorialCorrectionMatrix);
892 namespace Launch {
899 void setLinearConsistency(Particles *particles, real *tensorialCorrectionMatrix);
900 }
901#endif
902#if FRAGMENTATION
915 __global__ void setFragmentation(Particles *particles, real *d, real *damage_total, real *dddt, integer *numFlaws,
916 integer *maxNumFlaws, integer *numActiveFlaws, real *flaws);
917 namespace Launch {
930 void setFragmentation(Particles *particles, real *d, real *damage_total, real *dddt, integer *numFlaws,
931 integer *maxNumFlaws, integer *numActiveFlaws, real *flaws);
932 }
933#if PALPHA_POROSITY
941 __global__ void setPalphaPorosity(Particles *particles, real *damage_porjutzi, real *ddamage_porjutzidt);
942 namespace Launch {
950 void setPalphaPorosity(Particles *particles, real *damage_porjutzi, real *ddamage_porjutzidt);
951 }
952#endif
953#endif
954
960 __global__ void test(Particles *particles);
961
962 namespace Launch {
968 real test(Particles *particles, bool time=false);
969 }
970 }
971
972}
973
979class IntegratedParticles {
980
981public:
982
984 idInteger *uid;
985
987 real *x;
988 real *vx;
989 real *ax;
990#if DIM > 1
992 real *y;
993 real *vy;
994 real *ay;
995#if DIM == 3
997 real *z;
998 real *vz;
999 real *az;
1000#endif
1001#endif
1002
1003 //integer *level;
1004 //integer *nodeType;
1005
1007 real *rho;
1008 real *e;
1009 real *dedt;
1010 real *p;
1011 real *cs;
1012
1013 real *sml;
1014
1015//#if INTEGRATE_DENSITY
1016 real *drhodt;
1017//#endif
1018
1019#if VARIABLE_SML || INTEGRATE_SML
1020 real *dsmldt;
1021#endif
1022
1026 CUDA_CALLABLE_MEMBER IntegratedParticles();
1027
1028#if DIM == 1
1029
1030 CUDA_CALLABLE_MEMBER IntegratedParticles(idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x,
1031 real *vx, real *ax);
1032
1033 CUDA_CALLABLE_MEMBER void set(idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x,
1034 real *vx, real *ax);
1035
1036#elif DIM == 2
1037
1038 CUDA_CALLABLE_MEMBER IntegratedParticles(idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x,
1039 real *y, real *vx, real *vy, real *ax, real *ay);
1040
1041 CUDA_CALLABLE_MEMBER void set(integer *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x,
1042 real *y, real *vx, real *vy, real *ax, real *ay);
1043
1044#else
1045
1046 CUDA_CALLABLE_MEMBER IntegratedParticles(idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x,
1047 real *y, real *z, real *vx, real *vy, real *vz, real *ax,
1048 real *ay, real *az);
1049
1050 CUDA_CALLABLE_MEMBER void set(idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x,
1051 real *y, real *z, real *vx, real *vy, real *vz, real *ax,
1052 real *ay, real *az);
1053
1054#endif
1055
1056 //CUDA_CALLABLE_MEMBER void setLevel(integer *level);
1057 //CUDA_CALLABLE_MEMBER void setNodeType(integer *nodeType);
1058
1059 CUDA_CALLABLE_MEMBER void setSML(real *sml);
1060
1061//#if INTEGRATE_DENSITY
1062 CUDA_CALLABLE_MEMBER void setIntegrateDensity(real *drhodt);
1063//#endif
1064
1065#if VARIABLE_SML || INTEGRATE_SML
1066 CUDA_CALLABLE_MEMBER void setIntegrateSML(real *dsmldt);
1067#endif
1068
1074 CUDA_CALLABLE_MEMBER void reset(integer index);
1075
1079 CUDA_CALLABLE_MEMBER ~IntegratedParticles();
1080
1081};
1082
1083namespace IntegratedParticlesNS {
1084
1085 namespace Kernel {
1086
1087#if DIM == 1
1088
1089 __global__ void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt,
1090 real *p, real *cs, real *x, real *vx, real *ax);
1091
1092 namespace Launch {
1093
1094 void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt,
1095 real *p, real *cs, real *x, real *vx, real *ax);
1096 }
1097
1098#elif DIM == 2
1099
1100 __global__ void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt,
1101 real *p, real *cs, real *x, real *y, real *vx, real *vy, real *ax, real *ay);
1102
1103 namespace Launch {
1104
1105 void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt,
1106 real *p, real *cs, real *x, real *y, real *vx, real *vy, real *ax, real *ay);
1107 }
1108
1109#else
1110
1111
1112 __global__ void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt,
1113 real *p, real *cs, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax,
1114 real *ay, real *az);
1115
1116 namespace Launch {
1117
1118 void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt,
1119 real *p, real *cs, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax,
1120 real *ay, real *az);
1121 }
1122
1123#endif
1124
1125 //__global__ void setLevel(IntegratedParticles *integratedParticles, integer *level);
1126 //namespace Launch {
1127 // void setLevel(IntegratedParticles *integratedParticles, integer *level);
1128 //}
1129
1130 //__global__ void setNodeType(IntegratedParticles *integratedParticles, integer *nodeType);
1131 //namespace Launch {
1132 // void setNodeType(IntegratedParticles *integratedParticles, integer *nodeType);
1133 //}
1134
1135 __global__ void setSML(IntegratedParticles *integratedParticles, real *sml);
1136
1137 namespace Launch {
1138 void setSML(IntegratedParticles *integratedParticles, real *sml);
1139 }
1140
1141//#if INTEGRATE_DENSITY
1142 __global__ void setIntegrateDensity(IntegratedParticles *integratedParticles, real *drhodt);
1143
1144 namespace Launch {
1145
1146 void setIntegrateDensity(IntegratedParticles *integratedParticles, real *drhodt);
1147
1148 }
1149//#endif
1150
1151#if VARIABLE_SML || INTEGRATE_SML
1152 __global__ void setIntegrateSML(IntegratedParticles *integratedParticles, real *dsmldt);
1153
1154 namespace Launch {
1155 void setIntegrateSML(IntegratedParticles *integratedParticles, real *dsmldt);
1156 }
1157#endif
1158
1159 }
1160}
1161
1162#endif //MILUPHPC_PARTICLES_CUH
IntegratedParticles
Definition: particles.cuh:979
IntegratedParticles::cs
real * cs
Definition: particles.cuh:1011
IntegratedParticles::y
real * y
Definition: particles.cuh:992
IntegratedParticles::ay
real * ay
Definition: particles.cuh:994
IntegratedParticles::rho
real * rho
Definition: particles.cuh:1007
IntegratedParticles::setSML
CUDA_CALLABLE_MEMBER void setSML(real *sml)
Definition: particles.cu:1033
IntegratedParticles::ax
real * ax
Definition: particles.cuh:989
IntegratedParticles::drhodt
real * drhodt
Definition: particles.cuh:1016
IntegratedParticles::vx
real * vx
Definition: particles.cuh:988
IntegratedParticles::IntegratedParticles
CUDA_CALLABLE_MEMBER IntegratedParticles()
Definition: particles.cu:939
IntegratedParticles::p
real * p
Definition: particles.cuh:1010
IntegratedParticles::~IntegratedParticles
CUDA_CALLABLE_MEMBER ~IntegratedParticles()
Definition: particles.cu:1078
IntegratedParticles::reset
CUDA_CALLABLE_MEMBER void reset(integer index)
Definition: particles.cu:1049
IntegratedParticles::uid
idInteger * uid
unique identifier
Definition: particles.cuh:984
IntegratedParticles::az
real * az
Definition: particles.cuh:999
IntegratedParticles::vz
real * vz
Definition: particles.cuh:998
IntegratedParticles::x
real * x
Definition: particles.cuh:987
IntegratedParticles::dedt
real * dedt
Definition: particles.cuh:1009
IntegratedParticles::sml
real * sml
Definition: particles.cuh:1013
IntegratedParticles::z
real * z
Definition: particles.cuh:997
IntegratedParticles::e
real * e
Definition: particles.cuh:1008
IntegratedParticles::vy
real * vy
Definition: particles.cuh:993
IntegratedParticles::setIntegrateDensity
CUDA_CALLABLE_MEMBER void setIntegrateDensity(real *drhodt)
Definition: particles.cu:1038
IntegratedParticles::set
CUDA_CALLABLE_MEMBER void set(idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az)
Definition: particles.cu:1003
Particles
Particle(s) class based on SoA (Structur of Arrays).
Definition: particles.cuh:50
Particles::g_az_old
real * g_az_old
Definition: particles.cuh:97
Particles::noi
integer * noi
(pointer to) number of interactions (array)
Definition: particles.cuh:118
Particles::e
real * e
(pointer to) internal energy (array)
Definition: particles.cuh:121
Particles::ax_old
real * ax_old
Definition: particles.cuh:67
Particles::weightedEntry
CUDA_CALLABLE_MEMBER real weightedEntry(integer index, Entry::Name entry)
Definition: particles.cu:339
Particles::materialId
integer * materialId
(pointer to) material identifier (array)
Definition: particles.cuh:111
Particles::x
real * x
(pointer to) x position (array)
Definition: particles.cuh:62
Particles::rho
real * rho
(pointer to) density (array)
Definition: particles.cuh:133
Particles::level
integer * level
(pointer to) level of the (pseudo-)particles
Definition: particles.cuh:106
Particles::uid
idInteger * uid
(pointer to) unique identifier (array)
Definition: particles.cuh:109
Particles::drhodt
real * drhodt
(pointer to) time derivative of density (array)
Definition: particles.cuh:148
Particles::set
CUDA_CALLABLE_MEMBER void set(integer *numParticles, integer *numNodes, real *mass, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az, integer *level, idInteger *uid, integer *materialId, real *sml, integer *nnl, integer *noi, real *e, real *dedt, real *cs, real *rho, real *p)
Setter (DIM = 3) assigning variables to pointer members.
Definition: particles.cu:98
Particles::g_ax_old
real * g_ax_old
Definition: particles.cuh:89
Particles::g_ay
real * g_ay
(pointer to) y gravitational acceleration (array)
Definition: particles.cuh:92
Particles::ay
real * ay
(pointer to) y acceleration (array)
Definition: particles.cuh:74
Particles::nodeType
integer * nodeType
(pointer to) node type
Definition: particles.cuh:103
Particles::nnl
integer * nnl
(pointer to) near(est) neighbor list (array)
Definition: particles.cuh:116
Particles::az
real * az
(pointer to) z acceleration (array)
Definition: particles.cuh:82
Particles::ay_old
real * ay_old
Definition: particles.cuh:75
Particles::p
real * p
(pointer to) pressure (array)
Definition: particles.cuh:135
Particles::cs
real * cs
(pointer to) sound of speed (array)
Definition: particles.cuh:129
Particles::az_old
real * az_old
Definition: particles.cuh:83
Particles::y
real * y
(pointer to) y position (array)
Definition: particles.cuh:70
Particles::g_ay_old
real * g_ay_old
Definition: particles.cuh:93
Particles::ax
real * ax
(pointer to) x acceleration (array)
Definition: particles.cuh:66
Particles::reset
CUDA_CALLABLE_MEMBER void reset(integer index)
Reset (specific) entries.
Definition: particles.cu:279
Particles::u
real * u
energy (kinetic + gravitational for now)
Definition: particles.cuh:126
Particles::g_ax
real * g_ax
(pointer to) x gravitational acceleration (array)
Definition: particles.cuh:88
Particles::Particles
CUDA_CALLABLE_MEMBER Particles()
Definition: particles.cu:4
Particles::~Particles
CUDA_CALLABLE_MEMBER ~Particles()
Definition: particles.cu:361
Particles::sml
real * sml
(pointer to) smoothing length (array)
Definition: particles.cuh:113
Particles::dedt
real * dedt
(pointer to) time derivative of internal energy (array)
Definition: particles.cuh:123
Particles::mass
real * mass
(pointer to) mass (array)
Definition: particles.cuh:60
Particles::z
real * z
(pointer to) z position (array)
Definition: particles.cuh:78
Particles::numParticles
integer * numParticles
number of particles
Definition: particles.cuh:55
Particles::numNodes
integer * numNodes
number of nodes
Definition: particles.cuh:57
Particles::vz
real * vz
(pointer to) z velocity (array)
Definition: particles.cuh:80
Particles::distance
CUDA_CALLABLE_MEMBER real distance(integer index_1, integer index_2)
Distance of two particles.
Definition: particles.cu:292
Particles::setLeapfrog
CUDA_CALLABLE_MEMBER void setLeapfrog(real *ax_old, real *ay_old, real *az_old, real *g_ax_old, real *g_ay_old, real *g_az_old)
Definition: particles.cu:160
Particles::muijmax
real * muijmax
(pointer) to max(mu_ij) (array) needed for artificial viscosity and determining timestp
Definition: particles.cuh:138
Particles::setGravity
CUDA_CALLABLE_MEMBER void setGravity(real *g_ax, real *g_ay, real *g_az)
Constructor (DIM = 3) assigning gravitational acceleration to member variables.
Definition: particles.cu:139
Particles::g_az
real * g_az
(pointer to) z gravitational acceleration (array)
Definition: particles.cuh:96
Particles::vx
real * vx
(pointer to) x velocity (array)
Definition: particles.cuh:64
Particles::setNodeType
CUDA_CALLABLE_MEMBER void setNodeType(integer *nodeType)
Setter for node type.
Definition: particles.cu:175
Particles::vy
real * vy
(pointer to) y velocity (array)
Definition: particles.cuh:72
Particles::setArtificialViscosity
CUDA_CALLABLE_MEMBER void setArtificialViscosity(real *muijmax)
Setter for artificial viscosity (entry).
Definition: particles.cu:179
Particles::setIntegrateDensity
CUDA_CALLABLE_MEMBER void setIntegrateDensity(real *drhodt)
Setter in dependence of INTEGRATE_DENSITY.
Definition: particles.cu:191
Particles::setU
CUDA_CALLABLE_MEMBER void setU(real *u)
Setter for energy.
Definition: particles.cu:171
cuda_utilities.cuh
CUDA utilities.
CUDA_CALLABLE_MEMBER
#define CUDA_CALLABLE_MEMBER
Definition: cuda_utilities.cuh:30
IntegratedParticlesNS::Kernel::Launch::setSML
void setSML(IntegratedParticles *integratedParticles, real *sml)
Definition: particles.cu:1159
IntegratedParticlesNS::Kernel::Launch::setIntegrateDensity
void setIntegrateDensity(IntegratedParticles *integratedParticles, real *drhodt)
Definition: particles.cu:1173
IntegratedParticlesNS::Kernel::Launch::set
void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az)
Definition: particles.cu:1122
IntegratedParticlesNS::Kernel::set
__global__ void set(IntegratedParticles *integratedParticles, idInteger *uid, real *rho, real *e, real *dedt, real *p, real *cs, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az)
Definition: particles.cu:1116
IntegratedParticlesNS::Kernel::setSML
__global__ void setSML(IntegratedParticles *integratedParticles, real *sml)
Definition: particles.cu:1154
IntegratedParticlesNS::Kernel::setIntegrateDensity
__global__ void setIntegrateDensity(IntegratedParticles *integratedParticles, real *drhodt)
Definition: particles.cu:1167
IntegratedParticlesNS
Definition: particles.cuh:1083
Kernel
Definition: device_rhs.cuh:7
ParticlesNS::Kernel::Launch::setU
void setU(Particles *particles, real *u)
Definition: particles.cu:730
ParticlesNS::Kernel::Launch::setIntegrateDensity
void setIntegrateDensity(Particles *particles, real *drhodt)
Definition: particles.cu:774
ParticlesNS::Kernel::Launch::setGravity
void setGravity(Particles *particles, real *g_ax, real *g_ay, real *g_az)
Definition: particles.cu:676
ParticlesNS::Kernel::Launch::setLeapfrog
void setLeapfrog(Particles *particles, real *ax_old, real *ay_old, real *az_old, real *g_ax_old, real *g_ay_old, real *g_az_old)
Definition: particles.cu:716
ParticlesNS::Kernel::Launch::set
void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az, integer *level, idInteger *uid, integer *materialId, real *sml, integer *nnl, integer *noi, real *e, real *dedt, real *cs, real *rho, real *p)
Definition: particles.cu:631
ParticlesNS::Kernel::Launch::test
real test(Particles *particles, bool time=false)
Definition: particles.cu:930
ParticlesNS::Kernel::Launch::setNodeType
void setNodeType(Particles *particles, integer *nodeType)
Definition: particles.cu:740
ParticlesNS::Kernel::Launch::info
real info(Particles *particles, integer n, integer m, integer k)
Definition: particles.cu:568
ParticlesNS::Kernel::Launch::check4nans
real check4nans(Particles *particles, integer n)
Definition: particles.cu:563
ParticlesNS::Kernel::Launch::setArtificialViscosity
void setArtificialViscosity(Particles *particles, real *muijmax)
Definition: particles.cu:751
ParticlesNS::Kernel::set
__global__ void set(Particles *particles, integer *numParticles, integer *numNodes, real *mass, real *x, real *y, real *z, real *vx, real *vy, real *vz, real *ax, real *ay, real *az, integer *level, idInteger *uid, integer *materialId, real *sml, integer *nnl, integer *noi, real *e, real *dedt, real *cs, real *rho, real *p)
Definition: particles.cu:621
ParticlesNS::Kernel::setArtificialViscosity
__global__ void setArtificialViscosity(Particles *particles, real *muijmax)
Definition: particles.cu:746
ParticlesNS::Kernel::setNodeType
__global__ void setNodeType(Particles *particles, integer *nodeType)
Definition: particles.cu:736
ParticlesNS::Kernel::setIntegrateDensity
__global__ void setIntegrateDensity(Particles *particles, real *drhodt)
Definition: particles.cu:771
ParticlesNS::Kernel::setGravity
__global__ void setGravity(Particles *particles, real *g_ax, real *g_ay, real *g_az)
Definition: particles.cu:671
ParticlesNS::Kernel::info
__global__ void info(Particles *particles, integer n, integer m, integer k)
Definition: particles.cu:528
ParticlesNS::Kernel::setLeapfrog
__global__ void setLeapfrog(Particles *particles, real *ax_old, real *ay_old, real *az_old, real *g_ax_old, real *g_ay_old, real *g_az_old)
Definition: particles.cu:710
ParticlesNS::Kernel::check4nans
__global__ void check4nans(Particles *particles, integer n)
Definition: particles.cu:432
ParticlesNS::Kernel::setU
__global__ void setU(Particles *particles, real *u)
Definition: particles.cu:725
ParticlesNS::Kernel::test
__global__ void test(Particles *particles)
Definition: particles.cu:902
ParticlesNS
Particle class related functions and kernels.
Definition: particles.cuh:552
ProfilerIds::numParticles
const char *const numParticles
Definition: h5profiler.h:29
parameter.h
Settings via preprocessor directives, typedefs, constants, structs.
real
double real
Definition: parameter.h:15
integer
int integer
Definition: parameter.h:17
idInteger
int idInteger
Definition: parameter.h:19
Entry::Name
Name
Definition: parameter.h:255

milupHPC - include/particles.cuh Source File
Generated on Wed Aug 31 2022 12:16:52 by Doxygen 1.9.3