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

    r2d3854 rb57b9b  
    3434#include "base/math.hpp"
    3535#include "base/vector.hpp"
     36#include "cycles/cycle_cs_dirichlet.hpp"
    3637#include "comm/comm_serial.hpp"
    3738#include "level/level_operator_cs.hpp"
     
    3940#include "level/stencils.hpp"
    4041#include "samples/discretization_poisson_fd.hpp"
    41 #include "samples/techniques.hpp"
    4242#include "smoother/gsrb.hpp"
    4343#ifdef HAVE_LAPACK
     
    5858  LibraryDirichletCSFixture()
    5959  {
    60     Factory& factory = MG::GetFactory();
     60    const Boundary boundary(Dirichlet, Dirichlet, Dirichlet);
    6161
    62     Comm *comm = new CommSerial(Boundary(Dirichlet, Dirichlet, Dirichlet));
    63     comm->Register("COMM");
     62    new CommSerial(boundary);
     63    new VMGInterfaces::InterfaceSinus(sine_factor, boundary, 2, 6, 0.0, 1.0);
     64    new DiscretizationPoissonFD(2);
     65    new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
     66    new GaussSeidelRB();
     67    new Givens<SolverRegular>();
     68    new CycleCSDirichlet(2);
    6469
    65     Interface* interface = new VMGInterfaces::InterfaceSinus(sine_factor, comm->BoundaryConditions(), 2, 6, 0.0, 1.0);
    66     interface->Register("INTERFACE");
    67 
    68     Discretization* discretization = new DiscretizationPoissonFD(2);
    69     discretization->Register("DISCRETIZATION");
    70 
    71     LevelOperator* lop = new LevelOperatorCS(Stencils::RestrictionFullWeight, Stencils::InterpolationTrilinear);
    72     lop->Register("LEVEL_OPERATOR");
    73 
    74     Smoother* smoother = new GaussSeidelRB();
    75     smoother->Register("SMOOTHER");
    76 
    77 #ifdef HAVE_LAPACK
    78     Solver* solver = new DGESV<SolverRegular>();
    79 #else
    80     Solver* solver = new Givens<SolverRegular>();
    81 #endif
    82     solver->Register("SOLVER");
    83 
    84     Techniques::SetCorrectionSchemeDirichlet(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", 7);
     70    new ObjectStorage<int>("PRESMOOTHSTEPS", 3);
     71    new ObjectStorage<int>("POSTSMOOTHSTEPS", 3);
     72    new ObjectStorage<int>("MAX_ITERATION", 7);
     73    new ObjectStorage<vmg_float>("PRECISION", 1.0e-10);
    9074
    9175    MG::PostInit();
Note: See TracChangeset for help on using the changeset viewer.