aboutsummaryrefslogtreecommitdiff
path: root/src/gr/expansion_Jacobian.cc
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-02-16 22:21:49 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2003-02-16 22:21:49 +0000
commitcc221a875a640142697df54a2bcff6638f7b1a88 (patch)
treea1477d8a3dd8b96d0dea7a2af4546556166389aa /src/gr/expansion_Jacobian.cc
parent04ed769ddfacb1d6f5faedb66d3ff8d512ede7d4 (diff)
* general tidying of multiprocessor code
* add current iteration number to what's sent to processor #0 for printing at each iteration * add a new verbosity level "algorithm debug" for what used to be #ifdef DEBUG debugging code * add new parameters & logic to set CCTK_Warn() levels for various warnings (eg AH is outside the gid, metric isn't +ve definite, etc) * restore the ability to output the horizon shape to a data file, which I mistakenly deleted a few days ago :( git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@947 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/gr/expansion_Jacobian.cc')
-rw-r--r--src/gr/expansion_Jacobian.cc79
1 files changed, 44 insertions, 35 deletions
diff --git a/src/gr/expansion_Jacobian.cc b/src/gr/expansion_Jacobian.cc
index 805ed97..ef2f7e8 100644
--- a/src/gr/expansion_Jacobian.cc
+++ b/src/gr/expansion_Jacobian.cc
@@ -48,12 +48,13 @@ using jtutil::error_exit;
//
namespace {
-bool expansion_Jacobian_NP(patch_system& ps,
- Jacobian& Jac,
- const struct cactus_grid_info& cgi,
- const struct geometry_info& ii,
- const struct Jacobian_info& Jacobian_info,
- bool print_msg_flag);
+bool expansion_Jacobian_NP
+ (patch_system& ps, Jacobian& Jac,
+ const struct cactus_grid_info& cgi,
+ const struct geometry_info& gi,
+ const struct Jacobian_info& Jacobian_info,
+ const struct error_info& error_info, bool initial_flag,
+ bool print_msg_flag);
void expansion_Jacobian_partial_SD(patch_system& ps,
Jacobian& Jac,
@@ -67,12 +68,13 @@ void add_ghost_zone_Jacobian(const patch_system& ps,
const patch& xp, const ghost_zone& xmgz,
int x_II,
int xm_irho, int xm_isigma);
-bool expansion_Jacobian_dr_FD(patch_system* ps_ptr,
- Jacobian* Jac_ptr,
- const struct cactus_grid_info& cgi,
- const struct geometry_info& gi,
- const struct Jacobian_info& Jacobian_info,
- bool print_msg_flag);
+bool expansion_Jacobian_dr_FD
+ (patch_system* ps_ptr, Jacobian* Jac_ptr,
+ const struct cactus_grid_info& cgi,
+ const struct geometry_info& gi,
+ const struct Jacobian_info& Jacobian_info,
+ const struct error_info& error_info, bool initial_flag,
+ bool print_msg_flag);
}
//******************************************************************************
@@ -108,6 +110,7 @@ bool expansion_Jacobian(patch_system* ps_ptr,
const struct cactus_grid_info& cgi,
const struct geometry_info& gi,
const struct Jacobian_info& Jacobian_info,
+ const struct error_info& error_info, bool initial_flag,
bool print_msg_flag /* = false */)
{
const bool active_flag = (ps_ptr != NULL) && (Jac_ptr != NULL);
@@ -119,24 +122,23 @@ case Jacobian__numerical_perturbation:
then {
if (! expansion_Jacobian_NP(*ps_ptr, *Jac_ptr,
cgi, gi, Jacobian_info,
+ error_info, initial_flag,
print_msg_flag))
then return false; // *** ERROR RETURN ***
break;
}
- else CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
-"\n"
-" expansion_Jacobian():\n"
+ else error_exit(ERROR_EXIT,
+"***** expansion_Jacobian():\n"
" dummy computation isn't supported for\n"
-" Jacobian_compute_method = \"numerical perturbation\"!");/*NOTREACHED*/
+" Jacobian_compute_method = \"numerical perturbation\"!\n");
+ /*NOTREACHED*/
case Jacobian__symbolic_diff:
- CCTK_VWarn(1, __LINE__, __FILE__, CCTK_THORNSTRING,
-"\n"
-" expansion_Jacobian():\n"
+ error_exit(ERROR_EXIT,
+"***** expansion_Jacobian():\n"
" Jacobian_compute_method == \"symbolic differentiation\"\n"
" isn't implemented (yet); reverting to\n"
-" \"symbolic differentiation with finite diff d/dr\"");
- // fall through
+" \"symbolic differentiation with finite diff d/dr\"\n");/*NOTREACHED*/
case Jacobian__symbolic_diff_with_FD_dr:
if (active_flag)
@@ -147,6 +149,7 @@ case Jacobian__symbolic_diff_with_FD_dr:
// to choose a normal vs dummy computation
if (! expansion_Jacobian_dr_FD(ps_ptr, Jac_ptr,
cgi, gi, Jacobian_info,
+ error_info, initial_flag,
print_msg_flag))
then return false; // *** ERROR RETURN ***
break;
@@ -202,12 +205,13 @@ return true; // *** NORMAL RETURN ***
// for details of the various ways the computation may fail.
//
namespace {
-bool expansion_Jacobian_NP(patch_system& ps,
- Jacobian& Jac,
- const struct cactus_grid_info& cgi,
- const struct geometry_info& ii,
- const struct Jacobian_info& Jacobian_info,
- bool print_msg_flag)
+bool expansion_Jacobian_NP
+ (patch_system& ps, Jacobian& Jac,
+ const struct cactus_grid_info& cgi,
+ const struct geometry_info& gi,
+ const struct Jacobian_info& Jacobian_info,
+ const struct error_info& error_info, bool initial_flag,
+ bool print_msg_flag)
{
if (print_msg_flag)
then CCTK_VInfo(CCTK_THORNSTRING,
@@ -234,7 +238,9 @@ ps.gridfn_copy(gfns::gfn__Theta, gfns::gfn__save_Theta);
const fp save_h_y = yp.ghosted_gridfn(gfns::gfn__h, y_irho,y_isigma);
yp.ghosted_gridfn(gfns::gfn__h, y_irho,y_isigma) += epsilon;
- if (! expansion(&ps, cgi, ii))
+ if (! expansion(&ps,
+ cgi, gi,
+ error_info, initial_flag))
then return false; // *** ERROR RETURN ***
for (int xpn = 0 ; xpn < ps.N_patches() ; ++xpn)
@@ -523,12 +529,13 @@ patch& yp = ye.my_patch();
// FIXME: excision isn't implemented yet :(
//
namespace {
-bool expansion_Jacobian_dr_FD(patch_system* ps_ptr,
- Jacobian* Jac_ptr,
- const struct cactus_grid_info& cgi,
- const struct geometry_info& gi,
- const struct Jacobian_info& Jacobian_info,
- bool print_msg_flag)
+bool expansion_Jacobian_dr_FD
+ (patch_system* ps_ptr, Jacobian* Jac_ptr,
+ const struct cactus_grid_info& cgi,
+ const struct geometry_info& gi,
+ const struct Jacobian_info& Jacobian_info,
+ const struct error_info& error_info, bool initial_flag,
+ bool print_msg_flag)
{
const bool active_flag = (ps_ptr != NULL) && (Jac_ptr != NULL);
if (print_msg_flag)
@@ -544,7 +551,9 @@ if (active_flag)
ps_ptr->gridfn_copy(gfns::gfn__Theta, gfns::gfn__save_Theta);
ps_ptr->add_to_ghosted_gridfn(epsilon, gfns::gfn__h);
}
-if (! expansion(ps_ptr, cgi, gi))
+if (! expansion(ps_ptr,
+ cgi, gi,
+ error_info, initial_flag))
then return false; // *** ERROR RETURN ***
if (active_flag)