diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-07-22 17:33:21 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2002-07-22 17:33:21 +0000 |
commit | 73d9cdfe58e99305ede9c394f72712e7f759b5a2 (patch) | |
tree | fb0b18394b6a227056f23b2121d0d743fbf59940 /src/patch/patch_system.cc | |
parent | cee87925a7f844f805fd4d68c7fa1e4bb48ca5e4 (diff) |
various changes including d/dr terms in Jacobian by numerical perturbation,
tweak I/O parameters,
move printing Jacobian out of Jacobian class into test driver,
drop unused array BLAS routines in jtutil::
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@654 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/patch/patch_system.cc')
-rw-r--r-- | src/patch/patch_system.cc | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/patch/patch_system.cc b/src/patch/patch_system.cc index fa0d28d..2fb1f17 100644 --- a/src/patch/patch_system.cc +++ b/src/patch/patch_system.cc @@ -22,6 +22,9 @@ // patch_system::type_of_name // patch_system::patch_number_of_name // +// patch_system::gridfn_copy +// patch_system::add_to_ghosted_gridfn +// // patch_system::synchronize // patch_system::compute_synchronize_Jacobian // patch_system::synchronize_Jacobian_y_ipar_posn @@ -1060,6 +1063,54 @@ error_exit(ERROR_EXIT, //****************************************************************************** // +// This function copies one (nominal-grid) gridfn to another. +// +void patch_system::gridfn_copy(int src_gfn, int dst_gfn) +{ + for (int pn = 0 ; pn < N_patches() ; ++pn) + { + patch& p = ith_patch(pn); + for (int irho = p.min_irho() ; irho <= p.max_irho() ; ++irho) + { + for (int isigma = p.min_isigma() ; + isigma <= p.max_isigma() ; + ++isigma) + { + p.gridfn(dst_gfn, irho,isigma) = p.gridfn(src_gfn, irho,isigma); + } + } + } +} + +//****************************************************************************** + +// +// This function adds a scalar to a ghosted gridfn. +// +void patch_system::add_to_ghosted_gridfn(fp delta, int ghosted_dst_gfn) +{ + for (int pn = 0 ; pn < N_patches() ; ++pn) + { + patch& p = ith_patch(pn); + for (int irho = p.ghosted_min_irho() ; + irho <= p.ghosted_max_irho() ; + ++irho) + { + for (int isigma = p.ghosted_min_isigma() ; + isigma <= p.ghosted_max_isigma() ; + ++isigma) + { + p.ghosted_gridfn(ghosted_dst_gfn, irho,isigma) += delta; + } + } + } +} + +//****************************************************************************** +//****************************************************************************** +//****************************************************************************** + +// // This function "synchronizes" all ghost zones of all patches, i.e. it // update the ghost-zone values of the specified gridfns via the appropriate // sequence of symmetry operations and interpatch interpolations. This |