| Rev | Line | |
|---|
| [48b662] | 1 | /**
|
|---|
| 2 | * @file smoother.cpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 13:08:57 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief VMG::Smoother
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | #ifdef HAVE_CONFIG_H
|
|---|
| 11 | #include <config.h>
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 | #include "base/discretization.hpp"
|
|---|
| [dfed1c] | 15 | #include "base/timer.hpp"
|
|---|
| [48b662] | 16 | #include "comm/comm.hpp"
|
|---|
| 17 | #include "smoother/smoother.hpp"
|
|---|
| 18 | #include "mg.hpp"
|
|---|
| 19 |
|
|---|
| 20 | using namespace VMG;
|
|---|
| 21 |
|
|---|
| 22 | void Smoother::Run(Multigrid& sol, Multigrid& rhs, int steps)
|
|---|
| 23 | {
|
|---|
| [dfed1c] | 24 | Timer::Start("SmootherWithCommunication");
|
|---|
| 25 |
|
|---|
| [48b662] | 26 | for (int i=0; i<steps; i++) {
|
|---|
| [dfed1c] | 27 |
|
|---|
| [48b662] | 28 | MG::GetComm()->CommToGhosts(sol());
|
|---|
| 29 |
|
|---|
| 30 | if (sol().Global().BoundaryType() == LocallyRefined)
|
|---|
| 31 | MG::GetDiscretization()->SetInnerBoundary(sol(), rhs(), sol(sol.Level()-1));
|
|---|
| 32 |
|
|---|
| 33 | this->Compute(sol(), rhs());
|
|---|
| [dfed1c] | 34 |
|
|---|
| [48b662] | 35 | }
|
|---|
| [dfed1c] | 36 |
|
|---|
| 37 | Timer::Stop("SmootherWithCommunication");
|
|---|
| [48b662] | 38 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.