From b36e2c0ed5c07c6c72c18e34e720baf851e6bb89 Mon Sep 17 00:00:00 2001 From: jose larenas Date: Wed, 14 Dec 2022 11:18:27 -0300 Subject: [PATCH 1/2] fixed node numbering --- .../tetrahedron/TenNodeTetrahedron.cpp | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/SRC/element/tetrahedron/TenNodeTetrahedron.cpp b/SRC/element/tetrahedron/TenNodeTetrahedron.cpp index 0705ca734c..a4d5f79c0a 100644 --- a/SRC/element/tetrahedron/TenNodeTetrahedron.cpp +++ b/SRC/element/tetrahedron/TenNodeTetrahedron.cpp @@ -202,7 +202,7 @@ const double TenNodeTetrahedron::beta = (5.0 - sqrt(5.0))/20. ; const double TenNodeTetrahedron::sg[] = { alpha, beta, beta, beta} ; -const double TenNodeTetrahedron::wg[] = { 0.25} ; +const double TenNodeTetrahedron::wg[] = { 1.0 / 24.0 } ; static Matrix B(NumStressComponents, NumDOFsPerNode) ; @@ -587,7 +587,7 @@ const Matrix& TenNodeTetrahedron::getInitialStiff( ) } // end for p //volume element to also be saved - dvol[count] = wg[count] * xsj ; + dvol[count] = wg[0] * xsj ; volume += dvol[count] ; @@ -886,7 +886,7 @@ void TenNodeTetrahedron::formInertiaTerms( int tangFlag ) } // end for p //volume element to also be saved - dvol[count] = wg[count] * xsj ; + dvol[count] = wg[0] * xsj ; count++ ; @@ -1058,7 +1058,7 @@ TenNodeTetrahedron::update(void) } // end for p //volume element to also be saved - dvol[count] = wg[count] * xsj ; + dvol[count] = wg[0] * xsj ; count++ ; } //end for k } //end for j @@ -1255,7 +1255,7 @@ void TenNodeTetrahedron::formResidAndTangent( int tang_flag ) } // end for p //volume element to also be saved - dvol[k] = wg[k] * xsj ; + dvol[k] = wg[0] * xsj ; // opserr << "k = " << k << " gp = (" // << gaussPoint[0] << " " // << gaussPoint[1] << " " @@ -2053,32 +2053,32 @@ TenNodeTetrahedron::shp3d( const double zeta[4], double &xsj, double shp[4][NumN double dN3_dzeta1 = 0 ; double dN4_dzeta1 = 0; double dN5_dzeta1 = 4*zeta[1] ; double dN6_dzeta1 = 0; double dN7_dzeta1 = 4*zeta[2] ; double dN8_dzeta1 = 4*zeta4; - // double dN10_dzeta1 = 0 ; double dN9_dzeta1 = 0; // * - double dN9_dzeta1 = 0; double dN10_dzeta1 = 0; + double dN10_dzeta1 = 0 ; double dN9_dzeta1 = 0; // * + // double dN9_dzeta1 = 0; double dN10_dzeta1 = 0; // dNi/dzeta2 double dN1_dzeta2 = 0 ; double dN2_dzeta2 = 4*zeta[1]-1; double dN3_dzeta2 = 0 ; double dN4_dzeta2 = 0; double dN5_dzeta2 = 4*zeta[0]; double dN6_dzeta2 = 4*zeta[2]; double dN7_dzeta2 = 0 ; double dN8_dzeta2 = 0; - // double dN10_dzeta2 = 4*zeta4 ; double dN9_dzeta2 = 0; // * - double dN9_dzeta2 = 4*zeta4; double dN10_dzeta2 = 0; + double dN10_dzeta2 = 4*zeta4 ; double dN9_dzeta2 = 0; // * + // double dN9_dzeta2 = 4*zeta4; double dN10_dzeta2 = 0; // dNi/dzeta3 double dN1_dzeta3 = 0 ; double dN2_dzeta3 = 0; double dN3_dzeta3 = 4*zeta[2]-1; double dN4_dzeta3 = 0; double dN5_dzeta3 = 0 ; double dN6_dzeta3 = 4*zeta[1]; double dN7_dzeta3 = 4*zeta[0] ; double dN8_dzeta3 = 0; - // double dN10_dzeta3 = 0 ; double dN9_dzeta3 = 4*zeta4; // * - double dN9_dzeta3 = 0; double dN10_dzeta3 = 4*zeta4; + double dN10_dzeta3 = 0 ; double dN9_dzeta3 = 4*zeta4; // * + // double dN9_dzeta3 = 0; double dN10_dzeta3 = 4*zeta4; // dNi/dzeta3 double dN1_dzeta4 = 0 ; double dN2_dzeta4 = 0; double dN3_dzeta4 = 0 ; double dN4_dzeta4 = 4*zeta4-1; double dN5_dzeta4 = 0 ; double dN6_dzeta4 = 0; double dN7_dzeta4 = 0 ; double dN8_dzeta4 = 4*zeta[0]; - // double dN10_dzeta4 = 4*zeta[1]; double dN9_dzeta4 = 4*zeta[2]; // * - double dN9_dzeta4 = 4*zeta[1]; double dN10_dzeta4 = 4*zeta[2]; + double dN10_dzeta4 = 4*zeta[1]; double dN9_dzeta4 = 4*zeta[2]; // * + // double dN9_dzeta4 = 4*zeta[1]; double dN10_dzeta4 = 4*zeta[2]; // * double Jx1 = x1*dN1_dzeta1 + x2*dN2_dzeta1 + x3*dN3_dzeta1 + x4*dN4_dzeta1 + x5*dN5_dzeta1 + x6*dN6_dzeta1 + x7*dN7_dzeta1 + x8*dN8_dzeta1 + x9*dN9_dzeta1 + x10*dN10_dzeta1; // * @@ -2166,10 +2166,10 @@ TenNodeTetrahedron::shp3d( const double zeta[4], double &xsj, double shp[4][NumN shp[3][5] = 4*zeta[1]*zeta[2]; shp[3][6] = 4*zeta[2]*zeta[0]; shp[3][7] = 4*zeta[0]*zeta4; - // shp[3][9] = 4*zeta[1]*zeta4; // * - shp[3][8] = 4*zeta[1]*zeta4; - // shp[3][8] = 4*zeta[2]*zeta4; // * - shp[3][9] = 4*zeta[2]*zeta4; + shp[3][9] = 4*zeta[1]*zeta4; // * + // shp[3][8] = 4*zeta[1]*zeta4; + shp[3][8] = 4*zeta[2]*zeta4; // * + // shp[3][9] = 4*zeta[2]*zeta4; return ; } From ea5e7bdacbad715243e67e72c61857ac1cee9907 Mon Sep 17 00:00:00 2001 From: "Jose A. Abell" Date: Mon, 25 Mar 2024 15:19:12 -0300 Subject: [PATCH 2/2] Fixes bug in SAniSandMS, relating to mapping of input arguments to c++ objects --- SRC/material/nD/UANDESmaterials/SAniSandMS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SRC/material/nD/UANDESmaterials/SAniSandMS.cpp b/SRC/material/nD/UANDESmaterials/SAniSandMS.cpp index d8bb3faba4..383c2b28c8 100644 --- a/SRC/material/nD/UANDESmaterials/SAniSandMS.cpp +++ b/SRC/material/nD/UANDESmaterials/SAniSandMS.cpp @@ -155,7 +155,7 @@ OPS_SAniSandMSMaterial(void) dData[6], dData[7], dData[8], dData[9], dData[10], dData[11], dData[12], dData[13], dData[14], dData[15], dData[16], dData[17], dData[18], - flags[2], flags[3], flags[4], + flags[0], flags[1], flags[2], oData[0], oData[1]);