Introduce ComputeChunk class with shared functionality of all /chunk computes

This commit is contained in:
Axel Kohlmeyer
2023-03-18 05:55:03 -04:00
parent fce1f8e0af
commit 1ccb0f8d8d
29 changed files with 958 additions and 2050 deletions

View File

@ -20,39 +20,26 @@ ComputeStyle(vcm/chunk,ComputeVCMChunk);
#ifndef LMP_COMPUTE_VCM_CHUNK_H
#define LMP_COMPUTE_VCM_CHUNK_H
#include "compute.h"
#include "compute_chunk.h"
namespace LAMMPS_NS {
class ComputeVCMChunk : public Compute {
class ComputeVCMChunk : public ComputeChunk {
public:
ComputeVCMChunk(class LAMMPS *, int, char **);
~ComputeVCMChunk() override;
void init() override;
void setup() override;
void compute_array() override;
void lock_enable() override;
void lock_disable() override;
int lock_length() override;
void lock(class Fix *, bigint, bigint) override;
void unlock(class Fix *) override;
double memory_usage() override;
private:
int nchunk, maxchunk;
int firstflag, massneed;
char *idchunk;
class ComputeChunkAtom *cchunk;
double *massproc, *masstotal;
double **vcm, **vcmall;
void allocate();
void allocate() override;
};
} // namespace LAMMPS_NS
#endif
#endif