|
ESyS-Particle
2.3.4
|
#include "slip2vtk2d.h"#include <sstream>#include <map>#include <utility>#include <vector>#include <fstream>#include "Foundation/vec3.h"
Functions | |
| void | write_vtk_header (ofstream &outfile, int nx, int nt, double x0, double dx, double dt) |
| map< double, double > | read_file_to_map (const string &filename) |
| map< double, double > | read_line_to_map (ifstream &infile, const vector< double > &pos_vec) |
| double | get_disp_from_map_linear (const map< double, double > &dispmap, double x) |
| void | slip2vtk2d (const string &infilebase_up, const string &infilebase_down, const string &outfilename, int t0, int nt, int dt, double tlen, double x0, double x1, int nx) |
| void | slip2vtk2d_rate (const string &infilebase_up, const string &infilebase_down, const string &outfilename, int t0, int nt, int dt, double tlen, double x0, double x1, int nx) |
| void | slip2vtk2d_rate_rs (const string &infile_up, const string &infile_down, const string &posfile_up, const string &posfile_down, const string &outfilename, int t0, int nt, int dt, double tlen, double x0, double x1, int nx) |
| void | slip2raw2d_rs (const string &infile_up, const string &infile_down, const string &posfile_up, const string &posfile_down, const string &outfilename, int t0, int nt, int dt, double x0, double x1, int nx, int shift, int mult) |
| void | slip2raw2d_rate_rs (const string &infile_up, const string &infile_down, const string &posfile_up, const string &posfile_down, const string &outfilename, int t0, int nt, int dt, double x0, double x1, int nx) |
| void | slip_x2slip_t2d (const string &infilebase_up, const string &infilebase_down, const string &outfilename, int t0, int nt, int dt, double x0) |
| void | slip2rf (const string &infilebase_up, const string &infilebase_down, const string &outfilename, int t0, int nt, int dt, double x0, double x1, int nx, double thr) |
| void | vel2rf (const string &infilename_up, const string &infilename_down, const string &outfilename, int t0, int nt, int dt, int ofs, double x0, double x1, int nx, double px0, double px1, int npx, double thr) |
| void | slip2d_total_rs (const string &infile_up, const string &infile_down, const string &posfile_up, const string &posfile_down, const string &outfilename, int t0, int te, double x0, double x1, int nx) |
| void | slip2momrate_rs (const string &infile_up, const string &infile_down, const string &posfile_up, const string &posfile_down, const string &outfilename, int t0, int nt, int dt, double x0, double x1, int nx) |
| void | slip2raw2d (const string &infilebase_up, const string &infilebase_down, const string &outfilename, int t0, int nt, int dt, double x0, double x1, int nx) |
| double get_disp_from_map_linear | ( | const map< double, double > & | dispmap, |
| double | x | ||
| ) |
get displacement at given point from map (linear interpolation)
| x | |
| dispmap |
Referenced by slip2d_total_rs(), slip2momrate_rs(), slip2raw2d(), slip2raw2d_rate_rs(), slip2raw2d_rs(), slip2rf(), slip2vtk2d(), slip2vtk2d_rate(), slip2vtk2d_rate_rs(), slip_x2slip_t2d(), and vel2rf().

| map<double,double> read_file_to_map | ( | const string & | filename | ) |
read a displacement file into a map
| filename |
References Vec3::X().
Referenced by slip2raw2d(), slip2rf(), slip2vtk2d(), slip2vtk2d_rate(), and slip_x2slip_t2d().


| map<double,double> read_line_to_map | ( | ifstream & | infile, |
| const vector< double > & | pos_vec | ||
| ) |
read line of a RAW_SERIES file into map
| infile | the input file \pos_vec vector of particle x-positions |
Referenced by slip2d_total_rs(), slip2momrate_rs(), slip2raw2d_rate_rs(), slip2raw2d_rs(), slip2vtk2d_rate_rs(), and vel2rf().

| void slip2d_total_rs | ( | const string & | infile_up, |
| const string & | infile_down, | ||
| const string & | posfile_up, | ||
| const string & | posfile_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | te, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx | ||
| ) |
get total slip distribution at time t from posfiles & RAW_SERIES
| infile_up | file name for displacement data above the fault |
| infile_down | base file name for displacement data below the fault |
| posfile_up | file name for position data above the fault |
| posfile_down | base file name for position data below the fault |
| outfilename | file name for the putput file |
| t0 | start time |
| te | end time |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
References get_disp_from_map_linear(), and read_line_to_map().
Referenced by main().


| void slip2momrate_rs | ( | const string & | infile_up, |
| const string & | infile_down, | ||
| const string & | posfile_up, | ||
| const string & | posfile_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx | ||
| ) |
calculate the moment rate function (actually the potency rate function) from a pair of files containing particle displacements above/below a 1D fault and a pair of files containing the initial particle positions
| infile_up | file name for displacement data above the fault |
| infile_down | base file name for displacement data below the fault |
| posfile_up | file name for position data above the fault |
| posfile_down | base file name for position data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
References get_disp_from_map_linear(), and read_line_to_map().
Referenced by main().


| void slip2raw2d | ( | const string & | infilebase_up, |
| const string & | infilebase_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx | ||
| ) |
convert a number of file pairs containing particle displacements above/below a 1D fault in a 2D medium to a vtk-file (rect. grid) of the relative displacement
| infilebase_up | base file name for data above the fault |
| infilebase_down | base file name for data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
References get_disp_from_map_linear(), and read_file_to_map().
Referenced by main().


| void slip2raw2d_rate_rs | ( | const string & | infile_up, |
| const string & | infile_down, | ||
| const string & | posfile_up, | ||
| const string & | posfile_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx | ||
| ) |
convert a pair of files containing particle displacements above/below a 1D fault and a pair of files containing the initial particle positions to a raw file (column per data point) of the relative velocity
| infile_up | file name for displacement data above the fault |
| infile_down | base file name for displacement data below the fault |
| posfile_up | file name for position data above the fault |
| posfile_down | base file name for position data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
References get_disp_from_map_linear(), and read_line_to_map().
Referenced by main().


| void slip2raw2d_rs | ( | const string & | infile_up, |
| const string & | infile_down, | ||
| const string & | posfile_up, | ||
| const string & | posfile_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx, | ||
| int | shift, | ||
| int | mult | ||
| ) |
convert a pair of files containing particle displacements above/below a 1D fault and a pair of files containing the initial particle positions to a raw file (column per data point) of the relative displacement
| infile_up | file name for displacement data above the fault |
| infile_down | base file name for displacement data below the fault |
| posfile_up | file name for position data above the fault |
| posfile_down | base file name for position data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
| shift | shift output data by given abount (circular) |
| mult | interpolation steps between data points |
References get_disp_from_map_linear(), and read_line_to_map().
Referenced by main().


| void slip2rf | ( | const string & | infilebase_up, |
| const string & | infilebase_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx, | ||
| double | thr | ||
| ) |
get the time for each trace when the displacement first exceeds a given threshold
References get_disp_from_map_linear(), and read_file_to_map().
Referenced by main().


| void slip2vtk2d | ( | const string & | infilebase_up, |
| const string & | infilebase_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | tlen, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx | ||
| ) |
convert a number of file pairs containing particle displacements above/below a 1D fault in a 2D medium to a vtk-file (rect. grid) of the relative displacement
| infilebase_up | base file name for data above the fault |
| infilebase_down | base file name for data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| tlen | length of the output data in t-direction |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
References get_disp_from_map_linear(), read_file_to_map(), and write_vtk_header().
Referenced by main().


| void slip2vtk2d_rate | ( | const string & | infilebase_up, |
| const string & | infilebase_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | tlen, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx | ||
| ) |
convert a number of file pairs containing particle displacements above/below a 1D fault in a 2D medium to a vtk-file (rect. grid) of the relative displacement rate
| infilebase_up | base file name for data above the fault |
| infilebase_down | base file name for data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| tlen | length of the output data in t-direction |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
References get_disp_from_map_linear(), read_file_to_map(), and write_vtk_header().
Referenced by main().


| void slip2vtk2d_rate_rs | ( | const string & | infile_up, |
| const string & | infile_down, | ||
| const string & | posfile_up, | ||
| const string & | posfile_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | tlen, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx | ||
| ) |
convert a pair of files containing particle displacements above/below a 1D fault and a pair of files containing the initial particle positions to a vtk-file (rect. grid) of the relative displacement rate
| infile_up | file name for displacement data above the fault |
| infile_down | base file name for displacement data below the fault |
| posfile_up | file name for position data above the fault |
| posfile_down | base file name for position data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| tlen | length of the output data in t-direction |
| x0 | minimum x-value |
| x1 | maximum x-value |
| nx | nr. of grid points in x |
References get_disp_from_map_linear(), read_line_to_map(), and write_vtk_header().
Referenced by main().


| void slip_x2slip_t2d | ( | const string & | infilebase_up, |
| const string & | infilebase_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| double | x0 | ||
| ) |
convert a number of file pairs containing particle displacements above/below a 1D fault in a 2D medium to a file which represents the time evolution of the displacement at a given point along the fault
| infilebase_up | base file name for data above the fault |
| infilebase_down | base file name for data below the fault |
| outfilename | file name for the putput file |
| t0 | |
| nt | |
| dt | |
| x0 | location / sample point |
References get_disp_from_map_linear(), and read_file_to_map().
Referenced by main().


| void vel2rf | ( | const string & | infilename_up, |
| const string & | infilename_down, | ||
| const string & | outfilename, | ||
| int | t0, | ||
| int | nt, | ||
| int | dt, | ||
| int | ofs, | ||
| double | x0, | ||
| double | x1, | ||
| int | nx, | ||
| double | px0, | ||
| double | px1, | ||
| int | npx, | ||
| double | thr | ||
| ) |
get the time for each trace when the displacement first exceeds a given threshold using velocity files as input
References get_disp_from_map_linear(), and read_line_to_map().
Referenced by main().


| void write_vtk_header | ( | ofstream & | outfile, |
| int | nx, | ||
| int | nt, | ||
| double | x0, | ||
| double | dx, | ||
| double | dt | ||
| ) |
write VTK header
| outfile | the output file |
| nx | |
| nt | |
| x0 | |
| dx | |
| dt |
Referenced by slip2vtk2d(), slip2vtk2d_rate(), and slip2vtk2d_rate_rs().
