Changeset b57b9b for test/unit_test/library/dirichlet_fas_lr.cpp
- Timestamp:
- Sep 20, 2012, 1:54:01 PM (13 years ago)
- Children:
- c3acbb
- Parents:
- 2d3854
- File:
-
- 1 edited
-
test/unit_test/library/dirichlet_fas_lr.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
test/unit_test/library/dirichlet_fas_lr.cpp
r2d3854 rb57b9b 35 35 #include "base/vector.hpp" 36 36 #include "comm/comm_serial.hpp" 37 #include "cycles/cycle_fas_dirichlet.hpp" 37 38 #include "level/level_operator_fas.hpp" 38 39 #include "level/level_operator.hpp" 39 40 #include "samples/discretization_poisson_fv.hpp" 40 #include "samples/techniques.hpp"41 41 #include "smoother/gsrb.hpp" 42 #ifdef HAVE_LAPACK43 #include "solver/dgesv.hpp"44 #endif45 42 #include "solver/givens.hpp" 46 43 #include "solver/solver_regular.hpp" … … 57 54 LibraryDirichletFASLRFixture() 58 55 { 59 Factory& factory = MG::GetFactory();56 Boundary boundary(Dirichlet, Dirichlet, Dirichlet); 60 57 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); 63 65 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); 90 70 91 71 MG::PostInit();
Note:
See TracChangeset
for help on using the changeset viewer.
