Typesetting d'Alembertian symbol

Build a square with thicker lines the same size of \square:

\documentclass{article}
\usepackage{amsmath,amssymb}

\makeatletter
\newcommand{\dalembertian}{\mathop{\mathpalette\dalembertian@\relax}}
\newcommand{\dalembertian@}[2]{%
  \begingroup
  \sbox\z@{$\m@th#1\square$}%
  \dimen0=\fontdimen8
    \ifx#1\displaystyle\textfont\else
    \ifx#1\textstyle\textfont\else
    \ifx#1\scriptstyle\scriptfont\else
    \scriptscriptfont\fi\fi\fi3
  \makebox[\wd\z@]{%
    \hbox to \ht\z@{%
      \vrule width \dimen0
      \kern-\dimen0
      \vbox to \ht\z@{
        \hrule height \dimen0 width \ht\z@
        \vss
        \hrule height 2\dimen0
      }%
      \kern-2.5\dimen0
      \vrule width 2.5\dimen0
    }%
  }%
  \endgroup
}
\makeatother

\begin{document}

$\dalembertian = \mathop{{}\Delta}-\partial_0^2$

$\scriptstyle\dalembertian = \mathop{{}\Delta}-\partial_0^2$

$\scriptscriptstyle\dalembertian = \mathop{{}\Delta}-\partial_0^2$

{\Large$\dalembertian = \mathop{{}\Delta}-\partial_0^2$}

\end{document}

enter image description here


To increase the boarder on two sides, you could use the \ding{113} symbol from pifont

\documentclass{article}

\usepackage{pifont}
\usepackage{amsmath}

\begin{document}

$\text{\ding{113}}  \Delta$

\end{document}

enter image description here


Just uses \rules. Then, \scalerel to make it match the height of \Delta.

\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\dAlaux{%
  \Shortstack{\rule{12pt}{.6pt}\\
    \rule{.6pt}{10pt}\kern10pt\rule{1.4pt}{10pt}\\
    \rule{12pt}{1.4pt}}%
}
\newcommand\dAl{%
  \setstackgap{S}{0pt}%
  \setstackEOL{\\}%
  \scalerel*{\kern1pt\dAlaux\kern1pt}{\Delta}%
}
\begin{document}
$\dAl = \Delta - \partial_0^2,\quad \phi\dAl\phi e^{\phi\dAl\phi}$
\end{document}

enter image description here

A slightly thicker version, by adjusting the \rule dimensions...

\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\dAlaux{%
  \Shortstack{\rule{11pt}{.7pt}\\
    \rule{.7pt}{9pt}\kern9pt\rule{1.3pt}{9pt}\\
    \rule{11pt}{1.35pt}}%
}
\newcommand\dAl{%
  \setstackgap{S}{0pt}%
  \setstackEOL{\\}%
  \scalerel*{\kern1pt\dAlaux\kern1pt}{\Delta}%
}
\begin{document}
$\dAl = \Delta - \partial_0^2,\quad \phi\dAl\phi e^{\phi\dAl\phi}$
\end{document}

enter image description here