MercuryDPM  Trunk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Todo List
Member AngledPeriodicBoundary::checkBoundaryAfterParticleMoved (BaseParticle *P)
TW: can't we do the shift in the createPeriodicParticles function only? We are checking the distance three times!
Member AngledPeriodicBoundary::set (Vec3D normalLeft, Vec3D normalRight, Vec3D origin)
TW: Note, I cannot calculate angular shift; this needs to be revisited when we complete quaternion implementation
Member AngledPeriodicBoundary::shiftPosition (BaseParticle *P)

add velocity, angular, springs shift

TW: not sure how to calculate the angular position in common_axis direction; this needs to be revisited when we complete quaternion implementation

TW: recalculate the orientation here

Member AngledPeriodicBoundary::shiftPositions (Vec3D &P1, Vec3D &P2)
TW: this still doesn't shift all data
Member ArcWall::getInteractionWith (BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Hacked please fix
Member AxisymmetricIntersectionOfWalls::getDistanceAndNormal (const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const final
check, maybe orientation has to be normalized differently for axisymmetric walls (or axis needs to be normalized)
Member BaseCG::averageBeyondDomain_

should the default be false?

currently, the above description is not implemented; it simply ignores particles outside the domain.

Member BaseCG::setWidth (Mdouble width)=0
should be standard deviation, but is currently cutoff.
Member BaseClusterInsertionBoundary::checkBoundaryBeforeTimeStep (DPMBase *md) override
rename to something like "insertUntilMaxFailed"?
Member BaseHandler< T >::addGhostObject (T *O)
mx: type the stuff here: keeps the id unique key
Member BaseHandler< T >::BaseHandler (const BaseHandler< T > &BH)
Should max objects be set to the number of objects after this constructor? Maybe in copyContentsFromOtherHandler?
Member BaseHandler< T >::setDPMBase (DPMBase *DPMBase)
MX: Bad practice to have a function parameter with the exact name of the class
Member BaseHandler< T >::setId (T *object, unsigned int id)
we should use this function only to set the id of particles, not BaseObject::setId; however, to block BaseObject::setId, I need to make this function a friend of BaseObject, and I don't know how to do that.
Class BaseInteractable
Check prescribed objects have infinite mass.
Member BaseInteractable::getCurvature (const Vec3D &labFixedCoordinates) const
should be wall-type dependent
Member BaseInteractable::getInteractionWith (BaseParticle *P, unsigned timeStamp, InteractionHandler *interactionHandler)=0

TW make sure this function sets normal, distance, overlap, contact point

AT why is this a BaseParticle and not a BaseInteratable.

Member BaseInteractable::rotate (const Vec3D &angularVelocityDt)
TW the move and rotate functions should only pass the time step, as teh velocity can be accessed directly by the object; this would simplify functions like Screw::rotate
Member BaseInteractable::write (std::ostream &os) const override
take the zero out
Member BaseInteraction::BaseInteraction ()
: empty baseInteraction, used in mpi code probably
Member BaseInteraction::BaseInteraction (const BaseInteraction &p)
why are not all of the member variables copied?
Member BaseInteraction::copySwitchPointer (const BaseInteractable *original, BaseInteractable *ghost) const
Can this be simpler if we replace the particle with the ghost.
Parameters
[in]originalBaseInteractable* to the original particles who periodic image is being created from.
[in]ghostBaseInteractble* to the new ghost (periodic partcles) that has just been created.
Member BaseInteraction::gatherContactStatistics ()

Thomas please document this; as this is the area you are currently rewriting.

Thomas please document.

TW centre is used just for backward compatibility; replace centre by contact law; we also have to correct it in StatisticsVector::gatherContactStatistics. There also seems to be an issue with the normal being defined differently for walls

Member BaseInteraction::getAbsoluteNormalForce () const
Ant: Check this comment.
Returns
Mdouble that contains the absolute norm (length) of the normal force.
Member BaseInteraction::getNormalRelativeVelocity () const
Ant: Check this comment.
Returns
Mdouble that contains the norm (length) of the relative velocity.
Member BaseInteraction::rotateHistory (Matrix3D &rotationMatrix)
some of these might be unneccesary
Member BaseInteraction::setBasicMPIInteractionValues (int P, int I, unsigned timeStamp, Vec3D force, Vec3D torque, bool isWallInteraction, bool resetPointers)
TW should P, I be of type unsigned?
Member BaseInteraction::timeStamp_
TW it would be safer to use the integer time step here, instead of the double
Member BaseInteraction::write (std::ostream &os) const override
should we output id's here? os << " id " << getId() << " particleIds " << P_->getId() << " " << I_->getId();
Member BaseInteraction::writeToFStat (std::ostream &os, Mdouble time) const

MX The documentation mentions that the first variable is the time - this is incorrect, is is the timeStamp the interaction started

the flip in normal/tangential direction for walls should not be done; this is an old bug

Member BaseObject::setId (unsigned long id)
TW: here we should update BaseHandler::nextId_
Member BaseParticle::getDisplacement2 (Mdouble xmin, Mdouble xmax, Mdouble ymin, Mdouble ymax, Mdouble zmin, Mdouble zmax, Mdouble t) const

see .cc file.

Rewrite, redefine (TW). Is only used in StatisticsVector.hcc, consider moving to that class.

Member BaseParticle::getInteractionWith (BaseParticle *P, unsigned timeStamp, InteractionHandler *interactionHandler) override
We should consider setting the contact point to
Author
weinhartt
Member BaseParticle::getPeriodicComplexity (int index)
TW , this is indeed a hack; you should call a setter every time you add a value to the periodic boundary handler (this function takes 0.5% cpu time in the speedtest)
Member BaseParticle::integrateBeforeForceComputation (double time, double timeStep)
If the position is described by the user, one should also call BaseInteractable::integrateBeforeForceComputation. To check if it works correctly, remove the p0.fixParticle() line from the DrivenParticleUnitTest
Author
irana
Member BaseParticle::oldRead (std::istream &is)
incorporate contact information
Member BaseParticle::setIndSpecies (unsigned int indSpecies) override

MX: this index is used in the MPI transmission. This should be "undeprecated"

TW do we have to update the species stored in the interactions here?

Member BaseParticle::setSpecies (const ParticleSpecies *species)

TW: this function should also check if the particle is the correct particle for the species type

TW should we chaeck here if we have the right kind of species for the right kind of particle?

Member BaseSpecies::~BaseSpecies ()
the BaseSpecies destructor should delete all particles and wall belonging to that species; however, that will break all codes replacing a species (e.g. Sudeshna and Hao) so we need a proper way to replace a species
Member BaseVTKWriter< H >::makeVTKFileWithHeader () const
vtw wall files only need to be written by one processor
Member BaseWall::getInteractionWith (BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
{DK: What is the contact point for interactions with walls}
Member BaseWall::getInteractionWithSuperQuad (SuperQuadricParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler)
make it work with screw, coil and other weird walls
Member BaseWall::setSpecies (const ParticleSpecies *species)
TW: this function should also check if the particle is the correct particle for the species type.
Member BasicIntersectionOfWalls::add (BaseWall &wall)
TW maybe the Restricted wall should be templated with the wall type such that we don't need to use new and delete.
Member BasicIntersectionOfWalls::getVTK (std::vector< Vec3D > &points, std::vector< std::vector< double >> &triangleStrips)
change getVTK to writeVTK
Parameters
points
triangleStrips
this function could be improved; might not plot full wall
Member BasicUnionOfWalls::add (BaseWall &wall)
TW maybe the Restricted wall should be templated with the wall type such that we don't need to use new and delete.
Member BasicUnionOfWalls::getVTK (std::vector< Vec3D > &points, std::vector< std::vector< double >> &triangleStrips)
change getVTK to writeVTK
Parameters
points
triangleStrips
this function could be improved; might not plot full wall
Member BondedInteraction::BondedInteraction (const BondedInteraction &p)
tw check if the parameters are valid when inserting the species into the handler
Member BondedInteraction::BondedInteraction ()
MX: add to MPI
Member Box::getNrPanelsOnLevel (int level)
some ints here should be unsigned long
Member CG< Coordinates, BaseFunction, Fields >::evaluateContact (const BaseInteraction &i)
the check for contact statistics should be done here, not per particle.
Member CG< Coordinates, BaseFunction, Fields >::evaluateParticle (const BaseParticle &p)
evaluateParticle and evaluateContact can be optimized by using the grid properties for smart neighborhood search.
Member CG< Coordinates, BaseFunction, Fields >::write (std::ostream &os) const override
TW write should be renamed writeHeader, writeAll should be renamed write.
Member CGCoordinates::O::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Member CGCoordinates::R::getLength (const Vec3D &p)
Member CGCoordinates::R::normalisePolynomialCoefficients (std::vector< Mdouble > &coefficients, Mdouble cutoff)
Member CGCoordinates::RZ::getLength (const Vec3D &p)
Member CGCoordinates::RZ::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Member CGCoordinates::spaceEvenly (Vec3D min, Vec3D max, std::vector< std::size_t > nAll, std::vector< T > &points)
limit to r>0
Member CGCoordinates::X::getINormal (const BaseInteraction &c, const Vec3D &normal) const
change from normal.X to sign(normal.X)
Member CGCoordinates::X::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Member CGCoordinates::XY::getLength (const Vec3D &p)
Member CGCoordinates::XY::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Member CGCoordinates::XYZ::getLength (const Vec3D &p)
Member CGCoordinates::XZ::getLength (const Vec3D &p)
Member CGCoordinates::XZ::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Member CGCoordinates::Y::getLength (const Vec3D &p)
Member CGCoordinates::Y::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Member CGCoordinates::YZ::getLength (const Vec3D &p)
Member CGCoordinates::YZ::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Member CGCoordinates::Z::getLength (const Vec3D &p)
Member CGCoordinates::Z::getVolumeOfAveragedDimensions (const Vec3D &min, const Vec3D &max)
Generalise to 2D
Class CGFields::LiquidMigrationFields
These are currently the only fields that are computed. However, this class is destined to be extended to contain additional information such as fabric, energy, local angular momentum. Also, a simpler version is planned, where only particle statistics are evaluated (density and momentum).
Class CGFields::OrientationField
These are currently the only fields that are computed. However, this class is destined to be extended to contain additional information such as fabric, energy, local angular momentum. Also, a simpler version is planned, where only particle statistics are evaluated (density and momentum).
Class CGFields::StandardFields
These are currently the only fields that are computed. However, this class is destined to be extended to contain additional information such as fabric, energy, local angular momentum. Also, a simpler version is planned, where only particle statistics are evaluated (density and momentum).
Member CGFunctions::Gauss< Coordinates >::width_
TW I thought of implementing width_, cutoff_ and prefactor_ as const Mdouble&, as theses parameters are not set per CGPoint, but per CG object (i.e. all points share the same values). However, this site seems to discourage this: http://stackoverflow.com/questions/12387239/reference-member-variables-as-class-members Anyone has an opinion on this? @dducks @thorntonar
Member CGFunctions::Polynomial< Coordinates >::coefficients_
Make variables internal.
Member CGFunctions::PolynomialType
add user-defined PolynomialType USER
Class CGHandler

get function that by default can distinguish species, but also density

make tests

change output format

command line arguments

make more readable definitions

read (a) restart, (b) data/fstat files

add speed by using the mesh

introduce standardDev

add 2D support

do we need to store the BaseObject::index_ anymore?

Can Interaction inherit directly from BaseInteraction?

make Files::statFile_, ... public, like the handlers; remove get functions for File's and handlers.

take out dependence on DPMBase::statFile (i.e. the savecount)

TW note, to keep the code working on Windows:

  • std::exit requires correct header cstdlib,
  • don't use to_string (thanks to Silvia for debugging)
Member CGHandler::evaluateDataFiles (bool evaluateFStatFiles=true)
use ignore if time is out of bounds
Member ChargedBondedInteraction::ChargedBondedInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)

Clean up this file by using the logger instead of cout, //cout, cerr and assert, and by motivating why the commented out code needs to be here.

Complete the documentation of these methods

Member ChargedBondedInteraction::ChargedBondedInteraction ()
MX: add to MPI
Member Chute::Chute (const Chute &other)
Check if this should indeed be a shallow copy.
Member Chute::createBottom ()
Does the bottom we always has to be this particle? Maybe add a BaseParticle* argument, and add a default value with particle radius < 1e-12.
Member Chute::printTime () const override
currently, this is going to cout. Do we want to make it a logger message?
Member Chute::setChuteAngle (Mdouble chuteAngle)
would a check on the angle be beneficial to check if it is indeed in degrees?
Member Chute::setRoughBottomType (std::string roughBottomTypeString)
: logger::Fatal seems very strong here, maybe set a default instead?
Member ChuteBottom::ChuteBottom (const ChuteBottom &other)
IFCD: why are the name and file-stuff not set here, in contrast to constructor()?
Member ChuteBottom::makeRoughBottom (Chute &chute)

Make sure that the post-conditions are:

  • N fixed particles in particleHandler, with z-coordinate < 0
  • 1 wall, below the rough bottom
  • no boundaries

IFCD: Only a warning, or an error?

Member ChuteBottom::setupInitialConditions () override

The createBottom() function also creates some walls and boundaries, but at slightly different locations. In this version they are removed and reset, but this is (in my opinion (Dinant)) not the correct way.

Particles are created without insertion boundary... this reeks of double work (see also Dinant's todo in this same function (ChuteBottom::setupInitialConditions()). (BvdH)

Member ChuteWithHopper::addHopper ()

Waarom had ik deze ook al weer gecomment? IFCD: this was probably BvdH

Why shift A by arbitrary number of 40, when isHopperCentred_ = True? NB: this is probably the same shift of 40 as happens in HopperInsertionBoundary::generateParticle(RNG) with the calculation of 'point A'. NB2: seems to be just generating a nice 'view' of the hopper (in the center of the viewer...?)

Member ChuteWithHopper::getChuteLength () const
this hides the non-virtual function Chute::getChuteLength
Member ChuteWithHopper::getTimeStepRatio () const
Consider generalising this method by implementing it in the MercuryBase class.
Author
BvdH NB: this method is used in ChuteWithHopper::setupInitialConditions().
Member ChuteWithHopper::setHopper (Mdouble exitLength, Mdouble exitHeight, Mdouble angle, Mdouble length, Mdouble height)
: check whether hopperCornerHeight >=0, if not change hopperangle, line 105, I do not yet understand what the criteria is...
Member CircularPeriodicBoundary::checkBoundaryAfterParticleMoved (BaseParticle *P, ParticleHandler &pH)
TW: Dinant, please confirm that i and oldI should be integer
Member CircularPeriodicBoundary::checkBoundaryAfterParticlesMove (ParticleHandler &pH) override
MX: When implementing this function, I realised there might not be a unit test for this boundary
Member CircularPeriodicBoundary::createPeriodicParticle (BaseParticle *p, ParticleHandler &pH) override
TW getLargestParticle()->getInteractionRadius() should be getLargestInteractionRadius()
Class Coil

IFCD: Can someone look at the details of the documentation of class Coil? I can't make sense of them.

Coil is now fixed in Z-direction, centered around the Z-axis. Consider converting to more general parameters, with direction of choise and central axis of choice.

Member Coil::getDistanceAndNormal (const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const override
Make this function readable and explain the steps in the details.
Member Combtooth::getInteractionWith (BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Quick hack JMF2 please clean up with teh new way
Class ConstantMassFlowMaserBoundary

Add functionality which allows for opening the maser boundary after a certain time, being a normal periodic boundary until then

Consider writing a destructor that closes the gap again

Consider splitting it in 2 DPMBase instances, one for the periodic domain and one for the outflow domain

Consider re-using the PeriodicBoundary by adding it as a data member

Which Maser is it used in Denissen2019? To cite the Maser: I. F. C. Denissen, T. Weinhart, A. Te Voortwis, S. Luding, J. M. N. T. Gray and A. R. Thornton, Bulbous head formation in bidisperse shallow granular flow over an inclined plane. Journal of Fluid Mechanics, 866:263–297, mar 2019.

Member ConstantMassFlowMaserBoundary::activateMaser ()
JMFT: Would it be helpful to be able to set a custom gapSize ?
Member ConstantMassFlowMaserBoundary::gapSize_
JMFT: Do you mean 6 radii?
Member copyDataFromMPIParticleToParticle (MPIParticle *bP, BaseParticle *p, ParticleHandler *particleHandler)
MX: Maybe renamet his function to setParticleSpecies() or something
Member CubeDeletionBoundary::getDistance (const Vec3D &position) const override
JMFT: Calculate the distance properly, not just 1 or -1.
Member DeletionBoundary::checkBoundaryAfterParticleMoved (BaseParticle *p, ParticleHandler &pH)

: MX: update the above comment

JMFT: The mass and volume counters need to be updated in the MPI code.

Member DeletionBoundary::checkBoundaryAfterParticlesMove (ParticleHandler &pH) override
MX: I changed the syntax to a more mpi compatible (and neater) code. Need to update the comments of the checkBoundaryAfterParticleMoved function
Page Directory Structure

TW What happened to the Template directory?

TW Anthony, please add information about your new output file here.

Member Domain::boundaryList_
TW should this be unsigned int
Member Domain::findParticleInList (unsigned int identification, std::vector< BaseParticle * > particleList)
MX: This is probably not the fastest method
Parameters
[in]indentificationThe unique ID of a particle
[in]particleListList of particles
Returns
Either the particle with the id identification or a nullptr when the particle has not been found
Member Domain::localIndexToGlobalIndexTable_
TW should this be unsigned int
Member Domain::localIndexToProcessorList_
TW should this be unsigned int
Member Domain::read (std::istream &is) override
MX: why would this function be called?
Member Domain::write (std::ostream &os) const override
MX: why would this function be called?
Member DomainHandler::getName () const final
Still has to be implemented
Member DomainHandler::getParticleDomain (int globalIndex)
TW should this be unsigned int?
Member DomainHandler::getParticleDomainGlobalIndex (BaseParticle *particle)

MX: function under construction

TW should this be unsigned int?

MX: This function is still under development the goal of this function is to obtain the globalIndex of the domain the particle is located in

Member DomainHandler::getParticleProcessor (int globalIndex)
TW should this be unsigned int?
Member DomainHandler::readAndAddObject (std::istream &is) final
Still has to be implemented
Member DomainHandler::readOldObject (std::istream &is)
Still has to be implemented
Member DPMBase::checkParticleForInteractionLocal (const BaseParticle &P)
tw check against periodic copies (see ShearCell3DInitialConditions.cpp)
Member DPMBase::checkParticleForInteractionLocalPeriodic (const BaseParticle &P)
TW the implementation of this function is not very efficient and should be improved
Parameters
p
Returns
Member DPMBase::computeExternalForces (BaseParticle *)
take out computeWalls() from compute External Forces method.
Parameters
[in]CIThe BaseParticle object to which the relevant external forces are applied.
Member DPMBase::computeForcesDueToWalls (BaseParticle *, BaseWall *)
TW: I think this torque has the wrong sign
Member DPMBase::computeOneTimeStep ()

IFCD , TW: please check what should be in here, and whether it should be virtual or not.

MX: this is not true anymore. all boundaries are handled here. particles have received a position update, so here the deletion boundary deletes particles add particles need a periodic check

Member DPMBase::deleteGhostParticles (std::set< BaseParticle * > &particlesToBeDeleted)
: doc
Member DPMBase::getParticlesWriteVTK () const
Move this (and the set) to ParticleHandler.
Returns
bool
Member DPMBase::getRotationalEnergy () const
TW why is the ene_rot commented out
Member DPMBase::getWallsWriteVTK () const
Move this (and the set) to WallHandler.
Returns
bool
Member DPMBase::performGhostParticleUpdate ()
MX: Under construction
Member DPMBase::read (std::istream &is, ReadOptions opt=ReadOptions::ReadAll)
warning: hides non-virtual function from the class 'Files'.
Member DPMBase::setFixedParticles (unsigned int n)
Question: can this function be called during the run of the program? i.e. can particles be made to suddenly "become fixed"?
Member DPMBase::setParticlesWriteVTK (bool writeParticlesVTK)
Move this (and the get) to ParticleHandler.
Parameters
[in]writeParticlesVTK
Member DPMBase::setRotation (bool rotation)
{these functions should also update the mixed species}
Member DPMBase::setupInitialConditions ()

I (Anthony) wants to change this to be an external function. This has a lot of advantages especially when using copy-constructors. This is a major change and will break other codes, so therefore has to be done carefully.

Member DPMBase::setWallsWriteVTK (FileType writeWallsVTK)
Move this (and the get) to WallHandler.
Parameters
[in]writeWallsVTK
Member DPMBase::setWallsWriteVTK (bool)
Move this (and the get) to WallHandler.
Parameters
[in]writeWallsVTK
Member DPMBase::solve ()

IFCD , TW: Consider moving some things before the time loop to actionsBeforeTimeLoop

Is it necessary to reset initial conditions here and in setTimeStepByParticle (i.e. should it be in constructor) Thomas: I agree, setTimeStepByParticle should be rewritten to work without calling setupInitialConditions

Is it necessary to reset initial conditions here and in setTimeStepByParticle (i.e. should it be in constructor)? Thomas: I agree, setTimeStepByParticle should be rewritten to work without calling setupInitialConditions

MX: Why does the mass get computed here? if a particle is assigned a radius, it automatically also computes its mass. IFCD: commenting out this line does not make any test fail on my system.

Member DPMBase::splitDomain (DomainSplit domainSplit)
the function needs improvement: for non-cubic domains (with different domain length in x,y,z), having a equal number of grid cell is not the best choice.
Member DPMBase::write (std::ostream &os, bool writeAllParticles=true) const
what to do with statisticsFromRestartData?
Member DPMBase::writeEneHeader (std::ostream &os) const

JMFT: Get rid of aligned columns. They make things too wide. (changed back) */

{Why is there a +6 here? TW: to get the numbers and title aligned}

Add number of particles to this file (change from Jonny to be added later)

Member DPMBase::writePythonFileForVTKVisualisation () const
ask Sudeshna how she plotted the cylinders
Member DPMBase::writeXBallsScript () const
Implement or make pure virtual
Member File::write (std::ostream &os) const
TW: openMode_ is not saved, maybe it should not even be stored but set every time you open a file
Member FileReader::read ()
taking this line of of the for loop gives a huge speed improvement; why?
Member FrictionInteraction::computeFrictionForce ()
TW: Why do we not use the corrected diameter here, as in the rolling case? And check if Stefan uses radius or diameter
Class FrictionSpecies
TW: should this class be renamed SlidingRollingTorsionFrictionSpecies?
Member HeaterBoundary::checkBoundaryAfterParticleMoved (BaseParticle *p, ParticleHandler &pH)
JMFT: Make a 2D version of this
Member HeaterBoundary::getDistance (const Vec3D &position) const
JMFT: Calculate the distance properly, not just 1 or -1.
Member helpers::computeDisptFromCollisionTimeAndRestitutionCoefficientAndTangentialRestitutionCoefficientAndEffectiveMass (Mdouble tc, Mdouble r, Mdouble beta, Mdouble mass)
what should be used instead of this function?
Member helpers::getMaximumVelocity (Mdouble k, Mdouble disp, Mdouble radius, Mdouble mass)
what should be used instead of this function?
Class helpers::KAndDispAndKtAndDispt
This does not result in the same value as the given alternative.
Member helpers::readOptionalVariable (std::istream &is, const std::string &name, T &variable)
readOptionalVariable should check the full variable name, not just the next value. However, I don't know how to put the location in the ifstream back.
Member HertzianSinterInteraction::getElasticEnergy () const override
TW this is not correct; we should count the return energy
Member HertzianSinterInteraction::HertzianSinterInteraction ()
: MX add interaction to mpi
Member HertzianViscoelasticInteraction::computeNormalForce ()
check for superquadrics
Member HertzianViscoelasticInteraction::getElasticEnergyAtEquilibrium (Mdouble adhesiveForce) const override
TW consider renaming to getElasticAdhesiveEnergy or getElasticAdhesiveEnergyRelativeToEquilibrium
Member HGrid::computeHashBucketIndex (int x, int y, int z, unsigned int l) const
consider moving to HGridCell, which might give better performance.
Member HGrid::info () const
use logger everywhere
Class HGridOptimiser
Find out what this class does and document it.
Class HopperInsertionBoundary
(BvdH) Better graphical diagrams are needed for further clarification, as well as some property renaming.
Member HopperInsertionBoundary::placeParticle (BaseParticle *p, RNG &random) override

(BvdH) make a nice (InkScape) diagram with all useful properties in one image, and some angles explaining the definitions of AB and AC directions, the P->setPosition operation and the calculation of the Z-direction of the Vec3D A position.

Thomas, could you check if this bug is still valid? (BvdH)

Member HorizontalBaseScrew::getDistanceAndNormal (const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const final
check, maybe orientation has to be normalised differently for axisymmetric walls (or axis needs to be normalised)
Class HorizontalScrew
IFCD: Can these details about class HorizontalScrew be made more clear? I don't understand them.
Member HorizontalScrew::getDistanceAndNormal (const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const final
Make this function readable and explain the steps in the details.
Member InfiniteWallWithHole::move_time (Mdouble dt)
TW: generalize the move function for all walls Allows the wall to be moved with time
Member InfiniteWallWithHole::set (Vec3D normal, Mdouble position, Mdouble holeRadius)
Since InfiniteWall:set is deprecated, should we deprecate this format as well (and similar formats in other walls)?
Author
weinhartt
Member InsertionBoundary::checkBoundaryBeforeTimeStep (DPMBase *md) override

rename to something like "insertUntilMaxFailed"?

create a definition for zero-size particles. Right now the zero-size particle is only used as a stop criterion for the manual PSD insertion

Member InsertionBoundary::generateParticle (RNG &random)
TP: can we add a variable seed here? Let the user choose a seed and for reproducible results you always take the same seed.
Member InsertionBoundary::getParticleToCopy () const
make this a debug check
Member InsertionBoundary::read (std::istream &is) override
make theses reads non-optional
Member InsertionBoundary::setPSD (PSD psd)
TP: Consider std::move instead of a set function. This would result in a speedup + no one has to set the PSD for insertionBoundaries again as it is set when a PSD is inserted.
Class Interaction< NormalForceInteraction, FrictionForceInteraction, AdhesiveForceInteraction >
MX: I do not think the above is correct. integrateBeforeForceComputation() updates the positions
Member InteractionHandler::eraseOldInteractions (unsigned)
TW: this function has to be sped up with sth like this: erase(remove_if(begin(), end(), bind2nd(checkSpringTime(), lastTimeStep)), end());
Member InteractionHandler::getInteraction (BaseInteractable *P, BaseInteractable *I, unsigned timeStamp)
TW this can bet set earlier
Member InteractionHandler::InteractionHandler (const InteractionHandler &IH UNUSED)
Please check if interactions indeed don't need to be copied.
Member InteractionHandler::readAndAddObject (std::istream &is) override

Ant This is a tmp fix as in some cases the line before has not be finished reading. This should be looked at again at a later date.

TW: Change identifier in restart file from id to index; is there any reason the id should be kept after restarting, once this is done? (Note, the id is set to the old one in the particle handler because interactions store id, not indices; also note id's are slow

Member InteractionHandler::removeObjectKeepingPeriodics (unsigned int id)

TW The code assumes in a few places that P->getIndex()<I->getIndex(), but the copySwitchPointer function does not obey that rule; we have to check if this is valid behaviour.

this function will create an error if the timeStamp is in the future! This should not happen (ever), but who knows.

Member IntersectionOfWalls::getDistanceAndNormal (const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const override
do this for all walls
Member IntersectionOfWalls::read (std::istream &is) override

currently the IntersectionOfWall is special for moving and rotating; should we remove that specialty?

We should use the position_ and orientation_ of the IntersectionOfWalls; that way, IntersectionOfWalls can be moved with the standard BaseInteractable::move function, getting rid of an anomaly in the code and removing the virtual from the move function.

Author
weinhartt
Member IrreversibleAdhesiveInteraction::IrreversibleAdhesiveInteraction (const IrreversibleAdhesiveInteraction &p)
tw check if the parameters are valid when inserting the species into the handler
Class LeesEdwardsBoundary

Add link to paper by Lees-Edwards in the documentation of this class.

Is implemented for 2D only now. Needs extension to 3D.

Member LevelSetWall::getDistanceAndNormal (const BaseParticle &p, Mdouble &distance, Vec3D &normal_return) const override
do this for all walls
Member LevelSetWall::read (std::istream &is) override
Member LinearPlasticViscoelasticInteraction::getElasticEnergy () const override
TW this is not correct; we should count the return energy
Member LinearPlasticViscoelasticNormalSpecies::getCollisionTime (Mdouble mass) const
should this use unloading stiffness?
Member LinearPlasticViscoelasticNormalSpecies::setCollisionTimeAndRestitutionCoefficient (Mdouble tc, Mdouble eps, Mdouble mass)
TW: check that the masses are described correctly here (m_eff or m_p?))
Member LinearViscoelasticInteraction::getSpecies () const
you can remove this by adding the species to the Interaction instead of the base interaction
Member LiquidBridgeWilletInteraction::getElasticEnergy () const override
TW
Member LiquidMigrationWilletInteraction::form ()
: maybe we need to check ghost particles?
Member LiquidMigrationWilletInteraction::getElasticEnergy () const override
TW
Member Log
decide if this monologue of Chris should be moved elsewhere
Member Logger< L, ASSERTS >::createMessage (std::stringstream &msg, const char *fmt, Arg1 &&arg, Args &&...args)
TW add more format specifications for logger, e.g. how to plot a double with a certain width
Member logWriteAndDie (const std::string &module, std::string message)
Why is this here, and not in the logger?
Member mathsFunc::log (Mdouble Power)
check if this function works
Member mathsFunc::tan (T x)
should be properly computed
Member Matrix3D::operator* (const Matrix3D &a) const
check
Member MatrixSymmetric3D::getCylindricalTensorField (const Vec3D &p) const

implement MatrixSymmetric3D::getCylindricalTensorField

Member Mercury2D::hGridFindContactsWithinTargetCell (int x, int y, unsigned int l)
replace this generic check of the each bucket to checking only the object to avoid the critical
Member Mercury2D::hGridFindParticlesWithTargetCell (int x, int y, unsigned int l, BaseParticle *obj, std::vector< BaseParticle * > &list)

: MX: generalise this

: MX: generalise this

Member Mercury3D::hGridFindContactsWithinTargetCell (int x, int y, int z, unsigned int l)
replace this generic check of the each bucket to checking only the object to avoid the critical
Class MercuryBase
Discuss if we want to remove Mercury2D and Mercury3D and template MercuryBase as the interface for the user.
Member MercuryBase::checkParticleForInteraction (const BaseParticle &P) final

IFCD: I think it might be better if it returns true if there is an interaction.

MX: use all reduce with the appropriate operator

Member MercuryBase::checkParticleForInteractionLocal (const BaseParticle &P) final
IFCD: I think it might be better if it returns true if there is an interaction.
Member MercuryBase::getHGridTargetNumberOfBuckets () const
TW SpeedCheckThomas revealed that adding a factor 10 here improved performance by 20% for monodisperse particles, 45% for highly polydisperse (this seems true for particle numbers 1e3 - 1e6); a larger factor seems to little extra effect; the memory cost is small compared to the number of particles, so I added the factor permanently. please check this is ok to do.
Member MercuryBase::hGridRebuild ()
{This is really ugly fix to force the particle to update}
Member MercuryBase::setHGridCellOverSizeRatio (Mdouble cellOverSizeRatio)
IFCD: I changed the if unequal to if equal, can someone check this is correct?
Member MercuryTimeStep< NDIMS >::dataFile_
Chris, please check if this parameter is needed; it causes a warning with [-Wunused-private-field]
Author
weinhartt
Member MindlinInteraction::getAbsoluteNormalForcePrevious () const
Ant: Check this comment.
Returns
Mdouble that contains the absolute norm (length) of the normal force.
Member MindlinInteraction::getTangentialOverlap () const override
TWnow this should be positive
Member MindlinRollingTorsionInteraction::computeFrictionForce ()
TW: Why do we not use the corrected diameter here, as in the rolling case? And check if Stefan uses radius or diameter
Class MindlinRollingTorsionSpecies
TW: should this class be renamed SlidingRollingTorsionMindlinRollingTorsionSpecies?
Member MPIContainer::receive (T *t, int count, int from, int tag)
MX: type documentation. this is used to receive vectors of scalars accross
Member MPIContainer::send (T *t, int count, int to, int tag)
MX: type documentation. This one is used to send vectors of scalars across (hence the *t)
Member NEVER
IFCD: can we make this an int instead of unsigned int, as -1 as an unsigned is not good style?
Member NurbsSurface::getDistance (Vec3D P, double radius, double &distance, Vec3D &normal) const
here we should use the convex hull argument to rule out certain contactse quickly
Member ParhamiMcMeekingSinterInteraction::getElasticEnergy () const override
TW
Returns
Mdouble
Member ParhamiMcMeekingSinterInteraction::ParhamiMcMeekingSinterInteraction ()
: MX add to MPI
Member ParhamiMcMeekingSinterSpecies::ParhamiMcMeekingSinterSpecies ()
: implement initial/read/write values
Member ParticleHandler::addedFixedParticle ()
MX: For Jonny, is this still required, keeping the parallel code in mind?
Member ParticleHandler::getNumberOfRealObjectsLocal () const
MX: in future also add the periodic mpi particles
Member ParticleHandler::largestParticle_
TW: note that checkExtrema gets called if a particle gets created and its Species and Radius gets set, even if it's not yet included in the particleHandler! This is necessary to check a not included particle for overlaps before inserting it into the handler. Not sure if this is a sensible structure; to be discussed.
Member ParticleHandler::removedFixedParticle ()
MX: For Jonny, is this still required, keeping the parallel code in mind?
Member ParticleSpecies::getMassFromRadius (Mdouble radius) const
TW: should getMassFromRadius be removed? IFCD: it is used in at least one driver (AxisymmetricHopper).
Member ParticleSpecies::getVolumeFromRadius (Mdouble radius) const
this should depend on the particle shape; thus, it should be a static function of BaseParticle
Member ParticleSpecies::setDensity (Mdouble density)
recalculate masses when setting dim_particle or rho
Member PeriodicBoundary::shiftPositions (Vec3D &postition1, Vec3D &postion2) const
(AT) see toDo of PeriodicBoundary::shiftPosition().
Member PeriodicBoundaryHandler::flushParticles (std::set< BaseParticle * > &particlesToBeFlushed)
This function uses a brute force method to flush the particles, this can be done in a smarter way if profiling shows that this is a bottleneck.
Member PeriodicBoundaryHandler::~PeriodicBoundaryHandler () override
MX: Because the periodicBoundaryHandler contains a pointer to a boundary, which is also in the boundary handler currently we just need to empty the PeriodicBoundaryHandler without destroying the object Otherwise we create a segfault in the BoundaryHandler
Class PossibleContact
Change the names so that they follow the code guidelines.
Class PossibleContactList

Look at the memory management of PossibleContactList. Maybe a destructor that takes out all remaining PossibleContact? Or is there a Handler that calls remove_ParticlePosibleContacts for all particles?

Restart-tests are not working with CONTACT_LIST_HGRID turned on, so either finish the ContactList-related code, or get rid of it. If we keep it, clean up the code, in particular the naming-convention.

Member PSD::convertCumulativeToCumulativeNumberDistribution (TYPE CDFType)
TP: NOT WORKING! If anyone knows how to do it feel free to add
Member PSD::drawSample ()
TP: We should add a variable seed. Maybe make it definable by the user?
Class Quaternion
Need to generalize this to n-dimensional quaternions of any type
Member Quaternion::angularVelocityBodyFixedFrameToAngularDisplacement (Vec3D v) const

should the arguments be passed by reference?

rename to angularVelocityBodyFixedFrameToAngularDisplacement?

Member Quaternion::applyCInverse (Quaternion q) const
rename to angularDisplacementToAngularVelocity?
Member Quaternion::Quaternion (Vec3D normal)
should be explicit as teh conversion is not unique
Parameters
normal
Member Quaternion::rotateInverseInertiaTensor (const MatrixSymmetric3D &invI) const
move link to where it belongs http://stackoverflow.com/questions/1171849/finding-quaternion-representing-the-rotation-from-one-vector-to-another This is the same as rotateTensor, but than for MatrixSymmetric3D instead of SmallMatrix<3,3>.
Member RestrictedWall::getInteractionWith (BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override

Shouldn't this function be defined in BaseWall?

{setting the index of the wall is necessary to get the right index reported in fstat; however, the better way would be to make setIndex virtual.}

Member RestrictedWall::set (BaseWall *wall, InfiniteWall *restriction)
TW maybe the Restricted wall should be templated with the wall type such that we don't need to use new and delete.
Member ReversibleAdhesiveInteraction::getElasticEnergy () const override
TW
Returns
Mdouble
Class RNG
(AT) implement new C++-standard RNG instead of this one (Kudos on the hard work done here though ;). NB: maybe something for Mercury 2?
Member RNG::RNG ()

{Thomas: This code does sth. when min>max; I would prefer to throw an error.}

{the random seed should be stored in restart}

Member RoughBottomType

consider converting to an enum class.

consider changing to just 'bottomType' and add 'FLAT' (or something similar) as an option so that from ALL bottom types can be chosen with just ONE enumerator IFCD: I did add FLAT, but since there are multiple users using RoughBottomType, it might be a bad idea to change the interface with BottomType. Please also check if I have forgotten places to add "FLAT" to make this a complete interface.

Class Screw
IFCD: Can these details about class Screw be made more clear? I don't understand them.
Member Screw::getDistanceAndNormal (const BaseParticle &P, Mdouble &distance, Vec3D &normal_return) const final
do this for all walls
Member Screw::getDistanceAndNormalLabCoordinates (Vec3D position, Mdouble wallInteractionRadius, Mdouble &distance, Vec3D &normal_return) const
Make this function readable and explain the steps in the details.
Member Screw::rotate (const Vec3D &angularVelocityDt) override
the move and rotate functions should only pass the time step, as teh velocity can be accessed directly by the object
Parameters
angularVelocityDt
Class ShearBoxBoundary

Add link to paper by Lees-Edwards in the documentation of this class.

Is implemented for 2D only now. Needs extension to 3D.

Class SimpleDrumSuperquadrics

Document

Definitions in source-file

VTK-write function

Test

Member SineWall::getInteractionWith (BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Hacked please fix
Member SinterInteraction::computeNormalForce ()
adhesive force only, or add normalForce?
Member SinterInteraction::getElasticEnergy () const override
TW this is not correct; we should count the return energy
Member SinterInteraction::SinterInteraction ()
: MX add to MPI
Member SinterNormalSpecies::setCollisionTimeAndRestitutionCoefficient (Mdouble tc, Mdouble eps, Mdouble mass)
TW: check that the masses are described correctly here (m_eff or m_p?))
Member SinterNormalSpecies::setSinterForceAndTime (Mdouble adhesionForce, Mdouble sinterTime, Mdouble radius)
fix
Member SlidingFrictionInteraction::getTangentialOverlap () const override
TWnow this should be positive
Class SmallVector< numberOfRows >
Need to generalize this to n-dimensional vectors of any type
Member SpeciesHandler::addObject (ParticleSpecies *S) override
TW don't put logger messages that only make sense for one application!
Member SpeciesHandler::getMixedObject (unsigned int id1, unsigned int id2)
This function should probably be made private. The user should use the function SpeciesHandler::getMixedObject(const U* S, const U* T), which deals with pointers.
Member SpeciesHandler::readAndAddObject (std::istream &is) override
TW why does deleting these objects create a segmentation fault How do you create the segmentation fault?
Author
weinhartt
IFCD how does the numbering of mixedSpecies_ work? the numbering of mixed species is 01, 02, 12, 03, 13, 23, 04, 14, 24, 34, i.e. if you add the n-th ParticleSpecies, then you have to add n-1 MixedSpecies. So here I remove the last n-1 MixedSpecies and add n-1 new ones.
Author
weinhartt
Member SpeciesHandler::~SpeciesHandler () override
TW Note: deleting the species does not delete the particles and walls of this species.
Member StatisticsPoint< T >::CG_gradient (const Vec3D &P, const Mdouble phi)
{Only implemented for Gaussian}
Member StatisticsPoint< T >::CG_integral_gradient (Vec3D &P1, Vec3D &P2, Vec3D &P1_P2_normal, Mdouble P1_P2_distance)
{Only implemented for Gaussian and statavg Z}
Member StatisticsPoint< T >::CollisionalHeatFlux
{Heat flux calculations have not been checked, only implemented}
Member StatisticsPoint< T >::Dissipation
{Dissipation calculations have not been checked, only implemented}
Member StatisticsPoint< T >::Potential
{Potential calculations have not been checked, only implemented; fstat file does not include the torsional and rolling spring and hence cannot account for their potential}
Member StatisticsVector< T >::periodicWalls
{Thomas: the case periodicWalls=true seems to mess up some statistics. Needs to be checked or removed}
Member StatisticsVector< T >::rmin
Thomas: maybe this fixed condition should be replaced by a condition function, bool include_statistics_if()
Class SubcriticalMaserBoundary
Which Maser is it used in Denissen2019? To cite the Maser: I. F. C. Denissen, T. Weinhart, A. Te Voortwis, S. Luding, J. M. N. T. Gray and A. R. Thornton, Bulbous head formation in bidisperse shallow granular flow over an inclined plane. Journal of Fluid Mechanics, 866:263–297, mar 2019.
Member SubcriticalMaserBoundaryTEST::createPeriodicParticle (BaseParticle *p, ParticleHandler &pH) override
why 2.0?
Member SuperQuadricParticle::computeHessianLabFixed (const LabFixedCoordinates &labFixedCoordinates) const
Come up with good expression for when x = y = 0 and n1 < n2
Member SuperQuadricParticle::computeShapeGradientLabFixed (const LabFixedCoordinates &labFixedCoordinates) const
Come up with good expression for when x = y = 0 and n1 < n2
Member SuperQuadricParticle::getAxes () const override

TW we could remove this function from the BaseParticle and use a dynamic_cast instead

ID Middle-term plan is to template the BaseParticle on shape-type, so that we won't have to cast etc.

Member SuperQuadricParticle::getCurvature (const LabFixedCoordinates &labFixedCoordinates) const override
Minus sign the wrong way around, check why
Member SuperQuadricParticle::getInteractionWithSuperQuad (SuperQuadricParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler)
: find correct value for 'distance'
Member SuperQuadricParticle::setBoundingRadius ()
Currently only implemented for ellipsoids
Member TriangulatedWall::Face::getDistanceAndNormal (const BaseParticle &p, Mdouble &distance, Vec3D &normal_return, Mdouble interactionRadius) const
make the triangle work from both sides
Member TriangulatedWall::move (const Vec3D &move) override
We should use the position_ and orientation_ of the TriangulatedWall; that way, TriangulatedWall can be moved with the standard BaseInteractable::move function, getting rid of an anomaly in the code and removing the virtual from the move function.
Author
weinhartt
Member TriangulatedWall::read (std::istream &is) override
Member VChute::getInteractionWith (BaseParticle *p, unsigned timeStamp, InteractionHandler *interactionHandler) override
Hacked please fix
Member Vec3D::getFromCylindricalCoordinates () const
Member WallHandler::createObject (const std::string &type)
Review this line. Problem came up in merging.
Member WallHandler::readAndCreateOldObject (std::istream &is)
This is deprecated since r ~2360.
Member WallHandler::WallHandler (const WallHandler &BH)
why is this being done?
Member WallHandler::WallHandler ()
why is this being done?
Member WallHandler::writeVTKBoundingBox () const
Check that this should indeed be WARN