85 this->rhs_mp->fillHalo();
92 const auto firstElementVertexPoints =
97 refElement_m.getInverseTransposeTransformationJacobian(firstElementVertexPoints);
101 const Tlhs absDetDPhi = Kokkos::abs(
102 refElement_m.getDeterminantOfTransformationJacobian(firstElementVertexPoints));
109 FieldBC bcType = bcField[0]->getBCType();
111 const auto algoOperator = [poissonEquationEval, &bcField,
112 this](rhs_type field) -> lhs_type {
114 field.setFieldBC(bcField);
118 auto return_field = lagrangeSpace_m.
evaluateAx(field, poissonEquationEval);
123 const auto algoOperatorL = [poissonEquationEval, &bcField,
124 this](lhs_type field) -> lhs_type {
126 field.setFieldBC(bcField);
130 auto return_field = lagrangeSpace_m.evaluateAx_lower(field, poissonEquationEval);
135 const auto algoOperatorU = [poissonEquationEval, &bcField,
136 this](lhs_type field) -> lhs_type {
138 field.setFieldBC(bcField);
142 auto return_field = lagrangeSpace_m.evaluateAx_upper(field, poissonEquationEval);
147 const auto algoOperatorUL = [poissonEquationEval, &bcField,
148 this](lhs_type field) -> lhs_type {
150 field.setFieldBC(bcField);
155 lagrangeSpace_m.evaluateAx_upperlower(field, poissonEquationEval);
160 const auto algoOperatorInvD = [poissonEquationEval, &bcField,
161 this](lhs_type field) -> lhs_type {
163 field.setFieldBC(bcField);
168 lagrangeSpace_m.evaluateAx_inversediag(field, poissonEquationEval);
173 const auto algoOperatorD = [poissonEquationEval, &bcField,
174 this](lhs_type field) -> lhs_type {
176 field.setFieldBC(bcField);
180 auto return_field = lagrangeSpace_m.evaluateAx_diag(field, poissonEquationEval);
186 std::string preconditioner_type =
187 this->params_m.template get<std::string>(
"preconditioner_type");
188 preconditioner_validation::throwIfUnknownType(preconditioner_type,
189 "PreconditionedFEMPoissonSolver::solve");
191 Inform warn(
"PreconditionedFEMPoissonSolver");
192 int level = this->params_m.template get<int>(
"newton_level");
193 int degree = this->params_m.template get<int>(
"chebyshev_degree");
194 int inner = this->params_m.template get<int>(
"gauss_seidel_inner_iterations");
195 int outer = this->params_m.template get<int>(
"gauss_seidel_outer_iterations");
196 double omega = this->params_m.template get<double>(
"ssor_omega");
197 int richardson_iterations = this->params_m.template get<int>(
"richardson_iterations");
198 preconditioner_validation::sanitizeParams(preconditioner_type, warn, level, degree,
199 richardson_iterations, inner, outer, omega);
201 pcg_algo_m.
setPreconditioner(algoOperator, algoOperatorL, algoOperatorU, algoOperatorUL,
202 algoOperatorInvD, algoOperatorD, 0, 0, preconditioner_type,
203 level, degree, richardson_iterations, inner, outer, omega);
208 if (bcType == CONSTANT_FACE) {
211 bcField.apply(*(this->rhs_mp));
212 bcField.assignGhostToPhysical(*(this->rhs_mp));
213 this->rhs_mp->fillHalo();
216 - lagrangeSpace_m.
evaluateAx_lift(*(this->rhs_mp), poissonEquationEval);
220 static IpplTimings::TimerRef pcgTimer = IpplTimings::getTimer(
"pcg");
221 IpplTimings::startTimer(pcgTimer);
224 pcg_algo_m(*(this->lhs_mp), *(this->rhs_mp), this->params_m);
228 if (bcType == CONSTANT_FACE) {
229 bcField.assignGhostToPhysical(*(this->lhs_mp));
231 (this->lhs_mp)->fillHalo();
233 IpplTimings::stopTimer(pcgTimer);