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

Browse all defects in function SlipPlane::calculateDislocationStresses #27

Closed adhishm closed 11 years ago

adhishm commented 11 years ago

In the function SlipPlane::calculateDislocationStresses, currently only dislocations are browsed and their stress fields calculated. However, other defects may have stress fields too. Therefore, for each dislocation, the total stress field at its position should be calculated using contributions from all defects. Moreover, the class Defect has a virtual function Defect::stressField precisely for this reason.

adhishm commented 11 years ago

The function now browses all defects. In addition, the safeguard to prevent division by zero has been placed within the Dislocation::stressFieldLocal function, thus removing the need to check for distances (or pointer equality) in any functions calling the stressField function.