Changeset 728149
- Timestamp:
- Apr 30, 2012, 2:40:31 PM (14 years ago)
- Children:
- 759a6a
- Parents:
- d448a7
- Location:
- src/interface
- Files:
-
- 3 edited
-
interface_fcs.cpp (modified) (7 diffs)
-
interface_fcs.h (modified) (1 diff)
-
interface_particles_cf.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/interface/interface_fcs.cpp
rd448a7 r728149 53 53 static vmg_int max_iter = -1; 54 54 static vmg_int smoothing_steps = -1; 55 static vmg_int gamma= -1;55 static vmg_int cycle_type = -1; 56 56 static vmg_float precision = -1; 57 57 static vmg_float box_offset[3]; … … 64 64 65 65 static void VMG_fcs_init(vmg_int level, vmg_int* periodic,vmg_int max_iter, 66 vmg_int smoothing_steps, vmg_int gamma, vmg_float precision,66 vmg_int smoothing_steps, vmg_int cycle_type, vmg_float precision, 67 67 vmg_float* box_offset, vmg_float box_size, 68 68 vmg_int near_field_cells, vmg_int interpolation_degree, … … 73 73 VMGBackupSettings::max_iter = max_iter; 74 74 VMGBackupSettings::smoothing_steps = smoothing_steps; 75 VMGBackupSettings:: gamma = gamma;75 VMGBackupSettings::cycle_type = cycle_type; 76 76 VMGBackupSettings::precision = precision; 77 77 std::memcpy(VMGBackupSettings::box_offset, box_offset, 3*sizeof(vmg_float)); … … 158 158 */ 159 159 if (singular) 160 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), gamma);161 else 162 Techniques::SetFullApproximationSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), gamma);160 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type); 161 else 162 Techniques::SetFullApproximationSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), cycle_type); 163 163 164 164 /* … … 184 184 185 185 void VMG_fcs_setup(vmg_int level, vmg_int* periodic, vmg_int max_iter, 186 vmg_int smoothing_steps, vmg_int gamma, vmg_float precision,186 vmg_int smoothing_steps, vmg_int cycle_type, vmg_float precision, 187 187 vmg_float* box_offset, vmg_float box_size, 188 188 vmg_int near_field_cells, vmg_int interpolation_degree, … … 195 195 VMGBackupSettings::max_iter != max_iter || 196 196 VMGBackupSettings::smoothing_steps != smoothing_steps || 197 VMGBackupSettings:: gamma != gamma||197 VMGBackupSettings::cycle_type != cycle_type || 198 198 VMGBackupSettings::precision != precision || 199 199 VMGBackupSettings::box_offset[0] != box_offset[0] || … … 208 208 VMG_fcs_destroy(); 209 209 VMG_fcs_init(level, periodic, max_iter, 210 smoothing_steps, gamma, precision,210 smoothing_steps, cycle_type, precision, 211 211 box_offset, box_size, near_field_cells, 212 212 interpolation_degree, discretization_order, -
src/interface/interface_fcs.h
rd448a7 r728149 14 14 15 15 void VMG_fcs_setup(fcs_int level, fcs_int* periodic, fcs_int max_iter, 16 fcs_int smoothing_steps, fcs_int gamma, fcs_float precision,16 fcs_int smoothing_steps, fcs_int cycle_type, fcs_float precision, 17 17 fcs_float* box_offset, fcs_float box_size, 18 18 fcs_int near_field_cells, fcs_int interpolation_degree, -
src/interface/interface_particles_cf.cpp
rd448a7 r728149 59 59 int max_level, max_iterations; 60 60 int pre_smoothing_steps, post_smoothing_steps; 61 int gamma, near_field_cells, discretization_order;61 int cycle_type, near_field_cells, discretization_order; 62 62 vmg_float precision; 63 63 std::string lop_str, datafile_str; … … 107 107 pre_smoothing_steps = Helper::ToValWithDefault<int>(xml_conf.child_value("pre_smoothing_steps"), 3); 108 108 post_smoothing_steps = Helper::ToValWithDefault<int>(xml_conf.child_value("post_smoothing_steps"), 3); 109 gamma = Helper::ToValWithDefault<int>(xml_conf.child_value("gamma"), 1);109 cycle_type = Helper::ToValWithDefault<int>(xml_conf.child_value("cycle_type"), 1); 110 110 near_field_cells = Helper::ToValWithDefault<int>(xml_conf.child_value("near_field_cells"), 3); 111 111 discretization_order = Helper::ToValWithDefault<int>(xml_conf.child_value("discretization_order"), 2); … … 133 133 if (!lop_str.compare("cs")) { 134 134 lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); 135 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), gamma);135 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type); 136 136 } else if (!lop_str.compare("fas")) { 137 137 lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear); 138 Techniques::SetFullApproximationSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), gamma);138 Techniques::SetFullApproximationSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type); 139 139 } else if (!lop_str.compare("cs_debug")) { 140 140 lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); 141 Techniques::SetCorrectionSchemePeriodicDebug(interface->MinLevel(), interface->MaxLevel(), gamma);141 Techniques::SetCorrectionSchemePeriodicDebug(interface->MinLevel(), interface->MaxLevel(), cycle_type); 142 142 } else if (!lop_str.compare("fas_debug")) { 143 143 lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear); 144 Techniques::SetFullApproximationSchemePeriodicDebug(interface->MinLevel(), interface->MaxLevel(), gamma);144 Techniques::SetFullApproximationSchemePeriodicDebug(interface->MinLevel(), interface->MaxLevel(), cycle_type); 145 145 } else { 146 146 lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear); 147 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), gamma);147 Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type); 148 148 } 149 149 lop->Register("LEVEL_OPERATOR"); … … 170 170 std::printf(" Maximum level: %d\n", max_level); 171 171 std::printf(" Maximum number of iterations: %d\n", max_iterations); 172 std::printf(" Gamma: %d\n", gamma);172 std::printf(" Gamma: %d\n", cycle_type); 173 173 std::printf(" Pre smoothing steps: %d\n", pre_smoothing_steps); 174 174 std::printf(" Post smoothing steps: %d\n", post_smoothing_steps);
Note:
See TracChangeset
for help on using the changeset viewer.
