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/force_sinus.cpp

    r2d3854 rb57b9b  
    4141#include <iostream>
    4242
    43 #include "base/factory.hpp"
    4443#include "base/math.hpp"
    4544#include "base/vector.hpp"
    4645#include "comm/comm_mpi.hpp"
    4746#include "comm/domain_decomposition_mpi.hpp"
     47#include "cycles/cycle_cs_periodic.hpp"
    4848#include "level/level_operator_cs.hpp"
    4949#include "level/level_operator.hpp"
    5050#include "samples/discretization_poisson_fd.hpp"
    51 #include "samples/techniques.hpp"
    5251#include "smoother/gsrb.hpp"
    5352#include "solver/givens.hpp"
     
    6766  LibraryForceSinusFixture()
    6867  {
    69     Factory& factory = MG::GetFactory();
     68    const Boundary boundary(Periodic, Periodic, Periodic);
    7069
    71     Comm* comm = new CommMPI(Boundary(Periodic, Periodic, Periodic), new DomainDecompositionMPI());
    72     Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0);
    73     Discretization* discretization = new DiscretizationPoissonFD(2);
    74     LevelOperator* lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    75     Smoother* smoother = new GaussSeidelRB();
    76     Solver* solver = new Givens<SolverSingular>();
     70    new CommMPI(boundary, new DomainDecompositionMPI());
     71    new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0);
     72    new DiscretizationPoissonFD(2);
     73    new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
     74    new GaussSeidelRB();
     75    new Givens<SolverSingular>();
     76    new CycleCSPeriodic(2);
    7777
    78     comm->Register("COMM");
    79     interface->Register("INTERFACE");
    80     discretization->Register("DISCRETIZATION");
    81     lop->Register("LEVEL_OPERATOR");
    82     smoother->Register("SMOOTHER");
    83     solver->Register("SOLVER");
    84 
    85     Techniques::SetCorrectionSchemePeriodic(interface->MinLevel(), interface->MaxLevel(), 2);
    86 
    87     factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3);
    88     factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3);
    89     factory.RegisterObjectStorage("PRECISION", 1e-10);
    90     factory.RegisterObjectStorage("MAX_ITERATION", 7);
     78    new ObjectStorage<vmg_int>("PRESMOOTHSTEPS", 3);
     79    new ObjectStorage<vmg_int>("POSTSMOOTHSTEPS", 3);
     80    new ObjectStorage<vmg_int>("MAX_ITERATION", 7);
     81    new ObjectStorage<vmg_float>("PRECISION", 1e-10);
    9182
    9283    MG::PostInit();
Note: See TracChangeset for help on using the changeset viewer.