Skip to content

Commit

Permalink
Merge pull request #317 from gridap/enhancing_inward_and_outward
Browse files Browse the repository at this point in the history
Enhancing inward and outward
  • Loading branch information
fverdugo committed Jul 9, 2020
2 parents 7d54e18 + 90a94c1 commit ccf4f59
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
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

0 comments on commit ccf4f59

Please sign in to comment.