diff --git a/.gitignore b/.gitignore index 3e72945..2e2d95e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ lapreprint.pdf +.DS_Store diff --git a/examples/pixels/main.pdf b/examples/pixels/main.pdf index dbae31c..1b1c3da 100644 Binary files a/examples/pixels/main.pdf and b/examples/pixels/main.pdf differ diff --git a/examples/pixels/main.typ b/examples/pixels/main.typ index 7dc343e..8c49a7e 100644 --- a/examples/pixels/main.typ +++ b/examples/pixels/main.typ @@ -132,13 +132,13 @@ To discretize the first order differential equations we consider a single cell i So we have half of the equation discretized - the left hand side. Now we need to take care of the source: it contains two dirac delta functions - these are infinite at their origins, $r_(s^+)$ and $r_(s^-)$. However, the volume integral of a delta function _is_ well defined: it is _unity_ if the volume contains the origin of the delta function otherwise it is _zero_. -As such, we can integrate both sides of the equation over the volume enclosed by the cell. Since $bold(D) bold(j)$ is constant over the cell, the integral is simply a multiplication by the volume of the cell $"v"bold(D) bold(j)$. The integral of the source is zero unless one of the source electrodes is located inside the cell, in which case it is $q = plus.minus I$. Now we have a discrete description of equation 1 over a single cell: +As such, we can integrate both sides of the equation over the volume enclosed by the cell. Since $bold(D) bold(j)$ is constant over the cell, the integral is simply a multiplication by the volume of the cell $"v"bold(D) bold(j)$. The integral of the source is zero unless one of the source electrodes is located inside the cell, in which case it is $q = plus.minus I$. Now we have a discrete description of @eq:div over a single cell: $ "v"bold(D) bold(j) = q $ == Scalar equations only, please -Equation @eq:div is a vector equation, so really it is two or three equations involving multiple components of $arrow(j)$. We want to work with a single scalar equation, allow for anisotropic physical properties, and potentially work with non-axis-aligned meshes - how do we do this?! We can use the *weak formulation* where we take the inner product ($integral arrow(a) dot.op arrow(b) d v$) of the equation with a generic face function, $arrow(f)$. This reduces requirements of differentiability on the original equation and also allows us to consider tensor anisotropy or curvilinear meshes. +@eq:div is a vector equation, so really it is two or three equations involving multiple components of $arrow(j)$. We want to work with a single scalar equation, allow for anisotropic physical properties, and potentially work with non-axis-aligned meshes - how do we do this?! We can use the *weak formulation* where we take the inner product ($integral arrow(a) dot.op arrow(b) d v$) of the equation with a generic face function, $arrow(f)$. This reduces requirements of differentiability on the original equation and also allows us to consider tensor anisotropy or curvilinear meshes. In @fig-weak-formulation, we visually walk through the discretization of equation (b). On the left hand side, a dot product requires a _single_ cartesian vector, $bold(j_x comma j_y)$. However, we have a $j$ defined on each face (2 $j_x$ and 2 $j_y$ in 2D!). There are many different ways to evaluate this inner product: we could approximate the integral using trapezoidal, midpoint or higher order approximations. A simple method is to break the integral into four sections (or 8 in 3D) and apply the midpoint rule for each section using the closest $bold(j)$ components to compose a cartesian vector. A $bold(P)_i$ matrix (size $2 times 4$) is used to pick out the appropriate faces and compose the corresponding vector (these matrices are shown with colors corresponding to the appropriate face in the figure). On the right hand side, we use a vector identity to integrate by parts. The second term will cancel over the entire mesh (as the normals of adjacent cell faces point in opposite directions) and $phi$ on mesh boundary faces are zero by the Dirichlet boundary condition. This leaves us with the divergence, which we already know how to do! diff --git a/lapreprint.typ b/lapreprint.typ index fde21dd..5e88563 100644 --- a/lapreprint.typ +++ b/lapreprint.typ @@ -196,6 +196,7 @@ parbreak() box(text(14pt, fill: gray.darken(30%), subtitle)) } + linebreak() // Authors and affiliations if authors.len() > 0 { box(inset: (y: 10pt), { @@ -267,8 +268,8 @@ let abstracts - if (type(abstract) == "content") { - abstracts = (title: "Abstract", content: abstract) + if (type(abstract) == "content" or type(abstract) == "string") { + abstracts = ((title: "Abstract", content: abstract),) } else { abstracts = abstract }