source: src/commands/com_force_discrete_compatibility.cpp@ d24c2f

Last change on this file since d24c2f 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.1 KB
RevLine 
[48b662]1/**
2 * @file com_force_discrete_compatibility.cpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Mon Apr 18 12:37:11 2011
5 *
6 * @brief May be used to explicitly force the discrete
7 * compatibility condition \sum_{i,j,k} f_{i,j,k} = 0.
[dfed1c]8 *
[48b662]9 */
10
11#ifdef HAVE_CONFIG_H
12#include <config.h>
13#endif
14
15#include "base/command.hpp"
16#include "grid/grid.hpp"
17#include "grid/multigrid.hpp"
18#include "mg.hpp"
19
20using namespace VMG;
21
22class VMGCommandForceDiscreteCompatibility : public Command
23{
24public:
25 Request Run(Command::argument_vector arguments)
26 {
[dfed1c]27 MPE_EVENT_BEGIN()
28
29 Grid& rhs = (*MG::GetRhs())(MG::GetRhs()->MaxLevel());
30 Comm& comm = *MG::GetComm();
31
32 if (comm.BoundaryConditions()[0] == Periodic &&
33 comm.BoundaryConditions()[1] == Periodic &&
34 comm.BoundaryConditions()[2] == Periodic)
35 rhs.ForceDiscreteCompatibilityCondition();
36
37 MPE_EVENT_END()
[48b662]38
39 return Continue;
40 }
41
42 static const char* Name() {return "ForceDiscreteCompatibility";}
43 static int Arguments() {return 0;}
44};
45
[dfed1c]46CREATE_INITIALIZER(VMGCommandForceDiscreteCompatibility)
Note: See TracBrowser for help on using the repository browser.