[cig-commits] [commit] baagaard/dynrup-new-lagrange: Updated test data for tet4 and hex8 unit tests of FaultCohesiveDyn. (2718cca)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 15:40:44 PST 2014
- Previous message: [cig-commits] [commit] baagaard/dynrup-new-lagrange: Update test data for FaultCohesiveDyn 2-D unit tests. (54b8f6c)
- Next message: [cig-commits] [commit] baagaard/add-examples-debugging, baagaard/add-release-2.0.3, baagaard/add-release-2.1.0, baagaard/dynrup-new-lagrange, baagaard/feature-output-station-names, baagaard/feature-progress-monitor, baagaard/fix-custom-faultpc, baagaard/fix-error-messages, baagaard/fix-faults-intersect, baagaard/fix-friction-initial-state, baagaard/update-autoconf, knepley/feature-petsc-fe, knepley/upgrade-petsc-3.5, knepley/upgrade-petsc-master, maint, master, next, williams/add-examples-grav2d, willic3/fix-plasticity: Added initial version of 2D gravity example (2c89b41)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Repository : https://github.com/geodynamics/pylith
On branch : baagaard/dynrup-new-lagrange
Link : https://github.com/geodynamics/pylith/compare/f33c75b19fd60eedb2a3405db76a1fee333bb1d7...5b6d812b1612809fea3bd331c4e5af98c25a536a
>---------------------------------------------------------------
commit 2718cca1eccb33a08fd7ae4f9d0c25206daffd99
Author: Brad Aagaard <baagaard at usgs.gov>
Date: Tue Jun 10 14:55:38 2014 -0700
Updated test data for tet4 and hex8 unit tests of FaultCohesiveDyn.
>---------------------------------------------------------------
2718cca1eccb33a08fd7ae4f9d0c25206daffd99
.../libtests/faults/data/CohesiveDynDataHex8.cc | 152 +++----
.../libtests/faults/data/CohesiveDynDataTet4.cc | 102 ++---
unittests/libtests/faults/data/cohesivedyn.py | 472 +++++++++------------
3 files changed, 320 insertions(+), 406 deletions(-)
diff --git a/unittests/libtests/faults/data/CohesiveDynDataHex8.cc b/unittests/libtests/faults/data/CohesiveDynDataHex8.cc
index 6937753..a63a0b8 100644
--- a/unittests/libtests/faults/data/CohesiveDynDataHex8.cc
+++ b/unittests/libtests/faults/data/CohesiveDynDataHex8.cc
@@ -102,7 +102,7 @@ const char* pylith::faults::CohesiveDynDataHex8::_label = "fault";
const char* pylith::faults::CohesiveDynDataHex8::_initialTractFilename =
"data/hex8_initialtract.spatialdb";
-const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldT[] = {
+const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldT[20*3] = {
4.1, 2.1, 3.1,
4.2, 2.2, 3.2,
4.3, 2.3, 3.3,
@@ -115,10 +115,10 @@ const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldT[] = {
4.0, 2.0, 3.0,
4.1, 2.1, 3.1,
4.2, 2.2, 3.2,
- 4.5, 3.2, 4.3, // 15
- 4.6, 3.5, 4.6, // 16
- 4.7, 3.7, 4.6, // 17
- 4.8, 3.6, 4.5, // 18
+ 4.5, 2.5, 3.5, // 15
+ 4.6, 2.6, 3.6, // 16
+ 4.7, 2.7, 3.7, // 17
+ 4.8, 2.8, 3.8, // 18
-4.4, 2.4, 3.4, // 59
-4.6, 2.6, 3.6, // 60
-4.8, 2.8, 3.8, // 61
@@ -1359,7 +1359,7 @@ const int pylith::faults::CohesiveDynDataHex8::_negativeVertices[] = {
// Stick case
// ----------------------------------------------------------------------
// Input
-const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrStick[5*4*3] = {
+const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrStick[20*3] = {
0.1, 2.1, 1.1,
0.2, 2.2, 1.2,
0.3, 2.3, 1.3,
@@ -1384,26 +1384,26 @@ const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrStick[5*4*3] =
// Output
const PylithScalar pylith::faults::CohesiveDynDataHex8::_residualStickE[20*3] = {
- 1.100000000000, 2.100000000000, 0.100000000000,
- 1.200000000000, 2.200000000000, 0.200000000000,
- 1.300000000000, 2.300000000000, 0.300000000000,
- 1.400000000000, 2.400000000000, 0.400000000000,
- 1.500000000000, 2.500001245294, 0.500000812227,
- 1.600000000000, 2.600000694980, 0.600000786664,
- 1.700000000000, 2.700000891763, 0.700000882544,
- 1.800000000000, 2.800000903108, 0.800000871357,
- 1.900000000000, 2.900000000000, 0.900000000000,
- 1.000000000000, 2.000000000000, 0.000000000000,
- 1.100000000000, 2.100000000000, 0.100000000000,
- 1.200000000000, 2.200000000000, 0.200000000000,
- 1.500000000000, 2.499998754706, 0.499999187773,
- 1.600000000000, 2.599999305020, 0.599999213336,
- 1.700000000000, 2.699999108237, 0.699999117456,
- 1.800000000000, 2.799999096892, 0.799999128643,
- -1.400000000000, 0.328479469127, -1.239953753608,
- -1.600000000000, 0.293941190358, -1.262585961634,
- -1.800000000000, 0.259995967920, -1.286431883494,
- -1.000000000000, 0.342606428329, -1.125914857337,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 1.1901590824e-19, 1.5987211555e-19,
+ 0.0000000000e+00, 1.5987211555e-19, 1.1901590824e-19,
+ 0.0000000000e+00, 7.7271522514e-20, 1.8651746814e-19,
+ 0.0000000000e+00, 1.8296475446e-19, 7.6383344094e-20,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, -1.1901590824e-19, -1.5987211555e-19,
+ -0.0000000000e+00, -1.5987211555e-19, -1.1901590824e-19,
+ -0.0000000000e+00, -7.7271522514e-20, -1.8651746814e-19,
+ -0.0000000000e+00, -1.8296475446e-19, -7.6383344094e-20,
+ -0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
};
// ----------------------------------------------------------------------
@@ -1423,10 +1423,10 @@ const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrSlip[5*4*3] =
1.0, 2.0, 0.0,
1.1, 2.1, 0.1,
1.2, 2.2, 0.2,
- 1.5, 2.5, 0.5, // 15
- 1.6, 2.6, 0.6, // 16
- 1.7, 2.7, 0.7, // 17
- 1.8, 2.8, 0.8, // 18
+ 1.5, 2.9, 0.7, // 15
+ 1.6, 2.8, 0.5, // 16
+ 1.7, 2.9, 0.8, // 17
+ 1.8, 2.7, 0.9, // 18
-1.4, 2.4, 0.4, // 59
-1.6, 2.6, 0.6, // 60
-1.8, 2.8, 0.8, // 61
@@ -1435,33 +1435,33 @@ const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrSlip[5*4*3] =
// Output
const PylithScalar pylith::faults::CohesiveDynDataHex8::_residualSlipE[20*3] = {
- 1.100000000000, 2.100000000000, 0.100000000000,
- 1.200000000000, 2.200000000000, 0.200000000000,
- 1.300000000000, 2.300000000000, 0.300000000000,
- 1.400000000000, 2.400000000000, 0.400000000000,
- 1.500000000000, 2.500001245294, 0.500000812227,
- 1.600000000000, 2.600000694980, 0.600000786664,
- 1.700000000000, 2.700000891763, 0.700000882544,
- 1.800000000000, 2.800000903108, 0.800000871357,
- 1.900000000000, 2.900000000000, 0.900000000000,
- 1.000000000000, 2.000000000000, 0.000000000000,
- 1.100000000000, 2.100000000000, 0.100000000000,
- 1.200000000000, 2.200000000000, 0.200000000000,
- 1.500000000000, 2.499998754706, 0.499999187773,
- 1.600000000000, 2.599999305020, 0.599999213336,
- 1.700000000000, 2.699999108237, 0.699999117456,
- 1.800000000000, 2.799999096892, 0.799999128643,
- -1.400000000000, 0.328479469127, -1.239953753608,
- -1.600000000000, 0.293941190358, -1.262585961634,
- -1.800000000000, 0.259995967920, -1.286431883494,
- -1.000000000000, 0.342606428329, -1.125914857337,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, -2.0715205309e-06, -1.6399537536e-06,
+ 0.0000000000e+00, -2.3060588096e-06, -1.8625859616e-06,
+ 0.0000000000e+00, -2.5400040321e-06, -2.0864318835e-06,
+ 0.0000000000e+00, -1.6573935717e-06, -1.3259148573e-06,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, 2.0715205309e-06, 1.6399537536e-06,
+ -0.0000000000e+00, 2.3060588096e-06, 1.8625859616e-06,
+ -0.0000000000e+00, 2.5400040321e-06, 2.0864318835e-06,
+ -0.0000000000e+00, 1.6573935717e-06, 1.3259148573e-06,
+ -0.0000000000e+00, 1.9200000000e-06, 7.6000000000e-07,
+ -0.0000000000e+00, 1.0400000000e-06, -4.2000000000e-07,
+ -0.0000000000e+00, 1.1200000000e-06, 4.6000000000e-07,
+ -0.0000000000e+00, -4.0000000000e-07, 3.2000000000e-07,
};
// ----------------------------------------------------------------------
// Open case
// ----------------------------------------------------------------------
// Input
-const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrOpen[] = {
+const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrOpen[20*3] = {
1.1, 2.1, 0.1,
1.2, 2.2, 0.2,
1.3, 2.3, 0.3,
@@ -1474,10 +1474,10 @@ const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrOpen[] = {
1.0, 2.0, 0.0,
1.1, 2.1, 0.1,
1.2, 2.2, 0.2,
- 1.5, 2.5, 0.5, // 15
- 1.6, 2.6, 0.6, // 16
- 1.7, 2.7, 0.7, // 17
- 1.8, 2.8, 0.8, // 18
+ 2.5, 1.9, 0.8, // 15
+ 2.6, 1.8, 0.9, // 16
+ 2.7, 1.7, 1.0, // 17
+ 2.8, 1.6, 1.1, // 18
+20.4, 2.4, 0.4, // 59
+20.6, 2.6, 0.6, // 60
+20.8, 2.8, 0.8, // 61
@@ -1485,27 +1485,27 @@ const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrOpen[] = {
};
// Output
-const PylithScalar pylith::faults::CohesiveDynDataHex8::_residualOpenE[] = {
- 1.100000000000, 2.100000000000, 0.100000000000,
- 1.200000000000, 2.200000000000, 0.200000000000,
- 1.300000000000, 2.300000000000, 0.300000000000,
- 1.400000000000, 2.400000000000, 0.400000000000,
- 1.500000000000, 2.500007882076, 0.500005293315,
- 1.600000000000, 2.600004874790, 0.600005290605,
- 1.700000000000, 2.700006088248, 0.700005959177,
- 1.800000000000, 2.800006286383, 0.800006065901,
- 1.900000000000, 2.900000000000, 0.900000000000,
- 1.000000000000, 2.000000000000, 0.000000000000,
- 1.100000000000, 2.100000000000, 0.100000000000,
- 1.200000000000, 2.200000000000, 0.200000000000,
- 1.500000000000, 2.499992117924, 0.499994706685,
- 1.600000000000, 2.599995125210, 0.599994709395,
- 1.700000000000, 2.699993911752, 0.699994040823,
- 1.800000000000, 2.799993713617, 0.799993934099,
- 4.400000000000, -2.400000000000, -3.400000000000,
- 4.600000000000, -2.600000000000, -3.600000000000,
- 4.800000000000, -2.800000000000, -3.800000000000,
- 4.000000000000, -2.000000000000, -3.000000000000,
+const PylithScalar pylith::faults::CohesiveDynDataHex8::_residualOpenE[20*3] = {
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -1.6000000000e-05, -4.8000000000e-06, -3.8000000000e-06,
+ -1.6000000000e-05, -5.2000000000e-06, -4.2000000000e-06,
+ -1.6000000000e-05, -5.6000000000e-06, -4.6000000000e-06,
+ -1.6000000000e-05, -4.0000000000e-06, -3.2000000000e-06,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 1.6000000000e-05, 4.8000000000e-06, 3.8000000000e-06,
+ 1.6000000000e-05, 5.2000000000e-06, 4.2000000000e-06,
+ 1.6000000000e-05, 5.6000000000e-06, 4.6000000000e-06,
+ 1.6000000000e-05, 4.0000000000e-06, 3.2000000000e-06,
+ 1.6000000000e-05, -2.8800000000e-06, 1.1400000000e-06,
+ 1.6000000000e-05, -4.1600000000e-06, 1.2600000000e-06,
+ 1.6000000000e-05, -5.6000000000e-06, 1.3800000000e-06,
+ 1.6000000000e-05, -4.8000000000e-06, 9.6000000000e-07,
};
// ----------------------------------------------------------------------
diff --git a/unittests/libtests/faults/data/CohesiveDynDataTet4.cc b/unittests/libtests/faults/data/CohesiveDynDataTet4.cc
index d97b48b..13b68c2 100644
--- a/unittests/libtests/faults/data/CohesiveDynDataTet4.cc
+++ b/unittests/libtests/faults/data/CohesiveDynDataTet4.cc
@@ -88,7 +88,7 @@ const char* pylith::faults::CohesiveDynDataTet4::_label = "fault";
const char* pylith::faults::CohesiveDynDataTet4::_initialTractFilename =
"data/tet4_initialtract.spatialdb";
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldT[] = {
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldT[11*3] = {
7.1, 8.1, 9.1,
7.2, 8.2, 9.2, // 4
7.3, 8.3, 9.3, // 5
@@ -472,19 +472,19 @@ const PylithScalar pylith::faults::CohesiveDynDataTet4::_jacobian[] = {
// Computed values
// ----------------------------------------------------------------------
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_orientation[] = {
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_orientation[3*3*3] = {
0.0, +1.0, 0.0, 0.0, 0.0, +1.0, +1.0, 0.0, 0.0,
0.0, +1.0, 0.0, 0.0, 0.0, +1.0, +1.0, 0.0, 0.0,
0.0, +1.0, 0.0, 0.0, 0.0, +1.0, +1.0, 0.0, 0.0,
};
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_area[] = {
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_area[3] = {
1.0/3.0,
1.0/3.0,
1.0/3.0,
};
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_initialTractions[] = {
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_initialTractions[3*3] = {
// Fault coordinate frame
+1.0, +2.0, -3.0,
+1.1, +2.1, -3.1,
@@ -493,10 +493,10 @@ const PylithScalar pylith::faults::CohesiveDynDataTet4::_initialTractions[] = {
const int pylith::faults::CohesiveDynDataTet4::_numConstraintEdges = 3;
-const int pylith::faults::CohesiveDynDataTet4::_constraintEdges[] = {
+const int pylith::faults::CohesiveDynDataTet4::_constraintEdges[3] = {
34, 35, 36
};
-const int pylith::faults::CohesiveDynDataTet4::_negativeVertices[] = {
+const int pylith::faults::CohesiveDynDataTet4::_negativeVertices[3] = {
4, 5, 6
};
@@ -504,7 +504,7 @@ const int pylith::faults::CohesiveDynDataTet4::_negativeVertices[] = {
// Stick case
// ----------------------------------------------------------------------
// Input
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldIncrStick[] = {
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldIncrStick[11*3] = {
1.1, 2.1, 3.1,
1.2, 2.2, 3.2, // 4
1.3, 2.3, 3.3, // 5
@@ -519,84 +519,84 @@ const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldIncrStick[] = {
};
// Output
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_residualStickE[] = {
- 1.1, 2.1, 3.1,
- 1.2, 2.2, 3.2, // 4
- 1.3, 2.3, 3.3, // 5
- 1.4, 2.4, 3.4, // 6
- 1.5, 2.5, 3.5,
- 1.2, 2.2, 3.2, // 8
- 1.3, 2.3, 3.3, // 9
- 1.4, 2.4, 3.4, // 10
- -81.7, 2.7, 3.7, // 34
- -81.9, 2.9, 3.9, // 35
- -81.1, 2.1, 3.1, // 36
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_residualStickE[11*3] = {
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, 4.9332948625e-06, 5.3943504571e-06,
+ 0.0000000000e+00, 4.8643070839e-06, 5.3105737889e-06,
+ 0.0000000000e+00, 5.1384640949e-06, 5.6472229161e-06,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, -4.9332948625e-06, -5.3943504571e-06,
+ -0.0000000000e+00, -4.8643070839e-06, -5.3105737889e-06,
+ -0.0000000000e+00, -5.1384640949e-06, -5.6472229161e-06,
+ -0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
};
// ----------------------------------------------------------------------
// Slip case
// ----------------------------------------------------------------------
// Input
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldIncrSlip[] = {
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldIncrSlip[11*3] = {
1.1, 2.1, 3.1,
1.2, 2.2, 3.2, // 4
1.3, 2.3, 3.3, // 5
1.4, 2.4, 3.4, // 6
1.5, 2.5, 3.5,
- 1.2, 2.2, 3.2, // 7
- 1.3, 2.3, 3.3, // 8
- 1.4, 2.4, 3.4, // 10
+ 1.2, 2.5, 3.4, // 7
+ 1.3, 2.4, 3.5, // 8
+ 1.4, 2.6, 3.6, // 10
-4.7, 5.7, 6.7, // 34
-4.9, 5.9, 6.9, // 35
-4.1, 5.1, 6.1, // 36
};
// Output
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_residualSlipE[] = {
- 1.100000000000, 2.100000000000, 3.100000000000,
- 1.200000000000, 2.200000916680, 3.200000185945,
- 1.300000000000, 2.299999954294, 3.300000084646,
- 1.400000000000, 2.400000465197, 3.400000369651,
- 1.500000000000, 2.500000000000, 3.500000000000,
- 1.200000000000, 2.199999083320, 3.199999814055,
- 1.300000000000, 2.300000045706, 3.299999915354,
- 1.400000000000, 2.399999534803, 3.399999630349,
- -4.700000000000, -13.650158708856, -14.236237291549,
- -4.900000000000, -13.683824215808, -14.263164878373,
- -4.100000000000, -13.548480328050, -14.156107942537,
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_residualSlipE[11*3] = {
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 0.0000000000e+00, -6.4500529030e-06, -6.9787457638e-06,
+ 0.0000000000e+00, -6.5279414053e-06, -7.0543882928e-06,
+ 0.0000000000e+00, -6.2161601093e-06, -6.7520359808e-06,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -0.0000000000e+00, 6.4500529030e-06, 6.9787457638e-06,
+ -0.0000000000e+00, 6.5279414053e-06, 7.0543882928e-06,
+ -0.0000000000e+00, 6.2161601093e-06, 6.7520359808e-06,
+ -0.0000000000e+00, 2.4400000000e-06, 1.7600000000e-06,
+ -0.0000000000e+00, 8.2666666667e-07, 1.7866666667e-06,
+ -0.0000000000e+00, 1.5466666667e-06, 1.6800000000e-06,
};
// ----------------------------------------------------------------------
// Open case
// ----------------------------------------------------------------------
// Input
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldIncrOpen[] = {
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_fieldIncrOpen[11*3] = {
1.1, 2.1, 3.1,
1.2, 2.2, 3.2, // 4
1.3, 2.3, 3.3, // 5
1.4, 2.4, 3.4, // 6
1.5, 2.5, 3.5,
- 1.2, 2.2, 3.2, // 8
- 1.3, 2.3, 3.3, // 9
- 1.4, 2.4, 3.4, // 10
+ 1.5, 3.2, 4.2, // 8
+ 1.4, 3.3, 4.3, // 9
+ 1.6, 3.4, 4.4, // 10
+80.7, 2.7, 3.7, // 34
+80.9, 2.9, 3.9, // 35
+80.1, 2.1, 3.1, // 36
};
// Output
-const PylithScalar pylith::faults::CohesiveDynDataTet4::_residualOpenE[] = {
- 1.100000000000, 2.100000000000, 3.100000000000,
- 1.199999161233, 2.200004202086, 3.200002477003,
- 1.299998110594, 2.300001999917, 3.300002482177,
- 1.400000000000, 2.400002588150, 3.400002474071,
- 1.500000000000, 2.500000000000, 3.500000000000,
- 1.200000838767, 2.199995797914, 3.199997522997,
- 1.300001889406, 2.299998000083, 3.299997517823,
- 1.400000000000, 2.399997411850, 3.399997525929,
- 7.700000000000, -18.700000000000, -19.700000000000,
- 7.900000000000, -18.900000000000, -19.900000000000,
- 7.100000000000, -18.100000000000, -19.100000000000,
+const PylithScalar pylith::faults::CohesiveDynDataTet4::_residualOpenE[11*3] = {
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ -2.4333333333e-05, -7.1333333333e-06, -7.8000000000e-06,
+ -2.4333333333e-05, -7.2666666667e-06, -7.9333333333e-06,
+ -2.4333333333e-05, -6.7333333333e-06, -7.4000000000e-06,
+ 0.0000000000e+00, 0.0000000000e+00, 0.0000000000e+00,
+ 2.4333333333e-05, 7.1333333333e-06, 7.8000000000e-06,
+ 2.4333333333e-05, 7.2666666667e-06, 7.9333333333e-06,
+ 2.4333333333e-05, 6.7333333333e-06, 7.4000000000e-06,
+ 7.3000000000e-06, 7.1333333333e-06, 7.8000000000e-06,
+ 2.4333333333e-06, 7.2666666667e-06, 7.9333333333e-06,
+ 4.8666666667e-06, 6.7333333333e-06, 7.4000000000e-06,
};
// ----------------------------------------------------------------------
diff --git a/unittests/libtests/faults/data/cohesivedyn.py b/unittests/libtests/faults/data/cohesivedyn.py
index a245067..6d588f0 100644
--- a/unittests/libtests/faults/data/cohesivedyn.py
+++ b/unittests/libtests/faults/data/cohesivedyn.py
@@ -1,4 +1,4 @@
-cell = "tri3d"
+cell = "hex8"
testCase = "open"
import numpy
@@ -54,10 +54,8 @@ if cell in ["tri3", "tri3d", "quad4"]:
m = 2
DOF = 2
- L = numpy.array([[1.0, 0.0, 0.0, 0.0,],
- [0.0, 1.0, 0.0, 0.0,],
- [0.0, 0.0, 1.0, 0.0,],
- [0.0, 0.0, 0.0, 1.0,],]);
+ A = numpy.array([[1.0, 0.0,],
+ [0.0, 1.0,],]);
C = numpy.array([[0.0, +1.0, 0.0, 0.0,],
[+1.0, 0.0, 0.0, 0.0,],
[0.0, 0.0, 0.0, +1.0,],
@@ -109,7 +107,7 @@ if cell in ["tri3", "tri3d", "quad4"]:
m = 3
DOF = 2
- L = numpy.array([[2.0, 0.0, 0.0],
+ A = numpy.array([[2.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],])
C = numpy.array([[-0.70710678118654757, +0.70710678118654757, 0.0, 0.0, 0.0, 0.0,],
@@ -181,7 +179,8 @@ if cell in ["tri3", "tri3d", "quad4"]:
m = 2
DOF = 2
- L = numpy.array([1.0, 1.0, 1.0, 1.0,]);
+ A = numpy.array([[1.0, 0.0,],
+ [0.0, 1.0,],]);
C = numpy.array([[0.0, +1.0, 0.0, 0.0,],
[+1.0, 0.0, 0.0, 0.0,],
[0.0, 0.0, 0.0, +1.0,],
@@ -235,12 +234,12 @@ if cell in ["tri3", "tri3d", "quad4"]:
# ------------------------------------------------------------------
- lagrangeScale = lengthScale**1
+ A /= lengthScale
- fieldTpdt = (fieldT + fieldTIncr) / lengthScale
+ fieldTpdt = (fieldT + fieldTIncr)
fieldTpdtFault = globalToFault(fieldTpdt[indexL,:], C)
- tractionShear = fieldTpdtFault[:,0]
+ tractionShearMag = numpy.abs(fieldTpdtFault[:,0])
tractionNormal = fieldTpdtFault[:,1]
print "fieldTpdt",fieldTpdt
@@ -250,8 +249,11 @@ if cell in ["tri3", "tri3d", "quad4"]:
tractionRheologyFault = numpy.zeros((m, DOF))
if testCase != "open":
- tractionRheologyFault[:,0] = -0.6 * tractionNormal * tractionShear/numpy.abs(tractionShear)
- tractionRheologyFault[:,1] = tractionNormal
+ tractionRheologyShear = -0.6 * tractionNormal
+ tractionRheologyNormal = tractionNormal
+
+ tractionRheologyFault[:,0] = tractionRheologyShear * fieldTpdtFault[:,0]/tractionShearMag
+ tractionRheologyFault[:,1] = tractionRheologyNormal
print "tractionRheologyFault",tractionRheologyFault
tractionRheology = faultToGlobal(tractionRheologyFault, C)
@@ -262,43 +264,28 @@ if cell in ["tri3", "tri3d", "quad4"]:
print "tractionResidual",tractionResidual
residual = numpy.zeros(fieldT.shape)
- residual[indexN,:] = +numpy.dot(L, tractionResidual)
- residual[indexP,:] = -numpy.dot(L, tractionResidual)
- residual[indexL,:] = numpy.dot(L, tractionInternal) * (fieldTpdt[indexP,:] - fieldTpdt[indexN,:]) * lagrangeScale
+ residual[indexN,:] = +numpy.dot(A, tractionResidual)
+ residual[indexP,:] = -numpy.dot(A, tractionResidual)
+ residual[indexL,:] = numpy.dot(A, tractionInternal) * (fieldTpdt[indexP,:] - fieldTpdt[indexN,:])
print "residual \n",printdata(residual)
# ----------------------------------------------------------------------
-elif cell == "tet4" or cell == "hex8":
- lagrangeScale = lengthScale**2
+elif cell in ["tet4", "hex8"]:
if cell == "tet4":
- dlagrange2 = numpy.zeros(3)
- indexL = numpy.arange(24,33)
- indexN = numpy.arange(3,12)
- indexP = numpy.arange(15,24)
- n = 33
- m = 9
+ indexL = numpy.arange(8,11)
+ indexN = numpy.arange(1,4)
+ indexP = numpy.arange(5,8)
+ n = 11
+ m = 3
DOF = 3
- fieldT = numpy.array([[-7.7, 18.7, 19.7],
- [-7.9, 18.9, 19.9],
- [-7.1, 18.1, 19.1]])
- fieldIncr = numpy.array([[-4.7, 5.7, 6.7],
- [-4.9, 5.9, 6.9],
- [-4.1, 5.1, 6.1]])
-
- L = numpy.array([[1.0/3.0,0,0, 0.0,0,0, 0.0,0,0,],
- [0,1.0/3.0,0, 0,0.0,0, 0,0.0,0,],
- [0,0,1.0/3.0, 0,0,0.0, 0,0,0.0,],
- [0.0,0,0, 1.0/3.0,0,0, 0.0,0,0,],
- [0,0.0,0, 0,1.0/3.0,0, 0,0.0,0,],
- [0,0,0.0, 0,0,1.0/3.0, 0,0,0.0,],
- [0.0,0,0, 0.0,0,0, 1.0/3.0,0,0,],
- [0,0.0,0, 0,0.0,0, 0,1.0/3.0,0,],
- [0,0,0.0, 0,0,0.0, 0,0,1.0/3.0,]])
+ A = numpy.array([[1.0/3.0, 0, 0,],
+ [ 0, 1.0/3.0, 0,],
+ [ 0, 0, 1.0/3.0,]])
Cv = numpy.array([[ 0, +1, 0,],
[ 0, 0, +1,],
@@ -308,100 +295,68 @@ elif cell == "tet4" or cell == "hex8":
numpy.hstack((Zv, Cv, Zv)),
numpy.hstack((Zv, Zv, Cv)) ) )
- jacobianN = numpy.array(
- [[ 4.0, -1.1, -1.2, -1.3, -1.4, -1.5, -1.6, -1.7, -1.8],
- [-1.1, 4.1, -2.3, -2.4, -2.5, -2.6, -2.7, -2.8, -2.9],
- [-1.2, -2.3, 4.2, -1.0, -1.1, -1.2, -1.3, -1.4, -1.5],
- [-1.3, -2.4, -1.0, 4.3, -0.2, -0.3, -0.4, -0.5, -0.6],
- [-1.4, -2.5, -1.1, -0.2, 4.4, -0.9, -0.8, -0.7, -0.5],
- [-1.5, -2.6, -1.2, -0.3, -0.9, 4.5, -1.1, -1.2, -1.3],
- [-1.6, -2.7, -1.3, -0.4, -0.8, -1.1, 4.6, -1.8, -1.5],
- [-1.7, -2.8, -1.4, -0.5, -0.7, -1.2, -1.8, 4.7, -1.1],
- [-1.8, -2.9, -1.5, -0.6, -0.5, -1.3, -1.5, -1.1, 4.8]])
-
- jacobianP = numpy.array(
- [[ 5.0, -1.1, -1.2, -1.3, -1.4, -1.5, -1.6, -1.7, -1.8],
- [-1.1, 5.1, -2.3, -2.4, -2.5, -2.6, -2.7, -2.8, -2.9],
- [-1.2, -2.3, 5.2, -1.0, -1.1, -1.2, -1.3, -1.4, -1.5],
- [-1.3, -2.4, -1.0, 5.3, -0.2, -0.3, -0.4, -0.5, -0.6],
- [-1.4, -2.5, -1.1, -0.2, 5.4, -0.9, -0.8, -0.7, -0.5],
- [-1.5, -2.6, -1.2, -0.3, -0.9, 5.5, -1.1, -1.2, -1.3],
- [-1.6, -2.7, -1.3, -0.4, -0.8, -1.1, 5.6, -1.8, -1.5],
- [-1.7, -2.8, -1.4, -0.5, -0.7, -1.2, -1.8, 5.7, -1.1],
- [-1.8, -2.9, -1.5, -0.6, -0.5, -1.3, -1.5, -1.1, 5.8]])
-
- disp = numpy.array([[ 7.1, 8.1, 9.1,],
- [ 7.2, 8.2, 9.2,],
- [ 7.3, 8.3, 9.3,],
- [ 7.4, 8.4, 9.4,],
- [ 7.5, 8.5, 9.5,],
- [ 7.2, 8.2, 9.2,],
- [ 7.3, 8.3, 9.3,],
- [ 7.4, 8.4, 9.4,],
- [-7.7, 18.7, 19.7,],
- [-7.9, 18.9, 19.9,],
- [-7.1, 18.1, 19.1,],])
-
- if testCase == "slip":
- dispIncr = numpy.array([[ 1.1, 2.1, 3.1,],
- [ 1.2, 2.2, 3.2,],
- [ 1.3, 2.3, 3.3,],
- [ 1.4, 2.4, 3.4,],
- [ 1.5, 2.5, 3.5,],
- [ 1.2, 2.2, 3.2,],
- [ 1.3, 2.3, 3.3,],
- [ 1.4, 2.4, 3.4,],
- [-4.7, 5.7, 6.7,],
- [-4.9, 5.9, 6.9,],
- [-4.1, 5.1, 6.1,],])
+ fieldT = numpy.array([[ 7.1, 8.1, 9.1,],
+ [ 7.2, 8.2, 9.2,],
+ [ 7.3, 8.3, 9.3,],
+ [ 7.4, 8.4, 9.4,],
+ [ 7.5, 8.5, 9.5,],
+ [ 7.2, 8.2, 9.2,],
+ [ 7.3, 8.3, 9.3,],
+ [ 7.4, 8.4, 9.4,],
+ [-7.7, 18.7, 19.7,],
+ [-7.9, 18.9, 19.9,],
+ [-7.1, 18.1, 19.1,],])
+
+ if testCase == "stick":
+ fieldTIncr = numpy.array([[ 1.1, 2.1, 3.1,],
+ [ 1.2, 2.2, 3.2,],
+ [ 1.3, 2.3, 3.3,],
+ [ 1.4, 2.4, 3.4,],
+ [ 1.5, 2.5, 3.5,],
+ [ 1.2, 2.2, 3.2,],
+ [ 1.3, 2.3, 3.3,],
+ [ 1.4, 2.4, 3.4,],
+ [-81.7, 2.7, 3.7,],
+ [-81.9, 2.9, 3.9,],
+ [-81.1, 2.1, 3.1,],])
+ elif testCase == "slip":
+ fieldTIncr = numpy.array([[ 1.1, 2.1, 3.1,],
+ [ 1.2, 2.2, 3.2,],
+ [ 1.3, 2.3, 3.3,],
+ [ 1.4, 2.4, 3.4,],
+ [ 1.5, 2.5, 3.5,],
+ [ 1.2, 2.5, 3.4,],
+ [ 1.3, 2.4, 3.5,],
+ [ 1.4, 2.6, 3.6,],
+ [-4.7, 5.7, 6.7,],
+ [-4.9, 5.9, 6.9,],
+ [-4.1, 5.1, 6.1,],])
elif testCase == "open":
- dispIncr = numpy.array([[ 1.1, 2.1, 3.1,],
- [ 1.2, 2.2, 3.2,],
- [ 1.3, 2.3, 3.3,],
- [ 1.4, 2.4, 3.4,],
- [ 1.5, 2.5, 3.5,],
- [ 1.2, 2.2, 3.2,],
- [ 1.3, 2.3, 3.3,],
- [ 1.4, 2.4, 3.4,],
- [+80.7, 2.7, 3.7,],
- [+80.9, 2.9, 3.9,],
- [+80.1, 2.1, 3.1,],])
+ fieldTIncr = numpy.array([[ 1.1, 2.1, 3.1,],
+ [ 1.2, 2.2, 3.2,],
+ [ 1.3, 2.3, 3.3,],
+ [ 1.4, 2.4, 3.4,],
+ [ 1.5, 2.5, 3.5,],
+ [ 1.5, 3.2, 4.2,],
+ [ 1.4, 3.3, 4.3,],
+ [ 1.6, 3.4, 4.4,],
+ [+80.7, 2.7, 3.7,],
+ [+80.9, 2.9, 3.9,],
+ [+80.1, 2.1, 3.1,],])
elif cell == "hex8":
- dlagrange2 = numpy.zeros(4)
- indexL = numpy.arange(48,60)
- indexN = numpy.arange(12,24)
- indexP = numpy.arange(36,48)
- n = 60
- m = 12
+ indexL = numpy.arange(16,20)
+ indexN = numpy.arange(4,8)
+ indexP = numpy.arange(12,16)
+ n = 20
+ m = 4
DOF = 3
- a0 = 1.0
- a1 = 0.0
- a2 = 0.0
- L = numpy.array([[a0, 0, 0, a1, 0, 0, a1, 0, 0, a2, 0, 0],
- [0, a0, 0, 0, a1, 0, 0, a1, 0, 0, a2, 0],
- [0, 0, a0, 0, 0, a1, 0, 0, a1, 0, 0, a2],
- [a1, 0, 0, a0, 0, 0, a2, 0, 0, a1, 0, 0],
- [0, a1, 0, 0, a0, 0, 0, a2, 0, 0, a1, 0],
- [0, 0, a1, 0, 0, a0, 0, 0, a2, 0, 0, a1],
- [a1, 0, 0, a2, 0, 0, a0, 0, 0, a1, 0, 0],
- [0, a1, 0, 0, a2, 0, 0, a0, 0, 0, a1, 0],
- [0, 0, a1, 0, 0, a2, 0, 0, a0, 0, 0, a1],
- [a2, 0, 0, a1, 0, 0, a1, 0, 0, a0, 0, 0],
- [0, a2, 0, 0, a1, 0, 0, a1, 0, 0, a0, 0],
- [0, 0, a2, 0, 0, a1, 0, 0, a1, 0, 0, a0]])
-
- fieldT = numpy.array([[-4.4, 2.4, 3.4],
- [-4.6, 2.6, 3.6],
- [-4.8, 2.8, 3.8],
- [-4.0, 2.0, 3.0]])
- fieldIncr = numpy.array([[-1.4, 2.4, 0.4],
- [-1.6, 2.6, 0.6],
- [-1.8, 2.8, 0.8],
- [-1.0, 2.0, 0.2]])
-
+ A = numpy.array([[1.0, 0, 0, 0,],
+ [ 0, 1.0, 0, 0,],
+ [ 0, 0, 1.0, 0,],
+ [ 0, 0, 0, 1.0,]])
Cv = numpy.array([[ 0, +1, 0,],
[ 0, 0, +1,],
[ +1, 0, 0,],])
@@ -411,167 +366,126 @@ elif cell == "tet4" or cell == "hex8":
numpy.hstack((Zv, Zv, Cv, Zv)),
numpy.hstack((Zv, Zv, Zv, Cv)) ) )
- jacobianN = numpy.array(
- [[+6.0, -0.5, -0.6, -0.7, -0.8, -0.9, -1.0, -0.8, -0.7, -0.6, -0.5, -0.4,],
- [-0.5, +6.1, -1.0, -1.1, -1.2, -1.3, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9,],
- [-0.6, -1.0, +6.2, -0.5, -0.6, -0.7, -0.8, -0.9, -0.8, -0.7, -0.6, -0.5,],
- [-0.7, -1.1, -0.5, +6.3, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1,],
- [-0.8, -1.2, -0.6, -0.8, +6.4, -0.3, -0.4, -0.5, -0.6, -0.7, -0.8, -0.9,],
- [-0.9, -1.3, -0.7, -0.7, -0.3, +6.5, -0.3, -0.8, -0.7, -0.6, -0.9, -0.7,],
- [-1.0, -1.4, -0.8, -0.6, -0.4, -0.3, +6.6, -1.1, -0.8, -0.7, -0.6, -0.5,],
- [-0.8, -1.3, -0.9, -0.5, -0.5, -0.8, -1.1, +6.7, -0.8, -0.9, -1.0, -1.1,],
- [-0.7, -1.2, -0.8, -0.4, -0.6, -0.7, -0.8, -0.8, +6.8, -1.0, -1.1, -1.2,],
- [-0.6, -1.1, -0.7, -0.3, -0.7, -0.6, -0.7, -0.9, -1.0, +6.9, -0.5, -0.4,],
- [-0.5, -1.0, -0.6, -0.2, -0.8, -0.9, -0.6, -1.0, -1.1, -0.5, +6.0, -1.2,],
- [-0.4, -0.9, -0.5, -0.1, -0.9, -0.7, -0.5, -1.1, -1.2, -0.4, -1.2, +6.1,],])
-
-
- jacobianP = numpy.array(
- [[+7.0, -0.5, -0.6, -0.7, -0.8, -0.9, -1.0, -0.8, -0.7, -0.6, -0.5, -0.4,],
- [-0.5, +7.1, -1.0, -1.1, -1.2, -1.3, -1.4, -1.3, -1.2, -1.1, -1.0, -0.9,],
- [-0.6, -1.0, +7.2, -0.5, -0.6, -0.7, -0.8, -0.9, -0.8, -0.7, -0.6, -0.5,],
- [-0.7, -1.1, -0.5, +7.3, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1,],
- [-0.8, -1.2, -0.6, -0.8, +7.4, -0.3, -0.4, -0.5, -0.6, -0.7, -0.8, -0.9,],
- [-0.9, -1.3, -0.7, -0.7, -0.3, +7.5, -0.3, -0.8, -0.7, -0.6, -0.9, -0.7,],
- [-1.0, -1.4, -0.8, -0.6, -0.4, -0.3, +7.6, -1.1, -0.8, -0.7, -0.6, -0.5,],
- [-0.8, -1.3, -0.9, -0.5, -0.5, -0.8, -1.1, +7.7, -0.8, -0.9, -1.0, -1.1,],
- [-0.7, -1.2, -0.8, -0.4, -0.6, -0.7, -0.8, -0.8, +7.8, -1.0, -1.1, -1.2,],
- [-0.6, -1.1, -0.7, -0.3, -0.7, -0.6, -0.7, -0.9, -1.0, +7.9, -0.5, -0.4,],
- [-0.5, -1.0, -0.6, -0.2, -0.8, -0.9, -0.6, -1.0, -1.1, -0.5, +7.0, -1.2,],
- [-0.4, -0.9, -0.5, -0.1, -0.9, -0.7, -0.5, -1.1, -1.2, -0.4, -1.2, +7.1,],])
-
- disp = numpy.array([[ 4.1, 2.1, 3.1,],
- [ 4.2, 2.2, 3.2,],
- [ 4.3, 2.3, 3.3,],
- [ 4.4, 2.4, 3.4,],
- [ 4.5, 2.5, 3.5,],
- [ 4.6, 2.6, 3.6,],
- [ 4.7, 2.7, 3.7,],
- [ 4.8, 2.8, 3.8,],
- [ 4.9, 2.9, 3.9,],
- [ 4.0, 2.0, 3.0,],
- [ 4.1, 2.1, 3.1,],
- [ 4.2, 2.2, 3.2,],
- [ 4.5, 3.2, 4.3,],
- [ 4.6, 3.5, 4.6,],
- [ 4.7, 3.7, 4.6,],
- [ 4.8, 3.6, 4.5,],
- [-4.4, 2.4, 3.4,],
- [-4.6, 2.6, 3.6,],
- [-4.8, 2.8, 3.8,],
- [-4.0, 2.0, 3.0,],])
-
- if testCase == "slip":
- dispIncr = numpy.array([[ 1.1, 2.1, 0.1,],
- [ 1.2, 2.2, 0.2,],
- [ 1.3, 2.3, 0.3,],
- [ 1.4, 2.4, 0.4,],
- [ 1.5, 2.5, 0.5,],
- [ 1.6, 2.6, 0.6,],
- [ 1.7, 2.7, 0.7,],
- [ 1.8, 2.8, 0.8,],
- [ 1.9, 2.9, 0.9,],
- [ 1.0, 2.0, 0.0,],
- [ 1.1, 2.1, 0.1,],
- [ 1.2, 2.2, 0.2,],
- [ 1.5, 2.5, 0.5,],
- [ 1.6, 2.6, 0.6,],
- [ 1.7, 2.7, 0.7,],
- [ 1.8, 2.8, 0.8,],
- [-1.4, 2.4, 0.4,],
- [-1.6, 2.6, 0.6,],
- [-1.8, 2.8, 0.8,],
- [-1.0, 2.0, 0.2,],
- ])
+ fieldT = numpy.array([[ 4.1, 2.1, 3.1,],
+ [ 4.2, 2.2, 3.2,],
+ [ 4.3, 2.3, 3.3,],
+ [ 4.4, 2.4, 3.4,],
+ [ 4.5, 2.5, 3.5,],
+ [ 4.6, 2.6, 3.6,],
+ [ 4.7, 2.7, 3.7,],
+ [ 4.8, 2.8, 3.8,],
+ [ 4.9, 2.9, 3.9,],
+ [ 4.0, 2.0, 3.0,],
+ [ 4.1, 2.1, 3.1,],
+ [ 4.2, 2.2, 3.2,],
+ [ 4.5, 2.5, 3.5,],
+ [ 4.6, 2.6, 3.6,],
+ [ 4.7, 2.7, 3.7,],
+ [ 4.8, 2.8, 3.8,],
+ [-4.4, 2.4, 3.4,],
+ [-4.6, 2.6, 3.6,],
+ [-4.8, 2.8, 3.8,],
+ [-4.0, 2.0, 3.0,],])
+
+ if testCase == "stick":
+ fieldTIncr = numpy.array([[0.1, 2.1, 1.1,],
+ [0.2, 2.2, 1.2,],
+ [0.3, 2.3, 1.3,],
+ [0.4, 2.4, 1.4,],
+ [0.5, 2.5, 1.5,],
+ [0.6, 2.6, 1.6,],
+ [0.7, 2.7, 1.7,],
+ [0.8, 2.8, 1.8,],
+ [0.9, 2.9, 1.9,],
+ [0.0, 2.0, 1.0,],
+ [1.1, 3.1, 2.1,],
+ [1.2, 3.2, 2.2,],
+ [0.5, 2.5, 1.5,],
+ [0.6, 2.6, 1.6,],
+ [0.7, 2.7, 1.7,],
+ [0.8, 2.8, 1.8,],
+ [-12.266666666667, 3.6, 4.6,],
+ [-12.066666666667, 5.4, 2.4,],
+ [-16.866666666667, 2.2, 8.2,],
+ [-17.666666666667, 10.0, 2.0,],])
+ elif testCase == "slip":
+ fieldTIncr = numpy.array([[ 1.1, 2.1, 0.1,],
+ [ 1.2, 2.2, 0.2,],
+ [ 1.3, 2.3, 0.3,],
+ [ 1.4, 2.4, 0.4,],
+ [ 1.5, 2.5, 0.5,],
+ [ 1.6, 2.6, 0.6,],
+ [ 1.7, 2.7, 0.7,],
+ [ 1.8, 2.8, 0.8,],
+ [ 1.9, 2.9, 0.9,],
+ [ 1.0, 2.0, 0.0,],
+ [ 1.1, 2.1, 0.1,],
+ [ 1.2, 2.2, 0.2,],
+ [ 1.5, 2.9, 0.7,],
+ [ 1.6, 2.8, 0.5,],
+ [ 1.7, 2.9, 0.8,],
+ [ 1.8, 2.7, 0.9,],
+ [-1.4, 2.4, 0.4,],
+ [-1.6, 2.6, 0.6,],
+ [-1.8, 2.8, 0.8,],
+ [-1.0, 2.0, 0.2,],])
elif testCase == "open":
- dispIncr = numpy.array([[ 1.1, 2.1, 0.1,],
- [ 1.2, 2.2, 0.2,],
- [ 1.3, 2.3, 0.3,],
- [ 1.4, 2.4, 0.4,],
- [ 1.5, 2.5, 0.5,],
- [ 1.6, 2.6, 0.6,],
- [ 1.7, 2.7, 0.7,],
- [ 1.8, 2.8, 0.8,],
- [ 1.9, 2.9, 0.9,],
- [ 1.0, 2.0, 0.0,],
- [ 1.1, 2.1, 0.1,],
- [ 1.2, 2.2, 0.2,],
- [ 1.5, 2.5, 0.5,],
- [ 1.6, 2.6, 0.6,],
- [ 1.7, 2.7, 0.7,],
- [ 1.8, 2.8, 0.8,],
- [+20.4, 2.4, 0.4,],
- [+20.6, 2.6, 0.6,],
- [+20.8, 2.8, 0.8,],
- [+20.0, 2.0, 0.2,],])
+ fieldTIncr = numpy.array([[ 1.1, 2.1, 0.1,],
+ [ 1.2, 2.2, 0.2,],
+ [ 1.3, 2.3, 0.3,],
+ [ 1.4, 2.4, 0.4,],
+ [ 1.5, 2.5, 0.5,],
+ [ 1.6, 2.6, 0.6,],
+ [ 1.7, 2.7, 0.7,],
+ [ 1.8, 2.8, 0.8,],
+ [ 1.9, 2.9, 0.9,],
+ [ 1.0, 2.0, 0.0,],
+ [ 1.1, 2.1, 0.1,],
+ [ 1.2, 2.2, 0.2,],
+ [ 2.5, 1.9, 0.8,],
+ [ 2.6, 1.8, 0.9,],
+ [ 2.7, 1.7, 1.0,],
+ [ 2.8, 1.6, 1.1,],
+ [+20.4, 2.4, 0.4,],
+ [+20.6, 2.6, 0.6,],
+ [+20.8, 2.8, 0.8,],
+ [+20.0, 2.0, 0.2,],])
# ------------------------------------------------------------------
- fieldTpdt = fieldT + fieldIncr
+ A /= lengthScale**2
- fieldTpdt = globalToFault(fieldTpdt, C)
-
- tractionShear = (fieldTpdt[:,0]**2 + fieldTpdt[:,1]**2)**0.5
- tractionNormal = fieldTpdt[:,2]
+ fieldTpdt = (fieldT + fieldTIncr)
+ print "fieldTpdt",fieldTpdt
+ fieldTpdtFault = globalToFault(fieldTpdt[indexL,:], C)
- print "tractionShear",tractionShear
+ tractionShearMag = (fieldTpdtFault[:,0]**2 + fieldTpdtFault[:,1]**2)**0.5
+ tractionNormal = fieldTpdtFault[:,2]
+ print "tractionShearMag",tractionShearMag
print "tractionNormal",tractionNormal
- friction = -0.6 * tractionNormal;
-
- print "friction",friction
-
- dlagrange0 = (friction - tractionShear) * fieldTpdt[:,0] / tractionShear
- dlagrange1 = (friction - tractionShear) * fieldTpdt[:,1] / tractionShear
-
- print "dlagrange0",dlagrange0
- print "dlagrange1",dlagrange1
-
- if testCase == "slip":
- dLagrange = numpy.vstack((dlagrange0, dlagrange1, dlagrange2))
- dLagrange = numpy.transpose(dLagrange)
- dLagrange = faultToGlobal(dLagrange, C).reshape(m)
- elif testCase == "open":
- dLagrange = numpy.reshape(disp+dispIncr, n)
- dLagrange = -dLagrange[indexL]
-
- print "dLagrange \n", dLagrange
-
- L /= lengthScale**2
- RHS = numpy.dot(numpy.transpose(L),dLagrange)
- print "RHS",RHS
- duN = numpy.dot(inv(jacobianN),RHS)
- duP = -numpy.dot(inv(jacobianP),RHS)
-
- dispRel = duP - duN
-
- dispTpdt = disp + dispIncr
- dispTpdt = numpy.reshape(dispTpdt, n)
-
- slipVertex = dispRel + dispTpdt[indexP]-dispTpdt[indexN]
- slipVertex = numpy.reshape(slipVertex, (m/DOF,DOF))
- slipVertex = globalToFault(slipVertex, C)
- if testCase == "slip":
- slipVertex[:,2] = 0
- mask = slipVertex[:,2] < 0.0
- slipVertex[mask,2] = 0
- slipVertex = faultToGlobal(slipVertex, C)
- slipVertex = numpy.reshape(slipVertex, m)
- disp = numpy.reshape(disp, n)
- slipIncrVertex = slipVertex - (disp[indexP] - disp[indexN])
+ tractionRheologyFault = numpy.zeros((m, DOF))
+ if testCase != "open":
+ tractionRheologyShear = -0.6 * tractionNormal
+ tractionRheologyNormal = tractionNormal
- print "duN \n", duN
- print "duP \n", duP
+ tractionRheologyFault[:,0] = tractionRheologyShear * fieldTpdtFault[:,0]/tractionShearMag
+ tractionRheologyFault[:,1] = tractionRheologyShear * fieldTpdtFault[:,1]/tractionShearMag
+ tractionRheologyFault[:,2] = tractionRheologyNormal
+ print "tractionRheologyFault",tractionRheologyFault
- dispIncrE = dispIncr
- dispIncrE = numpy.reshape(dispIncrE, n)
+ tractionRheology = faultToGlobal(tractionRheologyFault, C)
+ tractionInternal = fieldTpdt[indexL,:]
+ tractionResidual = tractionRheology - tractionInternal
+ print "tractionRheology",tractionRheology
+ print "tractionInternal",tractionInternal
+ print "tractionResidual",tractionResidual
- dispIncrE[indexL] = dispIncrE[indexL] + dLagrange
- dispIncrE[indexN] = dispIncrE[indexN] - 0.5*slipIncrVertex
- dispIncrE[indexP] = dispIncrE[indexP] + 0.5*slipIncrVertex
- dispIncrE = numpy.reshape(dispIncrE, (n/DOF,DOF))
+ residual = numpy.zeros(fieldT.shape)
+ residual[indexN,:] = +numpy.dot(A, tractionResidual)
+ residual[indexP,:] = -numpy.dot(A, tractionResidual)
+ residual[indexL,:] = numpy.dot(A, tractionInternal) * (fieldTpdt[indexP,:] - fieldTpdt[indexN,:])
- slipVertex = numpy.reshape(slipVertex, (m/DOF,DOF))
- slipVertex = globalToFault(slipVertex, C)
+ print "numpy.dot(A, tractionInternal)",numpy.dot(A, tractionInternal)
+ print "fieldTpdt[indexP,:] - fieldTpdt[indexN,:]",fieldTpdt[indexP,:] - fieldTpdt[indexN,:]
- print "dispIncrE\n", printdata(dispIncrE)
- print "slipVertexE\n", printdata(slipVertex)
+ print "residual \n",printdata(residual)
- Previous message: [cig-commits] [commit] baagaard/dynrup-new-lagrange: Update test data for FaultCohesiveDyn 2-D unit tests. (54b8f6c)
- Next message: [cig-commits] [commit] baagaard/add-examples-debugging, baagaard/add-release-2.0.3, baagaard/add-release-2.1.0, baagaard/dynrup-new-lagrange, baagaard/feature-output-station-names, baagaard/feature-progress-monitor, baagaard/fix-custom-faultpc, baagaard/fix-error-messages, baagaard/fix-faults-intersect, baagaard/fix-friction-initial-state, baagaard/update-autoconf, knepley/feature-petsc-fe, knepley/upgrade-petsc-3.5, knepley/upgrade-petsc-master, maint, master, next, williams/add-examples-grav2d, willic3/fix-plasticity: Added initial version of 2D gravity example (2c89b41)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the CIG-COMMITS
mailing list