19 #include "adintrinsics.h"
29 unsigned int var_0, var_1, var_2, var_3, var_4, var_5, var_6, var_7;
47 static int g_filenum = 0;
49 adintr_ehsfid(&g_filenum, __FILE__,
"adic_element_fill");
51 for (
unsigned int qp = 0; qp < e->
nqp; ) {
52 for (
unsigned int eqn = 0; eqn < neqn; ) {
54 ad_grad_axpy_0(&(u[qp * neqn + eqn]));
58 ad_grad_axpy_0(&(du[qp * neqn + eqn]));
61 for (
unsigned int node = 0; node < e->
nnode; ) {
63 loc_0 =
DERIV_val(x[node * neqn + eqn]) * e->
phi[qp][node];
64 loc_1 =
DERIV_val(u[qp * neqn + eqn]) + loc_0;
65 ad_grad_axpy_2(&(u[qp * neqn + eqn]), 1.000000000000000e+00, &(u[qp * neqn + eqn]), e->
phi[qp][node], &(x[node * neqn + eqn]));
70 loc_1 =
DERIV_val(du[qp * neqn + eqn]) + loc_0;
71 ad_grad_axpy_2(&(du[qp * neqn + eqn]), 1.000000000000000e+00, &(du[qp * neqn + eqn]), e->
dphi[qp][node], &(x[node * neqn + eqn]));
81 for (
unsigned int qp = 0; qp < e->
nqp; ) {
83 ad_grad_axpy_0(&(s[qp]));
86 for (
unsigned int eqn = 0; eqn < neqn; ) {
90 ad_grad_axpy_3(&(s[qp]), 1.000000000000000e+00, &(s[qp]),
DERIV_val(u[qp * neqn + eqn]), &(u[qp * neqn + eqn]),
DERIV_val(u[qp * neqn + eqn]), &(u[qp * neqn + eqn]));
97 for (
unsigned int node = 0; node < e->
nnode; ) {
98 for (
unsigned int eqn = 0; eqn < neqn; ) {
99 unsigned int row = node * neqn + eqn;
101 ad_grad_axpy_0(&(f[row]));
104 for (
unsigned int qp = 0; qp < e->
nqp; ) {
108 ad_grad_axpy_1(&(var_8), adji_0, &(u[qp * neqn + eqn]));
111 loc_0 = e->
w[qp] * e->
jac[qp];
112 loc_1 = -e->
dphi[qp][node];
113 loc_2 = e->
jac[qp] * e->
jac[qp];
114 loc_3 = loc_1 / loc_2;
115 loc_4 = loc_3 *
DERIV_val(du[qp * neqn + eqn]);
118 loc_7 = loc_4 + loc_6;
119 loc_8 = loc_0 * loc_7;
121 adj_0 = loc_5 * loc_0;
123 adj_2 = e->
phi[qp][node] * adj_1;
124 adj_3 = loc_3 * loc_0;
125 ad_grad_axpy_4(&(f[row]), 1.000000000000000e+00, &(f[row]), adj_3, &(du[qp * neqn + eqn]), adj_2, &(s[qp]), adj_0, &(var_8));
137 ad_AD_GradInit(arg0);
void adic_element_fill(ElemData *e, unsigned int neqn, const DERIV_TYPE *x, DERIV_TYPE *u, DERIV_TYPE *du, DERIV_TYPE *f)