MoDeNa
1.0
Software framework facilitating sequential multi-scale modelling
|
Functions for input and output operations. More...
#include "globals.hh"
#include <fstream>
#include <iostream>
#include <string.h>
#include "allocation.hh"
#include "geometry.hh"
Go to the source code of this file.
Functions | |
void | readParameters (string filename, string &outputFilename, string &VTKInputFilename, string &GnuplotSkeletonFilename, string &GnuplotAltSkeletonFilename, string &descriptorsFilename, string ¶metersFilename) |
int *** | allocateFromVTK (string filename, int ***amat, bool report) |
Allocates the matrix from dimensions read from VTK file. More... | |
void | importFromVTK (string filename, int ***amat, bool report) |
Reads morphology from VTK file. Changes amat . More... | |
void | saveToVTK (const char *filename, int ***amat, bool report) |
Saves morphology to VTK file. More... | |
void | saveToDX (const char *filename, int ***amat, bool report) |
Saves morphology to DX file. More... | |
void | saveToGnuplot (string filename, int sv, int incmax, double **vert, int **vinc, bool report) |
Saves tessellation diagram to gnuplot file. More... | |
void | saveDescriptors (string filename, double por, double fs, bool report) |
Saves morphology descriptors (porosity and strut content) to a file. More... | |
void | saveParameters (string filename, double dedge, bool report) |
Saves parameters (dedge ) to a file. More... | |
Functions for input and output operations.
Definition in file inout.cc.
int*** allocateFromVTK | ( | string | filename, |
int *** | amat, | ||
bool | report | ||
) |
Allocates the matrix from dimensions read from VTK file.
[in] | filename | Name of input VTK file with morphology |
[in,out] | amat | matrix |
[in] | report | show output |
Definition at line 71 of file inout.cc.
References alloc_3Dmatrix(), globals::nx, globals::ny, and constants::nz.
Referenced by main().
void importFromVTK | ( | string | filename, |
int *** | amat, | ||
bool | report | ||
) |
void readParameters | ( | string | filename, |
string & | outputFilename, | ||
string & | VTKInputFilename, | ||
string & | GnuplotSkeletonFilename, | ||
string & | GnuplotAltSkeletonFilename, | ||
string & | descriptorsFilename, | ||
string & | parametersFilename | ||
) |
Reads file with options and parameters
Reads parameters from file and stores them to global variables. These parameters determine what will be done.
[in] | filename | Name of input file with parameters that determine what will be done |
[in,out] | outputFilename | Name of output file with morphology without extension |
[in,out] | VTKInputFilename | Name of input VTK file with morphology |
[in,out] | GnuplotSkeletonFilename | Name of input/output file with tessellation - gnuplot diagram |
[in,out] | GnuplotAltSkeletonFilename | Name of output file with tessellation - alt. gnuplot diagram |
[in,out] | descriptorsFilename | Name of output file with morphology descriptors |
[in,out] | parametersFilename | Name of output file with parameters |
Definition at line 18 of file inout.cc.
References globals::createEdges, globals::createNodes, globals::dedge, constants::dstrut, globals::grid, globals::import_vtk, globals::nx, globals::ny, constants::nz, globals::openCell, globals::progress_report, globals::RANDOM, globals::save_dat, globals::save_voro_diag1, globals::save_voro_diag2, globals::save_vtk, globals::strutPorosity, globals::sx, globals::sy, and globals::sz.
Referenced by main().
void saveDescriptors | ( | string | filename, |
double | por, | ||
double | fs, | ||
bool | report | ||
) |
void saveParameters | ( | string | filename, |
double | dedge, | ||
bool | report | ||
) |
void saveToDX | ( | const char * | filename, |
int *** | amat, | ||
bool | report | ||
) |
Saves morphology to DX file.
[in] | filename | Name of output file with morphology |
[in] | amat | matrix |
[in] | report | show output |
Definition at line 220 of file inout.cc.
References globals::nx, globals::ny, and constants::nz.
Referenced by main().
void saveToGnuplot | ( | string | filename, |
int | sv, | ||
int | incmax, | ||
double ** | vert, | ||
int ** | vinc, | ||
bool | report | ||
) |
Saves tessellation diagram to gnuplot file.
[in] | filename | Name of output file with tessellation |
[in] | sv | number of vertices |
[in] | incmax | maximum number of connections to one vertex |
[in] | vert | vertex positions |
[in] | vinc | indexes of connected vertices |
[in] | report | show output |
Definition at line 256 of file inout.cc.
References in_domain().
Referenced by main().
void saveToVTK | ( | const char * | filename, |
int *** | amat, | ||
bool | report | ||
) |
Saves morphology to VTK file.
[in] | filename | Name of output file with morphology |
[in] | amat | matrix |
[in] | report | show output |
Definition at line 178 of file inout.cc.
References globals::nx, globals::ny, and constants::nz.
Referenced by main().