/usr/include/liggghts/fix_wall_gran.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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | /* ----------------------------------------------------------------------
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:
Christoph Kloss (DCS Computing GmbH, Linz)
Christoph Kloss (JKU Linz)
Richard Berger (JKU Linz)
Arno Mayrhofer (CFDEMresearch GmbH, Linz)
Copyright 2012- DCS Computing GmbH, Linz
Copyright 2009-2012 JKU Linz
Copyright 2016- CFDEMresearch GmbH, Linz
------------------------------------------------------------------------- */
#ifdef FIX_CLASS
FixStyle(wall/gran,FixWallGran)
#else
#ifndef LMP_FIX_WALL_GRAN_H
#define LMP_FIX_WALL_GRAN_H
#include "fix_mesh_surface.h"
#include "contact_interface.h"
#include "granular_wall.h"
#include <string>
#include <vector>
#include "fix_contact_property_atom_wall.h"
#include "compute_pair_gran_local.h"
namespace LCM = LIGGGHTS::ContactModels;
namespace LAMMPS_NS {
class FixWallGran : public Fix, public LIGGGHTS::IContactHistorySetup {
friend class LIGGGHTS::Walls::IGranularWall;
public:
FixWallGran(class LAMMPS *, int, char **);
~FixWallGran();
/* INHERITED FROM Fix */
virtual int setmask();
virtual void post_create();
virtual void pre_delete(bool unfixflag);
virtual void init();
virtual void setup(int vflag);
virtual void post_force(int vflag);
virtual void post_force_pgl();
virtual void post_force_respa(int, int, int);
virtual int min_type();
virtual int max_type();
/* PUBLIC ACCESS FUNCTIONS */
virtual void createMulticontactData();
void setDnum(int newDnum)
{ dnum_ = newDnum; }
inline int store_force() const
{ return store_force_; }
inline FixPropertyAtom* fix_wallforce() const
{ return fix_wallforce_; }
inline int iarg() const
{ return iarg_; }
int add_history_value(std::string name, std::string newtonflag)
{ return dnum_++; }
int get_history_offset(const std::string hname)
{ return impl->get_history_offset(hname);}
bool contact_match(const std::string mtype, const std::string model)
{ return impl->contact_match(mtype, model); }
inline int dnum() const
{ return dnum_; }
inline int n_meshes() const
{ return n_FixMesh_; }
inline class FixMeshSurface ** mesh_list() const
{ return FixMesh_list_; }
inline int atom_type_wall() const
{ return atom_type_wall_; }
inline bool is_mesh_wall() const
{ return 1 == meshwall_; }
inline int computeflag() const
{ return computeflag_; }
inline int shearupdate() const
{ return shearupdate_; }
inline int heattransfer_flag() const
{ return heattransfer_flag_; }
inline int stress_flag() const
{ return stress_flag_; }
inline bool store_force_contact() const
{ return store_force_contact_; }
inline int store_force_contact_every() const
{ return store_force_contact_every_; }
inline bool store_force_contact_stress() const
{ return store_force_contact_stress_; }
inline ComputePairGranLocal * compute_wall_gran_local() const
{ return cwl_; }
inline int addflag() const
{ return addflag_; }
inline int body(int i) const
{ return body_[i]; }
inline double masstotal(int i) const
{ return masstotal_[i]; }
inline class FixRigid *fix_rigid() const
{ return fix_rigid_; }
inline void add_contactforce_wall(int ip, const LCM::ForceData & i_forces,int idTri)
{
// add to fix wallforce contact
// adds 0 as ID for primitive wall
double forces_torques_i[6];
if(fix_wallforce_contact_->has_partner(ip,idTri) == -1)
{
vectorCopy3D(i_forces.delta_F,&(forces_torques_i[0]));
vectorCopy3D(i_forces.delta_torque,&(forces_torques_i[3]));
fix_wallforce_contact_->add_partner(ip,idTri,forces_torques_i);
}
}
inline void add_contactforce_stress_wall(int ip, const LCM::ForceData & i_forces, const double *const delta, const double *const vwall, int idTri)
{
// add to fix wallforce contact
// adds 0 as ID for primitive wall
double forces_delta_i[9];
if(fix_wallforce_contact_stress_->has_partner(ip,idTri) == -1)
{
vectorCopy3D(i_forces.delta_F,&(forces_delta_i[0]));
vectorCopy3D(delta,&(forces_delta_i[3]));
vectorCopy3D(vwall,&(forces_delta_i[6]));
fix_wallforce_contact_stress_->add_partner(ip,idTri,forces_delta_i);
}
}
bool store_sum_normal_force() const
{ return fix_sum_normal_force_ != NULL; }
double * get_sum_normal_force_ptr(const int i)
{ return &(fix_sum_normal_force_->vector_atom[i]); }
class PrimitiveWall* primitiveWall();
int n_contacts_all(int &nIntersect);
int n_contacts_all(int contact_groupbit,int &nIntersect);
int n_contacts_local(int &nIntersect);
int n_contacts_local(int contact_groupbit,int &nIntersect);
int is_moving();
void register_compute_wall_local(ComputePairGranLocal *,int&);
void unregister_compute_wall_local(ComputePairGranLocal *ptr);
void wall_temperature_unique(bool &has_temp,bool &temp_unique, double &temperature_unique);
void addHeatFlux(class TriMesh *mesh,int i,const double ri,double rsq,double area_ratio);
protected:
int iarg_, narg_;
int atom_type_wall_;
int computeflag_;
int addflag_;
ComputePairGranLocal *cwl_;
double dt_;
int shearupdate_;
// class variables for atom properties
int nlocal_;
double **x_, **f_, *radius_, *rmass_, **wallforce_, r0_;
#ifdef SUPERQUADRIC_ACTIVE_FLAG
double **quat_, **shape_, **roundness_;
#endif
void set_r0(double _r0)
{ r0_ = _r0; }
virtual void init_granular() {}
// heat transfer
void init_heattransfer();
bool heattransfer_flag_;
// model for contact area calculation
int area_calculation_mode_;
// mesh and primitive force implementations
virtual void post_force_mesh(int);
virtual void post_force_primitive(int);
// virtual functions that allow implementation of the
// actual physics in the derived classes
virtual void compute_force(LCM::SurfacesIntersectData & sidata, double *vwall);
// sets flag that neigh list shall be built
virtual void pre_neighbor();
// builds neigh list if necessary
virtual void pre_force(int vflag);
// references to mesh walls
int n_FixMesh_;
class FixMeshSurface **FixMesh_list_;
class FixRigid *fix_rigid_;
int *body_;
double *masstotal_;
// heat transfer
class FixPropertyAtom *fppa_T;
class FixPropertyAtom *fppa_hf;
class FixPropertyAtom *fppa_htcw;
double Temp_wall;
double fixed_contact_area_;
double Q,Q_add;
const double *th_cond;
double const* const* deltan_ratio;
LIGGGHTS::Walls::IGranularWall * impl;
// per-contact force storage
bool store_force_contact_;
int store_force_contact_every_;
class FixContactPropertyAtomWall *fix_wallforce_contact_;
// for stress computation
bool store_force_contact_stress_;
class FixContactPropertyAtomWall *fix_wallforce_contact_stress_;
// storage for per contact data (for multicontact models)
class FixContactPropertyAtomWall *fix_store_multicontact_data_;
int nlevels_respa_;
int shear_, shearDim_, shearAxis_;
double vshear_;
double shearAxisVec_[3];
// distance in order to calculate interaction with
// rough wall
//double skinDistance_;
// number of values for contact history
int dnum_;
// flag if mesh wall
int meshwall_;
// flag to actiate potential energy calculation
bool track_energy_;
// flag for stressanalysis
// true if any of the meshes tracks stresses
bool stress_flag_;
class PrimitiveWall *primitiveWall_;
class FixPropertyAtom *fix_history_primitive_;
// class to keep track of wall contacts
bool rebuildPrimitiveNeighlist_;
// force storage
bool store_force_;
class FixPropertyAtom *fix_wallforce_;
// storage for simplistic pressure computation via normal forces
class FixPropertyAtom *fix_sum_normal_force_;
// max neigh cutoff - as in Neighbor
double cutneighmax_;
virtual void post_force_wall(int vflag);
};
}
#endif
#endif
|