source: src/commands/com_print_defect.cpp@ dfed1c

Last change on this file since dfed1c 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: 1007 bytes
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
21using namespace VMG;
22
23class VMGCommandPrintDefect : public Command
24{
25public:
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
50CREATE_INITIALIZER(VMGCommandPrintDefect)
Note: See TracBrowser for help on using the repository browser.