[cig-commits] r6488 - in short/3D/PyLith/trunk: . examples/twotri3
libsrc/feassemble libsrc/materials modulesrc/feassemble
pylith/feassemble pylith/problems
brad at geodynamics.org
brad at geodynamics.org
Sat Mar 31 12:43:46 PDT 2007
Author: brad
Date: 2007-03-31 12:43:45 -0700 (Sat, 31 Mar 2007)
New Revision: 6488
Removed:
short/3D/PyLith/trunk/libsrc/feassemble/IntegratorInertia.icc
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/examples/twotri3/pylithapp.cfg
short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc
short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh
short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.hh
short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh
short/3D/PyLith/trunk/libsrc/materials/Material.cc
short/3D/PyLith/trunk/libsrc/materials/Material.hh
short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src
short/3D/PyLith/trunk/pylith/feassemble/ExplicitElasticity.py
short/3D/PyLith/trunk/pylith/feassemble/Integrator.py
short/3D/PyLith/trunk/pylith/feassemble/IntegratorExplicit.py
short/3D/PyLith/trunk/pylith/problems/Explicit.py
Log:
Fixed initialization of material. Fixed material setup in example twotri3.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/TODO 2007-03-31 19:43:45 UTC (rev 6488)
@@ -7,8 +7,8 @@
add check to material::initialize material dimension must match cell dimension
-0. Add unit tests for ElasticIsotropic1D, ElasticPlaneStrain,
-ElasticPlaneStress.
+0. Update Material tests. Add unit tests for ElasticIsotropic1D,
+ElasticPlaneStrain, ElasticPlaneStress.
1. Finish implementing ExplicitElasticity
a. C++
Modified: short/3D/PyLith/trunk/examples/twotri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twotri3/pylithapp.cfg 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/examples/twotri3/pylithapp.cfg 2007-03-31 19:43:45 UTC (rev 6488)
@@ -37,7 +37,10 @@
# ----------------------------------------------------------------------
# materials
# ----------------------------------------------------------------------
-[pylithapp.eqdeformation.homogeneous.material]
+[pylithapp.eqdeformation.materials]
+material = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.eqdeformation.materials.material]
label = elastic material
id = 1
db.iohandler.filename = matprops.spatialdb
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc 2007-03-31 19:43:45 UTC (rev 6488)
@@ -61,25 +61,29 @@
// finite elements.
void
pylith::feassemble::ExplicitElasticity::integrateConstant(
- const ALE::Obj<Mesh>& m,
const ALE::Obj<real_section_type>& b,
const ALE::Obj<real_section_type>& dispT,
const ALE::Obj<real_section_type>& dispTmdt,
- const ALE::Obj<real_section_type>& coordinates)
+ const ALE::Obj<Mesh>& mesh)
{ // integrateConstant
assert(0 != _quadrature);
+ assert(!b.isNull());
+ assert(!dispT.isNull());
+ assert(!dispTmdt.isNull());
+ assert(!mesh.isNull());
// Get information about section
- const ALE::Obj<Mesh::label_sequence>& cells = m->heightStratum(0);
+ const ALE::Obj<Mesh::label_sequence>& cells = mesh->heightStratum(0);
const Mesh::label_sequence::iterator cellsEnd = cells->end();
+ const ALE::Obj<real_section_type>& coordinates =
+ mesh->getRealSection("coordinates");
+ assert(!coordinates.isNull());
+
// Get parameters used in integration.
const double dt = _dt;
const double dt2 = dt*dt;
- // Allocate vector for cell values (if necessary)
- _initCellVector();
-
// Get cell geometry information that doesn't depend on cell
const int numQuadPts = _quadrature->numQuadPts();
const double* quadWts = _quadrature->quadWts();
@@ -87,20 +91,24 @@
const int spaceDim = _quadrature->spaceDim();
const int cellDim = _quadrature->cellDim();
+ // Allocate vector for cell values (if necessary)
+ _initCellVector();
+ _material->initCellData(numQuadPts);
+
for (Mesh::label_sequence::iterator cellIter=cells->begin();
cellIter != cellsEnd;
++cellIter) {
// Compute geometry information for current cell
- _quadrature->computeGeometry(m, coordinates, *cellIter);
+ _quadrature->computeGeometry(mesh, coordinates, *cellIter);
// Reset element vector to zero
_resetCellVector();
// Restrict input fields to cell
const real_section_type::value_type* dispTCell =
- m->restrict(dispT, *cellIter);
+ mesh->restrict(dispT, *cellIter);
const real_section_type::value_type* dispTmdtCell =
- m->restrict(dispTmdt, *cellIter);
+ mesh->restrict(dispTmdt, *cellIter);
// Get cell geometry information that depends on cell
const double* basis = _quadrature->basis();
@@ -146,8 +154,8 @@
if (1 == cellDim) {
// Compute total strains
const int stressSize = _material->stressSize();
- assert(numQuadPts == stressSize);
- const int strainSize = stressSize;;
+ assert(1 == stressSize);
+ const int strainSize = stressSize * numQuadPts;
double* totalStrain = (strainSize > 0) ? new double[strainSize] : 0;
memset(totalStrain, 0, strainSize*sizeof(double));
for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
@@ -176,8 +184,8 @@
} else if (2 == cellDim) {
// Compute total strains
const int stressSize = _material->stressSize();
- assert(3*numQuadPts == stressSize);
- const int strainSize = stressSize;;
+ assert(3 == stressSize);
+ const int strainSize = stressSize * numQuadPts;
double* totalStrain = (strainSize > 0) ? new double[strainSize] : 0;
memset(totalStrain, 0, strainSize*sizeof(double));
for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
@@ -215,8 +223,8 @@
} else if (3 == cellDim) {
// Compute total strains
const int stressSize = _material->stressSize();
- assert(6*numQuadPts == stressSize);
- const int strainSize = stressSize;;
+ assert(6 == stressSize);
+ const int strainSize = stressSize*numQuadPts;
double* totalStrain = (strainSize > 0) ? new double[strainSize] : 0;
memset(totalStrain, 0, strainSize*sizeof(double));
for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
@@ -267,7 +275,7 @@
} // if/else
// Assemble cell contribution into field
- m->updateAdd(b, *cellIter, _cellVector);
+ mesh->updateAdd(b, *cellIter, _cellVector);
} // for
} // integrateConstant
@@ -276,33 +284,41 @@
void
pylith::feassemble::ExplicitElasticity::integrateJacobian(
PetscMat* mat,
- const ALE::Obj<Mesh>& m,
const ALE::Obj<real_section_type>& dispT,
- const ALE::Obj<real_section_type>& coordinates)
+ const ALE::Obj<Mesh>& mesh)
{ // integrateJacobian
assert(0 != _quadrature);
+ assert(0 != mat);
+ assert(!dispT.isNull());
+ assert(!mesh.isNull());
// Get information about section
- const ALE::Obj<Mesh::label_sequence>& cells = m->heightStratum(0);
+ const ALE::Obj<Mesh::label_sequence>& cells = mesh->heightStratum(0);
const Mesh::label_sequence::iterator cellsEnd = cells->end();
+ const ALE::Obj<real_section_type>& coordinates =
+ mesh->getRealSection("coordinates");
+ assert(!coordinates.isNull());
+
// Get parameters used in integration.
const double dt = _dt;
const double dt2 = dt*dt;
- // Allocate vector for cell values (if necessary)
- _initCellMatrix();
-
// Get cell geometry information that doesn't depend on cell
const int numQuadPts = _quadrature->numQuadPts();
const double* quadWts = _quadrature->quadWts();
const int numBasis = _quadrature->numCorners();
const int spaceDim = _quadrature->spaceDim();
+
+ // Allocate vector for cell values (if necessary)
+ _initCellMatrix();
+ _material->initCellData(numQuadPts);
+
for (Mesh::label_sequence::iterator cellIter=cells->begin();
cellIter != cellsEnd;
++cellIter) {
// Compute geometry information for current cell
- _quadrature->computeGeometry(m, coordinates, *cellIter);
+ _quadrature->computeGeometry(mesh, coordinates, *cellIter);
// Reset element vector to zero
_resetCellMatrix();
@@ -337,9 +353,11 @@
throw std::runtime_error("Logging PETSc flops failed.");
// Assemble cell contribution into field
- const ALE::Obj<Mesh::order_type>& globalOrder = m->getFactory()->getGlobalOrder(m, "default", dispT->getAtlas());
+ const ALE::Obj<Mesh::order_type>& globalOrder =
+ mesh->getFactory()->getGlobalOrder(mesh, "default", dispT->getAtlas());
- err = updateOperator(*mat, m, dispT, globalOrder, *cellIter, _cellMatrix, ADD_VALUES);
+ err = updateOperator(*mat, mesh, dispT, globalOrder,
+ *cellIter, _cellMatrix, ADD_VALUES);
if (err)
throw std::runtime_error("Update to PETSc Mat failed.");
} // for
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.hh 2007-03-31 19:43:45 UTC (rev 6488)
@@ -104,24 +104,22 @@
* @param b Constant field (output)
* @param dispT Displacement field at time t
* @param dispTmdt Displacement field at time t-dt
- * @param coordinates Field of cell vertex coordinates
+ * @param mesh Finite-element mesh
*/
- void integrateConstant(const ALE::Obj<Mesh>& m,
- const ALE::Obj<real_section_type>& b,
+ void integrateConstant(const ALE::Obj<real_section_type>& b,
const ALE::Obj<real_section_type>& dispT,
const ALE::Obj<real_section_type>& dispTmdt,
- const ALE::Obj<real_section_type>& coordinates);
+ const ALE::Obj<Mesh>& mesh);
/** Compute Jacobian matrix (A) associated with operator.
*
* @param mat Sparse matrix
* @param dispT Displacement at time t
- * @param coordinates Field of cell vertex coordinates
+ * @param mesh Finite-element mesh
*/
void integrateJacobian(PetscMat* mat,
- const ALE::Obj<Mesh>& m,
const ALE::Obj<real_section_type>& dispT,
- const ALE::Obj<real_section_type>& coordinates);
+ const ALE::Obj<Mesh>& mesh);
// PROTECTED METHODS ////////////////////////////////////////////////////
protected :
Modified: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.hh 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorExplicit.hh 2007-03-31 19:43:45 UTC (rev 6488)
@@ -79,26 +79,24 @@
* @param fieldOut Constant field (output)
* @param fieldInT Input field at time t
* @param fieldInTmdt Input field at time t-dt
- * @param coordinates Field of cell vertex coordinates
+ * @param mesh Finite-element mesh
*/
virtual
- void integrateConstant(const ALE::Obj<Mesh>& mesh,
- const ALE::Obj<real_section_type>& fieldOut,
+ void integrateConstant(const ALE::Obj<real_section_type>& fieldOut,
const ALE::Obj<real_section_type>& fieldInT,
const ALE::Obj<real_section_type>& fieldInTmdt,
- const ALE::Obj<real_section_type>& coordinates) = 0;
+ const ALE::Obj<Mesh>& mesh) = 0;
/** Compute Jacobian matrix (A) associated with operator.
*
* @param mat Sparse matrix
* @param fieldIn Input field at time t
- * @param coordinates Field of cell vertex coordinates
+ * @param mesh Finite-element mesh
*/
virtual
void integrateJacobian(PetscMat* mat,
- const ALE::Obj<Mesh>& mesh,
const ALE::Obj<real_section_type>& fieldIn,
- const ALE::Obj<real_section_type>& coordinates) = 0;
+ const ALE::Obj<Mesh>& mesh) = 0;
// PROTECTED METHODS ////////////////////////////////////////////////////
protected :
Deleted: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorInertia.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorInertia.icc 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorInertia.icc 2007-03-31 19:43:45 UTC (rev 6488)
@@ -1,26 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-#if !defined(pylith_feassemble_integratorinertia_hh)
-#error "IntegratorInertia.icc must be included only from IntegratorInertia.hh"
-#else
-
-// Create a copy of this object.
-inline
-pylith::feassemble::Integrator*
-pylith::feassemble::IntegratorInertia::clone(void) const {
- return new IntegratorInertia(*this);
-} // clone
-
-#endif
-
-// End of file
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.cc 2007-03-31 19:43:45 UTC (rev 6488)
@@ -119,8 +119,8 @@
// ----------------------------------------------------------------------
// Initialize arrays holding cell data.
void
-pylith::materials::ElasticMaterial::_initCellData(const int numQuadPts)
-{ // _initCellData
+pylith::materials::ElasticMaterial::initCellData(const int numQuadPts)
+{ // initCellData
int size = numQuadPts;
delete[] _density; _density = (size > 0) ? new double[size] : 0;
@@ -129,7 +129,7 @@
size = numQuadPts * numElasticConsts();
delete[] _elasticConsts; _elasticConsts = (size > 0) ? new double[size] : 0;
-} // _initCellData
+} // initCellData
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/materials/ElasticMaterial.hh 2007-03-31 19:43:45 UTC (rev 6488)
@@ -153,13 +153,11 @@
virtual
int numElasticConsts(void) const = 0;
- /** Compute physical properties of cell at quadrature points.
+ /** Initialize arrays holding cell data.
*
- * @param cell Finite-element cell
- * @param numQuadPts Number of quadrature points (consistency check)
+ * @param numQuadPts Number of quadrature points
*/
- void calcProperties(const Mesh::point_type& cell,
- const int numQuadPts);
+ void initCellData(const int numQuadPts);
// PROTECTED METHODS //////////////////////////////////////////////////
protected :
@@ -170,12 +168,6 @@
*/
ElasticMaterial(const ElasticMaterial& m);
- /** Initialize arrays holding cell data.
- *
- * @param numQuadPts Number of quadrature points
- */
- void _initCellData(const int numQuadPts);
-
/** Compute density at locations from parameters.
*
* Results are stored in _density.
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.cc 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.cc 2007-03-31 19:43:45 UTC (rev 6488)
@@ -165,16 +165,7 @@
// Close database
_db->close();
-
- // Initialize cell data
- _initCellData(numQuadPts);
} // initialize
-// ----------------------------------------------------------------------
-// Initialize arrays holding cell data.
-void
-pylith::materials::Material::_initCellData(const int numQuadPts)
-{}
-
// End of file
Modified: short/3D/PyLith/trunk/libsrc/materials/Material.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/materials/Material.hh 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/libsrc/materials/Material.hh 2007-03-31 19:43:45 UTC (rev 6488)
@@ -167,13 +167,6 @@
const double* dbValues,
const int numValues) const = 0;
- /** Initialize arrays holding cell data.
- *
- * @param numQuadPts Number of quadrature points
- */
- virtual
- void _initCellData(const int numQuadPts);
-
// NOT IMPLEMENTED ////////////////////////////////////////////////////
private :
Modified: short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src
===================================================================
--- short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src 2007-03-31 19:43:45 UTC (rev 6488)
@@ -441,23 +441,22 @@
return
- def integrateConstant(self, mesh, fieldOut, fieldInT, fieldInTmdt, coords):
+ def integrateConstant(self, fieldOut, fieldInT, fieldInTmdt, mesh):
"""
Integrate constant term (b) for dynamic elasticity term for 3-D
finite elements.
"""
# create shim for method 'integrateConstant'
- #embed{ void IntegratorExplicit_integrateConstant(void* objVptr, void* meshVptr, void* fieldOutVptr, void* fieldInTVptr, void* fieldInTmdtVptr, void* coordsVptr)
+ #embed{ void IntegratorExplicit_integrateConstant(void* objVptr, void* fieldOutVptr, void* fieldInTVptr, void* fieldInTmdtVptr, void* meshVptr)
typedef ALE::Field::Mesh Mesh;
typedef ALE::Field::Mesh::real_section_type real_section_type;
try {
assert(0 != objVptr);
- assert(0 != meshVptr);
assert(0 != fieldOutVptr);
assert(0 != fieldInTVptr);
assert(0 != fieldInTmdtVptr);
- assert(0 != coordsVptr);
+ assert(0 != meshVptr);
ALE::Obj<Mesh>* mesh =
(ALE::Obj<Mesh>*) meshVptr;
ALE::Obj<real_section_type>* fieldOut =
@@ -466,10 +465,8 @@
(ALE::Obj<real_section_type>*) fieldInTVptr;
ALE::Obj<real_section_type>* fieldInTmdt =
(ALE::Obj<real_section_type>*) fieldInTmdtVptr;
- ALE::Obj<real_section_type>* coords =
- (ALE::Obj<real_section_type>*) coordsVptr;
((pylith::feassemble::IntegratorExplicit*) objVptr)->integrateConstant(
- *mesh, *fieldOut, *fieldInT, *fieldInTmdt, *coords);
+ *fieldOut, *fieldInT, *fieldInTmdt, *mesh);
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
const_cast<char*>(err.what()));
@@ -481,23 +478,20 @@
"Caught unknown C++ exception.");
} // try/catch
#}embed
- cdef void* meshVptr
cdef void* fieldOutVptr
cdef void* fieldInTVptr
cdef void* fieldInTmdtVptr
- cdef void* coordsVptr
- meshVptr = PyCObject_AsVoidPtr(mesh)
fieldOutVptr = PyCObject_AsVoidPtr(fieldOut)
fieldInTVptr = PyCObject_AsVoidPtr(fieldInT)
fieldInTmdtVptr = PyCObject_AsVoidPtr(fieldInTmdt)
- coordsVptr = PyCObject_AsVoidPtr(coords)
- IntegratorExplicit_integrateConstant(self.thisptr, meshVptr,
+ IntegratorExplicit_integrateConstant(self.thisptr,
fieldOutVptr, fieldInTVptr,
- fieldInTmdtVptr, coordsVptr)
+ fieldInTmdtVptr,
+ ptrFromHandle(mesh))
return
- def integrateJacobian(self, mat, mesh, fieldIn, coords):
+ def integrateJacobian(self, mat, fieldIn, mesh):
"""
Compute matrix (A) associated with operator.
"""
Modified: short/3D/PyLith/trunk/pylith/feassemble/ExplicitElasticity.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/ExplicitElasticity.py 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/pylith/feassemble/ExplicitElasticity.py 2007-03-31 19:43:45 UTC (rev 6488)
@@ -43,8 +43,7 @@
"""
Initialize material properties.
"""
- self._info.log("Initializing integrator for material '%s'." % \
- material.label)
+ self._info.log("Initializing integrator material '%s'." % material.label)
material.initialize(mesh)
self.material = material
self.cppHandle.material = self.material.cppHandle
Modified: short/3D/PyLith/trunk/pylith/feassemble/Integrator.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/Integrator.py 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/pylith/feassemble/Integrator.py 2007-03-31 19:43:45 UTC (rev 6488)
@@ -37,9 +37,18 @@
Component.__init__(self, name, facility="integrator")
self.cppHandle = None
self.quadrature = None
+ self.mesh = None
return
+ def setMesh(self, mesh):
+ """
+ Set mesh.
+ """
+ self.mesh = mesh
+ return
+
+
def initQuadrature(self, quadrature):
"""
Initialize quadrature.
Modified: short/3D/PyLith/trunk/pylith/feassemble/IntegratorExplicit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/IntegratorExplicit.py 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/pylith/feassemble/IntegratorExplicit.py 2007-03-31 19:43:45 UTC (rev 6488)
@@ -53,11 +53,12 @@
return self.cppHandle.getStableTimeStep()
- def integrateConstant(self, fieldOut, fieldInT, fieldInTmdt, coords):
+ def integrateConstant(self, fieldOut, fieldInT, fieldInTmdt):
"""
Integrate constant term for dynamic terms for finite-elements.
"""
- self.cppHandle.integrateConstant(fieldOut, fieldInT, fieldInTmdt, coords)
+ self.cppHandle.integrateConstant(fieldOut, fieldInT, fieldInTmdt,
+ self.mesh.cppHandle)
return
@@ -65,7 +66,7 @@
"""
Integrate Jacobian term for dynamic terms for finite-elements.
"""
- self.cppHandle.integrateJacobian(jacobian, fieldInT, coords)
+ self.cppHandle.integrateJacobian(jacobian, fieldInT, self.mesh.cppHandle)
return
Modified: short/3D/PyLith/trunk/pylith/problems/Explicit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Explicit.py 2007-03-31 02:53:24 UTC (rev 6487)
+++ short/3D/PyLith/trunk/pylith/problems/Explicit.py 2007-03-31 19:43:45 UTC (rev 6488)
@@ -81,6 +81,7 @@
"for material '%s' is for spatial dimension '%d'." % \
(spaceDim, material.label, material.quadrature.spaceDim)
integrator = ExplicitElasticity()
+ integrator.setMesh(mesh)
integrator.initQuadrature(material.quadrature)
integrator.initMaterial(mesh, material)
self.integrators.append(integrator)
@@ -91,12 +92,10 @@
self.dispTmdt = mesh.cppHandle.createRealSection("dispTmdt", spaceDim)
self.dispTpdt = mesh.cppHandle.createRealSection("dispTpdt", spaceDim)
self.constant = mesh.cppHandle.createRealSection("constant", spaceDim)
- self.coordinates = mesh.cppHandle.getRealSection("coordinates")
self._info.log("Integrating Jacobian of operator.")
#for integrator in integrators:
- # integrator.integrateJacobian(self.jacobian, self.dispT,
- # self.coordinates)
+ # integrator.integrateJacobian(self.jacobian, self.dispT)
return
@@ -126,8 +125,7 @@
import pylith.topology.topology as bindings
bindings.zeroRealSection(self.constant)
for integrator in self.integrators:
- integrator.integrateConstant(self.constant, self.dispT, self.dispTmdt,
- self.coordinates)
+ integrator.integrateConstant(self.constant, self.dispT, self.dispTmdt)
self._info.log("Solving equations.")
# solve
@@ -140,7 +138,7 @@
"""
tmp = self.dispTmdt
self.dispTmdt = self.dispT
- self.dispT = dispTpdt
+ self.dispT = self.dispTpdt
self.dispTpdt = tmp
return
More information about the cig-commits
mailing list