Debian Codegraph @

src/atlas/output/Gmsh.h

raw
1 /*
2 * (C) Copyright 2013 ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
11 #pragma once
12
13 #include <fstream>
14
15 #include "atlas/output/Output.h"
16 #include "atlas/parallel/mpi/mpi.h"
17 #include "atlas/util/Config.h"
18
19 namespace eckit {
20 class Parametrisation;
21 class PathName;
22 } // namespace eckit
23
24 namespace atlas {
25 namespace output {
26 namespace detail {
27 class GmshIO;
28 }
29 } // namespace output
30 } // namespace atlas
31
32 namespace atlas {
33 namespace output {
34
35 // -----------------------------------------------------------------------------
36
37 class GmshFileStream : public std::ofstream {
38 public:
39 static std::string parallelPathName(const eckit::PathName& path, int part = mpi::rank());
40 GmshFileStream(const eckit::PathName& file_path, const char* mode, int part = mpi::rank());
41 };
42
43 // -----------------------------------------------------------------------------
44
45 class Gmsh : public Output {
46 public:
47 Gmsh(const Output& output);
48 Gmsh(std::ostream&);
49 Gmsh(std::ostream&, const eckit::Parametrisation&);
50
51 Gmsh(const eckit::PathName&, const std::string& mode);
52 Gmsh(const eckit::PathName&, const std::string& mode, const eckit::Parametrisation&);
53
54 Gmsh(const eckit::PathName&);
55 Gmsh(const eckit::PathName&, const eckit::Parametrisation&);
56 };
57
58 // -----------------------------------------------------------------------------
59
60 } // namespace output
61 } // namespace atlas