Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new cut cell MeshData #165

Merged
merged 49 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
8e01c26
add some temporary test files
jlchan Feb 22, 2023
c665c4d
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan Apr 6, 2023
d4e1ce0
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan Apr 8, 2023
76a01cf
fix docstrings
jlchan Apr 20, 2023
b204a8d
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan Apr 20, 2023
6cbffe9
remove cruft
jlchan Apr 25, 2023
7d2ea37
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan May 1, 2023
05d1a45
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan May 1, 2023
53a2655
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan May 13, 2023
dc82158
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan Aug 22, 2023
caa612e
update plot
jlchan Dec 1, 2023
d8fe5f5
update file name
jlchan Dec 1, 2023
db5462c
Merge branch 'main' into jc/isoparametric_cut_cell
jlchan Jan 8, 2024
d13fe0e
Merge branch 'dev' into jc/isoparametric_cut_cell_dev
jlchan Apr 25, 2024
f301833
fixing cut cell demo for v1.0+
jlchan Apr 25, 2024
ba2756a
adding Caratheodory pruning
jlchan Apr 25, 2024
cfc0597
cleaning up cutcell demo
jlchan Apr 25, 2024
497bec9
Merge branch 'dev' into jc/isoparametric_cut_cell_dev
jlchan Apr 25, 2024
db585a8
improve efficiency slightly
jlchan Apr 25, 2024
4bbe94c
refactoring functions
jlchan Apr 25, 2024
c6135cc
improve comments
jlchan Apr 25, 2024
201ac32
more refactoring
jlchan Apr 25, 2024
9bde927
generalize map_to_interval
jlchan Apr 29, 2024
8540e8c
add new version of "generate_sampling_points"
jlchan Apr 29, 2024
76a4a55
add dispatch to preserve old version of MeshData
jlchan Apr 29, 2024
98dfaf7
remove cruft
jlchan Apr 29, 2024
dc9c4f8
add new routines to create a cut cell MeshData with positive weights
jlchan Apr 29, 2024
2428cf8
refactoring
jlchan Apr 29, 2024
2383472
fix construction of cut cell face node indices
jlchan Apr 29, 2024
aff1604
fix precomputation of operators
jlchan Apr 29, 2024
b2b6353
clean up test of SBP property
jlchan Apr 29, 2024
d6e3311
add test of SBP property using new MeshData
jlchan Apr 29, 2024
a8d2bec
add MomentFitting dispatch for old cut cell MeshData
jlchan Apr 29, 2024
8711b89
remove outdated todo
jlchan Apr 30, 2024
6585529
changing wJf to wf internally
jlchan Apr 30, 2024
60a2a7c
add face node index array
jlchan Apr 30, 2024
bde44b0
make face centroid computation more compact
jlchan Apr 30, 2024
14fc1ee
specialize connect_mesh
jlchan Apr 30, 2024
69c83aa
add new MeshData based on subtriangulations
jlchan Apr 30, 2024
88d8b9c
add Subtriangulation() as a quadrature type
jlchan Apr 30, 2024
e29ad80
add quadrature type to CutCellMesh meshtype
jlchan Apr 30, 2024
8e71427
test both Subtriangulation and MomentFitting
jlchan Apr 30, 2024
fc1c211
add some docs
jlchan Apr 30, 2024
d0c8a63
allow specifying the target cut cell quadrature degree via keyword arg
jlchan Apr 30, 2024
a58c85f
committing scratch testing files before deleting
jlchan Apr 30, 2024
696ab77
removing some scratch test files
jlchan Apr 30, 2024
78aaf6a
add tests for the weak SBP property
jlchan Apr 30, 2024
a1317fb
fix an error when num_cartesian_cells = 0
jlchan Apr 30, 2024
ca13fd3
remove scratchpad files
jlchan May 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions docs/src/more_meshes.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,15 @@ circle = PresetGeometries.Circle(R=0.33, x0=0, y0=0)
cells_per_dimension_x, cells_per_dimension_y = 4, 4

rd = RefElemData(Quad(), N=3)
md = MeshData(rd, (circle, ), cells_per_dimension_x, cells_per_dimension_y; precompute_operators=true)
md = MeshData(rd, (circle, ), cells_per_dimension_x, cells_per_dimension_y, Subtriangulation(); precompute_operators=true)
```
The interpolation points on cut cells `md.x.cut` are determined from sampled points and a pivoted QR decomposition. The quadrature points on cut cells `md.xq.cut` are determined similarly. However, the cut-cell quadrature weights `md.wJq.cut` are not currently positive. The optional keyword argument `precompute_operators` specifies
whether to precompute differentiation, face interpolation, mass, and lifting matrices for each cut cell. If
Here, the final argument `quadrature_type = Subtriangulation()` determines how the quadrature on cut cells is determined. For `Subtriangulation()`, the quadrature on cut cells is constructed from a curved isoparametric subtriangulation of the cut cell. The number of quadrature points on a cut cell is then reduced (while preserving positivity) using Caratheodory pruning. If not specified, the `quadrature_type` argument defaults to `Subtriangulation()`.

Quadrature rules can also be constructed by specifying `quadrature_type = MomentFitting()`. The quadrature points on cut cells `md.xq.cut` are determined from sampling and a pivoted QR decomposition. This is not recommended, as it can be both slower, and the cut-cell quadrature weights `md.wJq.cut` are not guaranteed to be positive.

The interpolation points on cut cells `md.x.cut` are determined from sampled points and a pivoted QR decomposition.

The optional keyword argument `precompute_operators` specifies whether to precompute differentiation, face interpolation, mass, and lifting matrices for each cut cell. If
`precompute_operators=true`, these are stored in `md.mesh_type.cut_cell_operators`.

As with hybrid meshes, the nodal coordinates `md.x`, `md.y` are `NamedArrayPartition`s with `cartesian` and `cut` fields. For example, `md.x.cartesian` and `md.x.cut` are the x-coordinates of the Cartesian and cut cells, respectively. Likewise, `md.mapP` indexes linearly into the array of face coordinates and specifies exterior node indices. For example, we can interpolate a function to face nodes and compute exterior values via the following code:
Expand Down
1 change: 1 addition & 0 deletions src/StartUpDG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export num_faces, num_vertices, HybridMeshExample
include("physical_frame_basis.jl")
include("cut_cell_meshes.jl")
export PhysicalFrame, equi_nodes
export Subtriangulation, MomentFitting

include("state_redistribution.jl")
export StateRedistribution, apply!
Expand Down
Loading
Loading