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_cs.cpp

    r2d3854 rb57b9b  
    3535#include "base/vector.hpp"
    3636#include "comm/comm_serial.hpp"
     37#include "cycles/cycle_cs_periodic.hpp"
    3738#include "level/level_operator_cs.hpp"
    3839#include "samples/discretization_poisson_fd.hpp"
    39 #include "samples/techniques.hpp"
    4040#include "smoother/gs.hpp"
    4141#include "smoother/gsrb.hpp"
    42 #ifdef HAVE_LAPACK
    43 #include "solver/dsysv.hpp"
    44 #endif
    4542#include "solver/givens.hpp"
    4643#include "solver/solver_singular.hpp"
     
    5754  LibraryPeriodicCSFixture()
    5855  {
    59     Factory& factory = MG::GetFactory();
     56    const Boundary boundary(Periodic, Periodic, Periodic);
    6057
    61     Comm *comm = new CommSerial(Boundary(Periodic, Periodic, Periodic));
    62     comm->Register("COMM");
     58    new CommSerial(boundary);
     59    new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0);
     60    new DiscretizationPoissonFD(2);
     61    new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
     62    new GaussSeidelRB();
     63    new Givens<SolverSingular>();
     64    new CycleCSPeriodic(2);
    6365
    64     Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0);
    65     interface->Register("INTERFACE");
    66 
    67     Discretization* discretization = new DiscretizationPoissonFD(2);
    68     discretization->Register("DISCRETIZATION");
    69 
    70     LevelOperator* lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    71     lop->Register("LEVEL_OPERATOR");
    72 
    73     Smoother* smoother = new GaussSeidelRB();
    74     smoother->Register("SMOOTHER");
    75 
    76 #ifdef HAVE_LAPACK
    77     Solver* solver = new DSYSV<SolverSingular>();
    78 #else
    79     Solver* solver = new Givens<SolverSingular>();
    80 #endif
    81     solver->Register("SOLVER");
    82 
    83     Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), 2);
    84 
    85     factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3);
    86     factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3);
    87     factory.RegisterObjectStorage("PRECISION", 1e-10);
    88     factory.RegisterObjectStorage("MAX_ITERATION", 7);
     66    new ObjectStorage<int>("PRESMOOTHSTEPS", 3);
     67    new ObjectStorage<int>("POSTSMOOTHSTEPS", 3);
     68    new ObjectStorage<int>("MAX_ITERATION", 7);
     69    new ObjectStorage<vmg_float>("PRECISION", 1.0e-10);
    8970
    9071    MG::PostInit();
Note: See TracChangeset for help on using the changeset viewer.