source: src/commands/com_set_coarser_dirichlet_values.cpp@ dfed1c

Last change on this file since dfed1c was dfed1c, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Major vmg update.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1136 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 * @file com_set_coarser_dirichlet_values.cpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Mon Apr 18 12:50:00 2011
5 *
6 * @brief Used for FAS-like multigrid algorithms, to set
7 * all Dirichlet boundary values on all the coarse
8 * levels in advance.
9 *
10 */
11
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include "base/command.hpp"
17#include "grid/grid.hpp"
18#include "grid/multigrid.hpp"
19#include "mg.hpp"
20
21using namespace VMG;
22
23class VMGCommandSetCoarserDirichletValues : public Command
24{
25public:
26 Request Run(Command::argument_vector arguments)
27 {
28 MPE_EVENT_BEGIN()
29
30 Multigrid& rhs = *MG::GetRhs();
31 Multigrid& sol = *MG::GetSol();
32
33 rhs.SetCoarserDirichletValues();
34
35 for (int i=rhs.MinLevel(); i<=rhs.GlobalMaxLevel(); ++i)
36 sol(i).SetBoundary(rhs(i));
37
38 MPE_EVENT_END()
39
40 return Continue;
41 }
42
43 static const char* Name() {return "SetCoarserDirichletValues";}
44 static int Arguments() {return 0;}
45};
46
47CREATE_INITIALIZER(VMGCommandSetCoarserDirichletValues)
Note: See TracBrowser for help on using the repository browser.