In general the adjoint operator is calculated from its original operator by (a) complex-conjugation (if there are complex entries) and (b) transposition of the operator.
You may find the perhaps best explanations and examples on this topic in the introductory books on quantum mechanics, as e.g. in John Jacksons Mathematics for Quantum Mechanics: An Introductory Survey of Operators,...
In the requested generality, the formula for the (formal) adjoint of a linear partial differential operator can be found e.g. at page 329 of the following book: Peter J. Olver, Applications of Lie Groups to Differential Equations, Springer, N.Y., 2nd ed., 1993.
As for the Green-type formula in this generality, I am not quite sure where can one find it spelled out explicitly enough for your purposes.