/usr/include/liggghts/region.h is in libliggghts-dev 2.3.8-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | /* ----------------------------------------------------------------------
LIGGGHTS - LAMMPS Improved for General Granular and Granular Heat
Transfer Simulations
LIGGGHTS is part of the CFDEMproject
www.liggghts.com | www.cfdem.com
This file was modified with respect to the release in LAMMPS
Modifications are Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level directory.
------------------------------------------------------------------------- */
#ifndef LMP_REGION_H
#define LMP_REGION_H
#include "pointers.h"
namespace LAMMPS_NS {
class Region : protected Pointers {
public:
char *id,*style;
int interior; // 1 for interior, 0 for exterior
int scaleflag; // 1 for lattice, 0 for box
double xscale,yscale,zscale; // scale factors for box/lattice units
double extent_xlo,extent_xhi; // bounding box on region
double extent_ylo,extent_yhi;
double extent_zlo,extent_zhi;
int bboxflag; // 1 if bounding box is computable
// contact = particle near region surface
struct Contact {
double r; // distance between particle & surf, r > 0.0
double delx,dely,delz; // vector from surface pt to particle
};
Contact *contact; // list of contacts
int cmax; // max # of contacts possible with region
Region(class LAMMPS *, int, char **);
virtual ~Region();
void init();
virtual int dynamic_check();
int match(double, double, double);
int surface(double, double, double, double);
// reset random gen - is called out of restart by fix that uses region
void reset_random(int);
inline void rand_bounds(bool subdomain_flag, double *lo, double *hi);
// generates a random point within the region
virtual void generate_random(double *,bool subdomain_flag);
// generate a point inside region OR within a minimum distance from surface
virtual void generate_random_expandby_cut(double *,double,bool subdomain_flag);
// generate a point inside region AND further away from surface than cut
virtual void generate_random_shrinkby_cut(double *,double,bool subdomain_flag);
// inside region AND within a minimum distance from surface
int match_cut(double *,double);
// inside region OR within a minimum distance from surface
int match_expandby_cut(double *,double);
// inside region OR within a minimum distance from surface
int match_shrinkby_cut(double *,double);
// volume calculation based on MC
virtual void volume_mc(int n_test,bool cutflag,double cut,double &vol_global,double &vol_local);
// flag if region bbox extends outside simulation domain
virtual int bbox_extends_outside_box();
virtual int inside(double, double, double) = 0;
virtual int surface_interior(double *, double) = 0;
virtual int surface_exterior(double *, double) = 0;
protected:
void add_contact(int, double *, double, double, double);
void options(int, char **);
int seed;
class RanPark *random;
private:
int dynamic; // 1 if region changes over time
int moveflag,rotateflag;
double point[3],axis[3],runit[3];
char *xstr,*ystr,*zstr,*tstr;
int xvar,yvar,zvar,tvar;
double dx,dy,dz,theta;
bigint laststep;
void forward_transform(double &, double &, double &);
void inverse_transform(double &, double &, double &);
void rotate(double &, double &, double &, double);
};
}
#endif
/* ERROR/WARNING messages:
E: Variable name for region does not exist
Self-explanatory.
E: Variable for region is invalid style
Only equal-style variables can be used.
E: Variable for region is not equal style
Self-explanatory.
E: Illegal ... command
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Region union or intersect cannot be dynamic
The sub-regions can be dynamic, but not the combined region.
E: Use of region with undefined lattice
If scale = lattice (the default) for the region command, then a
lattice must first be defined via the lattice command.
E: Region cannot have 0 length rotation vector
Self-explanatory.
*/
|