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

    r2d3854 rb57b9b  
    4343#include "comm/comm_mpi.hpp"
    4444#include "comm/domain_decomposition_mpi.hpp"
     45#include "cycles/cycle_cs_dirichlet.hpp"
    4546#include "level/level_operator_cs.hpp"
    4647#include "level/level_operator.hpp"
    4748#include "samples/discretization_poisson_fd.hpp"
    48 #include "samples/techniques.hpp"
    4949#include "smoother/gsrb.hpp"
    50 #ifdef HAVE_LAPACK
    51 #include "solver/dgesv.hpp"
    52 #endif
    5350#include "solver/givens.hpp"
    5451#include "solver/solver_regular.hpp"
     
    6562  LibraryDirichletCSMPIFixture()
    6663  {
    67     Factory& factory = MG::GetFactory();
     64    const Boundary boundary(Dirichlet, Dirichlet, Dirichlet);
    6865
    69     Comm* comm = new CommMPI(Boundary(Dirichlet, Dirichlet, Dirichlet), new DomainDecompositionMPI());
    70     comm->Register("COMM");
     66    new CommMPI(boundary, new DomainDecompositionMPI());
     67    new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0);
     68    new DiscretizationPoissonFD(2);
     69    new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
     70    new GaussSeidelRB();
     71    new Givens<SolverRegular>();
     72    new CycleCSDirichlet(2);
    7173
    72     Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0);
    73     interface->Register("INTERFACE");
    74 
    75     Discretization* discretization = new DiscretizationPoissonFD(2);
    76     discretization->Register("DISCRETIZATION");
    77 
    78     LevelOperator* lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    79     lop->Register("LEVEL_OPERATOR");
    80 
    81     Smoother* smoother = new GaussSeidelRB();
    82     smoother->Register("SMOOTHER");
    83 
    84 #ifdef HAVE_LAPACK
    85     Solver* solver = new DGESV<SolverRegular>();
    86 #else
    87     Solver* solver = new Givens<SolverRegular>();
    88 #endif
    89     solver->Register("SOLVER");
    90 
    91     Techniques::SetCorrectionSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), 2);
    92 
    93     factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3);
    94     factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3);
    95     factory.RegisterObjectStorage("PRECISION", 1e-10);
    96     factory.RegisterObjectStorage("MAX_ITERATION", 7);
     74    new ObjectStorage<int>("PRESMOOTHSTEPS", 3);
     75    new ObjectStorage<int>("POSTSMOOTHSTEPS", 3);
     76    new ObjectStorage<int>("MAX_ITERATION", 7);
     77    new ObjectStorage<vmg_float>("PRECISION", 1.0e-10);
    9778
    9879    MG::PostInit();
Note: See TracChangeset for help on using the changeset viewer.