[cig-commits] commit: Multigrid seems to work, though it is slower than it should be
Mercurial
hg at geodynamics.org
Fri Feb 25 14:14:39 PST 2011
changeset: 44:4c1e4cd9d6de
user: Walter Landry <wlandry at caltech.edu>
date: Mon Jan 10 13:42:56 2011 -0800
files: StokesFACOps/initializeOperatorState.C StokesFACOps/prolongErrorAndCorrect.C StokesFACOps/xeqScheduleGhostFill.C StokesFACOps/xeqScheduleProlongation.C example_inputs/const_refine.2d.input
description:
Multigrid seems to work, though it is slower than it should be
diff -r c616e7ffcd1b -r 4c1e4cd9d6de StokesFACOps/initializeOperatorState.C
--- a/StokesFACOps/initializeOperatorState.C Sat Jan 08 10:09:27 2011 -0800
+++ b/StokesFACOps/initializeOperatorState.C Mon Jan 10 13:42:56 2011 -0800
@@ -258,24 +258,22 @@ void SAMRAI::solv::StokesFACOps::initial
vdb->mapIndexToVariable(d_cell_scratch_id, variable);
p_ghostfill_refine_operator =
geometry->lookupRefineOperator(variable,
- d_cf_discretization == "Ewing" ?
- "CONSTANT_REFINE" : d_cf_discretization);
+ "CONSERVATIVE_LINEAR_REFINE");
vdb->mapIndexToVariable(d_side_scratch_id, variable);
v_ghostfill_refine_operator =
geometry->lookupRefineOperator(variable,
- d_cf_discretization == "Ewing" ?
- "CONSTANT_REFINE" : d_cf_discretization);
+ "CONSERVATIVE_LINEAR_REFINE");
vdb->mapIndexToVariable(d_cell_scratch_id, variable);
p_nocoarse_refine_operator =
geometry->lookupRefineOperator(variable,
- "CONSTANT_REFINE");
+ "CONSERVATIVE_LINEAR_REFINE");
vdb->mapIndexToVariable(d_side_scratch_id, variable);
v_nocoarse_refine_operator =
geometry->lookupRefineOperator(variable,
- "CONSTANT_REFINE");
+ "CONSERVATIVE_LINEAR_REFINE");
#ifdef DEBUG_CHECK_ASSERTIONS
if (!p_prolongation_refine_operator) {
diff -r c616e7ffcd1b -r 4c1e4cd9d6de StokesFACOps/prolongErrorAndCorrect.C
--- a/StokesFACOps/prolongErrorAndCorrect.C Sat Jan 08 10:09:27 2011 -0800
+++ b/StokesFACOps/prolongErrorAndCorrect.C Mon Jan 10 13:42:56 2011 -0800
@@ -95,13 +95,18 @@ void SAMRAI::solv::StokesFACOps::prolong
* Add the refined error in the scratch space to the error currently
* residing in the destination level.
*/
- math::HierarchyCellDataOpsReal<double>
- hierarchy_math_ops(d_hierarchy, dest_ln, dest_ln);
- const int p_dst = d.getComponentDescriptorIndex(0);
- hierarchy_math_ops.add(p_dst, p_dst, d_cell_scratch_id);
- const int v_dst = d.getComponentDescriptorIndex(1);
- hierarchy_math_ops.add(v_dst, v_dst, d_side_scratch_id);
-
+ {
+ math::HierarchyCellDataOpsReal<double>
+ hierarchy_math_ops(d_hierarchy, dest_ln, dest_ln);
+ const int p_dst = d.getComponentDescriptorIndex(0);
+ hierarchy_math_ops.add(p_dst, p_dst, d_cell_scratch_id);
+ }
+ {
+ math::HierarchySideDataOpsReal<double>
+ hierarchy_math_ops(d_hierarchy, dest_ln, dest_ln);
+ const int v_dst = d.getComponentDescriptorIndex(1);
+ hierarchy_math_ops.add(v_dst, v_dst, d_side_scratch_id);
+ }
fine_level->deallocatePatchData(d_cell_scratch_id);
fine_level->deallocatePatchData(d_side_scratch_id);
diff -r c616e7ffcd1b -r 4c1e4cd9d6de StokesFACOps/xeqScheduleGhostFill.C
--- a/StokesFACOps/xeqScheduleGhostFill.C Sat Jan 08 10:09:27 2011 -0800
+++ b/StokesFACOps/xeqScheduleGhostFill.C Mon Jan 10 13:42:56 2011 -0800
@@ -56,7 +56,7 @@ void SAMRAI::solv::StokesFACOps::xeqSche
p_ghostfill_refine_operator);
refiner.
resetSchedule(p_ghostfill_refine_schedules[dest_ln]);
- p_ghostfill_refine_schedules[dest_ln]->fillData(0.0);
+ p_ghostfill_refine_schedules[dest_ln]->fillData(0.0,false);
p_ghostfill_refine_algorithm->
resetSchedule(p_ghostfill_refine_schedules[dest_ln]);
}
@@ -74,7 +74,7 @@ void SAMRAI::solv::StokesFACOps::xeqSche
v_ghostfill_refine_operator);
refiner.
resetSchedule(v_ghostfill_refine_schedules[dest_ln]);
- v_ghostfill_refine_schedules[dest_ln]->fillData(0.0);
+ v_ghostfill_refine_schedules[dest_ln]->fillData(0.0,false);
v_ghostfill_refine_algorithm->
resetSchedule(v_ghostfill_refine_schedules[dest_ln]);
}
diff -r c616e7ffcd1b -r 4c1e4cd9d6de StokesFACOps/xeqScheduleProlongation.C
--- a/StokesFACOps/xeqScheduleProlongation.C Sat Jan 08 10:09:27 2011 -0800
+++ b/StokesFACOps/xeqScheduleProlongation.C Mon Jan 10 13:42:56 2011 -0800
@@ -52,7 +52,7 @@ void SAMRAI::solv::StokesFACOps::xeqSche
xfer::RefineAlgorithm refiner(d_dim);
refiner.registerRefine(p_dst, p_src, p_scr, p_prolongation_refine_operator);
refiner.resetSchedule(p_prolongation_refine_schedules[dest_ln]);
- p_prolongation_refine_schedules[dest_ln]->fillData(0.0);
+ p_prolongation_refine_schedules[dest_ln]->fillData(0.0,false);
p_prolongation_refine_algorithm->
resetSchedule(p_prolongation_refine_schedules[dest_ln]);
}
@@ -65,7 +65,7 @@ void SAMRAI::solv::StokesFACOps::xeqSche
xfer::RefineAlgorithm refiner(d_dim);
refiner.registerRefine(v_dst, v_src, v_scr, v_prolongation_refine_operator);
refiner.resetSchedule(v_prolongation_refine_schedules[dest_ln]);
- v_prolongation_refine_schedules[dest_ln]->fillData(0.0);
+ v_prolongation_refine_schedules[dest_ln]->fillData(0.0,false);
v_prolongation_refine_algorithm->
resetSchedule(v_prolongation_refine_schedules[dest_ln]);
}
diff -r c616e7ffcd1b -r 4c1e4cd9d6de example_inputs/const_refine.2d.input
--- a/example_inputs/const_refine.2d.input Sat Jan 08 10:09:27 2011 -0800
+++ b/example_inputs/const_refine.2d.input Mon Jan 10 13:42:56 2011 -0800
@@ -88,8 +88,8 @@ StandardTagAndInitialize {
tagging_method = "REFINE_BOXES"
RefineBoxes {
level_0 = [(0,0),(7,7)]
- //level_1 = [(0,0),(15,15)]
- //level_2 = [(0,0),(31,31)]
+ level_1 = [(0,0),(15,15)]
+ level_2 = [(0,0),(31,31)]
//etc.
}
}
@@ -120,7 +120,7 @@ PatchHierarchy {
// [level 0 entry]
// etc....
// }
- max_levels = 1
+ max_levels = 3
ratio_to_coarser {
level_1 = 2, 2
level_2 = 2, 2
More information about the CIG-COMMITS
mailing list