Advanced Multi-Physics (AMP)
On-Line Documentation
SiloWriter.h
Go to the documentation of this file.
1#ifndef included_AMP_SiloIO
2#define included_AMP_SiloIO
3
4#include "AMP/AMP_TPLs.h"
5#include "AMP/IO/Writer.h"
6#include "AMP/mesh/Mesh.h"
7
8#include <map>
9#include <set>
10#include <sstream>
11#include <string.h>
12#include <vector>
13
14#ifdef AMP_USE_SILO
15 #include <silo.h>
16#endif
17
18
19namespace AMP::IO {
20
21
28class SiloIO : public AMP::IO::Writer
29{
30public:
33
35 virtual ~SiloIO();
36
39
41 void readFile( const std::string &fname ) override;
42
52 void writeFile( const std::string &fname, size_t iteration, double time = 0 ) override;
53
54private:
55// Function to write a single mesh
56#ifdef AMP_USE_SILO
57 void writeMesh( DBfile *file, const baseMeshData &data, int cycle, double time );
58#endif
59
60 // Function to write the summary file (the file should already be created, ready to reopen)
61 // This function requires global communication
62 void writeSummary( const std::string &filename, int cycle, double time );
63
64 // The dimension
65 int d_dim;
66};
67
68} // namespace AMP::IO
69
70#endif
A class used to abstract away reading/writing files for visualization.
Definition SiloWriter.h:29
virtual ~SiloIO()
Default destructor.
void writeSummary(const std::string &filename, int cycle, double time)
void readFile(const std::string &fname) override
Function to read a file.
SiloIO()
Default constructor.
WriterProperties getProperties() const override
Function to get the writer properties.
void writeFile(const std::string &fname, size_t iteration, double time=0) override
Function to write a file.
A class used to abstract away reading/writing files.
Definition Writer.h:37
std::string filename(const std::string &filename)
Return the filename (strip the path)



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:40.
Comments on this page