tbenthompson / cutde

Python CPU and GPU accelerated TDEs, over 100 million TDEs per second!
MIT License
58 stars 15 forks source link

Halfspace TDEs. #3

Closed tbenthompson closed 3 years ago

tbenthompson commented 3 years ago

It's a similar direct translation of matlab to cuda. See https://github.com/tbenthompson/cutde/blob/master/tests/matlab/TDdispHS.m and https://github.com/tbenthompson/cutde/blob/master/tests/matlab/TDstressHS.m

tbenthompson commented 3 years ago

The halfspace calculation is mostly composed of two full space calculations, this is a diff of the full space calculation implementation used in the two files. It's very similar but there are a couple lines that differ.

(base) ➜  cutde git:(master) ✗ diff abc2 tests/matlab/abc
0a1,5
> function [ue,un,uv]=TDdispFS(X,Y,Z,P1,P2,P3,Ss,Ds,Ts,nu)
> % TDdispFS 
> % Calculates displacements associated with a triangular dislocation in an
> % elastic full-space.
> 
5,12d9
< X = X(:);
< Y = Y(:);
< Z = Z(:);
< 
< P1 = P1(:);
< P2 = P2(:);
< P3 = P3(:);
< 
26a24,28
>     % For horizontal elements in case of half-space calculation!!!
>     % Correct the strike vector of image dislocation only
>     if P1(3)>0
>         Vstrike = -Vstrike;
>     end
31c33
< % Transform coordinates from EFCS into TDCS
---
> % Transform coordinates and slip vector components from EFCS into TDCS
119d120
< 
122d122
< 
tbenthompson commented 3 years ago

Closed by #18