[cig-commits] r7279 - in short/3D/PyLith/trunk: libsrc/faults
tests/2d/quad4 unittests/libtests/faults/data
brad at geodynamics.org
brad at geodynamics.org
Sun Jun 17 15:35:13 PDT 2007
Author: brad
Date: 2007-06-17 15:35:13 -0700 (Sun, 17 Jun 2007)
New Revision: 7279
Modified:
short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg
short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc
short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc
Log:
Removed Lagrange constraint vertices from being added to every group (only add to fault group). This fix prevents BC from affecting fault slip constraints (permits expected behavior when a fault intersects a boundary with a Dirichlet BC). Updated unit tests to require this behavior.
Modified: short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/libsrc/faults/CohesiveTopology.cc 2007-06-17 22:35:13 UTC (rev 7279)
@@ -145,16 +145,20 @@
std::cout << "Duplicating " << *v_iter << " to "
<< vertexRenumber[*v_iter] << std::endl;
+ // Add shadow and constraint vertices (if they exist) to group
+ // associated with fault
+ groupField->addPoint(newPoint, 1);
+ if (constraintCell)
+ groupField->addPoint(newPoint+1, 1);
+
+ // Add shadow vertices to other groups, don't add constraint
+ // vertices (if they exist) because we don't want BC, etc to act
+ // on constraint vertices
for(std::set<std::string>::const_iterator name = groupNames->begin();
name != groupNames->end(); ++name) {
const ALE::Obj<int_section_type>& group = mesh->getIntSection(*name);
-
- if (group->hasPoint(*v_iter)) {
+ if (group->hasPoint(*v_iter))
group->addPoint(newPoint, 1);
- if (constraintCell) {
- group->addPoint(newPoint+1, 1);
- }
- }
} // for
if (constraintCell) newPoint++;
} // for
Modified: short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg 2007-06-17 22:35:13 UTC (rev 7279)
@@ -35,7 +35,7 @@
default_dt = 1.0*s
dimension = 2
formulation = pylith.problems.Implicit
-bc = pylith.bc.BCTwoSides
+bc = pylith.bc.BCFourSides
interfaces = pylith.faults.SingleFault
# ----------------------------------------------------------------------
@@ -55,23 +55,28 @@
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.neg]
+[pylithapp.timedependent.bc.x_neg]
fixed_dof = [0, 1]
-id = 10
label = x_neg
db.label = Dirichlet BC -x edge
db.iohandler.filename = dislocation_disp.spatialdb
db.query_type = linear
-[pylithapp.timedependent.bc.pos]
+[pylithapp.timedependent.bc.x_pos]
fixed_dof = [0, 1]
-id = 11
label = x_pos
db.label = Dirichlet BC +x edge
db.iohandler.filename = dislocation_disp.spatialdb
db.query_type = linear
+[pylithapp.timedependent.bc.y_pos]
+fixed_dof = [0]
+label = y_pos
+db.label = Dirichlet BC +y edge
+db.iohandler.filename = dislocation_disp.spatialdb
+db.query_type = linear
+
# ----------------------------------------------------------------------
# faults
# ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh 2007-06-17 22:35:13 UTC (rev 7279)
@@ -52,4 +52,12 @@
5
}
}
+ group = {
+ name = y_pos
+ type = vertices
+ count = 1
+ indices = {
+ 3
+ }
+ }
}
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataHex8Lagrange.cc 2007-06-17 22:35:13 UTC (rev 7279)
@@ -81,11 +81,11 @@
const int pylith::faults::CohesiveDataHex8Lagrange::_numGroups = 2;
const int pylith::faults::CohesiveDataHex8Lagrange::_groupSizes[] =
- { 12, 10 };
+ { 12, 8 };
const int pylith::faults::CohesiveDataHex8Lagrange::_groups[] = {
6, 7, 8, 9, 14, 15, 16, 17, 18, 19, 20, 21,
- 4, 5, 8, 9, 12, 13, 18, 19, 20, 21
+ 4, 5, 8, 9, 12, 13, 18, 20
};
const char* pylith::faults::CohesiveDataHex8Lagrange::_groupNames[] = {
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataLine2Lagrange.cc 2007-06-17 22:35:13 UTC (rev 7279)
@@ -58,11 +58,11 @@
const int pylith::faults::CohesiveDataLine2Lagrange::_numGroups = 2;
const int pylith::faults::CohesiveDataLine2Lagrange::_groupSizes[] =
- { 3, 4 };
+ { 3, 3 };
const int pylith::faults::CohesiveDataLine2Lagrange::_groups[] = {
3, 5, 6,
- 2, 3, 5, 6
+ 2, 3, 5
};
const char* pylith::faults::CohesiveDataLine2Lagrange::_groupNames[] = {
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataQuad4Lagrange.cc 2007-06-17 22:35:13 UTC (rev 7279)
@@ -84,11 +84,11 @@
const int pylith::faults::CohesiveDataQuad4Lagrange::_numGroups = 2;
const int pylith::faults::CohesiveDataQuad4Lagrange::_groupSizes[] =
- { 6, 5 };
+ { 6, 4 };
const int pylith::faults::CohesiveDataQuad4Lagrange::_groups[] = {
4, 5, 8, 9, 10, 11,
- 3, 5, 7, 10, 11
+ 3, 5, 7, 10
};
const char* pylith::faults::CohesiveDataQuad4Lagrange::_groupNames[] = {
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTet4Lagrange.cc 2007-06-17 22:35:13 UTC (rev 7279)
@@ -71,11 +71,11 @@
const int pylith::faults::CohesiveDataTet4Lagrange::_numGroups = 2;
const int pylith::faults::CohesiveDataTet4Lagrange::_groupSizes[] =
- { 9, 7 };
+ { 9, 5 };
const int pylith::faults::CohesiveDataTet4Lagrange::_groups[] = {
3, 4, 5, 7, 8, 9, 10, 11, 12,
- 2, 4, 5, 9, 10, 11, 12
+ 2, 4, 5, 9, 11
};
const char* pylith::faults::CohesiveDataTet4Lagrange::_groupNames[] = {
Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc 2007-06-17 20:54:49 UTC (rev 7278)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDataTri3Lagrange.cc 2007-06-17 22:35:13 UTC (rev 7279)
@@ -85,11 +85,11 @@
const int pylith::faults::CohesiveDataTri3Lagrange::_numGroups = 2;
const int pylith::faults::CohesiveDataTri3Lagrange::_groupSizes[] =
- { 6, 7 };
+ { 6, 5 };
const int pylith::faults::CohesiveDataTri3Lagrange::_groups[] = {
3, 4, 6, 7, 8, 9,
- 3, 4, 5, 6, 7, 8, 9
+ 3, 4, 5, 6, 8
};
const char* pylith::faults::CohesiveDataTri3Lagrange::_groupNames[] = {
More information about the cig-commits
mailing list