Peano
Loading...
Searching...
No Matches
adaptive_softening_iact.h File Reference
#include <config.h>
#include "adaptive_softening_struct.h"
#include "inline.h"
#include "kernel_hydro.h"
Include dependency graph for adaptive_softening_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 adaptive_softening_add_correction_term(struct part *pi
 Computes the contribution to the softening length change term.
 

Variables

const float ui = r * h_inv
 
const float const float hi_inv
 

Function Documentation

◆ __attribute__()

__attribute__ ( (always_inline) )

Computes the contribution to the softening length change term.

Computes the kernel function derivative.

Computes the kernel function in double precision.

Computes the kernel function.

Calculate the gradient interaction between particle i and particle j.

Density interaction between two particles (non-symmetric).

Update the value of the viscosity alpha for the scheme.

Correct the signal velocity of the particle partaking in supernova (kinetic) feedback based on the velocity kick the particle receives.

Sets the drifted physical internal energy of a particle.

Sets the physical internal energy of a particle.

Sets the physical entropy of a particle.

Sets the time derivative of the co-moving internal energy of a particle.

Returns the time derivative of internal energy of a particle.

Returns the time derivative of co-moving internal energy of a particle.

Sets the mass of a particle.

Returns the mass of a particle.

Returns the comoving density of a particle.

Returns the physical sound speed of a particle.

Returns the comoving sound speed of a particle.

Returns the physical entropy of a particle drifted to the current time.

Returns the comoving entropy of a particle drifted to the current time.

Returns the physical entropy of a particle at the last time the particle was kicked.

Returns the comoving entropy of a particle at the last time the particle was kicked.

Returns the physical pressure of a particle.

Returns the comoving pressure of a particle.

Returns the physical internal energy of a particle drifted to the current time.

Returns the comoving internal energy of a particle drifted to the current time.

Returns the physical internal energy of a particle at the last time the particle was kicked.

Get the radius of a dimension sphere with the given volume.

Inverts the given dimension by dimension matrix (in place)

Returns the argument to the power given by the dimension minus one.

Returns the argument to the power given by the dimension plus one.

Returns the argument to the power given by the inverse of the dimension.

No adaptive softening --> Nothing to do.

Parameters
piThe part for which we compute terms.
uiThe ratio of the inter-particle distance to the smoothing length.
hi_invThe inverse the particle's smoothing length.
mjThe mass of the other particle.

Computes \(x^{1/d}\).

Computes \(x^{d+1}\).

Computes \(x^{d-1}\).

Parameters
AA 3x3 matrix of which we want to invert the top left dxd part
Returns
Exit code: 0 for success, 1 if a singular matrix was detected.
Parameters
volumeVolume of the dimension sphere
Returns
Radius of the dimension sphere
Parameters
pThe particle of interest.
xpThe extended data of the particle of interest.
cosmoThe cosmological model.
pThe particle of interest
pThe particle of interest.
cosmoThe cosmological model.

Computes the pressure based on the particle's properties.

Parameters
pThe particle of interest

Computes the pressure based on the particle's properties and convert it to physical coordinates.

Parameters
pThe particle of interest
cosmoThe cosmological model.
pThe particle of interest.
xpThe extended data of the particle of interest.
pThe particle of interest.
pThe particle of interest
cosmoThe cosmological model.
pThe particle of interest
mThe mass to set.

We assume a constant density.

Parameters
pThe particle of interest

We assume a constant density.

Parameters
pThe particle of interest
cosmoCosmology data structure

We assume a constant density for the conversion to entropy.

Parameters
pThe particle of interest.
du_dtThe new time derivative of the internal energy.

We assume a constant density.

Parameters
pThe particle of interest.
cosmoCosmology data structure
du_dtThe new time derivative of the internal energy.
pThe particle of interest.
xpThe extended particle data.
cosmoCosmology data structure
entropyThe physical entropy
pThe particle of interest.
xpThe extended particle data.
cosmoCosmology data structure
uThe physical internal energy
pThe particle of interest.
cosmoCosmology data structure
uThe physical internal energy
pThe particle of interest.
cosmoCosmology data structure
dv_physThe velocity kick received by the particle expressed in physical units (note that dv_phys must be positive or equal to zero)
pthe particle of interest
alphathe new value for the viscosity coefficient.
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.

The kernel function needs to be mutliplied by \(h^{-d}\), where \(d\) is the dimensionality of the problem.

Returns 0 if \(u > \gamma = H/h\)

Parameters
uThe ratio of the distance to the smoothing length \(u = x/h\).
W(return) The value of the kernel function \(W(x,h)\).

Required for computing the projected kernel because rounding error causes problems for the GSL integration function if we evaluate in single precision.

The kernel function needs to be mutliplied by \(h^{-d}\), where \(d\) is the dimensionality of the problem.

Returns 0 if \(u > \gamma = H/h\)

Parameters
uThe ratio of the distance to the smoothing length \(u = x/h\).
W(return) The value of the kernel function \(W(x,h)\).

The kernel function needs to be mutliplied by \(h^{-d}\) and the gradient by \(h^{-(d+1)}\), where \(d\) is the dimensionality of the problem.

Returns 0 if \(u > \gamma = H/h\).

Parameters
uThe ratio of the distance to the smoothing length \(u = x/h\).
dW_dx(return) The norm of the gradient of \(|\nabla W(x,h)|\).

Definition at line 98 of file dimension.h.

Variable Documentation

◆ hi_inv

const float const float hi_inv

Definition at line 101 of file adaptive_softening_iact.h.

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

◆ ui

const float ui = r * h_inv

Definition at line 100 of file adaptive_softening_iact.h.