aboutsummaryrefslogtreecommitdiff
path: root/src/elliptic/Jacobian.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-07-26 14:57:48 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-07-26 14:57:48 +0000
commit720ce53a79ef5bdff53b3db18bc45c46101aa0fa (patch)
tree5e15ab1aa1346cdbe63a8dd3e8cad3010d438827 /src/elliptic/Jacobian.cc
parent625a1471be9b782048d0db40fec675bee6bca0a4 (diff)
re-sync changes from laptop
- parameter to control how Jacobian is computed - can hardwire geometry to Schwarzschild/EF git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@661 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/elliptic/Jacobian.cc')
-rw-r--r--src/elliptic/Jacobian.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/elliptic/Jacobian.cc b/src/elliptic/Jacobian.cc
index 58009ec..603abac 100644
--- a/src/elliptic/Jacobian.cc
+++ b/src/elliptic/Jacobian.cc
@@ -10,6 +10,8 @@
// dense_Jacobian::zero_row
// dense_Jacobian::solve_linear_system
//
+// new_Jacobian
+//
#include <stdio.h>
using std::fopen;
@@ -180,3 +182,25 @@ if (info != 0)
rhs_gfn, x_gfn,
int(info)); /*NOTREACHED*/
}
+
+//******************************************************************************
+//******************************************************************************
+//******************************************************************************
+
+//
+// This function is an "object factory" for Jacobians: it constructs
+// and returns a new-allocated Jacobian object of a specified type.
+//
+// FIXME: the patch system shouldn't really have to be non-const, but
+// the Jacobian constructors all require this to allow the
+// linear solvers to directly update gridfns
+//
+Jacobian& new_Jacobian(patch_system& ps,
+ const char Jacobian_type[])
+{
+if (STRING_EQUAL(Jacobian_type, "dense matrix"))
+ then return *new dense_Jacobian(ps);
+else CCTK_VWarn(-1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "unknown Jacobian_type=\"%s\"!",
+ Jacobian_type); /*NOTREACHED*/
+}