Hi, I am trying to understand this code of gridap tutorial 18 but i couldnt is there anyone who can explain how below equation is written in julia as below?
dg/dpt=−2ℜ[w^†(dA/dpt u)]

That’s what the wconjh argument does. If A is the FEM matrix of a bilinear form a(u,v), then \vec{u}^T A \vec{v} = a(u,v) = \int \text{something}(u,v) d\Omega, where u(x) = \sum_k u_k p_k(x) is the function formed from the FEM basis functions p_k(x) \in P with coefficients \vec{u}, and similarly for v(x) and \vec{v}.

Now, for the adjoint method, it’s the same sort of thing but with the derivative of A with respect to the parameters. The \vec{w}^\dagger turns into a function \overline{w(x)} in the integrand, which is represented here by wconjh.

in this case it is assumed that b is independent from p so its derivation is zero. if i have a traction on boundary how can i assemble vector for derivation. DAdp is defined on domain while DbDp for traction and without body force defined on boundary?

@stevengj is there any documents or papers to help me in this wat? as you say if u^TAv=a(u,v) however it seems that dor dA, the conjugate of w is going through dA function. Am i right? Also I want to know that if i have real numbers, just w goes through dA?
thank you

For complex numbers where your weak forms and/or objective functions involve complex conjugatiohn, you apply the adjoint method using CR calculus; there are some tutorials on CR calculus online.