/usr/include/liggghts/fix_multicontact_halfspace.h is in libliggghts-dev 3.7.0+repack1-1.
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 | /* ----------------------------------------------------------------------
This is the
██╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗████████╗███████╗
██║ ██║██╔════╝ ██╔════╝ ██╔════╝ ██║ ██║╚══██╔══╝██╔════╝
██║ ██║██║ ███╗██║ ███╗██║ ███╗███████║ ██║ ███████╗
██║ ██║██║ ██║██║ ██║██║ ██║██╔══██║ ██║ ╚════██║
███████╗██║╚██████╔╝╚██████╔╝╚██████╔╝██║ ██║ ██║ ███████║
╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝®
DEM simulation engine, released by
DCS Computing Gmbh, Linz, Austria
http://www.dcs-computing.com, office@dcs-computing.com
LIGGGHTS® is part of CFDEM®project:
http://www.liggghts.com | http://www.cfdem.com
Core developer and main author:
Christoph Kloss, christoph.kloss@dcs-computing.com
LIGGGHTS® is open-source, distributed under the terms of the GNU Public
License, version 2 or later. It is distributed in the hope that it will
be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have
received a copy of the GNU General Public License along with LIGGGHTS®.
If not, see http://www.gnu.org/licenses . See also top-level README
and LICENSE files.
LIGGGHTS® and CFDEM® are registered trade marks of DCS Computing GmbH,
the producer of the LIGGGHTS® software and the CFDEM®coupling software
See http://www.cfdem.com/terms-trademark-policy for details.
-------------------------------------------------------------------------
Contributing author and copyright for this file:
Arno Mayrhofer (CFDEMresearch GmbH, Linz)
Copyright 2016- CFDEMresearch GmbH, Linz
------------------------------------------------------------------------- */
/*
* Multi contact model according to Brodu et al.: Multiple-contact discrete-element model for
* simulating dense granular media. Phys. Rev. E, 2016
*/
#ifdef FIX_CLASS
FixStyle(multicontact/halfspace,FixMultiContactHalfSpace)
#else
#ifndef LMP_FIX_MULTICONTACT_HALFSPACE_H
#define LMP_FIX_MULTICONTACT_HALFSPACE_H
#include "fix.h"
#include "fix_contact_property_atom.h"
namespace LAMMPS_NS {
// The HistoryData class contains:
// 1.) char: either "p", "m", "w" for pair, mesh, wall primitive, respectively
// 2.) void*: pointer to the history fix or the property/atom fix for wall primitives
// 3.) int: offset of the sumDelta history
class HistoryData {
private:
char type;
void *fix_ptr;
int offset;
public:
HistoryData(const char c, void* const ptr, const int i) :
type(c),
fix_ptr(ptr),
offset(i)
{ }
const char get_type()
{ return type; }
void* const get_ptr()
{ return fix_ptr; }
const int get_offset()
{ return offset; }
const int get_npartners(const int i);
double * const get_data_ptr(const int i, const int j);
void compute_surfPos(const int i, const int jj, const double * const* x, const double * const data_ptr, double * const surfPos_ij, double * const surfPos_ji, const double F_eps);
double get_fn(const double * const data_ptr);
void save_contact_property_atom(const int i, const int jj, const int * const tag, const double * const surfPos_ij, const double * const surfPos_ji, FixContactPropertyAtom *cpa);
};
class FixMultiContactHalfSpace : public Fix {
public:
FixMultiContactHalfSpace(class LAMMPS *, int, char **);
~FixMultiContactHalfSpace();
void post_create();
int setmask();
void init();
void setup_pre_force(int);
void pre_force(int);
private:
// pointers to classes holding the data
class PairGranProxy *pairgran_;
// model properties
double geometric_prefactor;
// Youngs modulus and poisson ratio
const double *Y, *nu;
// lists of all offsets for the contact history
// the HistoryData class contains:
// 1.) char: either "p", "m", "w" for pair, mesh, wall primitive, respectively
// 2.) void*: pointer to the history
// 3.) int: offset of the sumDelta history
std::vector<HistoryData> history_vector;
// list of all fixes that contain contact property atom (wall) fixes
std::vector<FixContactPropertyAtom*> contact_property_atom_vector;
};
}
#endif
#endif
|