Skip to content

Commit 1d4b6d5

Browse files
authored
Merge pull request #376 from gridap/release-0.14
Major refactoring associated with the skeleton and multi-field
2 parents 670dabd + acb3c86 commit 1d4b6d5

File tree

162 files changed

+5852
-5485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+5852
-5485
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ language: julia
99
os:
1010
- linux
1111
julia:
12-
- 1.0
13-
- 1.4
12+
- 1.3
13+
- 1.5
1414
notifications:
1515
email:
1616
on_success: never

NEWS.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.14.0] - Unreleased
8+
9+
### Changed
10+
- Table struct has been generalized such that data and ptrs arrays can be of an arbitrary type extending AbstractArray. Since PR [#310](https://github.com/gridap/Gridap.jl/pull/310/)
11+
- `interpolate, interpolate!, interpolate_dirichlet...` switched argument order to function first style. For instance `interpolate(u, V)` instead of `interpolate(V, u)`
712

813
## [0.13.4] - 2020-08-23
914

@@ -69,13 +74,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6974
- Possibility to have 0 order in `DISC` directions of a `CDLagrangianRefFE`. Since PR [#308](https://github.com/gridap/Gridap.jl/pull/308).
7075
- Added setindex! method for Reindexed. Since PR [#309](https://github.com/gridap/Gridap.jl/pull/309).
7176

77+
7278
### Changed
7379

7480
- Changed the interfaces of `ReferenceFE` and `NodalReferenceFE` in relation of DOF ownership. Now function `get_face_own_dofs` and related ones are parametrized by a `Conformity` object. Since PR [#311](https://github.com/gridap/Gridap.jl/pull/311).
7581
- The constructors `GenericRefFE`, `GenericNodalCartesianRefFE`, and `compute_conforming_cell_dofs` take an extra argument of type `Conformity`. Since PR [#311](https://github.com/gridap/Gridap.jl/pull/311).
7682
- Renamed `PDiscRefFE` -> `DiscRefFE` struct keeping the name for constructor. Since PR [#293](https://github.com/gridap/Gridap.jl/pull/293).
7783
- One of the `GradConformingFESpace` methods now more general `ConformingFESpace`. Since PR [#293](https://github.com/gridap/Gridap.jl/pull/293).
7884
- `DivConformingFESpace` and `CurlConformingFESpace` constructors eliminated. Since PR [#293](https://github.com/gridap/Gridap.jl/pull/293).
85+
- Extend table to support arbitrary vector types. Since PR [#310](https://github.com/gridap/Gridap.jl/pull/310).
7986

8087
### Fixed
8188

Project.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name = "Gridap"
22
uuid = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
33
authors = ["Santiago Badia <santiago.badia@monash.edu>", "Francesc Verdugo <fverdugo@cimne.upc.edu>"]
4-
version = "0.13.4"
4+
version = "0.14.0"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
88
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
9+
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
910
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa"
1011
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1112
FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838"
@@ -26,6 +27,7 @@ WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"
2627
[compat]
2728
AbstractTrees = "0.3.3"
2829
BSON = "0.2.5"
30+
BlockArrays = "0.12.12"
2931
Combinatorics = "1.0.0"
3032
DocStringExtensions = "0.8.1"
3133
FastGaussQuadrature = "0.4.2"
@@ -39,7 +41,7 @@ NLsolve = "4.3.0"
3941
QuadGK = "2.3.1"
4042
StaticArrays = "0.12.1"
4143
WriteVTK = "1.7"
42-
julia = "1.0"
44+
julia = "1.3"
4345

4446
[extras]
4547
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

bench/FieldsBenchs/FieldApplyBenchs.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ function bench1(n)
1818
v = 3.0
1919
d = 2
2020
f = MockField{d}(v)
21-
g = apply_kernel_to_field(bcast(+),f,v)
21+
g = operate_fields(+,f,v)
2222
cg = field_cache(g,x)
2323
@time repeat(n,evaluate!,cg,g,x)
2424
∇g = gradient(g)
2525
∇cg = field_cache(∇g,x)
2626
@time repeat(n,evaluate!,∇cg,∇g,x)
27-
h = apply_kernel_to_field(bcast(+),f,f)
27+
h = operate_fields(+,f,f)
2828
ch = field_cache(h,x)
2929
@time repeat(n,evaluate!,ch,h,x)
3030
end

bench/FieldsBenchs/FieldArraysBenchs.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function bench1(n)
3333
afx = evaluate(af,ax)
3434
cafx = array_cache(afx)
3535
@time loop(afx,cafx)
36-
ag = apply_to_field_array(bcast(+),af,af)
36+
ag = operate_arrays_of_fields(+,af,af)
3737
cag = array_cache(ag)
3838
@time loop(ag,cag)
3939
agx = evaluate(ag,ax)
@@ -58,7 +58,7 @@ function bench2(n)
5858
afx = evaluate(af,ax)
5959
cafx = array_cache(afx)
6060
@time loop(afx,cafx)
61-
_ag = apply_to_field_array(bcast(+),af,af)
61+
_ag = operate_arrays_of_fields(+,af,af)
6262
ag = gradient(_ag)
6363
cag = array_cache(ag)
6464
@time loop(ag,cag)
@@ -85,7 +85,7 @@ function bench2a(n)
8585
afx = evaluate(af,ax)
8686
cafx = array_cache(afx)
8787
@time loop(afx,cafx)
88-
_ag = apply_to_field_array(bcast(+),af,av)
88+
_ag = operate_arrays_of_fields(+,af,av)
8989
ag = gradient(_ag)
9090
cag = array_cache(ag)
9191
@time loop(ag,cag)
@@ -115,7 +115,7 @@ function bench3(n)
115115
afx = evaluate(af,ax)
116116
cafx = array_cache(afx)
117117
@time loop(afx,cafx)
118-
ag = apply_to_field_array(bcast(+),af,aw)
118+
ag = operate_arrays_of_fields(+,af,aw)
119119
cag = array_cache(ag)
120120
@time loop(ag,cag)
121121
agx = evaluate(ag,ax)

bench/FieldsBenchs/FieldOperationsBenchs.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ function bench1(n)
3737
aba = Fill(ba,l)
3838
abb = Fill(bb,l)
3939

40-
ag_ff = field_array_operation(inner,afa,afb)
40+
ag_ff = operate_arrays_of_fields(inner,afa,afb)
4141
agx_ff = evaluate(ag_ff,ax)
4242
cagx_ff = array_cache(agx_ff)
4343
@time loop(agx_ff,cagx_ff)
4444

45-
ag_bf = field_array_operation(inner,aba,afb)
45+
ag_bf = operate_arrays_of_fields(inner,aba,afb)
4646
agx_bf = evaluate(ag_bf,ax)
4747
cagx_bf = array_cache(agx_bf)
4848
@time loop(agx_bf,cagx_bf)
4949

50-
ag_bb = field_array_operation(inner,aba,abb)
51-
agx_bb = evaluate(ag_bb,ax)
52-
cagx_bb = array_cache(agx_bb)
53-
@time loop(agx_bb,cagx_bb)
50+
#ag_bb = operate_arrays_of_fields(inner,aba,abb)
51+
#agx_bb = evaluate(ag_bb,ax)
52+
#cagx_bb = array_cache(agx_bb)
53+
#@time loop(agx_bb,cagx_bb)
5454

5555
end
5656

bench/FieldsBenchs/IntegrateBenchs.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ function bench3(n)
7979
ar = Fill(r,l)
8080
ab = attachmap(ar,aϕ)
8181

82-
fmass = field_array_operation(inner,ab,ab)
82+
fmass = operate_arrays_of_fields(inner,ab,ab)
8383
mmass = integrate(fmass,ax,aw,aj)
8484

8585
cmmass = array_cache(mmass)
8686
@time loop(mmass,cmmass)
8787

88-
fstif = field_array_operation(inner,(ab),(ab))
88+
fstif = operate_arrays_of_fields(inner,(ab),(ab))
8989
mstif = integrate(fstif,ax,aw,aj)
9090

9191
cmstif = array_cache(mstif)

docs/src/Geometry.md

-13
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,6 @@ RestrictedDiscreteModel
340340

341341
## CellFields
342342

343-
### CellFieldLike interface
344-
```@docs
345-
CellFieldLike
346-
get_array(cf::CellFieldLike)
347-
get_cell_map(cf::CellFieldLike)
348-
similar_object(cf::CellFieldLike,array::AbstractArray)
349-
similar_object(cf1::CellFieldLike,cf2::CellFieldLike,array::AbstractArray)
350-
gradient(cf::CellFieldLike)
351-
grad2curl(cf::CellFieldLike)
352-
test_cell_field_like
353-
evaluate(cf::CellFieldLike,x)
354-
length(cf::CellFieldLike)
355-
```
356343
### CellField interface
357344

358345
```@docs

src/Algebra/LinearSolvers.jl

+8
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,18 @@ struct AffineOperator{A<:AbstractMatrix,B<:AbstractVector} <: NonlinearOperator
1111
end
1212

1313
"""
14+
get_matrix(operator)
15+
16+
Return the matrix corresponding to the assembled left hand side of the operator.
17+
This matrix incorporates all boundary conditions and constraints.
1418
"""
1519
get_matrix(op::AffineOperator) = op.matrix
1620

1721
"""
22+
get_vector(operator)
23+
24+
Return the vector corresponding to the assembled right hand side of the operator.
25+
This vector includes all boundary conditions and constraints.
1826
"""
1927
get_vector(op::AffineOperator) = op.vector
2028

src/Arrays/Arrays.jl

+24
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,28 @@ module Arrays
1212

1313
using Gridap.Helpers
1414
using Gridap.Inference
15+
using Gridap.Algebra
1516

1617
using DocStringExtensions
1718
using Test
1819
using FillArrays
1920
using Base: @propagate_inbounds
2021
using LinearAlgebra
2122
using ForwardDiff
23+
using BlockArrays
24+
25+
export BlockArrayCoo
26+
export BlockVectorCoo
27+
export BlockMatrixCoo
28+
export is_zero_block
29+
export is_nonzero_block
30+
export enumerateblocks
31+
export eachblockindex
32+
export VectorOfBlockArrayCoo
33+
export VectorOfBlockVectorCoo
34+
export VectorOfBlockMatrixCoo
35+
export zeros_like
36+
export TwoLevelBlockedUnitRange
2237

2338
export array_cache
2439
export getindex!
@@ -37,6 +52,7 @@ export CachedArray
3752
export CachedMatrix
3853
export CachedVector
3954
export setsize!
55+
export setaxes!
4056

4157
export CompressedArray
4258
export LocalToGlobalArray
@@ -52,6 +68,8 @@ export test_kernel
5268
export bcast
5369
export elem
5470
export contract
71+
export MulKernel
72+
export MulAddKernel
5573
export kernel_return_type
5674
export kernel_return_types
5775
export kernel_testitem
@@ -103,8 +121,12 @@ import Base: IndexStyle
103121
import Gridap.Io: to_dict
104122
import Gridap.Io: from_dict
105123

124+
import Gridap.Algebra: scale_entries!
125+
106126
include("Interface.jl")
107127

128+
include("BlockArraysCoo.jl")
129+
108130
include("CachedArrays.jl")
109131

110132
include("Kernels.jl")
@@ -131,6 +153,8 @@ include("ArrayPairs.jl")
131153

132154
include("AppendedArrays.jl")
133155

156+
include("VectorsOfBlockArrayCoo.jl")
157+
134158
include("Autodiff.jl")
135159

136160
end # module

0 commit comments

Comments
 (0)