| Rev | Line | |
|---|
| [48b662] | 1 | /**
|
|---|
| 2 | * @file com_set_average_to_zero.cpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 12:49:11 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief May be used to ensure the global constraint
|
|---|
| 7 | * \sum_{i,j,k} sol_{i,j,k} = 0
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | #ifdef HAVE_CONFIG_H
|
|---|
| 12 | #include <config.h>
|
|---|
| 13 | #endif
|
|---|
| 14 |
|
|---|
| 15 | #include "base/command.hpp"
|
|---|
| 16 | #include "base/factory.hpp"
|
|---|
| 17 | #include "grid/grid.hpp"
|
|---|
| 18 | #include "grid/multigrid.hpp"
|
|---|
| 19 |
|
|---|
| 20 | using namespace VMG;
|
|---|
| 21 |
|
|---|
| 22 | class VMGCommandSetAverageToZero : public Command
|
|---|
| 23 | {
|
|---|
| 24 | public:
|
|---|
| 25 | Request Run(Command::argument_vector arguments)
|
|---|
| 26 | {
|
|---|
| [dfed1c] | 27 | MPE_EVENT_BEGIN()
|
|---|
| 28 |
|
|---|
| 29 | (*MG::GetFactory().Get(arguments[0])->Cast<Multigrid>())().SetAverageToZero();
|
|---|
| 30 |
|
|---|
| 31 | MPE_EVENT_END()
|
|---|
| [48b662] | 32 |
|
|---|
| 33 | return Continue;
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | static const char* Name() {return "SetAverageToZero";}
|
|---|
| 37 | static int Arguments() {return 1;}
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| [dfed1c] | 40 | CREATE_INITIALIZER(VMGCommandSetAverageToZero)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.