[cig-commits] r15076 - in short/3D/PyLith/trunk: . modulesrc/include modulesrc/utils pylith/utils
brad at geodynamics.org
brad at geodynamics.org
Thu May 28 10:36:32 PDT 2009
Author: brad
Date: 2009-05-28 10:36:31 -0700 (Thu, 28 May 2009)
New Revision: 15076
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/modulesrc/include/chararray.i
short/3D/PyLith/trunk/modulesrc/utils/petsc_general.i
short/3D/PyLith/trunk/pylith/utils/PetscManager.py
Log:
Temporarily added some debugging output.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2009-05-28 15:29:27 UTC (rev 15075)
+++ short/3D/PyLith/trunk/TODO 2009-05-28 17:36:31 UTC (rev 15076)
@@ -164,7 +164,6 @@
after assert(0) to insure error is trapped.
Use Fields object to hold Field
- Material
Eliminate use of Inventory class.
Modified: short/3D/PyLith/trunk/modulesrc/include/chararray.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/include/chararray.i 2009-05-28 15:29:27 UTC (rev 15075)
+++ short/3D/PyLith/trunk/modulesrc/include/chararray.i 2009-05-28 17:36:31 UTC (rev 15076)
@@ -66,8 +66,7 @@
delete[] $1;
}
-
-// Treat char** as a special case.
+// Treat argc & argv as a special case.
%typemap(in) (int argc, char** argv) {
// Check to make sure input is a list.
if (PyList_Check($input)) {
@@ -92,9 +91,12 @@
// This cleans up the char** array we malloc'd before the function call
%typemap(freearg) (int argc, char** argv) {
+ for (int i=0; i < $1; ++i)
+ std::cout << "ARGV["<<i<<"]: '" << $2[i] << "'" << std::endl;
delete[] $2;
}
+
%typemap(argout) (int *numNames, char ***outNames) {
int num = *$1;
char **names = *$2;
Modified: short/3D/PyLith/trunk/modulesrc/utils/petsc_general.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/utils/petsc_general.i 2009-05-28 15:29:27 UTC (rev 15075)
+++ short/3D/PyLith/trunk/modulesrc/utils/petsc_general.i 2009-05-28 17:36:31 UTC (rev 15076)
@@ -14,7 +14,8 @@
// initialize
%inline %{
int
- initialize(int argc, char** argv)
+ initialize(int argc,
+ char** argv)
{ // initialize
PetscErrorCode err =
PetscInitialize(&argc, &argv, NULL, NULL); CHKERRQ(err);
Modified: short/3D/PyLith/trunk/pylith/utils/PetscManager.py
===================================================================
--- short/3D/PyLith/trunk/pylith/utils/PetscManager.py 2009-05-28 15:29:27 UTC (rev 15075)
+++ short/3D/PyLith/trunk/pylith/utils/PetscManager.py 2009-05-28 17:36:31 UTC (rev 15076)
@@ -52,6 +52,7 @@
if len(options) > 0:
for arg in options:
args.append(arg)
+ print "PETSC INITIALIZE ARGS",args
petsc.initialize(args)
return
More information about the CIG-COMMITS
mailing list