Added v_flow as paramter to deactivate flow data or set const value.
This commit is contained in:
@@ -24,6 +24,27 @@ Velocity_Container::~Velocity_Container() {
|
||||
delete[] vr_data;
|
||||
}
|
||||
|
||||
Velocity_Container::Velocity_Container(const Velocity_Container& other) : vz_data(nullptr), vr_data(nullptr) {
|
||||
*this = other;
|
||||
}
|
||||
|
||||
Velocity_Container &Velocity_Container::operator=(const Velocity_Container& other) {
|
||||
z_scale = other.z_scale;
|
||||
r_scale = other.r_scale;
|
||||
|
||||
delete[] vz_data;
|
||||
delete[] vr_data;
|
||||
int num_tot_bins = num_z_bins * num_r_bins;
|
||||
|
||||
vz_data = new double[num_tot_bins];
|
||||
vr_data = new double[num_tot_bins];
|
||||
for (int i=0; i< num_tot_bins; i++) {
|
||||
vz_data[i] = other.vz_data[i];
|
||||
vr_data[i] = other.vr_data[i];
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Velocity_Container::load_data(std::string load_path) {
|
||||
int num_tot_bins = num_z_bins * num_r_bins;
|
||||
bool *check_array = new bool[num_tot_bins];
|
||||
|
||||
Reference in New Issue
Block a user