[cig-commits] r11965 - in short/3D/PyLith/trunk: . modulesrc/bc pylith/bc
brad at geodynamics.org
brad at geodynamics.org
Wed May 14 09:07:06 PDT 2008
Author: brad
Date: 2008-05-14 09:07:06 -0700 (Wed, 14 May 2008)
New Revision: 11965
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src
short/3D/PyLith/trunk/pylith/bc/DirichletBoundary.py
short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py
Log:
Fixed bug in DirichletPoints and DirichletBoundary. Reference time was not transferred from Python to C++.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2008-05-14 15:43:06 UTC (rev 11964)
+++ short/3D/PyLith/trunk/TODO 2008-05-14 16:07:06 UTC (rev 11965)
@@ -75,6 +75,8 @@
KNOWN DEFICIENCIES
======================================================================
+* Dirichlet BC and fault BC
+
Can't use block Jacobi preconditioner when Dirichlet BC overlap with
fault BC's, because we end up with a DOF associated with a Lagrange
multiplier that is "free". Not sure if this is okay, when the fault
@@ -88,6 +90,14 @@
ifstream is insufficient. Need state of istringstream buffer, but it
is often !good() at eof(). Test of !good() and !eof()?
+* FixedDOFDB
+
+ The default BC is FixedDOF which hardwires the values in a UniformDB
+ to 0. No error message is generated if the user sets the values or
+ data properties and they are overwritten by the hardwired values. A
+ possible solution is for FixedDOF to use a C++ UniformDB but not
+ inherit from the Python UniformDB.
+
======================================================================
MISC PRIORITIES (Brad)
======================================================================
Modified: short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src 2008-05-14 15:43:06 UTC (rev 11964)
+++ short/3D/PyLith/trunk/modulesrc/bc/bc.pyxe.src 2008-05-14 16:07:06 UTC (rev 11965)
@@ -244,6 +244,30 @@
return
+ property referenceTime:
+ def __set__(self, value):
+ """
+ Set reference time for rate of change of values.
+ """
+ # create shim for method 'referenceTime'
+ #embed{ void DirichletPoints_referenceTime_set(void* objVptr, double value)
+ try {
+ assert(0 != objVptr);
+ ((pylith::bc::DirichletPoints*) objVptr)->referenceTime(value);
+ } catch (const std::exception& err) {
+ PyErr_SetString(PyExc_RuntimeError,
+ const_cast<char*>(err.what()));
+ } catch (const ALE::Exception& err) {
+ PyErr_SetString(PyExc_RuntimeError,
+ const_cast<char*>(err.msg().c_str()));
+ } catch (...) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Caught unknown C++ exception.");
+ } // try/catch
+ #}embed
+ DirichletPoints_referenceTime_set(self.thisptr, value)
+
+
property dbRate:
def __set__(self, value):
"""
@@ -465,6 +489,30 @@
return
+ property referenceTime:
+ def __set__(self, value):
+ """
+ Set reference time for rate of change of values.
+ """
+ # create shim for method 'referenceTime'
+ #embed{ void DirichletBoundary_referenceTime_set(void* objVptr, double value)
+ try {
+ assert(0 != objVptr);
+ ((pylith::bc::DirichletBoundary*) objVptr)->referenceTime(value);
+ } catch (const std::exception& err) {
+ PyErr_SetString(PyExc_RuntimeError,
+ const_cast<char*>(err.what()));
+ } catch (const ALE::Exception& err) {
+ PyErr_SetString(PyExc_RuntimeError,
+ const_cast<char*>(err.msg().c_str()));
+ } catch (...) {
+ PyErr_SetString(PyExc_RuntimeError,
+ "Caught unknown C++ exception.");
+ } // try/catch
+ #}embed
+ DirichletBoundary_referenceTime_set(self.thisptr, value)
+
+
property dbRate:
def __set__(self, value):
"""
Modified: short/3D/PyLith/trunk/pylith/bc/DirichletBoundary.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/DirichletBoundary.py 2008-05-14 15:43:06 UTC (rev 11964)
+++ short/3D/PyLith/trunk/pylith/bc/DirichletBoundary.py 2008-05-14 16:07:06 UTC (rev 11965)
@@ -144,6 +144,7 @@
self._logger.eventBegin(logEvent)
assert(None != self.cppHandle)
+ self.cppHandle.referenceTime = self.tRef.value
self.dbRate.initialize()
self.cppHandle.dbRate = self.dbRate.cppHandle
Modified: short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py 2008-05-14 15:43:06 UTC (rev 11964)
+++ short/3D/PyLith/trunk/pylith/bc/DirichletPoints.py 2008-05-14 16:07:06 UTC (rev 11965)
@@ -129,6 +129,7 @@
self._logger.eventBegin(logEvent)
assert(None != self.cppHandle)
+ self.cppHandle.referenceTime = self.tRef.value
self.dbRate.initialize()
self.cppHandle.dbRate = self.dbRate.cppHandle
More information about the cig-commits
mailing list