<commit_before>/* disloc3d_mod2.f -- translated by f2c (version 20050501).
   You must link the resulting object file with libf2c:
        on Microsoft Windows system, link with libf2c.lib;
        on Linux or Unix systems, link with .../path/to/libf2c.a -lm
        or, if you install libf2c.a in a standard place, with -lf2c -lm
        -- in that order, at the end of the command line, as in
                cc *.o -lf2c -lm
        Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,

                http://www.netlib.org/f2c/libf2c.zip
*/

#include "f2c.h"

/* Common Block Declarations */

union {
    struct {
        doublereal dummy[5], sd, cd, dummy2[5];
    } _1;
    struct {
        doublereal alp1, alp2, alp3, alp4, alp5, sd, cd, sdsd, cdcd, sdcd, 
                s2d, c2d;
    } _2;
} c0_;

#define c0_1 (c0_._1)
#define c0_2 (c0_._2)

union {
    struct {
        doublereal xi2, et2, q2, r__, dummy3[20];
    } _1;
    struct {
        doublereal xi2, et2, q2, r__, r2, r3, r5, y, d__, tt, alx, ale, x11, 
                y11, x32, y32, ey, ez, fy, fz, gy, gz, hy, hz;
    } _2;
} c2_;

#define c2_1 (c2_._1)
#define c2_2 (c2_._2)

/* Subroutine */ int dc3d_(doublereal *alpha, doublereal *x, doublereal *y, 
        doublereal *z__, doublereal *depth, doublereal *dip, doublereal *al1, 
        doublereal *al2, doublereal *aw1, doublereal *aw2, doublereal *disl1, 
        doublereal *disl2, doublereal *disl3, doublereal *ux, doublereal *uy, 
        doublereal *uz, doublereal *uxx, doublereal *uyx, doublereal *uzx, 
        doublereal *uxy, doublereal *uyy, doublereal *uzy, doublereal *uxz, 
        doublereal *uyz, doublereal *uzz, doublereal *iret)
{
    /* Initialized data */

    static doublereal f0 = 0.;

    /* Builtin functions */
    integer s_wsfe(cilist *), e_wsfe(void);

    /* Local variables */
    static doublereal d__;
    static integer i__, j, k;
    static doublereal p, q, u[12];
    extern /* Subroutine */ int ua_(doublereal *, doublereal *, doublereal *, 
            doublereal *, doublereal *, doublereal *, doublereal *), ub_(
            doublereal *, doublereal *, doublereal *, doublereal *, 
            doublereal *, doublereal *, doublereal *);
    static doublereal du[12], et;
    extern /* Subroutine */ int uc_(doublereal *, doublereal *, doublereal *, 
            doublereal *, doublereal *, doublereal *, doublereal *, 
            doublereal *);
    static doublereal xi, zz, dd1, dd2, dd3, dua[12], dub[12], duc[12];
    static integer jet, jxi;
    static doublereal ddip;
    extern /* Subroutine */ int dccon0_(doublereal *, doublereal *), dccon2_(
            doublereal *, doublereal *, doublereal *, doublereal *, 
            doublereal *);
    static doublereal aalpha;

    /* Fortran I/O blocks */
    static cilist io___2 = { 0, 6, 0, "(' ** POSITIVE Z WAS GIVEN IN SUB-DC3"
            "D')", 0 };


/*                                                                       04670000 */
/* ********************************************************************   04680000 */
/* *****                                                          *****   04690000 */
/* *****    DISPLACEMENT AND STRAIN AT DEPTH                      *****   04700000 */
/* *****    DUE TO BURIED FINITE FAULT IN A SEMIINFINITE MEDIUM   *****   04710000 */
/* *****                         CODED BY  Y.OKADA ... SEP 1991   *****   04720002 */
/* *****                         REVISED   Y.OKADA ... NOV 1991   *****   04730002 */
/* *****                                                          *****   04740000 */
/* ********************************************************************   04750000 */
/*                                                                       04760000 */
/* ***** INPUT                                                            04770000 */
/* *****   ALPHA : MEDIUM CONSTANT  (LAMBDA+MYU)/(LAMBDA+2*MYU)           04780000 */
/* *****   X,Y,Z : COORDINATE OF OBSERVING POINT                          04790000 */
/* *****   DEPTH : SOURCE DEPTH                                           04800000 */
/* *****   DIP   : DIP-ANGLE (DEGREE)                                     04810000 */
/* *****   AL1,AL2   : FAULT LENGTH (-STRIKE,+STRIKE)                     04820000 */
/* *****   AW1,AW2   : FAULT WIDTH  ( DOWNDIP, UPDIP)                     04830000 */
/* *****   DISL1-DISL3 : STRIKE-, DIP-, TENSILE-DISLOCATIONS              04840000 */
/*                                                                       04850000 */
/* ***** OUTPUT                                                           04860000 */
/* *****   UX, UY, UZ  : DISPLACEMENT ( UNIT=(UNIT OF DISL)               04870000 */
/* *****   UXX,UYX,UZX : X-DERIVATIVE ( UNIT=(UNIT OF DISL) /             04880000 */
/* *****   UXY,UYY,UZY : Y-DERIVATIVE        (UNIT OF X,Y,Z,DEPTH,AL,AW) )04890000 */
/* *****   UXZ,UYZ,UZZ : Z-DERIVATIVE                                     04900000 */
/* *****   IRET        : RETURN CODE  ( =0....NORMAL,   =1....SINGULAR )  04910002 */
/*                                                                       04920000 */
/* -----                                                                  04970000 */
    if (*z__ > 0.f) {
        s_wsfe(&io___2);
        e_wsfe();
    }
    for (i__ = 1; i__ <= 12; ++i__) {
        u[i__ - 1] = f0;
        dua[i__ - 1] = f0;
        dub[i__ - 1] = f0;
        duc[i__ - 1] = f0;
/* L111: */
    }
    aalpha = *alpha;
    ddip = *dip;
    dccon0_(&aalpha, &ddip);
/* ======================================                                 05080000 */
/* =====  REAL-SOURCE CONTRIBUTION  =====                                 05090000 */
/* ======================================                                 05100000 */
    d__ = *depth + *z__;
    p = *y * c0_1.cd + d__ * c0_1.sd;
    q = *y * c0_1.sd - d__ * c0_1.cd;
    jxi = 0;
    jet = 0;
    if ((*x + *al1) * (*x - *al2) <= 0.f) {
        jxi = 1;
    }
    if ((p + *aw1) * (p - *aw2) <= 0.f) {
        jet = 1;<commit_msg>Removing libf2c dependencies from disloc3d_mod2.o<commit_after>/* disloc3d_mod2.f -- translated by f2c (version 20050501).
 * Link this file with libm (add linker flag -lm)
 */

// #include "f2c.h"
typedef double doublereal;
typedef long int integer;
#define abs(x) ((x) >= 0 ? (x) : -(x))

#include <stdio.h>


/* Common Block Declarations */

union {
    struct {
        doublereal dummy[5], sd, cd, dummy2[5];
    } _1;
    struct {
        doublereal alp1, alp2, alp3, alp4, alp5, sd, cd, sdsd, cdcd, sdcd, 
                s2d, c2d;
    } _2;
} c0_;

#define c0_1 (c0_._1)
#define c0_2 (c0_._2)

union {
    struct {
        doublereal xi2, et2, q2, r__, dummy3[20];
    } _1;
    struct {
        doublereal xi2, et2, q2, r__, r2, r3, r5, y, d__, tt, alx, ale, x11, 
                y11, x32, y32, ey, ez, fy, fz, gy, gz, hy, hz;
    } _2;
} c2_;

#define c2_1 (c2_._1)
#define c2_2 (c2_._2)

/* Subroutine */ int dc3d_(doublereal *alpha, doublereal *x, doublereal *y, 
        doublereal *z__, doublereal *depth, doublereal *dip, doublereal *al1, 
        doublereal *al2, doublereal *aw1, doublereal *aw2, doublereal *disl1, 
        doublereal *disl2, doublereal *disl3, doublereal *ux, doublereal *uy, 
        doublereal *uz, doublereal *uxx, doublereal *uyx, doublereal *uzx, 
        doublereal *uxy, doublereal *uyy, doublereal *uzy, doublereal *uxz, 
        doublereal *uyz, doublereal *uzz, doublereal *iret)
{
    /* Initialized data */

    static doublereal f0 = 0.;

    /* Builtin functions */
    //integer s_wsfe(cilist *), e_wsfe(void);

    /* Local variables */
    static doublereal d__;
    static integer i__, j, k;
    static doublereal p, q, u[12];
    extern /* Subroutine */ int ua_(doublereal *, doublereal *, doublereal *, 
            doublereal *, doublereal *, doublereal *, doublereal *), ub_(
            doublereal *, doublereal *, doublereal *, doublereal *, 
            doublereal *, doublereal *, doublereal *);
    static doublereal du[12], et;
    extern /* Subroutine */ int uc_(doublereal *, doublereal *, doublereal *, 
            doublereal *, doublereal *, doublereal *, doublereal *, 
            doublereal *);
    static doublereal xi, zz, dd1, dd2, dd3, dua[12], dub[12], duc[12];
    static integer jet, jxi;
    static doublereal ddip;
    extern /* Subroutine */ int dccon0_(doublereal *, doublereal *), dccon2_(
            doublereal *, doublereal *, doublereal *, doublereal *, 
            doublereal *);
    static doublereal aalpha;

    /* Fortran I/O blocks */
    //static cilist io___2 = { 0, 6, 0, "(' ** POSITIVE Z WAS GIVEN IN SUB-DC3"
    //        "D')", 0 };


/*                                                                       04670000 */
/* ********************************************************************   04680000 */
/* *****                                                          *****   04690000 */
/* *****    DISPLACEMENT AND STRAIN AT DEPTH                      *****   04700000 */
/* *****    DUE TO BURIED FINITE FAULT IN A SEMIINFINITE MEDIUM   *****   04710000 */
/* *****                         CODED BY  Y.OKADA ... SEP 1991   *****   04720002 */
/* *****                         REVISED   Y.OKADA ... NOV 1991   *****   04730002 */
/* *****                                                          *****   04740000 */
/* ********************************************************************   04750000 */
/*                                                                       04760000 */
/* ***** INPUT                                                            04770000 */
/* *****   ALPHA : MEDIUM CONSTANT  (LAMBDA+MYU)/(LAMBDA+2*MYU)           04780000 */
/* *****   X,Y,Z : COORDINATE OF OBSERVING POINT                          04790000 */
/* *****   DEPTH : SOURCE DEPTH                                           04800000 */
/* *****   DIP   : DIP-ANGLE (DEGREE)                                     04810000 */
/* *****   AL1,AL2   : FAULT LENGTH (-STRIKE,+STRIKE)                     04820000 */
/* *****   AW1,AW2   : FAULT WIDTH  ( DOWNDIP, UPDIP)                     04830000 */
/* *****   DISL1-DISL3 : STRIKE-, DIP-, TENSILE-DISLOCATIONS              04840000 */
/*                                                                       04850000 */
/* ***** OUTPUT                                                           04860000 */
/* *****   UX, UY, UZ  : DISPLACEMENT ( UNIT=(UNIT OF DISL)               04870000 */
/* *****   UXX,UYX,UZX : X-DERIVATIVE ( UNIT=(UNIT OF DISL) /             04880000 */
/* *****   UXY,UYY,UZY : Y-DERIVATIVE        (UNIT OF X,Y,Z,DEPTH,AL,AW) )04890000 */
/* *****   UXZ,UYZ,UZZ : Z-DERIVATIVE                                     04900000 */
/* *****   IRET        : RETURN CODE  ( =0....NORMAL,   =1....SINGULAR )  04910002 */
/*                                                                       04920000 */
/* -----                                                                  04970000 */
    if (*z__ > 0.f) {
        fprintf(stderr, "(' ** POSITIVE Z WAS GIVEN IN SUB-DC3D')");
        //s_wsfe(&io___2);
        //e_wsfe();
    }
    for (i__ = 1; i__ <= 12; ++i__) {
        u[i__ - 1] = f0;
        dua[i__ - 1] = f0;
        dub[i__ - 1] = f0;
        duc[i__ - 1] = f0;
/* L111: */
    }
    aalpha = *alpha;
    ddip = *dip;
    dccon0_(&aalpha, &ddip);
/* ======================================                                 05080000 */
/* =====  REAL-SOURCE CONTRIBUTION  =====                                 05090000 */
/* ======================================                                 05100000 */
    d__ = *depth + *z__;
    p = *y * c0_1.cd + d__ * c0_1.sd;
    q = *y * c0_1.sd - d__ * c0_1.cd;
    jxi = 0;
    jet = 0;
    if ((*x + *al1) * (*x - *al2) <= 0.f) {
        jxi = 1;
    }
    if ((p + *aw1) * (p - *aw2) <= 0.f) {
        jet = 1;
{'fraction_non_alphanumeric': 0.17864666722844863, 'fraction_numerical': 0.06657116373135587, 'mean_word_length': 1.4530797850351385, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 60, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7561679', 'n_tokens_mistral': 4641, 'n_tokens_neox': 3748, 'n_words': 931}