Ignore:
Timestamp:
Nov 22, 2011, 9:22:10 PM (14 years ago)
Author:
Julian Iseringhausen <isering@…>
Children:
facba0
Parents:
66f24d
Message:

Major vmg update.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/comm/comm_serial.hpp

    r66f24d rdfed1c  
    1515
    1616#include "comm/comm.hpp"
     17#include "comm/domain_decomposition_serial.hpp"
    1718
    1819namespace VMG
    1920{
    2021
    21 class MeshBase;
    22 class Stencil;
     22class DomainDecomposition;
     23class Grid;
     24class Multigrid;
    2325
    2426class CommSerial : public Comm
    2527{
    2628public:
    27   CommSerial(BC boundary) : Comm(boundary) {Init();}
     29  CommSerial(const Boundary& boundary) :
     30    Comm(boundary, new DomainDecompositionSerial())
     31  {
     32    InitCommSerial();
     33  }
    2834
     35  Grid& GetCoarserGrid(Multigrid& multigrid);
    2936  Grid& GetFinerGrid(Multigrid& multigrid);
    30   Grid& GetCoarserGrid(Multigrid& multigrid);
     37  Grid& GetGlobalCoarseGrid(Multigrid& multigrid);
    3138
    32   void CommFromGhosts(Grid& mesh);
    33   void CommToGhosts(Grid& mesh);
    34   Grid* CommMergeGrids(Grid& oldgrid) {return &oldgrid;}
     39  void CommFromGhosts(Grid& grid);
     40  void CommToGhosts(Grid& grid);
     41  void CommSubgrid(Grid& grid_old, Grid& grid_new);
     42  void CommAddSubgrid(Grid& grid_old, Grid& grid_new);
    3543
    36   vmg_float ComputeResidualNorm(Multigrid& sol, Multigrid& rhs);
     44  void CommParticles(const Grid& grid, std::list<Particle::Particle>& particles);
     45  void CommLCListGhosts(const Grid& grid, Particle::LinkedCellList& lc);
     46  void CommAddPotential(std::list<Particle::Particle>& particles);
     47  void CommAddPotential(Particle::LinkedCellList& lc);
    3748
    38   vmg_float AllReduce(const vmg_float& value) {return value;}
     49  vmg_float GlobalSum(const vmg_float& value) {return value;}
     50  vmg_float GlobalSumRoot(const vmg_float& value)  {return value;}
     51  void GlobalSumArray(vmg_float* array, const vmg_int& size) {}
    3952
    40   void PrintDefect(const Grid& sol, const Grid& rhs, const char* information);
    41   void PrintGrid(const Grid& mesh, const char* information);
    42   void PrintCorrectedGrid(const Grid& mesh, const char* information);
    43 
    44   void PrintInnerGrid(const Grid& mesh, const char* information);
    45   void PrintInnerCorrectedGrid(const Grid& mesh, const char* information);
     53  void PrintString(const char* format, ...);
     54  void PrintStringOnce(const char* format, ...);
     55  void PrintXML(const std::string& filename, const std::string& xml_data);
     56  void PrintXMLAll(const std::string& filename, const std::string& xml_data);
     57  void PrintAllSettings();
     58  void PrintDefect(Grid& sol, Grid& rhs, const char* information);
     59  void PrintGrid(Grid& grid, const char* information);
     60  void PrintCorrectedGrid(Grid& grid, const char* information);
     61  void PrintInnerGrid(Grid& grid, const char* information);
     62  void PrintInnerCorrectedGrid(Grid& grid, const char* information);
    4663
    4764  void DebugPrintError(const Grid& sol, const char* information);
    48 
    49   void DebugPrintGridStructure(Multigrid& grid);
     65  void DebugPrintErrorNorm(Grid& sol);
     66  void DebugPrintGridStructure(Multigrid& multigrid);
    5067
    5168private:
    52   void Init();
     69  void InitCommSerial();
    5370
    54   void CreateOutputDirectory();
    5571  void OpenFileAndPrintHeader(std::ofstream& out, const Grid& mesh, const char* information, bool inner);
    5672  void PrintGridStructureLevel(Grid& grid, std::ofstream& out);
     73  std::string CreateOutputDirectory();
    5774
    58   int output_count, error_norm_count, residual_count;
    59   std::string defects_path_str;
     75  int error_norm_count, residual_count;
    6076
    6177  std::map< const Grid*, Grid*> finer, coarser;
     78
    6279};
    6380
Note: See TracChangeset for help on using the changeset viewer.