Ising_OPV
v4.0.2
Generates and analyzes model bulk heterojunction morphologies in a parallel computing environment
|
Classes | |
struct | Coords |
This namespace provides useful constants and utility functions. More... | |
class | Lattice |
This class contains the properties of a three-dimensional lattice and the functions needed to interact with it. More... | |
class | Morphology |
This class contains a lattice representation of a materials blend with the ability to simulate phase separation and perform a variety of structural analyses. More... | |
class | Parameters |
This class contains the parameters used by Ising_OPV and functions to import parameter files. More... | |
class | Version |
This class contains the current version information and version comparison operators. More... | |
Functions | |
std::vector< std::pair< double, double > > | calculateCumulativeHist (const std::vector< std::pair< double, double >> &data) |
Calculates the cumulative histogram from the input probability histogram data. More... | |
std::vector< std::pair< double, int > > | calculateHist (const std::vector< int > &data, int bin_size) |
Calculates the histogram for the input integer data vector using the input bin size. More... | |
std::vector< std::pair< double, double > > | calculateProbabilityHist (const std::vector< std::pair< double, int >> hist) |
Calculates the probability histogram for the input histogram data vector. The function outputs bin-centered x values and probability y values in a x-y pair vector. More... | |
std::vector< std::pair< double, double > > | calculateProbabilityHist (const std::vector< int > &data, int bin_size) |
Calculates the probability histogram for the input integer data vector using the input bin size. More... | |
std::vector< std::pair< double, double > > | calculateProbabilityHist (const std::vector< double > &data, int num_bins) |
Calculates the probability histogram for the input double data vector using the input number of bins. More... | |
std::vector< std::pair< double, double > > | calculateProbabilityHist (const std::vector< double > &data, double bin_size) |
Calculates the probability histogram for the input data vector using the input bin size. More... | |
std::vector< std::pair< double, double > > | calculateProbabilityHist (const std::vector< double > &data, const double bin_size, const int num_bins) |
Calculates the probability histogram for the input data vector using the input bin size and input number of bins. More... | |
std::vector< std::pair< double, double > > | calculateProbabilityHist (const std::vector< double > &data, const double bin_start, const double bin_size) |
Calculates the probability histogram for the input data vector using the input bin start value and bin size. More... | |
double | integrateData (const std::vector< std::pair< double, double >> &data) |
Numerically integrates a vector of x-y data using the trapezoid rule. More... | |
double | interpolateData (const std::vector< std::pair< double, double >> &data, const double x_val) |
Linearly interpolates an x-y data set to determine the interpolated y-value corresponding to an input x-value. More... | |
std::vector< std::pair< double, double > > | MPI_calculateProbHistAvg (const std::vector< std::pair< double, int >> &input_hist) |
Uses MPI to calculate the average probability histogram from separate histograms coming from different processors. More... | |
std::vector< double > | MPI_calculateVectorAvg (const std::vector< double > &input_vector) |
Uses MPI to calculate the element-wise average vector from separate vectors coming from different processors. More... | |
std::vector< double > | MPI_calculateVectorSum (const std::vector< double > &input_vector) |
Uses MPI to calculate the element-wise sum vector from separate equally sized vectors coming from different processors. More... | |
std::vector< int > | MPI_calculateVectorSum (const std::vector< int > &input_vector) |
Uses MPI to calculate the element-wise sum vector from separate vectors coming from different processors. More... | |
std::vector< int > | MPI_gatherValues (const int input_val) |
Uses MPI to gather integer values from separate processors to build one vector containing all of the data. More... | |
std::vector< double > | MPI_gatherValues (const double input_val) |
Uses MPI to gather double values from separate processors to build one vector containing all of the data. More... | |
std::vector< double > | MPI_gatherVectors (const std::vector< double > &input_vector) |
Uses MPI to gather vectors from separate processors to build one big vector containing all of the data. More... | |
std::vector< int > | MPI_gatherVectors (const std::vector< int > &input_vector) |
Uses MPI to gather vectors from separate processors to build one big vector containing all of the data. More... | |
std::string | removeWhitespace (const std::string &str) |
Removes all spaces and ta characters in a string. More... | |
int | round_int (const double num) |
Rounds the input double value to the nearest integer value. More... | |
bool | str2bool (const std::string &input) |
Extracts a boolean value from a string containing "true" or "false". Throws an invalid_argument exception if the input string is not "true" or "false". More... | |
template<typename T > | |
double | array_avg (const T data[], const int array_size) |
This template function calculates and returns the average value in double format when given an array of numerical datatypes. More... | |
template<typename T > | |
T | array_median (const T data[], const int array_size) |
This template function calculates and returns the median value when given an array of numerical datatypes. More... | |
template<typename T > | |
double | array_stdev (const T data[], const int array_size) |
This template function calculates and returns the standard deviation in double format when given an array of numerical datatypes. More... | |
template<typename T > | |
int | array_which_median (const T data[], const int array_size) |
This template function determines which element in the data array has the median value of the dataset. More... | |
template<typename T > | |
double | intpow (const T base, const int exponent) |
This template function calculates and returns the results of an integer power operation on a base numerical datatype. More... | |
template<typename T > | |
void | outputVectorToFile (std::vector< T > &vec, std::string filename) |
This template function outputs the input data vector to a file with the specified filename. More... | |
template<typename T > | |
void | outputVectorToFile (std::vector< std::pair< T, T >> &vec, std::string filename) |
This template function outputs the input data pair vector to a file with the specified filename. More... | |
template<typename T > | |
void | removeDuplicates (std::vector< T > &vec) |
This template function efficienctly removes the duplicate entries from an input vector. More... | |
template<typename T , typename A > | |
double | vector_avg (const std::vector< T, A > &data) |
This template function calculates and returns the average value in double format when given a vector of numerical datatypes. More... | |
template<typename T , typename A > | |
double | vector_median (std::vector< T, A > data) |
This template function calculates and returns the median value when given a vector of numerical datatypes. More... | |
template<typename T , typename A > | |
double | vector_stdev (const std::vector< T, A > &data) |
This template function calculates and returns the standard deviation in double format when given a vector of numerical datatypes. More... | |
template<typename T , typename A > | |
int | vector_which_median (const std::vector< T, A > &data) |
This template function determines which element in the data vector is closest to the median value of the dataset. More... | |
std::ostream & | operator<< (std::ostream &stream, const Version &input) |
Variables | |
Version | Current_version ("4.0.2") |
double Ising_OPV::array_avg | ( | const T | data[], |
const int | array_size | ||
) |
This template function calculates and returns the average value in double format when given an array of numerical datatypes.
data | is the array of numerical data. |
array_size | is the size of the input data array. |
T Ising_OPV::array_median | ( | const T | data[], |
const int | array_size | ||
) |
This template function calculates and returns the median value when given an array of numerical datatypes.
data | is the array of numerical data. |
array_size | is the size of the input data array. |
double Ising_OPV::array_stdev | ( | const T | data[], |
const int | array_size | ||
) |
This template function calculates and returns the standard deviation in double format when given an array of numerical datatypes.
data | is the input array of numerical data. |
array_size | is the size of the input data array. |
int Ising_OPV::array_which_median | ( | const T | data[], |
const int | array_size | ||
) |
This template function determines which element in the data array has the median value of the dataset.
data | is the input array of numerical data. |
array_size | is the size of the input data array. |
std::vector< std::pair< double, double > > Ising_OPV::calculateCumulativeHist | ( | const std::vector< std::pair< double, double >> & | data | ) |
Calculates the cumulative histogram from the input probability histogram data.
data | is the input probability histogram which is a vector of x-y pairs consisting of bin-centered x values and probability y values. |
std::vector< std::pair< double, int > > Ising_OPV::calculateHist | ( | const std::vector< int > & | data, |
int | bin_size | ||
) |
Calculates the histogram for the input integer data vector using the input bin size.
Linearly spaced bins are automatically created from the minimum value to the maximum value of the data set with the specified bin size. The function outputs bin-centered x values and counts y values in a x-y pair vector.
data | is the input integer data vector. |
bin_size | is the specified bin size |
std::vector< std::pair< double, double > > Ising_OPV::calculateProbabilityHist | ( | const std::vector< std::pair< double, int >> | hist | ) |
Calculates the probability histogram for the input histogram data vector. The function outputs bin-centered x values and probability y values in a x-y pair vector.
hist | is the input histogram data vector. |
std::vector< std::pair< double, double > > Ising_OPV::calculateProbabilityHist | ( | const std::vector< int > & | data, |
int | bin_size | ||
) |
Calculates the probability histogram for the input integer data vector using the input bin size.
Linearly spaced bins are automatically created from the minimum value to the maximum value of the data set with the specified bin size. The function outputs bin-centered x values and probability y values in a x-y pair vector.
data | is the input integer data vector. |
bin_size | is the specified bin size |
std::vector< std::pair< double, double > > Ising_OPV::calculateProbabilityHist | ( | const std::vector< double > & | data, |
int | num_bins | ||
) |
Calculates the probability histogram for the input double data vector using the input number of bins.
Linearly spaced bins are automatically created from the minimum value to the maximum value of the data set. The function outputs bin-centered x values and probability y values in a x-y pair vector.
data | is the input data vector. |
num_bins | is the desired number of bins. |
std::vector< std::pair< double, double > > Ising_OPV::calculateProbabilityHist | ( | const std::vector< double > & | data, |
double | bin_size | ||
) |
Calculates the probability histogram for the input data vector using the input bin size.
Linearly spaced bins are automatically created from the minimum value to the maximum value of the data set. with the specified bin spacing. The function outputs bin-centered x values and probability y values in a x-y pair vector.
data | is the input data vector. |
bin_size | is the desired bin size. |
std::vector< std::pair< double, double > > Ising_OPV::calculateProbabilityHist | ( | const std::vector< double > & | data, |
const double | bin_size, | ||
const int | num_bins | ||
) |
Calculates the probability histogram for the input data vector using the input bin size and input number of bins.
Linearly spaced bins are automatically created starting from the minimum value of the data set. The function outputs bin-centered x values and probability y values in a x-y pair vector.
data | is the input data vector. |
num_bins | is the number of bins that will be created. |
bin_size | is the input bin size. |
std::vector< std::pair< double, double > > Ising_OPV::calculateProbabilityHist | ( | const std::vector< double > & | data, |
const double | bin_start, | ||
const double | bin_size | ||
) |
Calculates the probability histogram for the input data vector using the input bin start value and bin size.
Linearly spaced bins are automatically created starting from the bin start value. The function outputs bin-centered x values and probability y values in a x-y pair vector.
data | is the input data vector. |
bin_start | is the starting value of the first bin. |
bin_size | is the input bin size. |
double Ising_OPV::integrateData | ( | const std::vector< std::pair< double, double >> & | data | ) |
Numerically integrates a vector of x-y data using the trapezoid rule.
data | is the data vector containing x-y data pairs. |
double Ising_OPV::interpolateData | ( | const std::vector< std::pair< double, double >> & | data, |
const double | x_val | ||
) |
Linearly interpolates an x-y data set to determine the interpolated y-value corresponding to an input x-value.
data | is the data vector containing x-y data pairs. |
x_val | is the x-value that will be interpolated to. |
double Ising_OPV::intpow | ( | const T | base, |
const int | exponent | ||
) |
This template function calculates and returns the results of an integer power operation on a base numerical datatype.
base | is the base of the integer power operation and can be any numerical type. |
exponent | is the integer exponent for the integer power operation. |
std::vector< std::pair< double, double > > Ising_OPV::MPI_calculateProbHistAvg | ( | const std::vector< std::pair< double, int >> & | input_hist | ) |
Uses MPI to calculate the average probability histogram from separate histograms coming from different processors.
Each processor calls this function and sends an input histogram. Each input histogram must have the same bin size.
Upon function return, processor 0 receives the average probabiliy histogram and all of the other processors receive an empty probability histogram.
input_hist | is the input histogram data from the processor calling the function. |
std::vector< double > Ising_OPV::MPI_calculateVectorAvg | ( | const std::vector< double > & | input_vector | ) |
Uses MPI to calculate the element-wise average vector from separate vectors coming from different processors.
Each processor calls this function and sends an input vector. If vectors are different sizes, the function uses trailing zeroes to make all vectors the same size before averaging. Upon function return, processor 0 receives the average vector and all of the other processors receive an empty vector.
input_vector | is the input data from the processor calling the function. |
std::vector< double > Ising_OPV::MPI_calculateVectorSum | ( | const std::vector< double > & | input_vector | ) |
Uses MPI to calculate the element-wise sum vector from separate equally sized vectors coming from different processors.
Each processor calls this function and sends an input vector. Upon function return, processor 0 receives the sum vector and all of the other processors receive an empty vector.
input_vector | is the input data from the processor calling the function. |
std::vector< int > Ising_OPV::MPI_calculateVectorSum | ( | const std::vector< int > & | input_vector | ) |
Uses MPI to calculate the element-wise sum vector from separate vectors coming from different processors.
Each processor calls this function and sends an input vector. Upon function return, processor 0 receives the sum vector and all of the other processors receive an empty vector.
input_vector | is the input data from the processor calling the function. |
std::vector< int > Ising_OPV::MPI_gatherValues | ( | const int | input_val | ) |
Uses MPI to gather integer values from separate processors to build one vector containing all of the data.
Each processor calls this function and sends an input value. Upon function return, processor 0 receives the data vector and all of the other processors receive an empty vector.
input_val | is the input integer data value from the processor calling the function. |
std::vector< double > Ising_OPV::MPI_gatherValues | ( | const double | input_val | ) |
Uses MPI to gather double values from separate processors to build one vector containing all of the data.
Each processor calls this function and sends an input value. Upon function return, processor 0 receives the data vector and all of the other processors receive an empty vector.
input_val | is the input double data value from the processor calling the function. |
std::vector< double > Ising_OPV::MPI_gatherVectors | ( | const std::vector< double > & | input_vector | ) |
Uses MPI to gather vectors from separate processors to build one big vector containing all of the data.
Each processor calls this function and sends an input vector. Upon function return, processor 0 receives the large data vector and all of the other processors receive an empty vector.
input_vector | is the input data from the processor calling the function. |
std::vector< int > Ising_OPV::MPI_gatherVectors | ( | const std::vector< int > & | input_vector | ) |
Uses MPI to gather vectors from separate processors to build one big vector containing all of the data.
Each processor calls this function and sends an input vector. Upon function return, processor 0 receives the large data vector and all of the other processors receive an empty vector.
input_vector | is the input data from the processor calling the function. |
std::ostream& Ising_OPV::operator<< | ( | std::ostream & | stream, |
const Version & | input | ||
) |
void Ising_OPV::outputVectorToFile | ( | std::vector< T > & | vec, |
std::string | filename | ||
) |
This template function outputs the input data vector to a file with the specified filename.
vec | is the input data vector. |
filename | is the input file name. |
void Ising_OPV::outputVectorToFile | ( | std::vector< std::pair< T, T >> & | vec, |
std::string | filename | ||
) |
This template function outputs the input data pair vector to a file with the specified filename.
vec | is the input data pair vector. |
filename | is the input file name. |
void Ising_OPV::removeDuplicates | ( | std::vector< T > & | vec | ) |
This template function efficienctly removes the duplicate entries from an input vector.
This algorithm allow efficient removal of duplicate vector objects when > or < comparison operators do not exist.
vec | is the input vector to be operated on. |
std::string Ising_OPV::removeWhitespace | ( | const std::string & | str | ) |
Removes all spaces and ta characters in a string.
str | is the input string |
int Ising_OPV::round_int | ( | const double | num | ) |
Rounds the input double value to the nearest integer value.
num | is the input double value. |
bool Ising_OPV::str2bool | ( | const std::string & | input | ) |
Extracts a boolean value from a string containing "true" or "false". Throws an invalid_argument exception if the input string is not "true" or "false".
input | is the input string. |
double Ising_OPV::vector_avg | ( | const std::vector< T, A > & | data | ) |
This template function calculates and returns the average value in double format when given a vector of numerical datatypes.
data | is the vector of numerical data. |
double Ising_OPV::vector_median | ( | std::vector< T, A > | data | ) |
This template function calculates and returns the median value when given a vector of numerical datatypes.
data | is the vector of numerical data. |
double Ising_OPV::vector_stdev | ( | const std::vector< T, A > & | data | ) |
This template function calculates and returns the standard deviation in double format when given a vector of numerical datatypes.
data | is the vector of numerical data. |
int Ising_OPV::vector_which_median | ( | const std::vector< T, A > & | data | ) |
This template function determines which element in the data vector is closest to the median value of the dataset.
if multiple values are equally close, the first one in the vector is selected.
data | is the input vector of numerical data. |
Version Ising_OPV::Current_version |