Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gridap/Gridap.jl into release_0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
amartinhuertas committed Oct 14, 2021
2 parents 17e573f + 9995bea commit 44af28b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Want to help? We have a number of [issues waiting for help](https://github.com/g

## How to cite Gridap

In order to give credit to the `Gridap` contributors, we simply ask you to cite the reference below in any publication in which you have made use of `Gridap` packages:
In order to give credit to the `Gridap` contributors, we simply ask you to cite the reference below in any publication in which you have made use of the `Gridap` project. If you are using other `Gridap` sub-packages, please cite them as indicated in their repositories.

```
@article{Badia2020,
Expand Down
5 changes: 3 additions & 2 deletions src/Arrays/PosNegReindex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ end

function pos_and_neg_length(i_to_iposneg)
Npos = maximum(i_to_iposneg)
Nneg = -minimum(i_to_iposneg)
Npos==-1 ? 0 : Npos , Nneg
Nneg = minimum(i_to_iposneg)
Nneg = Nneg == 1 ? 0 : -Nneg
Npos == -1 ? 0 : Npos , Nneg
end

function is_exhaustive(i_to_iposneg)
Expand Down
3 changes: 2 additions & 1 deletion test/ArraysTests/PosNegReindexTests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module PosNegReindexTests

using Test
using Gridap
using Gridap.Arrays
using Gridap.TensorValues

Expand Down Expand Up @@ -120,7 +121,7 @@ b = lazy_map(PosNegReindex(b_pos,b_neg),b_i)
c = lazy_map(+,a,b)
test_array(c,map(+,a,b))


@test Gridap.Arrays.pos_and_neg_indices([1,2,3,4]) == ([1,2,3,4],Int[])

## Testing some cases where PosNegReindex can be type-instable
#
Expand Down

0 comments on commit 44af28b

Please sign in to comment.