Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Functions
io.h File Reference

Declares logic pertaining to reading and writing data. More...

#include <iomanip>
#include <iostream>
#include <memory>
#include <sstream>
#include <type_traits>
#include <utility>
#include "../global/global.h"
#include "../grid/grid3D.h"
#include "../io/AttrRecorderInterface.h"
#include "../io/FieldWriter.h"
#include "../io/FnameTemplate.h"
#include "../io/WriterManager.h"
#include "../utils/error_handling.h"
Include dependency graph for io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool Is_Root_Proc ()
 
void Print_Stats (Grid3D &G)
 
void Write_Data (Grid3D &G, struct Parameters P, int nfile, const io::WriterManager &write_manager)
 
int chprintf (const char *__restrict sdata,...)
 
template<typename T >
std::string to_string_exact (T const &input)
 Convert a floating point number to a string such that it can be exactly deserialized back from a string to the same floating point number.
 
void Create_Log_File (struct Parameters P)
 
void Write_Message_To_Log_File (const char *message)
 
void Write_Debug (Real *Value, const char *fname, int nValues, int iProc)
 
void Ensure_Dir_Exists (std::string dir_path)
 

Detailed Description

Declares logic pertaining to reading and writing data.

Function Documentation

◆ Is_Root_Proc()

bool Is_Root_Proc ( )
inline

Local function that designates whether we are using a root-process. It gives a sensible result regardless of whether we are using MPI

◆ to_string_exact()

template<typename T >
std::string to_string_exact ( T const &  input)

Convert a floating point number to a string such that it can be exactly deserialized back from a string to the same floating point number.

Template Parameters
TAny floating point type
Parameters
[in]inputThe floating point number to convert
Returns
std::string The string representation of the input floating point

◆ Write_Data()

void Write_Data ( Grid3D G,
struct Parameters  P,
int  nfile,
const io::WriterManager write_manager 
)

Write all data files

Parameters
Gthe grid object
Pthe parameter struct
nfilethe index corresponding to the current output
writer_managerManages the data writers.