Revision d334fbbb65c972b40e6431562405f85416011757 authored by Tom Quinn on 30 January 2016, 05:07:15 UTC, committed by Tom Quinn on 30 January 2016, 05:07:15 UTC
Change-Id: Iabe4025b68f4b9355e20d71ac6bce1e72af28b65
1 parent e572b13
Raw File
smoothparams.h
#ifndef __SMOOTHPARAMS_H
#define __SMOOTHPARAMS_H
class pqSmoothNode;

/// @brief A base class from which parameters for all smooth
/// operations can be derived.
class SmoothParams : public PUP::able
{
 public:
    int iType;	// Particle type to smooth over;  "TreeActive"
    int activeRung;
    int bUseBallMax;	// limit fBall growth
    /// Function to apply to smooth particle and neighbors
    virtual void fcnSmooth(GravityParticle *p, int nSmooth, pqSmoothNode *nList) = 0;
    /// Particle is doing a neighbor search
    virtual int isSmoothActive(GravityParticle *p) = 0;
    /// initialize particles to be smoothed
    virtual void initSmoothParticle(GravityParticle *p) = 0;
    /// initialize particles in tree but not smoothed
    virtual void initTreeParticle(GravityParticle *p) = 0;
    /// calculation on all tree particles after all walks are done
    virtual void postTreeParticle(GravityParticle *p) = 0;
    /// initialize particles as they come into the cache
    virtual void initSmoothCache(GravityParticle *p) = 0;
    /// combine cache copy with home particle
    virtual void combSmoothCache(GravityParticle *p1,
				 ExternalSmoothParticle *p2) = 0;
    // limit ball growth by default
    SmoothParams() { bUseBallMax = 1; }
    PUPable_abstract(SmoothParams);
    SmoothParams(CkMigrateMessage *m) : PUP::able(m) {}
    /// required method for remote entry call.
    virtual void pup(PUP::er &p) {
        PUP::able::pup(p);//Call base class
        p|iType;
        p|activeRung;
	p|bUseBallMax;
	}
    };
#endif
back to top