KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
mpi_serializer.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Pooyan Dadvand
11 //
12 //
13 
14 #if !defined(KRATOS_MPI_SERIALIZER_H_INCLUDED )
15 #define KRATOS_MPI_SERIALIZER_H_INCLUDED
16 
17 // System includes
18 #include <string>
19 #include <cstring>
20 #include <iostream>
21 
22 // External includes
23 
24 // Project includes
25 #include "includes/define.h"
27 
28 //This class provides a simpler interface for serialization to a string instead of to a file
29 // Note that you may not override any load or save method of the Serializer. They are not virtual.
30 namespace Kratos
31 {
33  {
34  public:
36 
40  : StreamSerializer(rTrace)
41  {
42  Set(Serializer::MPI);
43  Set(Serializer::SHALLOW_GLOBAL_POINTERS_SERIALIZATION);
44  }
45 
46  //this constructor generates a standard Serializer AND fills the buffer with the data contained in "data"
49  MpiSerializer(const std::string& data,TraceType const& rTrace=SERIALIZER_NO_TRACE)
50  : StreamSerializer(data,rTrace)
51  {
52  Set(Serializer::MPI);
53  Set(Serializer::SHALLOW_GLOBAL_POINTERS_SERIALIZATION);
54  }
55 
56  virtual ~MpiSerializer(){}
57 
58  private:
59 
61  MpiSerializer& operator=(MpiSerializer const& rOther) = delete;
62 
64  MpiSerializer(MpiSerializer const& rOther) = delete;
65  };
66 }
67 #endif // KRATOS_MPI_SERIALIZER_H_INCLUDED defined
Definition: mpi_serializer.h:33
KRATOS_CLASS_POINTER_DEFINITION(MpiSerializer)
virtual ~MpiSerializer()
Definition: mpi_serializer.h:56
MpiSerializer(const std::string &data, TraceType const &rTrace=SERIALIZER_NO_TRACE)
Definition: mpi_serializer.h:49
MpiSerializer(TraceType const &rTrace=SERIALIZER_NO_TRACE)
Definition: mpi_serializer.h:39
TraceType
Definition: serializer.h:129
@ SERIALIZER_NO_TRACE
Definition: serializer.h:129
void Set(const Flags ThisFlag)
Definition: serializer.h:937
Definition: stream_serializer.h:33
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
data
Definition: mesh_to_mdpa_converter.py:59