Peano
Loading...
Searching...
No Matches
SmoothingLength.h
Go to the documentation of this file.
1// This file is part of the SWIFT2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
8#include "tarch/Assertions.h"
9
10
11namespace swift2 {
12 namespace kernels {
13 namespace legacy {
61 template <typename Particle>
63 Particle* localParticle
64 );
65
66 template <typename Particle>
69 const Particle& localParticle
70 ) {
71 return ::swift2::kernels::localParticleCanBeUpdatedInVertexKernel(marker, localParticle);
72 }
73
80 template <typename Particle>
83 Particle& localParticle
84 ) {
88 localParticle.getSearchRadius() <= tarch::la::min(marker.h()),
89 marker.toString(),
90 localParticle.toString()
91 );
93 localParticle.getSmoothingLength() <= localParticle.getSearchRadius(
94 ),
95 marker.toString(),
96 localParticle.toString()
97 );
98 }
99
103 template <typename Particle>
106 const Particle& particle
107 ) {
108 return ::swift2::kernels::localParticleCanBeUpdatedInVertexKernel(marker, particle);
109 }
110
111 template <typename Particle>
114 Particle& particle
115 ) {
117 particle.setSmoothingLengthConverged(false);
118 particle.setSmoothingLengthIterCount(0);
119 }
120 } // namespace legacy
121 } // namespace kernels
122} // namespace swift2
123
124
125#include "SmoothingLength.cpph"
#define assertion2(expr, param0, param1)
#define assertion(expr)
Definition idx.h:5
bool resetSmoothingLengthIterationCounterUpdateParticlePredicate(const peano4::datamanagement::VertexMarker &marker, const Particle &particle)
Reset smoothing length iteration related flags on a particle.
void hydro_update_smoothing_length_and_rerun_if_required(Particle *localParticle)
Derive smoothing length from density.
bool updateSmoothingLengthAndRerunIfRequiredUpdateParticlePredicate(const peano4::datamanagement::VertexMarker &marker, const Particle &localParticle)
void updateSmoothingLengthAndRerunIfRequired(const peano4::datamanagement::VertexMarker &marker, Particle &localParticle)
Wrapper around hydro_update_smoothing_length_and_rerun_if_required() with only one argument.
void resetSmoothingLengthIterationCounter(const peano4::datamanagement::VertexMarker &marker, Particle &particle)
This file is part of the SWIFT 2 project.
Scalar min(const Vector< Size, Scalar > &vector)
Returns the element with minimal value (NOT absolute value).
Vertex marker to provide information about selected vertex.