7#if defined(FEEDBACKDIFFLIMIT) && !defined(DIFFUSIONHARMONIC)
8#define DIFFUSIONHARMONIC
15class DenDvDxSmoothParams :
public SmoothParams
20 int bConstantDiffusion;
37 DenDvDxSmoothParams() {}
48 int _bActiveOnly,
int _bConstantDiffusion,
49 int _bStarting,
int _bHaveAlpha,
double _dAlphaMax) {
52 bActiveOnly = _bActiveOnly;
53 bConstantDiffusion = _bConstantDiffusion;
59 H = csmTime2Hub(csm,dTime);
60 a = csmTime2Exp(csm,dTime);
69 virtual void pup(PUP::er &p) {
90class DenDvDxNeighborSmParams :
public DenDvDxSmoothParams
100 DenDvDxNeighborSmParams() {}
111 : DenDvDxSmoothParams(_iType, am, csm, dTime, 0, bConstDiffusion,
115 virtual void pup(PUP::er &p) {
123class MarkSmoothParams :
public SmoothParams
135 MarkSmoothParams() {}
144 virtual void pup(PUP::er &p) {
150class PressureSmoothParams :
public SmoothParams
155 double dThermalDiffusionCoeff;
156 double dMetalDiffusionCoeff;
158 double dtFacDiffusion;
170 PressureSmoothParams() {}
178 double _alpha,
double _beta,
179 double _dThermalDiff,
double _dMetalDiff,
180 double dEtaCourant,
double dEtaDiffusion) {
185 H = csmTime2Hub(csm,dTime);
186 a = csmTime2Exp(csm,dTime);
194 dThermalDiffusionCoeff = _dThermalDiff;
195 dMetalDiffusionCoeff = _dMetalDiff;
196 dtFacCourant = dEtaCourant*a*2.0/1.6;
197 dtFacDiffusion = 2.0*dEtaDiffusion;
201 virtual void pup(PUP::er &p) {
208 p|dThermalDiffusionCoeff;
209 p|dMetalDiffusionCoeff;
219class DistDeletedGasSmoothParams :
public SmoothParams
231 DistDeletedGasSmoothParams() {}
241 virtual void pup(PUP::er &p) {
258 double dErgPerGmUnit;
260 double dDeltaStarForm;
262 virtual void fcnSmooth(GravityParticle *p,
int nSmooth,
263 pqSmoothNode *nList);
270 ExternalSmoothParticle *p2) ;
272 PromoteToHotGasSmoothParams() {}
281 PromoteToHotGasSmoothParams(
int _iType,
int am,
double _dEvapCoeff,
double _dEvapMinTemp,
282 double _dErgPerGmUnit,
double _dGmPerCcUnit,
double _dDeltaStarForm,
double _dTime) {
286 dEvapCoeff = _dEvapCoeff;
287 dEvapMinTemp = _dEvapMinTemp;
288 dErgPerGmUnit = _dErgPerGmUnit;
289 dGmPerCcUnit = _dGmPerCcUnit;
290 dDeltaStarForm = _dDeltaStarForm;
293 PUPable_decl(PromoteToHotGasSmoothParams);
294 PromoteToHotGasSmoothParams(CkMigrateMessage *m) : SmoothParams(m) {}
295 virtual void pup(PUP::er &p) {
315 double dErgPerGmUnit;
317 virtual void fcnSmooth(GravityParticle *p,
int nSmooth,
318 pqSmoothNode *nList);
325 ExternalSmoothParticle *p2) ;
327 ShareWithHotGasSmoothParams() {}
333 ShareWithHotGasSmoothParams(
int _iType,
int am,
double _dEvapMinTemp,
334 double _dErgPerGmUnit,
double _dGmPerCcUnit ){
338 dEvapMinTemp = _dEvapMinTemp;
339 dErgPerGmUnit = _dErgPerGmUnit;
340 dGmPerCcUnit = _dGmPerCcUnit;
342 PUPable_decl(ShareWithHotGasSmoothParams);
343 ShareWithHotGasSmoothParams(CkMigrateMessage *m) : SmoothParams(m) {}
344 virtual void pup(PUP::er &p) {
Get density and velocity derivatives of "Neighbor ofActive" particles.
Definition Sph.h:91
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition Sph.h:115
DenDvDxNeighborSmParams(int _iType, int am, CSM csm, double dTime, int bConstDiffusion, double dAlphaMax)
Definition Sph.h:109
Parameters and functions for the first SPH smooth: density and velocity derivatives.
Definition Sph.h:16
int bHaveAlpha
Alpha has been read in.
Definition Sph.h:25
int bStarting
Definition Sph.h:23
virtual void initTreeParticle(GravityParticle *p)
initialize particles in tree but not smoothed
Definition Sph.cpp:1079
virtual void initSmoothParticle(GravityParticle *p)
initialize particles to be smoothed
Definition Sph.cpp:1074
DenDvDxSmoothParams(int _iType, int am, CSM csm, double _dTime, int _bActiveOnly, int _bConstantDiffusion, int _bStarting, int _bHaveAlpha, double _dAlphaMax)
Definition Sph.h:47
double dAlphaMax
Maximum SPH alpha.
Definition Sph.h:22
virtual void combSmoothCache(GravityParticle *p1, ExternalSmoothParticle *p2)
combine cache copy with home particle
Definition Sph.cpp:1098
virtual void initSmoothCache(GravityParticle *p)
initialize particles as they come into the cache
Definition Sph.cpp:1094
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition Sph.h:69
virtual void postTreeParticle(GravityParticle *p)
calculation on all tree particles after all walks are done
Definition Sph.cpp:1085
virtual void fcnSmooth(GravityParticle *p, int nSmooth, pqSmoothNode *nList)
Function to apply to smooth particle and neighbors.
Definition Sph.cpp:1105
virtual int isSmoothActive(GravityParticle *p)
Particle is doing a neighbor search.
Definition Sph.cpp:1039
SmoothParams class for distributing deleted gas to neighboring particles.
Definition Sph.h:220
DistDeletedGasSmoothParams(int _iType, int am)
Definition Sph.h:234
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition Sph.h:241
Class for cross processor data needed for smooth operations.
Definition GravityParticle.h:649
Fundamental type for a particle.
Definition GravityParticle.h:364
Parameters for "Mark Smooth", used to find inverse nearest neighbors.
Definition Sph.h:124
MarkSmoothParams(int _iType, int am)
Definition Sph.h:138
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition Sph.h:144
Second pass in SPH: calculate pressure forces.
Definition Sph.h:151
PressureSmoothParams(int _iType, int am, CSM csm, double _dTime, double _alpha, double _beta, double _dThermalDiff, double _dMetalDiff, double dEtaCourant, double dEtaDiffusion)
Definition Sph.h:177
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition Sph.h:201
A base class from which parameters for all smooth operations can be derived.
Definition smoothparams.h:9
virtual int isSmoothActive(GravityParticle *p)=0
Particle is doing a neighbor search.
int iType
Particle type to smooth over; "TreeActive".
Definition smoothparams.h:11
virtual void initTreeParticle(GravityParticle *p)=0
initialize particles in tree but not smoothed
virtual void pup(PUP::er &p)
required method for remote entry call.
Definition smoothparams.h:45
virtual void postTreeParticle(GravityParticle *p)=0
calculation on all tree particles after all walks are done
virtual void combSmoothCache(GravityParticle *p1, ExternalSmoothParticle *p2)=0
combine cache copy with home particle
virtual void fcnSmooth(GravityParticle *p, int nSmooth, pqSmoothNode *nList)=0
Function to apply to smooth particle and neighbors.
virtual void initSmoothCache(GravityParticle *p)=0
initialize particles as they come into the cache
int activeRung
Currently active rung.
Definition smoothparams.h:12
int bUseBallMax
Definition smoothparams.h:14
virtual void initSmoothParticle(GravityParticle *p)=0
initialize particles to be smoothed
Object for priority queue entry.
Definition smooth.h:13