diff --git a/src/BTCSDiffusion.cpp b/src/BTCSDiffusion.cpp index c9b0837..72f7242 100644 --- a/src/BTCSDiffusion.cpp +++ b/src/BTCSDiffusion.cpp @@ -17,7 +17,7 @@ BTCSDiffusion::BTCSDiffusion(unsigned int dim) : grid_dim(dim) { assert(dim <= 3); grid_cells.resize(dim, 1); - spatial_discretization.resize(dim, 1); + domain_size.resize(dim, 1); deltas.resize(dim, 1); } @@ -25,7 +25,7 @@ std::vector BTCSDiffusion::getNumberOfGridCells() { return this->grid_cells; } std::vector BTCSDiffusion::getSpatialDiscretization() { - return this->spatial_discretization; + return this->domain_size; } void BTCSDiffusion::setNumberOfGridCells(std::vector &n_grid) { grid_cells = n_grid; @@ -33,14 +33,14 @@ void BTCSDiffusion::setNumberOfGridCells(std::vector &n_grid) { updateInternals(); } void BTCSDiffusion::setSpatialDiscretization(std::vector &s_grid) { - spatial_discretization = s_grid; - assert(spatial_discretization.size() == grid_dim); + domain_size = s_grid; + assert(domain_size.size() == grid_dim); updateInternals(); } void BTCSDiffusion::updateInternals() { for (int i = 0; i < grid_dim; i++) { - deltas[i] = (double)spatial_discretization[i] / grid_cells[i]; + deltas[i] = (double)domain_size[i] / grid_cells[i]; } switch (grid_dim) { diff --git a/src/BTCSDiffusion.hpp b/src/BTCSDiffusion.hpp index 21a4b37..6a9ebda 100644 --- a/src/BTCSDiffusion.hpp +++ b/src/BTCSDiffusion.hpp @@ -141,7 +141,7 @@ private: int grid_dim; std::vector grid_cells; - std::vector spatial_discretization; + std::vector domain_size; std::vector deltas; }; diff --git a/src/main.cpp b/src/main.cpp index 356f89d..c4549ee 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) { // create input + diffusion coefficients for each grid cell std::vector alpha(n, 1 * pow(10, -1)); - std::vector input(n, 1 * std::pow(10, -6)); + std::vector field(n, 1 * std::pow(10, -6)); // create instance of diffusion module BTCSDiffusion diffu(dim); @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) { // loop 100 times // output is currently generated by the method itself for (int i = 0; i < 100; i++) { - diffu.simulate(input, alpha); + diffu.simulate(field, alpha); } return 0;