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

    r2d3854 rb57b9b  
    4444#include "comm/comm_mpi.hpp"
    4545#include "comm/domain_decomposition_mpi.hpp"
     46#include "cycles/cycle_fas_dirichlet.hpp"
    4647#include "level/level_operator_fas.hpp"
    4748#include "level/level_operator.hpp"
    4849#include "samples/discretization_poisson_fd.hpp"
    49 #include "samples/techniques.hpp"
    5050#include "smoother/gsrb.hpp"
    51 #ifdef HAVE_LAPACK
    52 #include "solver/dgesv.hpp"
    53 #endif
    5451#include "solver/givens.hpp"
    5552#include "solver/solver_regular.hpp"
     
    6663  LibraryDirichletFASMPIFixture()
    6764  {
    68     Factory& factory = MG::GetFactory();
     65    const Boundary boundary(Dirichlet, Dirichlet, Dirichlet);
    6966
    70     Comm *comm = new CommMPI(Boundary(Dirichlet, Dirichlet, Dirichlet), new DomainDecompositionMPI());
    71     comm->Register("COMM");
     67    new CommMPI(boundary, new DomainDecompositionMPI());
     68    new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0);
     69    new DiscretizationPoissonFD(2);
     70    new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
     71    new GaussSeidelRB();
     72    new Givens<SolverRegular>();
     73    new CycleFASDirichlet(2);
    7274
    73     Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0);
    74     interface->Register("INTERFACE");
    75 
    76     Discretization* discretization = new DiscretizationPoissonFD(2);
    77     discretization->Register("DISCRETIZATION");
    78 
    79     LevelOperator* lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
    80     lop->Register("LEVEL_OPERATOR");
    81 
    82     Smoother* smoother = new GaussSeidelRB();
    83     smoother->Register("SMOOTHER");
    84 
    85 #ifdef HAVE_LAPACK
    86     Solver* solver = new DGESV<SolverRegular>();
    87 #else
    88     Solver* solver = new Givens<SolverRegular>();
    89 #endif
    90 
    91     solver->Register("SOLVER");
    92 
    93     Techniques::SetFullApproximationSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), 2);
    94 
    95     factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3);
    96     factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3);
    97     factory.RegisterObjectStorage("PRECISION", 1e-10);
    98     factory.RegisterObjectStorage("MAX_ITERATION", 7);
     75    new ObjectStorage<int>("PRESMOOTHSTEPS", 3);
     76    new ObjectStorage<int>("POSTSMOOTHSTEPS", 3);
     77    new ObjectStorage<int>("MAX_ITERATION", 7);
     78    new ObjectStorage<vmg_float>("PRECISION", 1.0e-10);
    9979
    10080    MG::PostInit();
Note: See TracChangeset for help on using the changeset viewer.