Ignore:
Timestamp:
Sep 20, 2012, 1:54:01 PM (13 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
c3acbb
Parents:
2d3854
Message:

vmg: Simplified API.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/units/particle/interface_fcs.cpp

    r2d3854 rb57b9b  
    4646#include "comm/mpi/error_handler.hpp"
    4747#endif
     48#include "cycles/cycle_cs_periodic.hpp"
     49#include "cycles/cycle_fas_dirichlet.hpp"
    4850#include "level/level_operator_cs.hpp"
    4951#include "level/level_operator_fas.hpp"
     
    5153#include "samples/discretization_poisson_fd.hpp"
    5254#include "samples/discretization_poisson_fv.hpp"
    53 #include "samples/techniques.hpp"
    5455#include "smoother/gsrb_poisson_2.hpp"
    5556#include "smoother/gsrb_poisson_4.hpp"
     
    111112  const bool singular = periodic[0] * periodic[1] * periodic[2];
    112113
    113   Comm* comm;
    114   Discretization* discretization;
    115   Interface* interface;
    116   LevelOperator* lop;
    117   Smoother* smoother;
    118   Solver* solver;
    119 
    120114  /*
    121115   * Choose multigrid components
     
    123117  if (singular) {
    124118
    125     comm = new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm);
    126     discretization = new DiscretizationPoissonFD(discretization_order);
    127     interface = new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 0, 1.0);
    128     lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    129     solver = new Givens<SolverSingular>();
    130 
    131     Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), cycle_type);
     119    new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm);
     120    new DiscretizationPoissonFD(discretization_order);
     121    new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 0, 1.0);
     122    new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
     123    new Givens<SolverSingular>();
     124    new CycleCSPeriodic(cycle_type);
    132125
    133126  }else {
    134127
    135     comm = new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm);
    136     discretization = new DiscretizationPoissonFV(discretization_order);
    137     interface = new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 2, 1.6);
    138     lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
    139     solver = new Givens<SolverRegular>();
    140 
    141     Techniques::SetFullApproximationSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), cycle_type);
     128    new Particle::CommMPI(boundary, new DomainDecompositionMPI(), mpi_comm);
     129    new DiscretizationPoissonFV(discretization_order);
     130    new InterfaceParticles(boundary, 2, level, Vector(box_offset), box_size, near_field_cells, 2, 1.6);
     131    new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
     132    new Givens<SolverRegular>();
     133    new CycleFASDirichlet(cycle_type);
    142134
    143135  }
     
    147139   */
    148140  if (discretization_order == 2)
    149     smoother = new GaussSeidelRBPoisson2();
     141    new GaussSeidelRBPoisson2();
    150142  else
    151     smoother = new GaussSeidelRBPoisson4();
    152 
    153   /*
    154    * Register multigrid components
    155    */
    156   comm->Register("COMM");
    157   discretization->Register("DISCRETIZATION");
    158   interface->Register("INTERFACE");
    159   lop->Register("LEVEL_OPERATOR");
    160   smoother->Register("SMOOTHER");
    161   solver->Register("SOLVER");
     143    new GaussSeidelRBPoisson4();
    162144
    163145  /*
Note: See TracChangeset for help on using the changeset viewer.