source: src/commands/com_print_defect.cpp@ 2fad0e0

Last change on this file since 2fad0e0 was 48b662, checked in by Olaf Lenz <olenz@…>, 14 years ago

Moved files in scafacos_fcs one level up.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@847 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 965 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
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include <sstream>
17
18#include "base/command.hpp"
19#include "comm/comm.hpp"
20#include "grid/multigrid.hpp"
21
22using namespace VMG;
23
24class VMGCommandPrintDefect : public Command
25{
26public:
27 Request Run(Command::argument_vector arguments)
28 {
29 std::stringstream buffer;
30
31 Comm* comm = MG::GetComm();
32 Multigrid& rhs = *MG::GetRhs();
33 Multigrid& sol = *MG::GetSol();
34
35 buffer << "Level "<< rhs.Level() << " Defect";
36
37 comm->CommToGhosts(sol());
38 comm->PrintDefect(sol(), rhs(), buffer.str().c_str());
39
40 return Continue;
41 }
42
43 static const char* Name() {return "PrintDefect";}
44 static int Arguments() {return 0;}
45};
46
47CREATE_INITIALIZER(VMGCommandPrintDefect);
Note: See TracBrowser for help on using the repository browser.