Peano
Loading...
Searching...
No Matches
hydro_iact.h File Reference
Include dependency graph for hydro_iact.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 __attribute__ ((always_inline)) INLINE static void runner_iact_density(const float r2
 Density interaction between two particles.
 
 kernel_deval (ui, &wi, &wi_dx)
 
 adaptive_softening_add_correction_term (pi, ui, hi_inv, mj)
 
 kernel_deval (uj, &wj, &wj_dx)
 
 adaptive_softening_add_correction_term (pj, uj, hj_inv, mi)
 
 adaptive_softening_add_correction_term (pi, ui, h_inv, mj)
 

Variables

const float dx [3]
 
const float const float hi
 
const float const float const float hj
 
const float const float const float struct part *restrict pi
 
const float const float const float struct part *restrict struct part *restrict pj
 
const float const float const float struct part *restrict struct part *restrict const float a
 
const float const float const float struct part *restrict struct part *restrict const float const float H
 
const float r = sqrtf(r2)
 
const float r_inv = r ? 1.0f / r : 0.0f
 
const float mi = pi->mass
 
const float mj = pj->mass
 
const float hi_inv = 1.f / hi
 
const float ui = r * hi_inv
 
pi rho = mj * wi
 
pi density rho_dh = mj * (hydro_dimension * wi + ui * wi_dx)
 
pi density wcount = wi
 
pi density wcount_dh = (hydro_dimension * wi + ui * wi_dx)
 
const float hj_inv = 1.f / hj
 
const float uj = r * hj_inv
 
float dv [3] = pi->v[0] - pj->v[0]
 
float curlvr [3] = dv[1] * dx[2] - dv[2] * dx[1]
 
const float faci = mj * wi_dx * r_inv
 
const float facj = mi * wj_dx * r_inv
 
const float dvdr = dv[0] * dx[0] + dv[1] * dx[1] + dv[2] * dx[2]
 
pi density div_v = faci * dvdr
 
pi density rot_v [0] = faci * curlvr[0]
 
const float h_inv = 1.f / hi
 

Function Documentation

◆ __attribute__()

__attribute__ ( (always_inline) ) const

Density interaction between two particles.

Calculate the gradient interaction between particle i and particle j.

Density interaction between two particles (non-symmetric).

Parameters
r2Comoving square distance between the two particles.
dxComoving vector separating both particles (pi - pj).
hiComoving smoothing-length of particle i.
hjComoving smoothing-length of particle j.
piFirst particle.
pjSecond particle.
aCurrent scale factor.
HCurrent Hubble parameter.
r2Comoving square distance between the two particles.
dxComoving vector separating both particles (pi - pj).
hiComoving smoothing-length of particle i.
hjComoving smoothing-length of particle j.
piFirst particle.
pjSecond particle (not updated).
aCurrent scale factor.
HCurrent Hubble parameter.

Nothing to do here in this scheme.

Parameters
r2Comoving squared distance between particle i and particle j.
dxComoving distance vector between the particles (dx = pi->x - pj->x).
hiComoving smoothing-length of particle i.
hjComoving smoothing-length of particle j.
piParticle i.
pjParticle j.
aCurrent scale factor.
HCurrent Hubble parameter.

◆ adaptive_softening_add_correction_term() [1/3]

adaptive_softening_add_correction_term ( pi ,
ui ,
h_inv ,
mj  )

◆ adaptive_softening_add_correction_term() [2/3]

adaptive_softening_add_correction_term ( pi ,
ui ,
hi_inv ,
mj  )

◆ adaptive_softening_add_correction_term() [3/3]

adaptive_softening_add_correction_term ( pj ,
uj ,
hj_inv ,
mi  )

◆ kernel_deval() [1/2]

kernel_deval ( ui ,
& wi,
& wi_dx )

◆ kernel_deval() [2/2]

kernel_deval ( uj ,
& wj,
& wj_dx )

Variable Documentation

◆ a

const float const float const float struct part *restrict struct part *restrict const float a

◆ curlvr

float curlvr = dv[1] * dx[2] - dv[2] * dx[1]

Definition at line 98 of file hydro_iact.h.

Referenced by swift2::kernels::legacy::density_kernel().

◆ div_v

pi density div_v = faci * dvdr

Definition at line 108 of file hydro_iact.h.

◆ dv

◆ dvdr

const float dvdr = dv[0] * dx[0] + dv[1] * dx[1] + dv[2] * dx[2]

◆ dx

const float dx

Definition at line 54 of file hydro_iact.h.

Referenced by ExaSeis::Derivatives< Shortcuts, num_nodes >::computeDerivatives_x_3D(), swift2::kernels::legacy::density_kernel(), swift2::kernels::legacy::densityKernelPairEvaluationPredicate(), do_density(), do_density(), Refinement::RefineDownToPosition< Shortcuts >::eval(), Refinement::RefinePosition< Shortcuts >::eval(), Refinement::RefineFilterCube< Shortcuts >::eval(), Refinement::RefineBetweenPositions< Shortcuts >::eval(), swift2::kernels::legacy::force_kernel(), swift2::kernels::legacy::forceKernelWithMasking(), ContextCurvilinear< Shortcuts, basisSize >::getElementSize(), ContextCartesian< Shortcuts, basisSize >::initUnknownsPatch(), ContextCurvilinear< Shortcuts, basisSize >::initUnknownsPatch(), ContextDiffuse< Shortcuts, basisSize >::initUnknownsPatch(), main(), ExaSeis::Derivatives< Shortcuts, num_nodes >::metricDerivatives(), applications::exahype2::ccz4::internal::recomputeAuxiliaryVariablesFD4_centralDifferences_LoopBody(), applications::exahype2::ccz4::internal::recomputeAuxiliaryVariablesFD4_leftDifferences_LoopBody(), applications::exahype2::ccz4::internal::recomputeAuxiliaryVariablesFD4_rightDifferences_LoopBody(), toolbox::particles::assignmentchecks::tests::TestHelpers::testAddingParticleMovingEvents(), toolbox::particles::assignmentchecks::tests::TestHelpers::testParticleWalk(), toolbox::particles::assignmentchecks::tests::TestHelpers::testParticleWalkSameTreeLevel(), toolbox::particles::assignmentchecks::tests::TestHelpers::testPeriodicBoundaryConditions(), toolbox::particles::assignmentchecks::tests::TestHelpers::testSieveSet(), and applications::exahype2::swe::TopologyParser::transformIndexCDFRangeToArray().

◆ faci

const float faci = mj * wi_dx * r_inv

Definition at line 100 of file hydro_iact.h.

◆ facj

const float facj = mi * wj_dx * r_inv

Definition at line 101 of file hydro_iact.h.

◆ H

const float const float const float struct part *restrict const struct part *restrict const float const float H
Initial value:
{
float wi, wj, wi_dx, wj_dx

Definition at line 56 of file hydro_iact.h.

Referenced by applications::exahype2::ccz4::diagonal_gaugeWave(), do_density(), and do_density().

◆ h_inv

◆ hi

◆ hi_inv

const float hi_inv = 1.f / hi

Definition at line 76 of file hydro_iact.h.

◆ hj

const float const float const float hj

Definition at line 54 of file hydro_iact.h.

Referenced by do_density(), and do_density().

◆ hj_inv

const float hj_inv = 1.f / hj

Definition at line 87 of file hydro_iact.h.

◆ mi

const float mi = pi->mass

Definition at line 72 of file hydro_iact.h.

◆ mj

const float mj = pj->mass

Definition at line 73 of file hydro_iact.h.

Referenced by swift2::kernels::legacy::density_kernel().

◆ pi

const float const float const float struct part* restrict pi

Definition at line 55 of file hydro_iact.h.

◆ pj

const float const float const float struct part *restrict struct part *restrict pj

Definition at line 55 of file hydro_iact.h.

Referenced by do_density(), and do_density().

◆ r

◆ r_inv

◆ rho

◆ rho_dh

pi density rho_dh = mj * (hydro_dimension * wi + ui * wi_dx)

Definition at line 81 of file hydro_iact.h.

◆ rot_v

pi density rot_v = faci * curlvr[0]

Definition at line 116 of file hydro_iact.h.

◆ ui

const float ui = r * hi_inv

Definition at line 77 of file hydro_iact.h.

◆ uj

const float uj = r * hj_inv

Definition at line 88 of file hydro_iact.h.

◆ wcount

pi density wcount = wi

◆ wcount_dh

pi density wcount_dh = (hydro_dimension * wi + ui * wi_dx)

Definition at line 83 of file hydro_iact.h.