Peano 4
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
72 template <typename Particle>
75 Particle& localParticle
76 ) {
77 if (::swift2::kernels::
78 localParticleCanBeUpdatedInVertexKernel(marker, localParticle)) {
81 localParticle.getSearchRadius() <= tarch::la::min(marker.h()),
82 marker.toString(),
83 localParticle.toString()
84 );
86 localParticle.getSmoothingLength() <= localParticle.getSearchRadius(
87 ),
88 marker.toString(),
89 localParticle.toString()
90 );
91 }
92 }
93
99 template <typename Particle>
102 Particle& localParticle
103 ) {
104 updateSmoothingLengthAndRerunIfRequired(marker, localParticle);
105 }
106
110 template <typename Particle>
113 Particle& particle
114 ) {
115 if (::swift2::kernels::
116 localParticleCanBeUpdatedInVertexKernel(marker, particle)) {
117 particle.setSmoothingLengthConverged(false);
118 particle.setSmoothingLengthIterCount(0);
119 }
120 }
121
127 template <typename Particle>
130 Particle& particle
131 ) {
132 resetSmoothingLengthIterationCounter(marker, particle);
133 }
134
135
136 } // namespace legacy
137 } // namespace kernels
138} // namespace swift2
139
140
141#include "SmoothingLength.cpph"
#define assertion2(expr, param0, param1)
This file is part of the ExaHyPE project.
void resetSmoothingLengthIterationCounterWithMasking(const peano4::datamanagement::VertexMarker &marker, Particle &particle)
At this point, we just reset some flags and counters that are only required during a single time step...
void hydro_update_smoothing_length_and_rerun_if_required(Particle *localParticle)
Derive smoothing length from density.
void updateSmoothingLengthAndRerunIfRequired(const peano4::datamanagement::VertexMarker &marker, Particle &localParticle)
void resetSmoothingLengthIterationCounter(const peano4::datamanagement::VertexMarker &marker, Particle &particle)
Reset smoothing length iteration related flags on a particle.
void updateSmoothingLengthAndRerunIfRequiredWithMasking(const peano4::datamanagement::VertexMarker &marker, Particle &localParticle)
bool localParticleCanBeUpdatedInVertexKernel(const peano4::datamanagement::VertexMarker &marker, const Particle &localParticle)
Can we do work on this particle during a vertex kernel sweep stage?
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.