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
  • test/unit_test/library/periodic_fas.cpp

    r2d3854 rb57b9b  
    3434#include "base/math.hpp"
    3535#include "comm/comm_serial.hpp"
     36#include "cycles/cycle_fas_periodic.hpp"
    3637#include "level/level_operator_fas.hpp"
    3738#include "samples/discretization_poisson_fd.hpp"
    38 #include "samples/techniques.hpp"
    39 #include "smoother/gs.hpp"
    4039#include "smoother/gsrb.hpp"
    41 #ifdef HAVE_LAPACK
    42 #include "solver/dsysv.hpp"
    43 #endif
    4440#include "solver/givens.hpp"
    4541#include "solver/solver_singular.hpp"
     
    5652  LibraryPeriodicFASFixture()
    5753  {
    58     Factory& factory = MG::GetFactory();
     54    const Boundary boundary(Periodic, Periodic, Periodic);
    5955
    60     Comm *comm = new CommSerial(Boundary(Periodic, Periodic, Periodic));
    61     comm->Register("COMM");
     56    new CommSerial(boundary);
     57    new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0);
     58    new DiscretizationPoissonFD(2);
     59    new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
     60    new GaussSeidelRB();
     61    new Givens<SolverSingular>();
     62    new CycleFASPeriodic(2);
    6263
    63     Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0);
    64     interface->Register("INTERFACE");
    65 
    66     Discretization* discretization = new DiscretizationPoissonFD(2);
    67     discretization->Register("DISCRETIZATION");
    68 
    69     LevelOperator* lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
    70     lop->Register("LEVEL_OPERATOR");
    71 
    72     Smoother* smoother = new GaussSeidelRB();
    73     smoother->Register("SMOOTHER");
    74 
    75 #ifdef HAVE_LAPACK
    76     Solver* solver = new DSYSV<SolverSingular>();
    77 #else
    78     Solver* solver = new Givens<SolverSingular>();
    79 #endif
    80     solver->Register("SOLVER");
    81 
    82     Techniques::SetFullApproximationSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), 2);
    83 
    84     factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3);
    85     factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3);
    86     factory.RegisterObjectStorage("PRECISION", 1e-10);
    87     factory.RegisterObjectStorage("MAX_ITERATION", 7);
     64    new ObjectStorage<int>("PRESMOOTHSTEPS", 3);
     65    new ObjectStorage<int>("POSTSMOOTHSTEPS", 3);
     66    new ObjectStorage<int>("MAX_ITERATION", 7);
     67    new ObjectStorage<vmg_float>("PRECISION", 1.0e-10);
    8868
    8969    MG::PostInit();
Note: See TracChangeset for help on using the changeset viewer.