You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
366 B
Common Lisp
23 lines
366 B
Common Lisp
/*
|
|
* Apply PEC and preconditioner.
|
|
*
|
|
* Template parameters:
|
|
* pec false iff no PEC anywhere
|
|
*
|
|
* Arguments:
|
|
* ctype *E (output) E-field
|
|
* ctype *Pr Entries of (diagonal) right preconditioner matrix
|
|
* ctype *p (input vector)
|
|
*
|
|
*/
|
|
|
|
|
|
{%- if pec -%}
|
|
if (pec[i] != 0) {
|
|
E[i] = zero;
|
|
} else
|
|
{%- endif -%}
|
|
{
|
|
E[i] = mul(Pr[i], p[i]);
|
|
}
|