12#include "gadgetconfig.h"
20#include "../data/allvars.h"
21#include "../data/dtypes.h"
22#include "../data/intposconvert.h"
23#include "../data/mymalloc.h"
24#include "../logs/logs.h"
25#include "../logs/timer.h"
26#include "../main/simulation.h"
27#include "../mpi_utils/mpi_utils.h"
28#include "../ngbtree/ngbtree.h"
29#include "../sort/cxxsort.h"
30#include "../sph/kernel.h"
31#include "../sph/sph.h"
32#include "../system/system.h"
42inline int sph::sph_density_evaluate_particle_node_opening_criterion(pinfo &pdat,
ngbnode *nop)
56 if(left[0] > pdat.search_range[0] && right[0] > left[0])
63 if(left[1] > pdat.search_range[1] && right[1] > left[1])
70 if(left[2] > pdat.search_range[2] && right[2] > left[2])
79inline void sph::sph_density_check_particle_particle_interaction(pinfo &pdat,
int p,
int p_type,
unsigned char shmrank)
81#ifdef PRESERVE_SHMEM_BINARY_INVARIANCE
82 if(skip_actual_force_computation)
100 if(posdiff[0] * posdiff[0] + posdiff[1] * posdiff[1] + posdiff[2] * posdiff[2] > pdat.hsml2)
106 int n = pdat.numngb++;
108 Ngbdensdat[n].IntPos = P->
IntPos;
109 Ngbdensdat[n].VelPred = SphP->
VelPred;
110 Ngbdensdat[n].Mass = P->
getMass();
111#ifdef PRESSURE_ENTROPY_SPH
112 Ngbdensdat[n].EntropyToInvGammaPred = SphP->EntropyToInvGammaPred;
114#ifdef TIMEDEP_ART_VISC
115 Ngbdensdat[n].Csnd = SphP->
Csnd;
126 if(posdiff[0] * posdiff[0] + posdiff[1] * posdiff[1] + posdiff[2] * posdiff[2] > pdat.hsml2)
132 int n = pdat.numngb++;
134 Ngbdensdat[n].IntPos = foreignpoint->
IntPos;
136 Ngbdensdat[n].Mass = foreignpoint->
Mass;
137#ifdef PRESSURE_ENTROPY_SPH
138 Ngbdensdat[n].EntropyToInvGammaPred = foreignpoint->
SphCore.EntropyToInvGammaPred;
140#ifdef TIMEDEP_ART_VISC
150inline void sph::sph_density_open_node(pinfo &pdat,
ngbnode *nop,
int mintopleafnode,
int committed)
160 "p=%d < 0 nop->sibling=%d nop->nextnode=%d shmrank=%d nop->sibling_shmrank=%d nop->foreigntask=%d "
161 "first_nontoplevelnode=%d",
165 unsigned char next_shmrank;
172 next_shmrank = shmrank;
205 "should not happen: p=%d MaxPart=%d MaxNodes=%d ImportedNodeOffset=%d EndOfTreePoints=%d EndOfForeignNodes=%d "
206 "shmrank=%d nop->nextnode=%d nop->cannot_be_opened_locally=%d nop->not_empty=%d nop-TopNodes=%d",
211 sph_density_interact(pdat, p, type, shmrank, mintopleafnode, committed);
214 shmrank = next_shmrank;
223inline void sph::sph_density_interact(pinfo &pdat,
int no,
char no_type,
unsigned char shmrank,
int mintopleafnode,
int committed)
227 sph_density_check_particle_particle_interaction(pdat, no, no_type, shmrank);
240 int openflag = sph_density_evaluate_particle_node_opening_criterion(pdat, nop);
249 Terminate(
"this should not happen any more");
260 int min_buffer_space =
275void sph::densities_determine(
int ntarget,
int *targetlist)
277 Ngbdensdat = (ngbdata_density *)
Mem.mymalloc(
"Ngbdensdat",
MAX_NGBS *
sizeof(ngbdata_density));
286 for(
int i = 0; i < ntarget; i++)
288 int target = targetlist[i];
290 clear_density_result(&
Tp->
SphP[target]);
299#ifdef PRESERVE_SHMEM_BINARY_INVARIANCE
300 workstack_data *WorkStackBak = (workstack_data *)
Mem.mymalloc(
"WorkStackBak",
NumOnWorkStack *
sizeof(workstack_data));
309#ifdef PRESERVE_SHMEM_BINARY_INVARIANCE
310 for(
int rep = 0; rep < 2; rep++)
314 skip_actual_force_computation =
true;
318 skip_actual_force_computation =
false;
337 int min_buffer_space =
339 if(min_buffer_space >= committed)
344 int mintopleaf =
WorkStack[item].MinTopLeafNode;
348 get_pinfo(target, pdat);
362 Terminate(
"item=%d: no=%d now we should be able to open it!", item, no);
365 sph_density_open_node(pdat, nop, mintopleaf, committed);
368 density_evaluate_kernel(pdat);
375 Terminate(
"Can't even process a single particle");
395#ifdef PRESERVE_SHMEM_BINARY_INVARIANCE
400#ifdef PRESERVE_SHMEM_BINARY_INVARIANCE
401 Mem.myfree(WorkStackBak);
404 Mem.myfree(Ngbdensdat);
421#ifdef TIMEDEP_ART_VISC
422 SphP->DivVelOld = SphP->
DivVel;
446 int *targetList = (
int *)
Mem.mymalloc(
"TargetList",
Tp->
NumGas *
sizeof(
int));
450 int ndensities = ntarget;
452 for(
int i = 0; i < ntarget; i++)
454 int target = list[i];
455 targetList[i] = target;
456 Left[target] = Right[target] = 0.0;
489 densities_determine(ndensities, targetList);
494 for(
int i = 0; i < ndensities; i++)
496 int target = targetList[i];
504 if(SphP[target].Density > 0)
506#ifdef WENDLAND_BIAS_CORRECTION
510 if(SphP[target].DhsmlDensityFactor >
516#ifndef IMPROVED_VELOCITY_GRADIENTS
517 SphP[target].
CurlVel =
sqrt(SphP[target].Rot[0] * SphP[target].Rot[0] + SphP[target].Rot[1] * SphP[target].Rot[1] +
518 SphP[target].Rot[2] * SphP[target].Rot[2]) /
523 SphP[target].set_velocity_gradients();
525 SphP[target].
DtHsml = (1.0 /
NUMDIMS) * SphP[target].DivVel * SphP[target].Hsml;
528#ifndef PRESSURE_ENTROPY_SPH
533#ifdef PRESSURE_ENTROPY_SPH
534 if(SphP[target].EntropyToInvGammaPred > 0 && SphP[target].PressureSphDensity > 0)
536 SphP[target].DhsmlDerivedDensityFactor *=
537 SphP[target].
Hsml / (
NUMDIMS * SphP[target].
Density * SphP[target].EntropyToInvGammaPred);
539 SphP[target].PressureSphDensity /= SphP[target].EntropyToInvGammaPred;
540#ifdef WENDLAND_BIAS_CORRECTION
541 SphP[target].PressureSphDensity -= get_density_bias(SphP[target].Hsml,
Tp->
P[target].
getMass(),
All.
DesNumNgb);
543 SphP[target].DtPressureSphDensity = -SphP[target].
DivVel * SphP[target].PressureSphDensity;
548 SphP[target].DhsmlDerivedDensityFactor = 0;
549 SphP[target].EntropyToInvGammaPred = 0;
550 SphP[target].PressureSphDensity = 0;
554#ifdef ADAPTIVE_HYDRO_SOFTENING
562 for(
int i = 0; i <
NUMDIMS; i++)
564 hfac *= SphP[target].
Hsml;
568 if(SphP[target].NumNgb < (desnumngb - desnumngbdev) || (SphP[target].NumNgb > (desnumngb + desnumngbdev)))
570 if(Left[target] > 0 && Right[target] > 0)
571 if((Right[target] - Left[target]) < 1.0e-3 * Left[target])
578 targetList[npleft++] = target;
580 if(SphP[target].NumNgb < (desnumngb - desnumngbdev))
581 Left[target] = std::max<double>(SphP[target].Hsml, Left[target]);
584 if(Right[target] != 0)
586 if(SphP[target].Hsml < Right[target])
587 Right[target] = SphP[target].
Hsml;
590 Right[target] = SphP[target].
Hsml;
598 printf(
"target=%d Hsml=%g task=%d ID=%llu Left=%g Right=%g Ngbs=%g Right-Left=%g\n pos=(%g|%g|%g)\n", target,
599 SphP[target].Hsml,
D->ThisTask, (
unsigned long long)
Tp->
P[target].
ID.
get(), Left[target], Right[target],
600 SphP[target].
NumNgb, Right[target] - Left[target], pos[0], pos[1], pos[2]);
604 if(Right[target] > 0 && Left[target] > 0)
605 SphP[target].
Hsml =
pow(0.5 * (
pow(Left[target], 3) +
pow(Right[target], 3)), 1.0 / 3);
608 if(Right[target] == 0 && Left[target] == 0)
609 Terminate(
"Right[i] == 0 && Left[i] == 0 SphP[i].Hsml=%g\n", SphP[target].Hsml);
611 if(Right[target] == 0 && Left[target] > 0)
613 if(
Tp->
P[target].
getType() == 0 &&
fabs(SphP[target].NumNgb - desnumngb) < 0.5 * desnumngb)
615 double fac = 1 - (SphP[target].
NumNgb - desnumngb) / (
NUMDIMS * SphP[target].NumNgb) *
619 SphP[target].
Hsml *= fac;
621 SphP[target].
Hsml *= 1.26;
624 SphP[target].
Hsml *= 1.26;
627 if(Right[target] > 0 && Left[target] == 0)
629 if(
Tp->
P[target].
getType() == 0 &&
fabs(SphP[target].NumNgb - desnumngb) < 0.5 * desnumngb && iter < 4)
631 double fac = 1 - (SphP[target].
NumNgb - desnumngb) / (
NUMDIMS * SphP[target].NumNgb) *
635 SphP[target].
Hsml *= fac;
637 SphP[target].
Hsml /= 1.26;
640 SphP[target].
Hsml /= 1.26;
655 D->mpi_printf(
"SPH-DENSITY: ngb iteration %4d: took %8.3f , need to repeat for %012lld local particles.\n", iter,
659 Terminate(
"failed to converge in neighbour iteration in density()\n");
662 D->mpi_printf(
"SPH-DENSITY: ngb iteration %4d: took %8.3f\n", ++iter,
Logs.
timediff(t0, t1));
664 while(ndensities > 0);
666#ifdef TIMEDEP_ART_VISC
667 for(
int i = 0; i < ntarget; i++)
669 int target = list[i];
673 Tp->
SphP[target].set_viscosity_coefficient(dtime);
679 MPI_Allreduce(MPI_IN_PLACE, &max_ncycles, 1, MPI_INT, MPI_MAX,
D->Communicator);
692 Mem.myfree(targetList);
698 D->mpi_printf(
"SPH-DENSITY: density computation done. took %8.3f\n",
Logs.
timediff(ta, tb));
700 struct detailed_timings
702 double tree, wait, fetch, all;
705 double fillfacFgnNodes, fillfacFgnPoints;
707 detailed_timings timer, tisum, timax;
712 timer.all = timer.tree + timer.wait + timer.fetch +
TIMER_DIFF(CPU_DENSITY);
719 MPI_Reduce((
double *)&timer, (
double *)&tisum, (
int)(
sizeof(detailed_timings) /
sizeof(
double)), MPI_DOUBLE, MPI_SUM, 0,
721 MPI_Reduce((
double *)&timer, (
double *)&timax, (
int)(
sizeof(detailed_timings) /
sizeof(
double)), MPI_DOUBLE, MPI_MAX, 0,
730 fprintf(
Logs.
FdDensity,
" work-load balance: %g part/sec: raw=%g, effective=%g\n",
734 " maximum number of nodes: %g, filled: %g NumForeignNodes: max=%g avg=%g fill=%g NumForeignPoints: max=%g avg=%g "
735 "fill=%g cycles=%d\n",
736 timax.numnodes, timax.numnodes /
MaxNodes, timax.NumForeignNodes, tisum.NumForeignNodes /
D->NTask,
737 timax.fillfacFgnNodes, timax.NumForeignPoints, tisum.NumForeignPoints /
D->NTask, timax.fillfacFgnPoints, max_ncycles);
738 fprintf(
Logs.
FdDensity,
" avg times: <all>=%g <tree>=%g <wait>=%g <fetch>=%g sec\n", tisum.all /
D->NTask,
739 tisum.tree /
D->NTask, tisum.wait /
D->NTask, tisum.fetch /
D->NTask);
746#ifdef EXPLICIT_VECTORIZATION
752void sph::density_evaluate_kernel(pinfo &pdat)
757 double shinv, shinv3, shinv4;
758 kernel_hinv(targetSphP->
Hsml, &shinv, &shinv3, &shinv4);
764 Vec4d dwnorm(
NORM * shinv3);
765 Vec4d dwknorm(
NORM * shinv4);
768 for(
int i = 0; i <
NUMDIMS; i++)
770 v_i[i] = targetSphP->
VelPred[i];
773 Vec4d cs_i(targetSphP->
Csnd);
774 const int vector_length = 4;
775 const int array_length = (pdat.numngb + vector_length - 1) & (-vector_length);
777 for(
int n = pdat.numngb; n < array_length; n++)
778 Ngbdensdat[n] = Ngbdensdat[0];
780 Vec4d decayVel_loc(0);
782 for(
int n = 0; n < array_length; n += vector_length)
784 struct ngbdata_density *ngb0 = &Ngbdensdat[n + 0];
785 struct ngbdata_density *ngb1 = &Ngbdensdat[n + 1];
786 struct ngbdata_density *ngb2 = &Ngbdensdat[n + 2];
787 struct ngbdata_density *ngb3 = &Ngbdensdat[n + 3];
790#if defined(LONG_X_BITS) || defined(LONG_Y_BITS) || defined(LONG_Z_BITS)
791 double posdiff[array_length][3];
792 for(
int i = 0; i < 4; i++)
797 for(
int i = 0; i <
NUMDIMS; i++)
799 dpos[i] = Vec4d(posdiff[0][i], posdiff[1][i], posdiff[2][i], posdiff[3][i]);
802 for(
int i = 0; i <
NUMDIMS; i++)
804 dpos[i] =
Tp->nearest_image_intpos_to_doublepos_vectorial(targetP->
IntPos[i], ngb0->IntPos[i], ngb1->IntPos[i],
805 ngb2->IntPos[i], ngb3->IntPos[i]);
810 for(
int i = 0; i <
NUMDIMS; i++)
812 v_j[i] = Vec4d(ngb0->VelPred[i], ngb1->VelPred[i], ngb2->VelPred[i], ngb3->VelPred[i]);
815 Vec4d mass_j(ngb0->Mass, ngb1->Mass, ngb2->Mass, ngb3->Mass);
818 for(
int i = 0; i <
NUMDIMS; i++)
820 r2 += dpos[i] * dpos[i];
829 kernel_main_vector(u, dwnorm, dwknorm, &wk, &dwk);
831 if(n + vector_length > pdat.numngb)
833 mass_j.cutoff(vector_length - (array_length - pdat.numngb));
834 wk.cutoff(vector_length - (array_length - pdat.numngb));
837 Vec4d mj_wk = mass_j * wk;
839 targetSphP->
Density += horizontal_add(mj_wk);
841#ifdef PRESSURE_ENTROPY_SPH
842 Vec4d entr_j(ngb0->EntropyToInvGammaPred, ngb1->EntropyToInvGammaPred, ngb2->EntropyToInvGammaPred, ngb3->EntropyToInvGammaPred);
844 targetSphP->PressureSphDensity += horizontal_add(mj_wk * entr_j);
846 targetSphP->DhsmlDerivedDensityFactor += horizontal_add(-mass_j * entr_j * (
NUMDIMS * hinv * wk + u * dwk));
851 Vec4db decision_r_gt_0 = (r > 0);
853 r = select(decision_r_gt_0, r, 1.0);
855 Vec4d mj_dwk_r = mass_j * dwk / r;
858 for(
int i = 0; i <
NUMDIMS; i++)
860 dv[i] = v_i[i] - v_j[i];
863#ifndef IMPROVED_VELOCITY_GRADIENTS
864 Vec4d dpos_times_dv(0);
865 for(
int i = 0; i <
NUMDIMS; i++)
866 dpos_times_dv += dpos[i] * dv[i];
868 targetSphP->
DivVel += horizontal_add(-mj_dwk_r * dpos_times_dv);
871 targetSphP->
Rot[2] += horizontal_add(mj_dwk_r * (dpos[1] * dv[0] - dpos[0] * dv[1]));
874 targetSphP->
Rot[0] += horizontal_add(mj_dwk_r * (dpos[2] * dv[1] - dpos[1] * dv[2]));
875 targetSphP->
Rot[1] += horizontal_add(mj_dwk_r * (dpos[0] * dv[2] - dpos[2] * dv[0]));
876 targetSphP->
Rot[2] += horizontal_add(mj_dwk_r * (dpos[1] * dv[0] - dpos[0] * dv[1]));
879 for(
int i = 0; i <
NUMDIMS; i++)
881 for(
int j = 0; j <
NUMDIMS; j++)
883 targetSphP->dvel[i][j] -= horizontal_add(mj_dwk_r * dv[i] * dpos[j]);
886 targetSphP->dpos.dx_dx -= horizontal_add(mj_dwk_r * dpos[0] * dpos[0]);
887 targetSphP->dpos.dx_dy -= horizontal_add(mj_dwk_r * dpos[0] * dpos[1]);
888 targetSphP->dpos.dx_dz -= horizontal_add(mj_dwk_r * dpos[0] * dpos[2]);
889 targetSphP->dpos.dy_dy -= horizontal_add(mj_dwk_r * dpos[1] * dpos[1]);
890 targetSphP->dpos.dy_dz -= horizontal_add(mj_dwk_r * dpos[1] * dpos[2]);
891 targetSphP->dpos.dz_dz -= horizontal_add(mj_dwk_r * dpos[2] * dpos[2]);
893#ifdef TIMEDEP_ART_VISC
895 for(
int i = 0; i <
NUMDIMS; i++)
897 vdotr2 += dpos[i] * dv[i];
905 Vec4d cs_j(ngb0->Csnd, ngb1->Csnd, ngb2->Csnd, ngb3->Csnd);
906 Vec4d cs_sum = cs_i + cs_j;
908 Vec4d decay_vel_2 = cs_sum - mu_ij;
910 Vec4db decision = (vdotr2 > 0);
912 Vec4d decay_vel = select(decision, cs_sum, decay_vel_2);
914 Vec4d fac_decay_vel = select(decision_r_gt_0, 1, 0);
916 decay_vel = decay_vel * fac_decay_vel;
918 decayVel_loc = max(decayVel_loc, decay_vel);
923#ifdef TIMEDEP_ART_VISC
924 for(
int i = 0; i < vector_length; i++)
926 if(decayVel_loc[i] > targetSphP->decayVel)
927 targetSphP->decayVel = decayVel_loc[i];
938void sph::density_evaluate_kernel(pinfo &pdat)
947 for(
int n = 0; n < pdat.numngb; n++)
949 struct ngbdata_density *ngb = &Ngbdensdat[n];
956 for(
int i = 0; i <
NUMDIMS; i++)
958 kernel.
dpos[i] = posdiff[i];
963 for(
int i = 0; i <
NUMDIMS; i++)
965 r2 += kernel.
dpos[i] * kernel.
dpos[i];
970 double u = kernel.
r * kernel.
hinv;
974 double mass_j = ngb->Mass;
975 kernel.
mj_wk = (mass_j * kernel.
wk);
979#ifdef PRESSURE_ENTROPY_SPH
980 targetSphP->PressureSphDensity += kernel.
mj_wk * ngb->EntropyToInvGammaPred;
981 targetSphP->DhsmlDerivedDensityFactor +=
982 (-mass_j * ngb->EntropyToInvGammaPred * (
NUMDIMS * kernel.
hinv * kernel.
wk + u * kernel.
dwk));
992 for(
int i = 0; i <
NUMDIMS; i++)
994 kernel.
dv[i] = targetSphP->
VelPred[i] - ngb->VelPred[i];
997#ifndef IMPROVED_VELOCITY_GRADIENTS
998 double dpos_times_dv = 0;
999 for(
int i = 0; i <
NUMDIMS; i++)
1000 dpos_times_dv += kernel.
dpos[i] * kernel.
dv[i];
1012 for(
int i = 0; i <
NUMDIMS; i++)
1014 for(
int j = 0; j <
NUMDIMS; j++)
1016 targetSphP->dvel[i][j] -= kernel.
mj_dwk_r * kernel.
dv[i] * kernel.
dpos[j];
1020 targetSphP->dpos.dx_dx -= kernel.
mj_dwk_r * kernel.
dpos[0] * kernel.
dpos[0];
1021 targetSphP->dpos.dx_dy -= kernel.
mj_dwk_r * kernel.
dpos[0] * kernel.
dpos[1];
1022 targetSphP->dpos.dx_dz -= kernel.
mj_dwk_r * kernel.
dpos[0] * kernel.
dpos[2];
1023 targetSphP->dpos.dy_dy -= kernel.
mj_dwk_r * kernel.
dpos[1] * kernel.
dpos[1];
1024 targetSphP->dpos.dy_dz -= kernel.
mj_dwk_r * kernel.
dpos[1] * kernel.
dpos[2];
1025 targetSphP->dpos.dz_dz -= kernel.
mj_dwk_r * kernel.
dpos[2] * kernel.
dpos[2];
1028#ifdef TIMEDEP_ART_VISC
1030 for(
int i = 0; i <
NUMDIMS; i++)
1032 vdotr2 += kernel.
dpos[i] * kernel.
dv[i];
1042 decay_vel = targetSphP->
Csnd + ngb->Csnd - mu_ij;
1044 decay_vel = targetSphP->
Csnd + ngb->Csnd;
1046 if(decay_vel > targetSphP->decayVel)
1047 targetSphP->decayVel = decay_vel;
1063 for(
int k = 0; k < 3; k++)
1066#ifdef PRESSURE_ENTROPY_SPH
1067 SphP->PressureSphDensity = 0;
1068 SphP->DhsmlDerivedDensityFactor = 0;
1070#ifdef IMPROVED_VELOCITY_GRADIENTS
1072 for(
int i = 0; i <
NUMDIMS; i++)
1074 for(
int j = 0; j <
NUMDIMS; j++)
1076 SphP->dvel[i][j] = 0;
1080#ifdef TIMEDEP_ART_VISC
global_data_all_processes All
void nearest_image_intpos_to_pos(const MyIntPosType *const a, const MyIntPosType *const b, T *posdiff)
MyIntPosType nearest_image_intpos_to_intpos_Y(const MyIntPosType a, const MyIntPosType b)
MyIntPosType nearest_image_intpos_to_intpos_Z(const MyIntPosType a, const MyIntPosType b)
void intpos_to_pos(MyIntPosType *intpos, T *posdiff)
MyIntPosType nearest_image_intpos_to_intpos_X(const MyIntPosType a, const MyIntPosType b)
double timediff(double t0, double t1)
double getAllocatedBytesInMB(void)
int * GetNodeIDForSimulCommRank
int drift_particle(particle_data *P, sph_particle_data *SphP, integertime time1, bool ignore_light_cone=false)
This function drifts a particle i to time1.
TimeBinData TimeBinsGravity
TimeBinData TimeBinsHydro
void compute_densities(void)
void density(int *targetlist, int ntarget)
long long sum_NumForeignPoints
workstack_data * WorkStack
sph_particle_data * get_SphPp(int n, unsigned char shmrank)
void cleanup_shared_memory_access(void)
domain< simparticles > * D
pdata get_Pp(int n, unsigned char shmrank)
static bool compare_workstack(const workstack_data &a, const workstack_data &b)
int * get_nextnodep(unsigned char shmrank)
long long sum_NumForeignNodes
void tree_fetch_foreign_nodes(enum ftype fetch_type)
void prepare_shared_memory_access(void)
foreign_sphpoint_data * Foreign_Points
fetch_data * StackToFetch
int AllocWorkStackBaseHigh
ngbnode * get_nodep(int no)
void tree_add_to_fetch_stack(ngbnode *nop, int nodetoopen, unsigned char shmrank)
void tree_add_to_work_stack(int target, int no, unsigned char shmrank, int mintopleafnode)
void tree_initialize_leaf_node_access_info(void)
int AllocWorkStackBaseLow
double mycxxsort(T *begin, T *end, Tcomp comp)
#define LEVEL_ALWAYS_OPEN
#define TREE_MIN_WORKSTACK_SIZE
#define NODE_TYPE_FETCHED_NODE
#define TREE_EXPECTED_CYCLES
#define NODE_TYPE_FETCHED_PARTICLE
#define NODE_TYPE_LOCAL_NODE
#define NODE_TYPE_LOCAL_PARTICLE
#define COMPUTE_WK_AND_DWK
#define TIMER_START(counter)
Starts the timer counter.
#define TIMER_STOP(counter)
Stops the timer counter.
#define TIMER_STORE
Copies the current value of CPU times to a stored variable, such that differences with respect to thi...
#define TIMER_DIFF(counter)
Returns amount elapsed for the timer since last save with TIMER_STORE.
#define TIMER_STOPSTART(stop, start)
Stops the timer 'stop' and starts the timer 'start'.
expr pow(half base, half exp)
long long GlobalNActiveParticles
unsigned char nextnode_shmrank
std::atomic< unsigned char > cannot_be_opened_locally
vector< MyIntPosType > center
unsigned char sibling_shmrank
unsigned char Nextnode_shmrank
sph_particle_data_hydrocore SphCore
double cf_atime2_hubble_a
int ComovingIntegrationOn
double MaxNumNgbDeviation
std::atomic< integertime > Ti_Current
MySignedIntPosType center_offset_max[3]
MySignedIntPosType center_offset_min[3]
void drift_node(integertime time1, simparticles *Sp)
void setSofteningClass(unsigned char softclass)
integertime get_Ti_Current(void)
unsigned char getTimeBinHydro(void)
unsigned char getType(void)
MyFloat DhsmlDensityFactor
void set_thermodynamic_variables(void)
void myflush(FILE *fstream)
#define TREE_NUM_BEFORE_NODESPLIT