UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
v_base.hh
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2// Modified version of Voro++'s source file
3
4// Voro++, a 3D cell-based Voronoi library
5//
6// Author : Chris H. Rycroft (LBL / UC Berkeley)
7// Email : chr@alum.mit.edu
8// Date : August 30th 2011
9
13#ifndef VOROPP_V_BASE_HH
14#define VOROPP_V_BASE_HH
15
16#include "worklist.hh"
17
18namespace voro {
19
28class voro_base {
29 public:
31 const int nx;
33 const int ny;
35 const int nz;
39 const int nxy;
42 const int nxyz;
44 const double boxx;
46 const double boxy;
48 const double boxz;
50 const double xsp;
52 const double ysp;
54 const double zsp;
58 double *mrad;
60 static const unsigned int wl[wl_seq_length*wl_hgridcu];
61 bool contains_neighbor(const char* format) const;
62 voro_base(int nx_,int ny_,int nz_,double boxx_,double boxy_,double boxz_);
63 voro_base(const voro_base& Other) = delete;
65 voro_base(voro_base&& Other) noexcept : nx(Other.nx), ny(Other.ny), nz(Other.nz), nxy(Other.nxy), nxyz(Other.nxyz), boxx(Other.boxx), boxy(Other.boxy), boxz(Other.boxz),
66 xsp(Other.xsp), ysp(Other.ysp), zsp(Other.zsp), mrad(Other.mrad)
67 {
68 Other.mrad = nullptr;
69 }
70 // Note: Move assignment not implemented due to const members on this class (and it has not been needed yet)
72
73 ~voro_base() {delete [] mrad;}
74 protected:
80 inline int step_int(double a) const {return a<0?int(a)-1:int(a);}
87 inline int step_mod(int a,int b) const {return a>=0?a%b:b-1-(b-1-a)%b;}
94 inline int step_div(int a,int b) const {return a>=0?a/b:-1+(a+1)/b;}
95 private:
96 void compute_minimum(double &minr,double &xlo,double &xhi,double &ylo,double &yhi,double &zlo,double &zhi,int ti,int tj,int tk);
97};
98
99}
100
101#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Class containing data structures common across all particle container classes.
Definition v_base.hh:28
int step_int(double a) const
Definition v_base.hh:80
~voro_base()
Definition v_base.hh:73
voro_base & operator=(voro_base &&Other)=delete
const double ysp
Definition v_base.hh:52
const double boxy
Definition v_base.hh:46
const int nxyz
Definition v_base.hh:42
voro_base(voro_base &&Other) noexcept
Definition v_base.hh:65
bool contains_neighbor(const char *format) const
Definition v_base.cc:103
const int ny
Definition v_base.hh:33
const int nx
Definition v_base.hh:31
voro_base & operator=(const voro_base &Other)=delete
const int nxy
Definition v_base.hh:39
const int nz
Definition v_base.hh:35
double * mrad
Definition v_base.hh:58
static const unsigned int wl[wl_seq_length *wl_hgridcu]
Definition v_base.hh:60
const double zsp
Definition v_base.hh:54
const double boxx
Definition v_base.hh:44
const double xsp
Definition v_base.hh:50
int step_div(int a, int b) const
Definition v_base.hh:94
voro_base(const voro_base &Other)=delete
const double boxz
Definition v_base.hh:48
int step_mod(int a, int b) const
Definition v_base.hh:87
Definition c_loops.cc:15
const int wl_hgridcu
Definition worklist.hh:30
const int wl_seq_length
Definition worklist.hh:32
Header file for setting constants used in the block worklists that are used during cell computation.