@@ -36,8 +36,15 @@ struct NeighborInfo{
3636 char total3;
3737};
3838
39+ struct CorrelationCalcParams {
40+ int N_sampling_max;
41+ bool Enable_mix_frac_method;
42+ bool Enable_e_method;
43+ bool Enable_extended_correlation_calc;
44+ int Correlation_cutoff_distance;
45+ };
46+
3947struct TomogramImportParams {
40- // Tomogram Import Options
4148 bool Enable_cutoff_analysis;
4249 int Mixed_greyscale_width;
4350 double Mixed_conc;
@@ -54,10 +61,10 @@ class Morphology {
5461 Morphology (const Lattice& input_lattice, const int id);
5562 virtual ~Morphology ();
5663 bool calculateAnisotropies (const int N_sampling_max);
57- void calculateCorrelationDistances (const bool enable_extended_calc, const int N_sampling_max);
64+ void calculateCorrelationDistances (const CorrelationCalcParams& parameters);
65+ void calculateDepthDependentData (const CorrelationCalcParams& correlation_params);
5866 double calculateInterfacialAreaVolumeRatio () const ;
5967 bool calculateInterfacialDistance ();
60- // bool calculateInterfacialDistanceOld();
6168 double calculateInterfacialVolumeFraction () const ;
6269 void calculateMixFractions ();
6370 bool calculateTortuosity (const bool enable_reduced_memory);
@@ -68,6 +75,8 @@ class Morphology {
6875 void executeMixing (const double width, const double interfacial_conc);
6976 void executeSmoothing (const double smoothing_threshold, const int rescale_factor);
7077 std::vector<double > getCorrelationData (const char site_type) const ;
78+ std::vector<double > getDepthCompositionData (const char site_type) const ;
79+ std::vector<double > getDepthDomainSizeData (const char site_type) const ;
7180 double getDomainSize (const char site_type) const ;
7281 double getDomainAnisotropy (const char site_type) const ;
7382 int getHeight () const ;
@@ -108,7 +117,7 @@ class Morphology {
108117 };
109118 // properties
110119 int ID;
111- std::vector<double > Mix_fractions; // Fraction of each component to total
120+ std::vector<double > Mix_fractions; // Volume fraction of each component to total
112121 bool Enable_third_neighbor_interaction;
113122 Lattice lattice;
114123 std::vector<char > Site_types;
@@ -117,13 +126,13 @@ class Morphology {
117126 std::vector<std::vector<float >> Tortuosity_data;
118127 std::vector<std::vector<double >> InterfacialHistogram_data;
119128 std::vector<std::vector<double >> TortuosityHistogram_data;
120- std::vector<bool > Domain_size_updated;
129+ std::vector<std::vector<double >> Depth_composition_data;
130+ std::vector<std::vector<double >> Depth_domain_size_data;
121131 std::vector<bool > Domain_anisotropy_updated;
122- std::vector<double > Domain_size ;
123- std::vector<double > Domain_anisotropy ;
132+ std::vector<double > Domain_sizes ;
133+ std::vector<double > Domain_anisotropies ;
124134 std::vector<int > Island_volume;
125135 std::vector<long int > Interfacial_sites;
126- std::vector<std::vector<long int >> Correlation_sites_data;
127136 std::vector<NeighborCounts> Neighbor_counts;
128137 std::vector<NeighborInfo> Neighbor_info;
129138 NeighborCounts Temp_counts1;
@@ -132,8 +141,8 @@ class Morphology {
132141 // functions
133142 void addSiteType (const char site_type);
134143 double calculateAdditionalEnergyChange (const long int site_index_main, const long int site_index_neighbor,const int growth_direction,const double additional_interaction) const ;
135- bool calculateAnisotropy (const char site_type, const int cutoff_distance ,const int N_sampling_max );
136- bool calculateCorrelationDistance (const char site_type, const int cutoff_distance , const bool enable_extended_calc , const int N_sampling_max );
144+ bool calculateAnisotropy (const std::vector< long int >& correlation_sites, const char site_type ,const int cutoff_distance );
145+ double calculateCorrelationDistance (const std::vector< long int >& correlation_sites, std::vector< double >& correlation_data, const char site_type , const int cutoff_distance , const CorrelationCalcParams& params );
137146 double calculateDissimilarFraction (const Coords& coords, const int rescale_factor) const ;
138147 double calculateEnergyChangeSimple (const long int site_index1, const long int site_index2, const double interaction_energy1, const double interaction_energy2);
139148 double calculateEnergyChange (const Coords& coords1, const Coords& coords2,const double interaction_energy1,const double interaction_energy2) const ;
@@ -142,6 +151,7 @@ class Morphology {
142151 bool calculatePathDistances_ReducedMemory (std::vector<float >& path_distances);
143152 void createNode (Node& node,const Coords& coords);
144153 void getSiteSampling (std::vector<long int >& sites, const char site_type, const int N_sites);
154+ void getSiteSamplingZ (std::vector<long int >& sites, const char site_type, const int N_sites, const int z);
145155 int getSiteTypeIndex (const char site_type) const ;
146156 void initializeNeighborInfo ();
147157 bool isNearInterface (const Coords& coords, const double distance) const ;
0 commit comments