From cf604a3024c7b9e7f2a9080514abe51ce149a798 Mon Sep 17 00:00:00 2001 From: Paul Kuberry Date: Thu, 5 Dec 2024 22:47:36 -0500 Subject: [PATCH 1/3] Update README.md --- README.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e7da32887..e927b91a3 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ The Compadre Toolkit provides a performance portable solution for the parallel e This toolkit focuses on the 'on-node' aspects of meshless PDE solution and remap, namely the parallel construction of small dense matrices and their inversion. What it does **not** provide is the tools for managing fields, inverting globally sparse matrices, or neighbor search that requires orchestration over many MPI processes. This toolkit is designed to be easily dropped-in to an existing MPI (or serial) based framework for PDE solution or remap, with minimal dependencies ([Kokkos](https://github.com/kokkos/kokkos) and [KokkosKernels](https://github.com/kokkos/kokkos-kernels)). ### Generalized Moving Least Squares (GMLS) - + +Here is a brief overview of the GMLS framework: + +Consider $\phi$ of function class $\mathbf{V}$ as well as a collection of samples $\Lambda = \\{\lambda_ i(\phi)\\}_ {i=1}^{N}$ (Compadre::SamplingFunctional) corresponding to a quasiuniform collection of data sites $\mathbf{X}_ h = \\{ \mathbf{x}_ i \\} \subset \mathbb{R}^d$ characterized by fill distance $h$. To approximate a given linear target functional $\tau_{\tilde{x}}$ (Compadre::TargetOperation) associated with a target site $\tilde{x}$, we seek a reconstruction $p \in \mathbf{V}_ h$, where $\mathbf{V}_ h \subset \mathbf{V}$ is a finite dimensional space (Compadre::ReconstructionSpace) chosen to provide good approximation properties, with basis $\mathbf{P} = \\{P\\}_{i=1}^{dim(V_h)}$. We perform this reconstruction in the following weighted $\ell_2$ sense: + +$$p = \underset{{q \in \mathbf{V}_ h}}{\mathrm{argmin}} \sum_{i=1}^N ( \lambda_i(\phi) -\lambda_i(q) )^2 \omega(\lambda_i,\tau_{\tilde{x}}),$$ + +where $\omega$ is a locally supported positive function, $\omega = \Phi(|\tilde{x}-\mathbf{x}_i|)$ and $|\cdot|$ denotes the Euclidean norm. $\Phi(r,\epsilon)$ is selected by the user, having a parameter controlling the support of $\omega$. + +With an optimal reconstruction $p$ in hand, the target functional is approximated via $\tau_{\tilde{x}} (\phi) \approx \tau^h_{\tilde{x}} (\phi) := \tau_{\tilde{x}} (p)$. + +As an unconstrained $\ell_2$-optimization problem, this process admits the explicit form: + + +$$\tau^h_{\tilde{x}}(\phi) = \tau_{\tilde{x}}(\mathbf{P})^\intercal \left(\Lambda(\mathbf{P})^\intercal \mathbf{W} \Lambda(\mathbf{P})\right)^{-1} \Lambda(\mathbf{P})^\intercal \mathbf{W} \Lambda(\phi),$$ + +where: +* $\tau_{\tilde{x}}(\mathbf{P}) \in \mathbb{R}^{dim(V_h)}$ is a vector with components consisting of the target functional applied to each basis function, +* $\mathbf{W} \in \mathbb{R}^{N \times N}$ is a diagonal matrix with diagonal entries consisting of $\\{\omega(\lambda_i,\tau_{\tilde{x}})\\}_{i=1,...,N}$, +* $\Lambda(\mathbf{P}) \in \mathbb{R}^{N \times dim(V_h)}$ is a rectangular matrix whose $(i,j)$ entry corresponds to the application of the $i^{th}$ sampling functional applied to the $j^{th}$ basis function, +* and $\Lambda(\phi) \in \mathbb{R}^N$ is a vector consisting of the $N$ samples of the function $\phi$. + +Compadre forms and solves the GMLS problem for $\\{\alpha_i\\}$ used in the approximation $\tau^h_{\tilde{x}}(\phi) = \sum_{\mathbf{x}_i \in B^\epsilon(\tilde{x})} \alpha_i \lambda_i(\phi)$, +where $B^\epsilon(\tilde{x})$ denotes the $\epsilon$-ball neighborhood of the target site $\tilde{x}$. + +As such, GMLS admits an interpretation as an automated process for generating generalized finite difference methods on unstructured point clouds. Note that the computational cost of solving the GMLS problem amounts to inverting a small linear system which may be assembled using only information from neighbors within the support of $\omega$, and construction of such stencils across the entire domain is embarrassingly parallel. + +The Compadre Toolkit is designed to efficiently assemble, factorize, and solve large batches of GMLS problems. + ## Wiki Information Details about building and using the Compadre toolkit can be found on the [Wiki](https://github.com/sandialabs/compadre/wiki). From 96c289e033e2bc3838abb7d1a6cc3896f7253a4f Mon Sep 17 00:00:00 2001 From: Paul Kuberry Date: Mon, 9 Dec 2024 11:05:06 -0500 Subject: [PATCH 2/3] Update README.md and add FILTER_PATTERN for Doxygen - Allows single README.md to be reused for MathJax markup on Github and with Doxygen --- README.md | 15 +-------------- doc/Doxyfile | 6 +++--- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e927b91a3..6c6f33e0d 100644 --- a/README.md +++ b/README.md @@ -7,19 +7,6 @@ The Compadre Toolkit provides a performance portable solution for the parallel e This toolkit focuses on the 'on-node' aspects of meshless PDE solution and remap, namely the parallel construction of small dense matrices and their inversion. What it does **not** provide is the tools for managing fields, inverting globally sparse matrices, or neighbor search that requires orchestration over many MPI processes. This toolkit is designed to be easily dropped-in to an existing MPI (or serial) based framework for PDE solution or remap, with minimal dependencies ([Kokkos](https://github.com/kokkos/kokkos) and [KokkosKernels](https://github.com/kokkos/kokkos-kernels)). ### Generalized Moving Least Squares (GMLS) - Here is a brief overview of the GMLS framework: @@ -34,7 +21,7 @@ With an optimal reconstruction $p$ in hand, the target functional is approximate As an unconstrained $\ell_2$-optimization problem, this process admits the explicit form: -$$\tau^h_{\tilde{x}}(\phi) = \tau_{\tilde{x}}(\mathbf{P})^\intercal \left(\Lambda(\mathbf{P})^\intercal \mathbf{W} \Lambda(\mathbf{P})\right)^{-1} \Lambda(\mathbf{P})^\intercal \mathbf{W} \Lambda(\phi),$$ +$$\tau^h_{\tilde{x}}(\phi) = \tau_{\tilde{x}}(\mathbf{P})^\top \left(\Lambda(\mathbf{P})^\top \mathbf{W} \Lambda(\mathbf{P})\right)^{-1} \Lambda(\mathbf{P})^\top \mathbf{W} \Lambda(\phi),$$ where: * $\tau_{\tilde{x}}(\mathbf{P}) \in \mathbb{R}^{dim(V_h)}$ is a vector with components consisting of the target functional applied to each basis function, diff --git a/doc/Doxyfile b/doc/Doxyfile index 294efd7d2..c260eac88 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -926,7 +926,7 @@ INPUT_FILTER = # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. -FILTER_PATTERNS = +FILTER_PATTERNS += "*.md=sed 's/\([^$]\)\$\([^$]*\)\$\([^$]\)/\1\\f$\2\\f$\3/g;s/\\{/\{/g;s/\\}/\}/g'" # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER ) will also be used to filter the input files that are used for @@ -1500,7 +1500,7 @@ FORMULA_TRANSPARENT = YES # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -USE_MATHJAX = NO +USE_MATHJAX = YES # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: @@ -1633,7 +1633,7 @@ EXTRA_SEARCH_MAPPINGS = # If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output. # The default value is: YES. -GENERATE_LATEX = YES +GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of From 63e988b6217f4f8b176ed39adf84362bc4c2e5b9 Mon Sep 17 00:00:00 2001 From: Paul Kuberry Date: Mon, 9 Dec 2024 12:32:34 -0500 Subject: [PATCH 3/3] Add config to MathJax --- doc/Doxyfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Doxyfile b/doc/Doxyfile index c260eac88..475ee6d79 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -1523,7 +1523,8 @@ MATHJAX_FORMAT = HTML-CSS # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +# https was required to have it resolve on Github pages +MATHJAX_RELPATH = https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example