adhishm / dd2d_Matryoshka

A set of classes defining the behaviour of crystalline defects, with the final goal of carrying out dislocation dynamics simulations in two dimensions.
Other
5 stars 4 forks source link

Version 0.0 simulate single slip plane list defects #22

Closed adhishm closed 11 years ago

adhishm commented 11 years ago

A generic list of Defects, std::vector<Defect*> defects is created in the class SlipPlane. This list is the only one that is browsed during the simulation and functions are called to act on it. All generic functions have their virtual functions defined in the base class Defect, for example, idealTimeIncrement, getVelocity, stressField.

Since pointers are used, an operation on an instance of any child class of Defect modifies directly the data stored in memory without any need to modify the pointer. All lists containing this pointer will be able to access the modified data.