| Line | |
|---|
| 1 | /**
|
|---|
| 2 | * @file com_print_defect.cpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 12:42:29 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief Writes the current defect to a VTKStructuredPoints file
|
|---|
| 7 | * in output/date_time
|
|---|
| 8 | *
|
|---|
| 9 | */
|
|---|
| 10 |
|
|---|
| 11 | #ifdef HAVE_CONFIG_H
|
|---|
| 12 | #include <config.h>
|
|---|
| 13 | #endif
|
|---|
| 14 |
|
|---|
| 15 | #include <sstream>
|
|---|
| 16 |
|
|---|
| 17 | #include "base/command.hpp"
|
|---|
| 18 | #include "comm/comm.hpp"
|
|---|
| 19 | #include "grid/multigrid.hpp"
|
|---|
| 20 |
|
|---|
| 21 | using namespace VMG;
|
|---|
| 22 |
|
|---|
| 23 | class VMGCommandPrintDefect : public Command
|
|---|
| 24 | {
|
|---|
| 25 | public:
|
|---|
| 26 | Request Run(Command::argument_vector arguments)
|
|---|
| 27 | {
|
|---|
| 28 | MPE_EVENT_BEGIN()
|
|---|
| 29 |
|
|---|
| 30 | std::stringstream buffer;
|
|---|
| 31 |
|
|---|
| 32 | Comm* comm = MG::GetComm();
|
|---|
| 33 | Multigrid& rhs = *MG::GetRhs();
|
|---|
| 34 | Multigrid& sol = *MG::GetSol();
|
|---|
| 35 |
|
|---|
| 36 | buffer << "Level "<< rhs.Level() << " Defect";
|
|---|
| 37 |
|
|---|
| 38 | comm->CommToGhosts(sol());
|
|---|
| 39 | comm->PrintDefect(sol(), rhs(), buffer.str().c_str());
|
|---|
| 40 |
|
|---|
| 41 | MPE_EVENT_END()
|
|---|
| 42 |
|
|---|
| 43 | return Continue;
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | static const char* Name() {return "PrintDefect";}
|
|---|
| 47 | static int Arguments() {return 0;}
|
|---|
| 48 | };
|
|---|
| 49 |
|
|---|
| 50 | CREATE_INITIALIZER(VMGCommandPrintDefect)
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.