diff --git a/.github/workflows/render_joss_paper.yml b/.github/workflows/render_joss_paper.yml new file mode 100644 index 0000000..998b3ac --- /dev/null +++ b/.github/workflows/render_joss_paper.yml @@ -0,0 +1,19 @@ +on: [push] + +jobs: + paper: + runs-on: ubuntu-latest + name: Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: joss + paper-path: paper/paper.md + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: paper + path: paper/paper.pdf diff --git a/paper/.gitignore b/paper/.gitignore new file mode 100644 index 0000000..cb4a634 --- /dev/null +++ b/paper/.gitignore @@ -0,0 +1,2 @@ +compile.sh +paper.pdf diff --git a/paper/apa.csl b/paper/apa.csl new file mode 100644 index 0000000..5c24fbb --- /dev/null +++ b/paper/apa.csl @@ -0,0 +1,1919 @@ + + diff --git a/paper/latex.template b/paper/latex.template new file mode 100644 index 0000000..1a67a15 --- /dev/null +++ b/paper/latex.template @@ -0,0 +1,538 @@ +\documentclass[10pt,a4paper,onecolumn]{article} +\usepackage{marginnote} +\usepackage{graphicx} +\usepackage{xcolor} +\usepackage{authblk,etoolbox} +\usepackage{titlesec} +\usepackage{calc} +\usepackage{tikz} +\usepackage{hyperref} +\hypersetup{colorlinks,breaklinks=true, + urlcolor=[rgb]{0.0, 0.5, 1.0}, + linkcolor=[rgb]{0.0, 0.5, 1.0}} +\usepackage{caption} +\usepackage{tcolorbox} +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\usepackage{seqsplit} +\usepackage{xstring} + +\usepackage{float} +\let\origfigure\figure +\let\endorigfigure\endfigure +\renewenvironment{figure}[1][2] { + \expandafter\origfigure\expandafter[H] +} { + \endorigfigure +} + +$if(draft)$ +\usepackage{lineno} +\linenumbers +\usepackage{draftwatermark} +$endif$ + +\usepackage{fixltx2e} % provides \textsubscript +\usepackage[ + backend=biber, +% style=alphabetic, +% citestyle=numeric +]{biblatex} +\bibliography{$bibliography$} + +% --- Splitting \texttt -------------------------------------------------- + +\let\textttOrig=\texttt +\def\texttt#1{\expandafter\textttOrig{\seqsplit{#1}}} +\renewcommand{\seqinsert}{\ifmmode + \allowbreak + \else\penalty6000\hspace{0pt plus 0.02em}\fi} + + +% --- Pandoc does not distinguish between links like [foo](bar) and +% --- [foo](foo) -- a simplistic Markdown model. However, this is +% --- wrong: in links like [foo](foo) the text is the url, and must +% --- be split correspondingly. +% --- Here we detect links \href{foo}{foo}, and also links starting +% --- with https://doi.org, and use path-like splitting (but not +% --- escaping!) with these links. +% --- Another vile thing pandoc does is the different escaping of +% --- foo and bar. This may confound our detection. +% --- This problem we do not try to solve at present, with the exception +% --- of doi-like urls, which we detect correctly. + + +\makeatletter +\let\href@Orig=\href +\def\href@Urllike#1#2{\href@Orig{#1}{\begingroup + \def\Url@String{#2}\Url@FormatString + \endgroup}} +\def\href@Notdoi#1#2{\def\tempa{#1}\def\tempb{#2}% + \ifx\tempa\tempb\relax\href@Urllike{#1}{#2}\else + \href@Orig{#1}{#2}\fi} +\def\href#1#2{% + \IfBeginWith{#1}{https://doi.org}% + {\href@Urllike{#1}{#2}}{\href@Notdoi{#1}{#2}}} +\makeatother + +$if(csl-refs)$ +% definitions for citeproc citations +\NewDocumentCommand\citeproctext{}{} +\NewDocumentCommand\citeproc{mm}{% + \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} +\makeatletter + % allow citations to break across lines + \let\@cite@ofmt\@firstofone + % avoid brackets around text for \cite: + \def\@biblabel#1{} + \def\@cite#1#2{{#1\if@tempswa , #2\fi}} +\makeatother +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing + {\begin{list}{}{% + \setlength{\itemindent}{0pt} + \setlength{\leftmargin}{0pt} + \setlength{\parsep}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 + \setlength{\leftmargin}{\cslhangindent} + \setlength{\itemindent}{-1\cslhangindent} + \fi + % set entry spacing + \setlength{\itemsep}{#2\baselineskip}}} + {\end{list}} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{\hfill\break#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ + +% --- Page layout ------------------------------------------------------------- +\usepackage[top=3.5cm, bottom=3cm, right=1.5cm, left=1.0cm, + headheight=2.2cm, reversemp, includemp, marginparwidth=4.5cm]{geometry} + +% --- Default font ------------------------------------------------------------ +\renewcommand\familydefault{\sfdefault} + +% --- Style ------------------------------------------------------------------- +\renewcommand{\bibfont}{\small \sffamily} +\renewcommand{\captionfont}{\small\sffamily} +\renewcommand{\captionlabelfont}{\bfseries} + +% --- Section/SubSection/SubSubSection ---------------------------------------- +\titleformat{\section} + {\normalfont\sffamily\Large\bfseries} + {}{0pt}{} +\titleformat{\subsection} + {\normalfont\sffamily\large\bfseries} + {}{0pt}{} +\titleformat{\subsubsection} + {\normalfont\sffamily\bfseries} + {}{0pt}{} +\titleformat*{\paragraph} + {\sffamily\normalsize} + + +% --- Header / Footer --------------------------------------------------------- +\usepackage{fancyhdr} +\pagestyle{fancy} +\fancyhf{} +%\renewcommand{\headrulewidth}{0.50pt} +\renewcommand{\headrulewidth}{0pt} +\fancyhead[L]{\hspace{-0.75cm}\includegraphics[width=5.5cm]{$logo_path$}} +\fancyhead[C]{} +\fancyhead[R]{} +\renewcommand{\footrulewidth}{0.25pt} + +\fancyfoot[L]{\parbox[t]{0.98\headwidth}{\footnotesize{\sffamily $citation_author$, ($year$). $title$. \textit{$journal_name$}, $volume$($issue$), $page$. \url{https://doi.org/$formatted_doi$}}}} + + +\fancyfoot[R]{\sffamily \thepage} +\makeatletter +\let\ps@plain\ps@fancy +\fancyheadoffset[L]{4.5cm} +\fancyfootoffset[L]{4.5cm} + +% --- Macros --------- + +\definecolor{linky}{rgb}{0.0, 0.5, 1.0} + +\newtcolorbox{repobox} + {colback=red, colframe=red!75!black, + boxrule=0.5pt, arc=2pt, left=6pt, right=6pt, top=3pt, bottom=3pt} + +\newcommand{\ExternalLink}{% + \tikz[x=1.2ex, y=1.2ex, baseline=-0.05ex]{% + \begin{scope}[x=1ex, y=1ex] + \clip (-0.1,-0.1) + --++ (-0, 1.2) + --++ (0.6, 0) + --++ (0, -0.6) + --++ (0.6, 0) + --++ (0, -1); + \path[draw, + line width = 0.5, + rounded corners=0.5] + (0,0) rectangle (1,1); + \end{scope} + \path[draw, line width = 0.5] (0.5, 0.5) + -- (1, 1); + \path[draw, line width = 0.5] (0.6, 1) + -- (1, 1) -- (1, 0.6); + } + } + +% --- Title / Authors --------------------------------------------------------- +% patch \maketitle so that it doesn't center +\patchcmd{\@maketitle}{center}{flushleft}{}{} +\patchcmd{\@maketitle}{center}{flushleft}{}{} +% patch \maketitle so that the font size for the title is normal +\patchcmd{\@maketitle}{\LARGE}{\LARGE\sffamily}{}{} +% patch the patch by authblk so that the author block is flush left +\def\maketitle{{% + \renewenvironment{tabular}[2][] + {\begin{flushleft}} + {\end{flushleft}} + \AB@maketitle}} +\makeatletter +\renewcommand\AB@affilsepx{ \protect\Affilfont} +%\renewcommand\AB@affilnote[1]{{\bfseries #1}\hspace{2pt}} +\renewcommand\AB@affilnote[1]{{\bfseries #1}\hspace{3pt}} +\renewcommand{\affil}[2][]% + {\newaffiltrue\let\AB@blk@and\AB@pand + \if\relax#1\relax\def\AB@note{\AB@thenote}\else\def\AB@note{#1}% + \setcounter{Maxaffil}{0}\fi + \begingroup + \let\href=\href@Orig + \let\texttt=\textttOrig + \let\protect\@unexpandable@protect + \def\thanks{\protect\thanks}\def\footnote{\protect\footnote}% + \@temptokena=\expandafter{\AB@authors}% + {\def\\{\protect\\\protect\Affilfont}\xdef\AB@temp{#2}}% + \xdef\AB@authors{\the\@temptokena\AB@las\AB@au@str + \protect\\[\affilsep]\protect\Affilfont\AB@temp}% + \gdef\AB@las{}\gdef\AB@au@str{}% + {\def\\{, \ignorespaces}\xdef\AB@temp{#2}}% + \@temptokena=\expandafter{\AB@affillist}% + \xdef\AB@affillist{\the\@temptokena \AB@affilsep + \AB@affilnote{\AB@note}\protect\Affilfont\AB@temp}% + \endgroup + \let\AB@affilsep\AB@affilsepx +} +\makeatother +\renewcommand\Authfont{\sffamily\bfseries} +\renewcommand\Affilfont{\sffamily\small\mdseries} +\setlength{\affilsep}{1em} + + +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} + \usepackage[utf8]{inputenc} + +\else % if luatex or xelatex + \ifxetex + \usepackage{mathspec} + \usepackage{fontspec} + + \else + \usepackage{fontspec} + \fi + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} + +\fi +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +% use microtype if available +\IfFileExists{microtype.sty}{% +\usepackage{microtype} +\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} + +\usepackage{hyperref} +$if(colorlinks)$ +\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref +$endif$ +\hypersetup{unicode=true, +$if(title-meta)$ + pdftitle={$title-meta$}, +$endif$ +$if(author-meta)$ + pdfauthor={$author-meta$}, +$endif$ +$if(keywords)$ + pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$}, +$endif$ +$if(colorlinks)$ + colorlinks=true, + linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, + citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, + urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, +$else$ + pdfborder={0 0 0}, +$endif$ + breaklinks=true} +\urlstyle{same} % don't use monospace font for urls +$if(lang)$ +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} +$if(babel-newcommands)$ + $babel-newcommands$ +$endif$ +\else + \usepackage{polyglossia} + \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} +$for(polyglossia-otherlangs)$ + \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} +$endfor$ +\fi +$endif$ +$if(natbib)$ +\usepackage{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +\usepackage$if(biblio-style)$[style=$biblio-style$]$endif${biblatex} +$if(biblatexoptions)$\ExecuteBibliographyOptions{$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$}$endif$ +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ +$if(listings)$ +\usepackage{listings} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ +$if(tables)$ +\usepackage{longtable,booktabs} +$endif$ + +% --- We redefined \texttt, but in sections and captions we want the +% --- old definition +\let\addcontentslineOrig=\addcontentsline +\def\addcontentsline#1#2#3{\bgroup + \let\texttt=\textttOrig\addcontentslineOrig{#1}{#2}{#3}\egroup} +\let\markbothOrig\markboth +\def\markboth#1#2{\bgroup + \let\texttt=\textttOrig\markbothOrig{#1}{#2}\egroup} +\let\markrightOrig\markright +\def\markright#1{\bgroup + \let\texttt=\textttOrig\markrightOrig{#1}\egroup} + + +$if(graphics)$ +\usepackage{graphicx,grffile} +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +$endif$ +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\renewcommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +$if(indent)$ +$else$ +\IfFileExists{parskip.sty}{% +\usepackage{parskip} +}{% else +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +} +$endif$ +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(numbersections)$ +\setcounter{secnumdepth}{5} +$else$ +\setcounter{secnumdepth}{0} +$endif$ +$if(subparagraph)$ +$else$ +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +$endif$ +$if(dir)$ +\ifxetex + % load bidi as late as possible as it modifies e.g. graphicx + $if(latex-dir-rtl)$ + \usepackage[RTLdocument]{bidi} + $else$ + \usepackage{bidi} + $endif$ +\fi +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +\providecommand{\subtitle}[1]{} +\subtitle{$subtitle$} +$endif$ + +$if(authors)$ + $for(authors)$ + $if(authors.affiliation)$ + \author[$authors.affiliation$]{$authors.name$} + $else$ + \author{$authors.name$} + $endif$ + $endfor$ +$endif$ + +$if(affiliations)$ + $for(affiliations)$ + \affil[$affiliations.index$]{$affiliations.name$} + $endfor$ +$endif$ +\date{\vspace{-7ex}} + +\begin{document} +$if(title)$ +\maketitle +$endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ + +\marginpar{ + + \begin{flushleft} + %\hrule + \sffamily\small + + {\bfseries DOI:} \href{https://doi.org/$formatted_doi$}{\color{linky}{$formatted_doi$}} + + \vspace{2mm} + + {\bfseries Software} + \begin{itemize} + \setlength\itemsep{0em} + \item \href{$review_issue_url$}{\color{linky}{Review}} \ExternalLink + \item \href{$repository$}{\color{linky}{Repository}} \ExternalLink + \item \href{$archive_doi$}{\color{linky}{Archive}} \ExternalLink + \end{itemize} + + \vspace{2mm} + + \par\noindent\hrulefill\par + + \vspace{2mm} + + {\bfseries Editor:} \href{$editor_url$}{$editor_name$} \ExternalLink \\ + \vspace{1mm} + $if(reviewers)$ + {\bfseries Reviewers:} + \begin{itemize} + \setlength\itemsep{0em} + $for(reviewers)$ + \item \href{https://github.com/$reviewers$}{@$reviewers$} + $endfor$ + \end{itemize} + $endif$ + \vspace{2mm} + + {\bfseries Submitted:} $submitted$\\ + {\bfseries Published:} $published$ + + \vspace{2mm} + {\bfseries License}\\ + Authors of papers retain copyright and release the work under a Creative Commons Attribution 4.0 International License (\href{http://creativecommons.org/licenses/by/4.0/}{\color{linky}{CC BY 4.0}}). + + $if(aas-doi)$ + \vspace{4mm} + {\bfseries In partnership with}\\ + \vspace{2mm} + \includegraphics[width=4cm]{$aas_logo_path$} + \vspace{2mm} + \newline + This article and software are linked with research article DOI \href{https://doi.org/$aas-doi$}{\color{linky}{$aas-doi$}}, published in the $aas-journal$. + $endif$ + + \end{flushleft} +} + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +{ +$if(colorlinks)$ +\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$} +$endif$ +\setcounter{tocdepth}{$toc-depth$} +\tableofcontents +} +$endif$ +$if(lot)$ +\listoftables +$endif$ +$if(lof)$ +\listoffigures +$endif$ +$body$ + +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} + +$endif$ +$endif$ +$if(biblatex)$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ + +$endif$ +$for(include-after)$ +$include-after$ + +$endfor$ +\end{document} diff --git a/paper/logo.png b/paper/logo.png new file mode 100644 index 0000000..79de736 Binary files /dev/null and b/paper/logo.png differ diff --git a/paper/ma_demo.png b/paper/ma_demo.png new file mode 100644 index 0000000..7a8ed54 Binary files /dev/null and b/paper/ma_demo.png differ diff --git a/paper/paper.bib b/paper/paper.bib new file mode 100644 index 0000000..5fb0b95 --- /dev/null +++ b/paper/paper.bib @@ -0,0 +1,188 @@ +% Our work + +@article{M2N, + title={M2N: mesh movement networks for PDE solvers}, + author={Song, Wenbin and Zhang, Mingrui and Wallwork, Joseph G and Gao, Junpeng and Tian, Zheng and Sun, Fanglei and Piggott, Matthew and Chen, Junqing and Shi, Zuoqiang and Chen, Xiang and others}, + journal={Advances in Neural Information Processing Systems}, + volume={35}, + pages={7199--7210}, + year={2022} +} + +@article{UM2N, + title={Towards Universal Mesh Movement Networks}, + author={Zhang, Mingrui and Wang, Chunyang and Kramer, Stephan and Wallwork, Joseph G and Li, Siyi and Liu, Jiancheng and Chen, Xiang and Piggott, Matthew D}, + journal={Advances in Neural Information Processing Systems}, + volume={37}, + year={2024} +} + +% Citations + +@article{RM24, + title={G-Adaptive mesh refinement--leveraging graph neural networks and differentiable finite element solvers}, + author={Rowbottom, James and Maierhofer, Georg and Deveney, Teo and Schratz, Katharina and Li{\`o}, Pietro and Sch{\"o}nlieb, Carola-Bibiane and Budd, Chris}, + journal={arXiv preprint arXiv:2407.04516}, + year={2024} +} + +@article{dSO24, + title={Velocity model-based adapted meshes using optimal transport}, + author={dos Santos, Thiago Dias and Olender, Alexandre and Dolci, Daiane Iglesia and Carmo, Bruno Souza}, + journal={Geophysics}, + volume={89}, + number={6}, + pages={1--60}, + year={2024}, + publisher={Society of Exploration Geophysicists} +} + +@article{dSO25, + author={Thiago Dias {dos Santos} and Rodrigo G. Dourado {da Silva} and Elisan dos Santos Magalhães and Luis Carlos Marques Pires}, + doi={https://doi.org/10.1016/j.icheatmasstransfer.2025.109412}, + issn={0735-1933}, + journal={International Communications in Heat and Mass Transfer}, + pages={109412}, + title={A finite element model of thermite reaction for wellbore plugging and abandonment operation using moving mesh}, + url={https://www.sciencedirect.com/science/article/pii/S0735193325008383}, + volume={168}, + year={2025}, +} + +% Software + +@article{Firedrake, + title={Firedrake: automating the finite element method by composing abstractions}, + author={Rathgeber, Florian and Ham, David A and Mitchell, Lawrence and Lange, Michael and Luporini, Fabio and McRae, Andrew TT and Bercea, Gheorghe-Teodor and Markall, Graham R and Kelly, Paul HJ}, + journal={ACM Transactions on Mathematical Software (TOMS)}, + volume={43}, + number={3}, + pages={1--27}, + year={2016}, + publisher={ACM New York, NY, USA} +} + +@article{PETSc, + title={PETSc users manual}, + author={Balay, Satish and Abhyankar, Shrirang and Adams, Mark and Brown, Jed and Brune, Peter and Buschelman, Kris and Dalcin, Lisandro and Dener, Alp and Eijkhout, Victor and Gropp, William and others}, + year={2019}, + publisher={Argonne National Laboratory} +} + +@article{UFL, + title={Unified form language: A domain-specific language for weak formulations of partial differential equations}, + author={Aln{\ae}s, Martin S and Logg, Anders and {\O}lgaard, Kristian B and Rognes, Marie E and Wells, Garth N}, + journal={ACM Transactions on Mathematical Software (TOMS)}, + volume={40}, + number={2}, + pages={1--37}, + year={2014}, + publisher={ACM New York, NY, USA} +} + +% Mesh movement literature + +@article{Field88, + title={Laplacian smoothing and Delaunay triangulations}, + author={Field, David A}, + journal={Communications in applied numerical methods}, + volume={4}, + number={6}, + pages={709--712}, + year={1988}, + publisher={Wiley Online Library} +} + +@article{Huang94, + title={Moving mesh partial differential equations (MMPDES) based on the equidistribution principle}, + author={Huang, Weizhang and Ren, Yuhe and Russell, Robert D}, + journal={SIAM Journal on Numerical Analysis}, + volume={31}, + number={3}, + pages={709--730}, + year={1994}, + publisher={SIAM} +} + +@article{Farhat98, + title={Torsional springs for two-dimensional dynamic unstructured fluid meshes}, + author={Farhat, Charbel and Degand, Christoph and Koobus, Bruno and Lesoinne, Michel}, + journal={Computer methods in applied mechanics and engineering}, + volume={163}, + number={1-4}, + pages={231--245}, + year={1998}, + publisher={Elsevier} +} + +@article{Huang05, + title={Measuring mesh qualities and application to variational mesh adaptation}, + author={Huang, Weizhang}, + journal={SIAM Journal on Scientific Computing}, + volume={26}, + number={5}, + pages={1643--1666}, + year={2005}, + publisher={SIAM} +} + +@article{Budd06, + title={Parabolic Monge--Amp{\`e}re methods for blow-up problems in several spatial dimensions}, + author={Budd, Chris J and Williams, JF}, + journal={Journal of Physics A: Mathematical and General}, + volume={39}, + number={19}, + pages={5425}, + year={2006}, + publisher={IOP Publishing} +} + +@article{Budd09, + title={Adaptivity with moving grids}, + author={Budd, Chris J and Huang, Weizhang and Russell, Robert D}, + journal={Acta Numerica}, + volume={18}, + pages={111--241}, + year={2009}, + publisher={Cambridge University Press} +} + +@techreport{McManus17, + title={Moving mesh methods in Fluidity and Firedrake}, + author={McManus, TM and Percival, JR and Yeager, BA and Barral, N and Gorman, GJ and Piggott, MD}, + year={2017}, + institution={Technical Report July, Imperial College London} +} + +@article{McRae18, + title={Optimal-transport--based mesh adaptivity on the plane and sphere using finite elements}, + author={McRae, Andrew TT and Cotter, Colin J and Budd, Chris J}, + journal={SIAM Journal on Scientific Computing}, + volume={40}, + number={2}, + pages={A1121--A1148}, + year={2018}, + publisher={SIAM} +} + +@article{Paganini21, + title={Fireshape: a shape optimization toolbox for Firedrake}, + author={Paganini, Alberto and Wechsung, Florian}, + journal={Structural and Multidisciplinary Optimization}, + volume={63}, + number={5}, + pages={2553--2569}, + year={2021}, + publisher={Springer} +} + +@article{Clare22, + title={Multi-scale hydro-morphodynamic modelling using mesh movement methods}, + author={Clare, Mariana CA and Wallwork, Joseph G and Kramer, Stephan C and Weller, Hilary and Cotter, Colin J and Piggott, Matthew D}, + journal={GEM-International Journal on Geomathematics}, + volume={13}, + number={1}, + pages={2}, + year={2022}, + publisher={Springer} +} diff --git a/paper/paper.md b/paper/paper.md new file mode 100644 index 0000000..790efc7 --- /dev/null +++ b/paper/paper.md @@ -0,0 +1,232 @@ +--- +title: 'Movement: a library of mesh movement methods for Firedrake' +tags: + - Python + - mesh adaptation + - finite element + - Firedrake +authors: + - name: Joseph G. Wallwork + affiliation: "1" + orcid: 0000-0002-3646-091X + corresponding: true + - name: Stephan C. Kramer + affiliation: "2" + orcid: 0000-0002-9193-5092 + - name: Davor Dundovic + affiliation: "3" + orcid: 0009-0000-6085-4794 + - name: Mingrui Zhang + affiliation: "2" + orcid: 0000-0002-9549-5813 + - name: Matthew D. Piggott + affiliation: "2" + orcid: 0000-0002-7526-6853 +affiliations: + - name: Institute of Computing for Climate Science, University of Cambridge, UK + index: 1 + - name: Department of Earth Science and Engineering, Imperial College London, UK + index: 2 + - name: Department of Geosciences, University of Oslo, Norway + index: 3 +date: 4 September 2024 +bibliography: paper.bib + +--- + +# Summary + +*Movement* is a library of mesh movement methods for the Firedrake finite +element package [@Firedrake]. It implements several commonly used mesh movement +approaches from the literature. + +*Mesh adaptation* is an advanced discretisation approach for mesh-based partial +differential equation (PDE) solvers. It uses variable spatial resolution, guided +by a user-specified error indicator or heuristic, in an attempt to improve +accuracy, whilst maintaining a low overall computational cost. *Mesh movement* +is family of methods in which the topology of the mesh is unaffected by the mesh +adaptation process. That is, mesh entities (vertices, edges, cells, etc.) are +not inserted or deleted and the connectivity of the mesh remains unchanged. What +does change under adaptation is the *geometry* of the mesh - namely the mesh +vertex positions. This affects the spatial resolution because vertices (and +other mesh entities) are re-distributed, leaving some regions with higher +resolution than others. Mesh movement is also known as $r$-adaptation, where the +$r$ stands for *re-distribution*. + +# Statement of need + +Several works have implemented mesh movement in Firedrake, such as +[@McManus17;@McRae18;@Paganini21;@Clare22]. These implementations include +several different mesh movement methods, as described subsequently. However, +there does not currently exist a single, up-to-date package providing a +user-friendly 'toolbox' of various different mesh movement methods. + +# Software description + +## Underlying framework + +Movement is a Python package that uses the domain-specific languages of +Firedrake [@Firedrake] and Unified Form Language (UFL) [@UFL]. With these, the +user is able to write high-level code for finite element problems, akin to how +finite element notation is written as mathematics. Despite the high-level +interface, Firedrake achieves efficiency through automatic code generation and +by leveraging PETSc [@PETSc] for its unstructured mesh representation and +linear and nonlinear solvers. The mesh movement methods implemented in Movement +are PDE-based, meaning it inherits these efficiency benefits from Firedrake. + +Movement is an open source package with an MIT licence. The source code is +freely available at . Long-form +documentation, API documentation, and demos may be found at + - part of a larger +website, which also provides documentation for other mesh adaptation packages +developed and maintained by our group. Movement has an open development process +and welcomes contributors. Development guidelines can be found within the wiki +pages for the wider `mesh-adaptation` organisation at + + +## Process + +Firedrake is an essential dependency of Movement, so it should be installed +first, following the instructions at . +Having done so, activate the virtual environment and pip install either by +cloning the Movement repository and running `pip install ./movement` or pip +installing directly from GitHub with +```sh +pip install git+https://github.com/mesh-adaptation/movement.git +``` + +Movement is provided as a Python module, which can be imported with +```python +from movement import * +``` +or similar. Assuming that the repository was cloned locally, the demos may be +run by navigating to the `demos` subdirectory and running the Python scripts +from the command line. + +## Main library + +Movement takes an object-oriented approach, focused on `Mover` classes, which +handle the transformation of an input mesh into an adapted mesh. There +are three main families of `Mover`s, aligned with the three main mesh movement +paradigms. + + + +### Monitor-based methods + +These methods use the concept of a *monitor function* - a strictly positive, +scalar function which is sought to be *equi-distributed* over the physical +domain [@Budd09]. In practice, this means that the integral of the monitor +function is approximately equal across the elements of the physical mesh. As +such, the monitor function is often thought of as a 'mesh density function'. + +The two monitor-based methods currently implemented in Movement are based on +optimal transport theory and are driven by solutions of Monge-Ampère type +equations. The idea is to solve auxiliary nonlinear PDEs to determine the +minimal mesh deformation that will equidistribute a user-provided monitor +function. The implementations of both Monge-Ampère methods are based on those +used to generate the results presented in [@McRae18]. + +Figure 1 shows an example from the first Monge-Ampère based Movement demo, with +an analytically prescribed monitor function, +\begin{equation}\label{eq:ring} + m(x,y) = 1 + \frac{\alpha}{\cosh^2\left(\beta\left( + \left(x-\frac{1}{2}\right)^2+\left(y-\frac{1}{2}\right)^2-\gamma^2\right) + \right)}, +\end{equation} +with amplitude $\alpha=20$, width $\beta=200$, and radius $\gamma^2=0.15$. + +![Monge-Ampère based mesh movement applied to a uniform mesh, with ring-shaped +monitor function (\ref{eq:ring}). Left: full +mesh. Right: zoom on the region $[0.15,0.3]\times[0.15,0.3]$.](ma_demo.png) + +### Velocity-based methods + +Velocity-based methods introduce the concept of a *mesh velocity*, which is +used to update the mesh between iterations of a time integration scheme for +time-dependent PDE problems [@McManus17]. They can also be used to support PDE +solvers with moving reference frames, such as Laplacian or Arbitrary +Lagrangian-Eulerian (ALE) viewpoints. + +Movement implements Laplacian smoothing [@Field88] as a velocity-based method. +This approach is now standard in the mesh adaptation literature, although it is +generally used as a post-processing step for improving the quality of a mesh +generated by a $h$-adaptive (topology-deforming) method [@McManus17]. Given some +forcing of the mesh, the Laplacian smoothing method determines the mesh +response by solving a vector Laplace equation as an auxiliary PDE. + +### Spring-based methods + +The spring-based approach differs from the others in that it +re-interprets the mesh as a fictitious, discrete structure comprised of beams. +Each beam is given a stiffness value and the mesh response to forcings is +determined by solving a discrete linear elasticity problem. Movement currently +only implements the *lineal spring* approach, although there are plans to +implement the *torsional spring* approach [@Farhat98]. + +## Tools + +In addition to the core functionality of the mesh movement methods described +above, Movement implements supporting utilities including: + +- The `MeshTanglingChecker` class, which can be used to detect when one or more + mesh elements has become invalid as a result of the mesh movement process. + Such a checker is created and enabled by default along with any `Mover` + instance. +- Builder classes for creating standard monitor functions, including analytical + shapes such as rings and balls, as well as monitors based on gradients and/or + Hessians of solution PDE fields. + + + +# Examples of use + +Movement has been used to implement mesh movement methods in several research +projects. To the best of our knowledge, only the Monge-Ampère based methods +have so far been utilised. Research papers that make use of Movement include: + +- [@dSO24;@dSO25]: Monge-Ampère based mesh movement for seismology applications. +- [@M2N]: End-to-end graph neural network (GNN) emulators for mesh movement. +- [@UM2N]: Extension of [@M2N] that generalises to arbitrary PDEs. +- [@RM24]: A different GNN mesh movement framework that makes use of online + training via Firedrake's in-built automatic differentiation functionality. + +Note that [@dSO24] uses Movement directly within an application code, whereas +[@M2N;@UM2N;@RM24] use Movement's Monge-Ampère `Mover`s to provide +'gold standard' adapted meshes that are used as training data for GNNs. + +# Future development + +As described above, Movement currently implements one velocity-based method, one +spring-based method, and one monitor-based method (albeit with two different +solution strategies). Rather than implementing more of the many methods +presenting in the literature, development has focused on improving the +functionality, efficiency, and robustness of the Monge-Ampère `Mover`s, since +these are the best used by collaborators and users. + +Now that the Monge-Ampère implementations have reached a mature state, we seek +to implement several other methods, including *torsional spring* [@Farhat98], +*linear and nonlinear elasticity*, *MMPDE methods* [@Huang94] *parabolic +Monge-Ampère*, [@Budd06], and anisotropic variants of various monitor-based +approaches [@Huang05]. We also plan to implement tools for integrating the +`Mover`s into Lagrangian and ALE solution strategies for PDE solvers. + +# Acknowledgments + +The authors gratefully acknowledge funding from Huawei Corporation Ltd. + +# References