Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

LSMDD_Utilities.h File Reference

The LSMDD_Utilities provides a collection of macros and static methods that can be useful when computing forces and velocities on dislocation lines. More...

#include "LSMDD_config.h"

Go to the source code of this file.

Namespaces

namespace  LSMDD

Defines

#define GET_TETRAHEDRON(x1, x2, x3, x4, phi_tet, psi_tet,tet_num, i, j, k,X, dX, phi, psi, idx_phi, idx_psi,phi_ghostbox_dims, psi_ghostbox_dims)
#define INTERPOLATE_FORCE(force_x_pt, force_y_pt, force_z_pt,pt,force_x, force_y, force_z,X, dX,idx_force, force_ghostbox_dims)
#define CHECK_IF_CELL_NEEDS_VELOCITY_UPDATE(update_cell, force_x_closest, force_y_closest, force_z_closest,tangent_x, tangent_y, tangent_z,dislocation_segment_length, min_segment_length,X, dX, endpt1, endpt2,force_x_endpt1, force_y_endpt1, force_z_endpt1,force_x_endpt2, force_y_endpt2, force_z_endpt2,distance, idx_neighbor_distance)
#define CHECK_FOR_PURE_SCREW_SCREW_DISLOCATION(segment_is_pure_screw,max_angle_for_pure_screw,b_x, b_y, b_z,tangent_vector_x, tangent_vector_y, tangent_vector_z)


Detailed Description

The LSMDD_Utilities provides a collection of macros and static methods that can be useful when computing forces and velocities on dislocation lines.


Define Documentation

#define CHECK_FOR_PURE_SCREW_SCREW_DISLOCATION segment_is_pure_screw,
max_angle_for_pure_screw,
b_x,
b_y,
b_z,
tangent_vector_x,
tangent_vector_y,
tangent_vector_z   ) 
 

CHECK_FOR_PURE_SCREW_SCREW_DISLOCATION() determines whether a dislocation line segment is a pure screw dislocation.

Arguments:

  • segment_is_pure_screw (out): boolean indicating whether or not the dislocation segment has pure screw character
  • max_angle_for_pure_screw (in): maximum angle (approximate) allowed between Burgers vector and tangent vector for segment to be considered to have pure screw character
  • b_x, b_y, b_z (in): Burgers vector of dislocation line segment
  • tangent_vector_x (in): x-component of tangent vector of dislocation line segment
  • tangent_vector_y (in): y-component of tangent vector of dislocation line segment
  • tangent_vector_z (in): z-component of tangent vector of dislocation line segment

NOTES:

  • The tangent vector need NOT be of unit length.

  • The formula used to estimate the angle, $ \theta $, between the Burgers vector and tangent vector is

  • \[ \theta^2 \approx 1 \frac{\vec{b} \cdot \vec{\xi}} {|\vec{b}|^2 |\vec{\xi}|^2} \]

where $ \vec{\xi} $ is the tangent vector.

  • All arguments passed into this macro MUST be variables NOT expressions. If expressions are passed in as arguments, this macro may yield incorrect results!

#define CHECK_IF_CELL_NEEDS_VELOCITY_UPDATE update_cell,
force_x_closest,
force_y_closest,
force_z_closest,
tangent_x,
tangent_y,
tangent_z,
dislocation_segment_length,
min_segment_length,
X,
dX,
endpt1,
endpt2,
force_x_endpt1,
force_y_endpt1,
force_z_endpt1,
force_x_endpt2,
force_y_endpt2,
force_z_endpt2,
distance,
idx_neighbor_distance   ) 
 

CHECK_IF_CELL_NEEDS_VELOCITY_UPDATE() checks to see if the specified grid cell needs to have its velocity updated because the current dislocation line segment is closer than all previous ones that have been examined. If so, update_cell is set to true and the force to use for the velocity update is computed.

Arguments:

  • update_cell (out): boolean indicating whether or not the grid cell needs to have its velocity updated
  • force_*_closest (out): components of the force at the point on the dislocation segment closest to the center of the grid cell
  • tangent_* (in): components of the tangent vector for the dislocation segment defined by (endpt2 - endpt1).
  • dislocation_segment_length (in): length of dislocation line segment
  • min_segment_length (in): minimum dislocation line segment length for considering the two endpoints of the segment to be numerically distinct
  • X (in): double array holding the physical coordinates for the center of the grid cell being examined
  • dX (in): double array holding the grid spacing in the three coordinate directions
  • endpt1, endpt2 (in): double arrays holding the physical coordinates of the end points of the dislocation line segment
  • force_*_endpt1 (in): components of force at endpoint 1
  • force_*_endpt2 (in): components of force at endpoint 2
  • distance (in): double arrays holding the current distance from the center of each grid cell to the nearest dislocation line segment for the entire Patch
  • idx_distance (in): index of grid index (i,j,k) in linear data array for distance

NOTES:

  • the length of the dislocation line segment is passed in as an argument for performance reasons (i.e. so it doesn't have to be recomputed for each neighbor).

  • All arguments passed into this macro MUST be variables NOT expressions. If expressions are passed in as arguments, this macro may yield incorrect results!

#define GET_TETRAHEDRON x1,
x2,
x3,
x4,
phi_tet,
psi_tet,
tet_num,
i,
j,
k,
X,
dX,
phi,
psi,
idx_phi,
idx_psi,
phi_ghostbox_dims,
psi_ghostbox_dims   ) 
 

GET_TETRAHEDRON() sets the coordinates and values of the level set functions at the vertices of the specified tetrahedron within the specified cell with corners given by the centers of the cells in the index space [(i,j,k),(i+1,j+1,k+1)]. This information is used to find the dislocation line within the grid cell using the LSM3D_findLineInTetrahedron() function in the LSMLIB library.

Arguments:

  • x1, x2, x3, x4 (out): Coordinates of the four vertices of the tetrahedron. These should all be double arrays with at least three elements.
  • phi_tet, psi_tet (out): double arrays storing the values of phi and psi at the vertices of the tetrahedron.
  • tet_num (in): integer between 0 and 5 (inclusive) indicating which tetrahedron within the cell for which to extract data
  • i, j, k (in): grid index for grid point at lower corner of cell containing tetrahedra
  • X (in): double array holding the physical coordinates for the center of the grid cell with index (i,j,k)
  • dX (in): double array holding the grid spacing in the three coordinate directions
  • phi, psi (in): double arrays holding the phi and psi data for the entire Patch
  • idx_phi, idx_psi (in): indices of grid index (i,j,k) in linear data arrays for phi and psi, respectively
  • phi_ghostbox_dims (in): IntVector holding the dimensions of the ghostbox for phi
  • psi_ghostbox_dims (in): IntVector holding the dimensions of the ghostbox for psi

NOTES:

  • All arguments passed into this macro MUST be variables NOT expressions. If expressions are passed in as arguments, this macro may yield incorrect results!

#define INTERPOLATE_FORCE force_x_pt,
force_y_pt,
force_z_pt,
pt,
force_x,
force_y,
force_z,
X,
dX,
idx_force,
force_ghostbox_dims   ) 
 

INTERPOLATE_FORCE() interpolates the forces at the corners of the cell defined by the centers of the cells in the index space [(i,j,k),(i+1,j+1,k+1)] to the specified point using trilinear interpolation.

Arguments:

  • force_*_pt (out): components of force at endpoint
  • pt (in): double array holding the physical coordinates of the point at which force should be interpolated
  • X (in): double array holding the physical coordinates for the center of the grid cell with index (i,j,k)
  • dX (in): double array holding the grid spacing in the three coordinate directions
  • force_* (in): double arrays holding the components of the force for the entire Patch
  • idx_force (in): index of grid index (i,j,k) in linear data array for force
  • force_ghostbox_dims (in): IntVector holding the dimensions of the ghostbox for force

NOTES:

  • All arguments passed into this macro MUST be variables NOT expressions. If expressions are passed in as arguments, this macro may yield incorrect results!


Generated on Tue Aug 7 15:43:41 2007 for LSMDD by doxygen 1.3.4