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

    r2d3854 rb57b9b  
    3535#include "base/vector.hpp"
    3636#include "comm/comm_serial.hpp"
     37#include "cycles/cycle_fas_dirichlet.hpp"
    3738#include "level/level_operator_fas.hpp"
    3839#include "level/level_operator.hpp"
    3940#include "samples/discretization_poisson_fv.hpp"
    40 #include "samples/techniques.hpp"
    4141#include "smoother/gsrb.hpp"
    42 #ifdef HAVE_LAPACK
    43 #include "solver/dgesv.hpp"
    44 #endif
    4542#include "solver/givens.hpp"
    4643#include "solver/solver_regular.hpp"
     
    5754  LibraryDirichletFASLRFixture()
    5855  {
    59     Factory& factory = MG::GetFactory();
     56    Boundary boundary(Dirichlet, Dirichlet, Dirichlet);
    6057
    61     Comm *comm = new CommSerial(Boundary(Dirichlet, Dirichlet, Dirichlet));
    62     comm->Register("COMM");
     58    new CommSerial(boundary);
     59    new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0, 2, 1.6);
     60    new DiscretizationPoissonFV(2);
     61    new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, Stencils::InterpolationTrilinear);
     62    new GaussSeidelRB();
     63    new Givens<SolverRegular>();
     64    new CycleFASDirichlet(2);
    6365
    64     Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0, 2, 1.6);
    65     interface->Register("INTERFACE");
    66 
    67     Discretization* discretization = new DiscretizationPoissonFV(2);
    68     discretization->Register("DISCRETIZATION");
    69 
    70     LevelOperator* lop = new LevelOperatorFAS(Stencils::RestrictionFullWeight, Stencils::Injection, 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 DGESV<SolverRegular>();
    78 #else
    79     Solver* solver = new Givens<SolverRegular>();
    80 #endif
    81 
    82     solver->Register("SOLVER");
    83 
    84     Techniques::SetFullApproximationSchemeDirichlet(interface->MinLevel(), interface->MaxLevel(), 2);
    85 
    86     factory.RegisterObjectStorage("PRESMOOTHSTEPS", 3);
    87     factory.RegisterObjectStorage("POSTSMOOTHSTEPS", 3);
    88     factory.RegisterObjectStorage("PRECISION", 1e-10);
    89     factory.RegisterObjectStorage("MAX_ITERATION", 8);
     66    new ObjectStorage<int>("PRESMOOTHSTEPS", 3);
     67    new ObjectStorage<int>("POSTSMOOTHSTEPS", 3);
     68    new ObjectStorage<int>("MAX_ITERATION", 8);
     69    new ObjectStorage<vmg_float>("PRECISION", 1.0e-10);
    9070
    9171    MG::PostInit();
Note: See TracChangeset for help on using the changeset viewer.