| 952 | |
| 953 | template<typename SCAL> |
| 954 | void HCurlAMG_Matrix<SCAL> :: Mult(const BaseVector& f, BaseVector& u) const |
| 955 | { |
| 956 | static Timer timer("HCurlAMG::Mult"); |
| 957 | RegionTimer regt(timer); |
| 958 | static Timer timer_n("Node correction"); |
| 959 | static Timer timer_c("Coarse correction"); |
| 960 | |
| 961 | u = 0.; |
| 962 | smoother->Smooth(u, f, param.smoothing_steps); |
| 963 | |
| 964 | auto residuum = f.CreateVector(); |
| 965 | |
| 966 | if (gradient) |
| 967 | { |
| 968 | residuum = f - (*mat) * u; |
| 969 | auto op = gradient*node_h1*trans_gradient; |
| 970 | auto size = op->Height(); |
| 971 | u.Range(size) += *op * residuum.Range(size); |
| 972 | } |
| 973 | |
| 974 | { |
| 975 | RegionTimer rt(timer_c); |
| 976 | residuum = f - (*mat) * u; |
| 977 | |
| 978 | auto op = prolongation * coarse_precond * restriction; |
| 979 | auto size = op->Height(); |
| 980 | u.Range(size) += *op * residuum.Range(size); |
| 981 | } |
| 982 | |
| 983 | if (gradient) |
| 984 | { |
| 985 | residuum = f - (*mat) * u; |
| 986 | auto op = gradient*node_h1*trans_gradient; |
| 987 | auto size = op->Height(); |
| 988 | u.Range(size) += *op * residuum.Range(size); |
| 989 | } |
| 990 | |
| 991 | smoother->SmoothBack(u, f, param.smoothing_steps); |
| 992 | } |
| 993 | |
| 994 | |
| 995 | /* ************************* HCurlAMG preconditioner ************************** */ |
nothing calls this directly
no test coverage detected