About
Concept
\begin{bmatrix}
K_1 & 0 & B_1^T\\
0 & K_2 & B_2^T\\
B_1 & B_2 & 0
\end{bmatrix}
\begin{bmatrix}
u_1 \\ u_2 \\ \lambda
\end{bmatrix}
=
\begin{bmatrix}
f_1 \\ f_2 \\ 0
\end{bmatrix}In primal mortar, \mu takes FE basis
D_{ij}=\int_{\Gamma_c}\mu_i\phi^{(s)}_jd\Gamma,\qquad
M_{ij}=\int_{\Gamma_c}\mu_i\phi^{(m)}_jd\Gammawhere \phi is trace basis of each surface s=slave and m=master.
So the constraints are
Du_s - Mu_m = 0
In dual mortar, \mu is made with basis \phi that is on slave side.
\int_{\Gamma_c} \mu_i \phi_j d\Gamma_c = \delta_{ij}when we regard 1 as slave and 2 as master, typically
B_1 = I,
\qquad
B_2 = -D^{-1}Mwhen we use dual basis with scaling,
B_1 = D_{\text{diag}},
\qquad
B_2 = -MIf we use above, the connection will be reformulated as
B_m = D^{-1} M\\
B_s = IAnd the constraints will be
u_s - Pu_m = 0,
\qquad
P:=D^{-1}MThis P is projection of dual mortar.
The implementation flow
1. Create supermesh / intersection quadrature
2. At each crossing cell, evaluate the slave-side trace basis \phi^{(s)} and master-side \phi^{(m)}
3. Assemble local blocks
D_e = \int \phi^{(s)}\phi^{(s)T} d\Gamma,\qquad
M_e = \int \phi^{(s)}\phi^{(m)T} d\Gamma4. Project Block
P_e = D_e^{-1}M_e