Hex  2.2
Hydrogen-electron collision solver
Functions | Variables
io.cpp File Reference
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <string>
#include <tuple>
#include "hex-arrays.h"
#include "hex-cmdline.h"
#include "hex-csrmatrix.h"
#include "hex-matrix.h"
#include "hex-vtkfile.h"
#include "io.h"
#include "preconditioners.h"
#include <CL/cl.h>
Include dependency graph for io.cpp:

Functions

void ReadArrays (std::ifstream &inf, rArray &arr)
 
void zip_solution (CommandLine const &cmd, InputFile const &inp, Parallel const &par, Bspline const &bspline_inner, Bspline const &bspline_full, std::vector< std::pair< int, int >> const &ll)
 Convert solution to VTK file. More...
 
void write_grid (Bspline const &bspline, std::string const &basename)
 Write grid to a VTK file. More...
 

Variables

const std::string sample_input
 

Function Documentation

◆ ReadArrays()

void ReadArrays ( std::ifstream &  inf,
rArray &  arr 
)

◆ write_grid()

void write_grid ( Bspline const &  bspline,
std::string const &  basename 
)

◆ zip_solution()

void zip_solution ( CommandLine const &  cmd,
InputFile const &  inp,
Parallel const &  par,
Bspline const &  bspline_inner,
Bspline const &  bspline_full,
std::vector< std::pair< int, int >> const &  ll 
)

This function will convert a solution (the filename of the HDF file should come from the command line option –zipfile) to a series of VTK text files that can be viewed e.g. by the free ParaView program. The resulting VTK files (one for each angular basis vector) will contain real and imaginary part of the wave function component on an rectilinear grid. Parameters of the grid can be further refined by the command line arguments –zipcount and –zipmax).

Parameters
cmdClass containing command line options.
bsplineB-spline environments. The appropriate one will be chosen by the match between the B-spline count and the solution size.
llAngular basis.

See the respective classes for deeper explanation of individual parameters.

Variable Documentation

◆ sample_input

const std::string sample_input