/** * @file solver.cpp * @author Julian Iseringhausen * @date Mon Apr 18 13:10:55 2011 * * @brief VMG::Solver * */ #ifdef HAVE_CONFIG_H #include #endif #include "solver/solver.hpp" using namespace VMG; void Solver::Realloc(int n) { //Reallocate memory if necessary this->vec_size = n; if (n > this->max_size) { delete [] b; delete [] x; for (int i=0; imax_size; i++) delete [] A[i]; delete [] A; b = new vmg_float[n]; x = new vmg_float[n]; A = new vmg_float*[n]; for (int i=0; imax_size = n; } } void Solver::Realloc(Grid& sol) { this->Realloc(sol.Global().Size().Product()); }