source: src/commands/com_set_coarser_dirichlet_values.cpp@ 2fad0e0

Last change on this file since 2fad0e0 was 48b662, checked in by Olaf Lenz <olenz@…>, 14 years ago

Moved files in scafacos_fcs one level up.

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

  • Property mode set to 100644
File size: 997 bytes
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 Multigrid& rhs = *MG::GetRhs();
29 Multigrid& sol = *MG::GetSol();
30
31 rhs.SetCoarserDirichletValues();
32
33 for (int i=rhs.MinLevel(); i<=rhs.GlobalMaxLevel(); ++i)
34 sol(i).SetBoundary(rhs(i));
35
36 return Continue;
37 }
38
39 static const char* Name() {return "SetCoarserDirichletValues";}
40 static int Arguments() {return 0;}
41};
42
43CREATE_INITIALIZER(VMGCommandSetCoarserDirichletValues);
Note: See TracBrowser for help on using the repository browser.