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,38 +20,25 @@ ComputeStyle(inertia/chunk,ComputeInertiaChunk);
#ifndef LMP_COMPUTE_INERTIA_CHUNK_H
#define LMP_COMPUTE_INERTIA_CHUNK_H
#include "compute.h"
#include "compute_chunk.h"
namespace LAMMPS_NS {
class ComputeInertiaChunk : public Compute {
class ComputeInertiaChunk : public ComputeChunk {
public:
ComputeInertiaChunk(class LAMMPS *, int, char **);
~ComputeInertiaChunk() override;
void init() 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;
char *idchunk;
class ComputeChunkAtom *cchunk;
double *massproc, *masstotal;
double **com, **comall;
double **inertia, **inertiaall;
void allocate();
void allocate() override;
};
} // namespace LAMMPS_NS
#endif
#endif