From c9be9cbae8cc14223059293e26eeea8fdc84e095 Mon Sep 17 00:00:00 2001 From: miguel Date: Fri, 10 Mar 2000 13:32:12 +0000 Subject: Extending elliptic interface to work with petsc, and adding some parameters for boundary conditions. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/IDBrillData/trunk@21 a678b1cf-93e1-4b43-a69d-d43939e66649 --- param.ccl | 20 ++++++++++++++++++-- src/brilldata.F | 25 ++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/param.ccl b/param.ccl index e624a2c..5485fcc 100644 --- a/param.ccl +++ b/param.ccl @@ -12,14 +12,30 @@ private: # Parameters for elliptic solve -KEYWORD solver "Which elliptic solver to use" +KEYWORD brill_solver "Which elliptic solver to use" { "sor" :: "Use SOR solver" "petsc" :: "Use PETSc solver" "bam" :: "Use bam solver" } "sor" -REAL thresh "How far (absolute norm) to go" +KEYWORD brill_bound "Which boundary condition to use" +{ + "const" :: "constant boundary: set brill_const_v0" + "robin" :: "Robin boundary: set brill_robin_falloff, brill_robin_inf +} "const" + +CCTK_INT brill_robin_falloff "Fall-off of Robin BC" +{ + 0: :: "any positive integer value" +} 1 + +CCTK_REAL brill_robin_inf " inf-value of Robin BC" +{ + : :: "anything goes" +} 1.0 + +REAL brill_thresh "How far (absolute norm) to go" { 0.0: :: "Positive number please" } 0.00001 diff --git a/src/brilldata.F b/src/brilldata.F index 65614f7..1b1645d 100644 --- a/src/brilldata.F +++ b/src/brilldata.F @@ -44,7 +44,7 @@ c to find conformal factor. call CCTK_VarIndex (Mlin_index, "IDBrillData::Mlinear") call CCTK_VarIndex (Nsrc_index, "IDBrillData::Nsource") - AbsTol(1)= 0.0001 + AbsTol(1)= brill_thresh AbsTol(2)= -1 AbsTol(3)= -1 @@ -52,8 +52,27 @@ c to find conformal factor. RelTol(2)= -1 RelTol(3)= -1 - call Ell_LinConfMetricSolver(ierr,cctkGH,metpsi_index, - .field_index,Mlin_index,Nsrc_index,AbsTol,RelTol,"sor") + if (CCTK_EQUALS(brill_bound,"const")) then + call Ell_SetRealKey(ierr,brill_const_v0, + . "EllLinConfMetric::Bnd::Const::V0") + end if + + if (CCTK_EQUALS(brill_bound,"robin")) then + call Ell_SetIntKey(ierr,brill_robin_falloff, + . "EllLinConfMetric::Bnd::Robin::falloff") + call Ell_SetRealKey(ierr,brill_robin_inf, + . "EllLinConfMetric::Bnd::Robin::inf") + endif + + if (CCTK_EQUALS(brill_solver,"sor")) then + call Ell_LinConfMetricSolver(ierr,cctkGH,metpsi_index, + . field_index,Mlin_index,Nsrc_index,AbsTol,RelTol,"sor") + end if + + if (CCTK_EQUALS(brill_solver,"petsc)) then + call Ell_LinConfMetricSolver(ierr,cctkGH,metpsi_index, + . field_index,Mlin_index,Nsrc_index,AbsTol,RelTol,"petsc") + end if c Synchronize conformal factor. -- cgit v1.2.3