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 support for facet orientation in FacetBasis #865

Merged
merged 28 commits into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8f21d9b
Add FacetBasis.init_subdomain
kinnala Jan 16, 2022
85bea6c
Fix flake7
kinnala Jan 16, 2022
b47f93a
wip
kinnala Jan 23, 2022
35b60fd
Fix ori reading
kinnala Jan 25, 2022
69eeefb
Some reverts and cleaning
kinnala Jan 25, 2022
850636b
Make the visualization nicer
kinnala Jan 25, 2022
0c71c65
Fixes for 3D
kinnala Jan 25, 2022
b28f744
Move oriented facet array
kinnala Jan 25, 2022
20f701d
Remove Any
kinnala Jan 25, 2022
bf25883
Fix flake8
kinnala Jan 25, 2022
1b69d91
Fix typing
kinnala Jan 25, 2022
5242c33
Add workaround for default file format change in meshio 5.3.0
kinnala Jan 26, 2022
475dd51
Respect overridden file_format
kinnala Jan 26, 2022
26a3b4b
Add Mesh.facets_around
kinnala Jan 26, 2022
574aba2
Rename BoundaryFacetBasis to FacetBasis and alias vice versa
kinnala Jan 26, 2022
5b76c60
Add example meshes with oriented interfaces
kinnala Jan 26, 2022
196458d
Support giving lambda AND index sets in with_boundaries, fix test
kinnala Jan 26, 2022
49ceb86
Add two tests
kinnala Jan 26, 2022
4c2656a
Add tests and fix the horribly broken subdomain assembly
kinnala Jan 26, 2022
b393010
Fix typing
kinnala Jan 26, 2022
edfe397
Fix interpolation with multiple components; add test for orientation
kinnala Jan 28, 2022
5a41334
Fix bugs and rename parameters
kinnala Jan 28, 2022
4939d81
Workaround for ElementVector interpolation; comment out test
kinnala Jan 28, 2022
a6404fc
Fix mypy and flake8
kinnala Jan 28, 2022
aacff19
Allow specifying normal in Mesh.facets_satisfying
kinnala Jan 28, 2022
ef4c2fc
Add changelog entries
kinnala Jan 28, 2022
fe0a36a
More fixes to changelog
kinnala Jan 28, 2022
a4cb88e
Add changelog about OrientedBoundary
kinnala Jan 29, 2022
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
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,20 +216,44 @@ with respect to documented and/or tested features.
### Unreleased

- Changed: `DiscreteField` is now a subclass of `ndarray` instead of
`NamedTuple`
`NamedTuple` and, consequently, the components of `DiscreteField` cannot no
more be indexed inside forms like `u[1]` (use `u.grad` instead)
- Changed: Writing `w['u']` and `w.u` inside the form definition is now
equivalent (previously `w.u == w['u'].value`)
- Changed: `Mesh.draw` now uses `matplotlib` by default, call
`Mesh.draw("vedo")` to keep using `vedo`
- Changed: `Mesh.draw` now uses `matplotlib` by default, calling
`Mesh.draw("vedo")` uses `vedo`
- Changed: `skfem.visuals.matplotlib` now uses `jet` as the default colormap
- Changed: `BoundaryFacetBasis` is now an alias of `FacetBasis` instead of
other way around
- Deprecated: `DiscreteField.value` remains for backwards-compatibility but is
now deprecated and can be dropped
- Added: `Mesh.plot`, a wrapper to `skfem.visuals.*.plot`
- Added: `Basis.plot`, a wrapper to `skfem.visuals.*.plot`
- Added: `Basis.refinterp` now supports vectorial fields
- Added: `skfem.visuals.matpltlib.plot` now has a basic quiver plot for vector
- Added: `skfem.visuals.matplotlib.plot` now has a basic quiver plot for vector
fields
- Fixed: Improvements to backwards compatibility in `asm`/`assemble` kwargs
- Added: `Mesh.facets_around` which constructs a set of facets around a
subdomain
- Added: `Mesh.load` now tries loading the orientation of boundaries and
interfaces
- Added: `OrientedBoundary` which is a subclass of `ndarray` for facet index
arrays with the orientation information (0 or 1 per facet) available as
`OrientedBoundary.ori`
- Added: `FacetBasis` will use the facet orientations (if present) to calculate
traces and normal vectors
- Added: `skfem.visuals.matplotlib.draw` will visualize the orientations if
`boundaries=True` is given
- Added: `Mesh.facets_satisfying` allows specifying the keyword argument
`normal` for orienting the resulting interface
- Added: `FacetBasis` constructor now has the keyword argument `side` which
allows changing the side of the facet used to calculate the basis function
values and gradients
- Fixed: Improvements to backwards compatibility in `asm`/`assemble` keyword
arguments
- Fixed: Save format issue with meshio 5.3.0+
- Fixed: `CellBasis` did not properly support `elements` argument
- Fixed: `Basis.interpolate` did not properly interpolate all components of
`ElementComposite`

### [5.2.0] - 2021-12-27

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This can be written as

In addition, forms can depend on the local mesh parameter ``w.h`` or other
finite element functions (see :ref:`predefined`). Moreover, boundary forms
assembled using :class:`~skfem.assembly.BoundaryFacetBasis` can depend on the
assembled using :class:`~skfem.assembly.FacetBasis` can depend on the
outward normal vector ``w.n``. One example is the form

.. math::
Expand Down
8 changes: 4 additions & 4 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ Class: CellBasis
:members: __init__, interpolate, project


Class: BoundaryFacetBasis
*************************

.. autoclass:: skfem.assembly.FacetBasis
Class: FacetBasis
*****************

.. autoclass:: skfem.assembly.BoundaryFacetBasis

.. autoclass:: skfem.assembly.FacetBasis
:members: __init__

Class: InteriorFacetBasis
Expand Down
Loading