[cig-commits] r13133 - in short/3D/PyLith/trunk/libsrc: feassemble utils
brad at geodynamics.org
brad at geodynamics.org
Sun Oct 26 10:41:49 PDT 2008
Author: brad
Date: 2008-10-26 10:41:49 -0700 (Sun, 26 Oct 2008)
New Revision: 13133
Added:
short/3D/PyLith/trunk/libsrc/utils/lapack.h
Removed:
short/3D/PyLith/trunk/libsrc/utils/blas.h
Modified:
short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
short/3D/PyLith/trunk/libsrc/utils/Makefile.am
Log:
Attempt to use PETSc interface to dgesvd.
Modified: short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2008-10-26 16:08:02 UTC (rev 13132)
+++ short/3D/PyLith/trunk/libsrc/feassemble/ElasticityImplicit.cc 2008-10-26 17:41:49 UTC (rev 13133)
@@ -21,7 +21,7 @@
#include "pylith/topology/FieldsManager.hh" // USES FieldsManager
#include "pylith/utils/array.hh" // USES double_array
#include "pylith/utils/macrodefs.h" // USES CALL_MEMBER_FN
-#include "pylith/utils/blas.h" // USES dgesvd
+#include "pylith/utils/lapack.h" // USES LAPACKdgesvd
#include "petscmat.h" // USES PetscMat
#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
@@ -421,8 +421,9 @@
const int n2 = n*n;
for (int i = 0; i < n2; ++i)
elemMat[i] = _cellMatrix[i];
- dgesvd("N", "N", &n, &n, elemMat, &n, svalues,
- &sdummy, &idummy, &sdummy, &idummy, work, &lwork, &lierr);
+ LAPACKdgesvd("N", "N", &n, &n, elemMat, &n, svalues,
+ &sdummy, &idummy, &sdummy, &idummy, work,
+ &lwork, &lierr);
if (lierr)
throw std::runtime_error("Lapack SVD failed");
minSV = svalues[n-1];
Modified: short/3D/PyLith/trunk/libsrc/utils/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/Makefile.am 2008-10-26 16:08:02 UTC (rev 13132)
+++ short/3D/PyLith/trunk/libsrc/utils/Makefile.am 2008-10-26 17:41:49 UTC (rev 13133)
@@ -16,10 +16,10 @@
subpkginclude_HEADERS = \
EventLogger.hh \
EventLogger.icc \
- blas.h \
array.hh \
arrayfwd.hh \
constdefs.h \
+ lapack.h \
macrodefs.h \
petscfwd.h \
sievefwd.hh \
Deleted: short/3D/PyLith/trunk/libsrc/utils/blas.h
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/blas.h 2008-10-26 16:08:02 UTC (rev 13132)
+++ short/3D/PyLith/trunk/libsrc/utils/blas.h 2008-10-26 17:41:49 UTC (rev 13133)
@@ -1,43 +0,0 @@
-// -*- C++ -*-
-//
-// ======================================================================
-//
-// Brad T. Aagaard
-// U.S. Geological Survey
-//
-// {LicenseText}
-//
-// ======================================================================
-//
-
-/**
- * @file pylith/utils/blas.h
- *
- * @brief Declarations for BLAS routines that we use. We rely on
- * PETSc's interface to these routines.
- */
-
-#if !defined(pylith_utils_blas_h)
-#define pylith_utils_blas_h
-
-extern "C" {
- EXTERN void dgesvd(const char*,
- const char*,
- PetscBLASInt*,
- PetscBLASInt*,
- PetscScalar*,
- PetscBLASInt*,
- PetscReal*,
- PetscScalar*,
- PetscBLASInt*,
- PetscScalar*,
- PetscBLASInt*,
- PetscScalar*,
- PetscBLASInt*,
- PetscBLASInt*);
-}
-
-#endif // pylith_utils_blas_h
-
-
-// End of file
Copied: short/3D/PyLith/trunk/libsrc/utils/lapack.h (from rev 13132, short/3D/PyLith/trunk/libsrc/utils/blas.h)
===================================================================
--- short/3D/PyLith/trunk/libsrc/utils/lapack.h (rev 0)
+++ short/3D/PyLith/trunk/libsrc/utils/lapack.h 2008-10-26 17:41:49 UTC (rev 13133)
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+
+/**
+ * @file pylith/utils/lapack.h
+ *
+ * @brief Declarations for BLAS routines that we use. We rely on
+ * PETSc's interface to these routines.
+ */
+
+#if !defined(pylith_utils_lapack_h)
+#define pylith_utils_lapack_h
+
+extern "C" {
+ EXTERN void LAPACKdgesvd(const char*,
+ const char*,
+ PetscBLASInt*,
+ PetscBLASInt*,
+ PetscScalar*,
+ PetscBLASInt*,
+ PetscReal*,
+ PetscScalar*,
+ PetscBLASInt*,
+ PetscScalar*,
+ PetscBLASInt*,
+ PetscScalar*,
+ PetscBLASInt*,
+ PetscBLASInt*);
+}
+
+#endif // pylith_utils_lapack_h
+
+
+// End of file
More information about the CIG-COMMITS
mailing list