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

Enhancing inward and outward #317

Merged
merged 2 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [0.13.0] - Unreleased

### Changed
- The meaning of `inward/outward` has slightly changed for `SkeletonCellBasis` objects. Now, by accessing to these properties a `ReducedSkeletonCellBasis` is returned, which allows to use the result in a more flexible way (in particular, the result can be used in a similar way than the result of `jump` or `mean`).Since PR [#317](https://github.com/gridap/Gridap.jl/pull/317).

### Fixed
- Replaced += by add_entry!. Since PR [#316](https://github.com/gridap/Gridap.jl/pull/316).
- Replaced `+=` by `add_entry!`. Since PR [#316](https://github.com/gridap/Gridap.jl/pull/316).

## [0.12.0] - 2020-07-07

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Gridap"
uuid = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
authors = ["Santiago Badia <[email protected]>", "Francesc Verdugo <[email protected]>"]
version = "0.12.0"
version = "0.13.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
8 changes: 4 additions & 4 deletions src/FESpaces/CellBases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,13 @@ struct SkeletonCellBasis{T} <: GridapType
right::CellBasis
end

function Base.getproperty(x::SkeletonCellBasis, sym::Symbol)
function Base.getproperty(a::SkeletonCellBasis, sym::Symbol)
if sym == :inward
x.left
ReducedSkeletonCellBasis(a.trial_style,1*a.left,0*a.right)
elseif sym == :outward
x.right
ReducedSkeletonCellBasis(a.trial_style,0*a.left,1*a.right)
else
getfield(x, sym)
getfield(a, sym)
end
end

Expand Down
11 changes: 9 additions & 2 deletions test/FESpacesTests/CellBasesTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,15 @@ sq = get_coordinates(squad)
sv = restrict(v,strian)
@test isa(sv,SkeletonCellBasis)
@test is_test(sv)
@test sv.left === sv.inward
@test sv.right === sv.outward
_sv = sv.inward
@test isa(_sv,ReducedSkeletonCellBasis)
@test is_test(_sv)
@test evaluate(sv.inward.left,sq) == evaluate(sv.left,sq)
@test evaluate(sv.outward.right,sq) == evaluate(sv.right,sq)

_sv = sv.outward
@test isa(_sv,ReducedSkeletonCellBasis)
@test is_test(_sv)

_sv = jump(2*∇(sv))
@test isa(_sv,ReducedSkeletonCellBasis)
Expand Down