/* * vmg - a versatile multigrid solver * Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn * * vmg is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * vmg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * @file gsrb_poisson_4.cpp * @author Julian Iseringhausen * @date Fri May 11 18:30:20 2012 * * @brief Gauss-Seidel Red Black method, specialized to * the Poisson equation. Performance improved by * explicit loop unrolling. * */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_MPI #include #endif #include "base/helper.hpp" #include "comm/comm.hpp" #include "grid/grid.hpp" #include "smoother/gsrb_poisson_4.hpp" #include "mg.hpp" using namespace VMG; static inline void ComputePartial(Grid& sol, Grid& rhs, const Index& begin, const Index& end, const vmg_float& prefactor, const int& off) { const vmg_float fac_1 = 1.0 / 12.0; const vmg_float fac_2 = 1.0 / 24.0; for (int i=begin.X(); i