Ignore:
Timestamp:
Apr 30, 2012, 2:40:31 PM (14 years ago)
Author:
Frederik Heber <heber@…>
Children:
759a6a
Parents:
d448a7
Message:

Conformalized vmg getter functions with other solvers.

  • also rename gamma -> cycle_type.
  • all getters now return FCSResult and require two parameters.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1778 5161e1c8-67bf-11de-9fd5-51895aff932f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/interface/interface_particles_cf.cpp

    rd448a7 r728149  
    5959  int max_level, max_iterations;
    6060  int pre_smoothing_steps, post_smoothing_steps;
    61   int gamma, near_field_cells, discretization_order;
     61  int cycle_type, near_field_cells, discretization_order;
    6262  vmg_float precision;
    6363  std::string lop_str, datafile_str;
     
    107107  pre_smoothing_steps = Helper::ToValWithDefault<int>(xml_conf.child_value("pre_smoothing_steps"), 3);
    108108  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);
    110110  near_field_cells = Helper::ToValWithDefault<int>(xml_conf.child_value("near_field_cells"), 3);
    111111  discretization_order = Helper::ToValWithDefault<int>(xml_conf.child_value("discretization_order"), 2);
     
    133133  if (!lop_str.compare("cs")) {
    134134    lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    135     Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), gamma);
     135    Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type);
    136136  } else if (!lop_str.compare("fas")) {
    137137    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);
    139139  } else if (!lop_str.compare("cs_debug")) {
    140140    lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    141     Techniques::SetCorrectionSchemePeriodicDebug(interface->MinLevel(), interface->MaxLevel(), gamma);
     141    Techniques::SetCorrectionSchemePeriodicDebug(interface->MinLevel(), interface->MaxLevel(), cycle_type);
    142142  } else if (!lop_str.compare("fas_debug")) {
    143143    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);
    145145  } else {
    146146    lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    147     Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), gamma);
     147    Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type);
    148148  }
    149149  lop->Register("LEVEL_OPERATOR");
     
    170170    std::printf("  Maximum level:                %d\n", max_level);
    171171    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);
    173173    std::printf("  Pre smoothing steps:          %d\n", pre_smoothing_steps);
    174174    std::printf("  Post smoothing steps:         %d\n", post_smoothing_steps);
Note: See TracChangeset for help on using the changeset viewer.