[cig-commits] r6175 - in short/3D/PyLith/trunk: libsrc/feassemble
modulesrc/feassemble
brad at geodynamics.org
brad at geodynamics.org
Sun Mar 4 22:44:06 PST 2007
Author: brad
Date: 2007-03-04 22:44:06 -0800 (Sun, 04 Mar 2007)
New Revision: 6175
Modified:
short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc
short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src
Log:
Bug is not related to casting void* to Quadrature*. _quadrature in Integrator is getting messed up and delete in quadrature() causes crash.
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc 2007-03-05 04:17:53 UTC (rev 6174)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ExplicitElasticity.cc 2007-03-05 06:44:06 UTC (rev 6175)
@@ -40,6 +40,7 @@
pylith::feassemble::ExplicitElasticity::ExplicitElasticity(const ExplicitElasticity& i) :
IntegratorExplicit(i)
{ // copy constructor
+ std::cout << "In ExplicitElasticity copy constructor." << std::endl;
} // copy constructor
// ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc 2007-03-05 04:17:53 UTC (rev 6174)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc 2007-03-05 06:44:06 UTC (rev 6175)
@@ -27,6 +27,7 @@
_cellVector(0),
_cellMatrix(0)
{ // constructor
+ std::cout << "In constructor, _quadrature: " << _quadrature << std::endl;
} // constructor
// ----------------------------------------------------------------------
@@ -56,7 +57,8 @@
void
pylith::feassemble::Integrator::quadrature(const Quadrature* q)
{ // quadrature
- delete _quadrature;
+ std::cout << "In quadrature(), _quadrature: " << _quadrature << std::endl;
+ //delete _quadrature;
_quadrature = (0 != q) ? q->clone() : 0;
// Deallocate cell vector and matrix since size may change
Modified: short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src
===================================================================
--- short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src 2007-03-05 04:17:53 UTC (rev 6174)
+++ short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe.src 2007-03-05 06:44:06 UTC (rev 6175)
@@ -298,6 +298,7 @@
void* result = 0;
try {
result = (void*)(new pylith::feassemble::Quadrature2D);
+ std::cout << "Quadrature2D ptr: " << result << std::endl;
} catch (const std::exception& err) {
PyErr_SetString(PyExc_RuntimeError,
const_cast<char*>(err.what()));
@@ -440,7 +441,7 @@
assert(0 != qObj);
// :BUG: Cannot cast void* to Quadrature* because we lose what
// type of Quadrature qObj is.
- assert(0);
+ std::cout << "qObj ptr: " << qObj << std::endl;
pylith::feassemble::Quadrature* quadrature =
(pylith::feassemble::Quadrature*) qObj;
((pylith::feassemble::Integrator*) pObj)->quadrature(quadrature);
More information about the cig-commits
mailing list