Changeset b57b9b for test/unit_test/library/dirichlet_cs.cpp
- Timestamp:
- Sep 20, 2012, 1:54:01 PM (13 years ago)
- Children:
- c3acbb
- Parents:
- 2d3854
- File:
-
- 1 edited
-
test/unit_test/library/dirichlet_cs.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
test/unit_test/library/dirichlet_cs.cpp
r2d3854 rb57b9b 34 34 #include "base/math.hpp" 35 35 #include "base/vector.hpp" 36 #include "cycles/cycle_cs_dirichlet.hpp" 36 37 #include "comm/comm_serial.hpp" 37 38 #include "level/level_operator_cs.hpp" … … 39 40 #include "level/stencils.hpp" 40 41 #include "samples/discretization_poisson_fd.hpp" 41 #include "samples/techniques.hpp"42 42 #include "smoother/gsrb.hpp" 43 43 #ifdef HAVE_LAPACK … … 58 58 LibraryDirichletCSFixture() 59 59 { 60 Factory& factory = MG::GetFactory();60 const Boundary boundary(Dirichlet, Dirichlet, Dirichlet); 61 61 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); 64 69 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); 90 74 91 75 MG::PostInit();
Note:
See TracChangeset
for help on using the changeset viewer.
