| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * @file com_check_consistency.cpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 12:28:58 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief Checks a given grid for nan and inf.
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | #ifdef HAVE_CONFIG_H
|
|---|
| 11 | #include <config.h>
|
|---|
| 12 | #endif
|
|---|
| 13 |
|
|---|
| 14 | #include <cstdio>
|
|---|
| 15 |
|
|---|
| 16 | #include "base/command.hpp"
|
|---|
| 17 | #include "grid/grid.hpp"
|
|---|
| 18 | #include "grid/multigrid.hpp"
|
|---|
| 19 |
|
|---|
| 20 | using namespace VMG;
|
|---|
| 21 |
|
|---|
| 22 | class VMGCommandCheckConsistency : public Command
|
|---|
| 23 | {
|
|---|
| 24 | public:
|
|---|
| 25 | Request Run(Command::argument_vector arguments)
|
|---|
| 26 | {
|
|---|
| 27 | MPE_EVENT_BEGIN()
|
|---|
| 28 |
|
|---|
| 29 | Multigrid* grid = MG::GetFactory().Get(arguments[0])->Cast<Multigrid>();
|
|---|
| 30 |
|
|---|
| 31 | MPE_EVENT_END()
|
|---|
| 32 |
|
|---|
| 33 | if (!(*grid)().IsConsistent())
|
|---|
| 34 | return StopCycleNow;
|
|---|
| 35 |
|
|---|
| 36 | return Continue;
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | static const char* Name() {return "CheckConsistency";}
|
|---|
| 40 | static int Arguments() {return 1;}
|
|---|
| 41 | };
|
|---|
| 42 |
|
|---|
| 43 | CREATE_INITIALIZER(VMGCommandCheckConsistency)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.