| 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 |
|
|---|
| 11 | #ifdef HAVE_CONFIG_H
|
|---|
| 12 | #include <config.h>
|
|---|
| 13 | #endif
|
|---|
| 14 |
|
|---|
| 15 | #include <cstdio>
|
|---|
| 16 |
|
|---|
| 17 | #include "base/command.hpp"
|
|---|
| 18 | #include "grid/grid.hpp"
|
|---|
| 19 | #include "grid/multigrid.hpp"
|
|---|
| 20 |
|
|---|
| 21 | using namespace VMG;
|
|---|
| 22 |
|
|---|
| 23 | class VMGCommandCheckConsistency : public Command
|
|---|
| 24 | {
|
|---|
| 25 | public:
|
|---|
| 26 | Request Run(Command::argument_vector arguments)
|
|---|
| 27 | {
|
|---|
| 28 | Multigrid* grid = MG::GetFactory().GetObject(arguments[0])->Cast<Multigrid>();
|
|---|
| 29 |
|
|---|
| 30 | if (!(*grid)().IsConsistent())
|
|---|
| 31 | return StopCycleNow;
|
|---|
| 32 |
|
|---|
| 33 | return Continue;
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | static const char* Name() {return "CheckConsistency";}
|
|---|
| 37 | static int Arguments() {return 1;}
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| 40 | CREATE_INITIALIZER(VMGCommandCheckConsistency);
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.