@@ -23,7 +23,7 @@ using Base.Threads
23
23
revrot (hk:: Chain{V,1} ,f= identity) where V = Chain {V,1} (- f (hk[2 ]),f (hk[1 ]))
24
24
25
25
function gradienthat (t,m= volumes (t))
26
- N = ndims (Manifold (t))
26
+ N = mdims (Manifold (t))
27
27
if N == 2 # inv.(m)
28
28
V = Manifold (points (t))
29
29
c = Chain {↓(V),1} .(inv .(m))
@@ -70,7 +70,7 @@ assembleglobal(M,t,m=volumes(t),c=1,g=0) = assembleglobal(M,t,iterable(t,m),iter
70
70
function assembleglobal (M,t,m:: T ,c:: C ,g:: F ) where {T<: AbstractVector ,C<: AbstractVector ,F<: AbstractVector }
71
71
np = length (points (t)); A = spzeros (np,np)
72
72
for k ∈ 1 : length (t)
73
- assemblelocal! (A,M (c[k],g[k],Val (ndims (Manifold (t)))),m[k],value (t[k]))
73
+ assemblelocal! (A,M (c[k],g[k],Val (mdims (Manifold (t)))),m[k],value (t[k]))
74
74
end
75
75
return A
76
76
end
99
99
function incidence (t,cols= columns (t))
100
100
np,nt = length (points (t)),length (t)
101
101
A = spzeros (Int,np,nt)
102
- for i ∈ Grassmann. list (1 ,ndims (Manifold (t)))
102
+ for i ∈ Grassmann. list (1 ,mdims (Manifold (t)))
103
103
A += sparse (cols[i],1 : nt,1 ,np,nt)
104
104
end
105
105
return A
106
106
end # node-element incidence, A[i,j]=1 -> i∈t[j]
107
107
108
108
assemblemassfunction (t,f,m= volumes (t),l= m,d= degrees (t)) = assemblemassfunction (t,iterpts (t,f),iterable (t,m),iterable (t,l),iterpts (t,d))
109
109
function assemblemassfunction (t,f:: F ,m:: V ,l:: T ,d:: D ) where {F<: AbstractVector ,V<: AbstractVector ,T<: AbstractVector ,D<: AbstractVector }
110
- np,n = length (points (t)),Val (ndims (Manifold (t)))
110
+ np,n = length (points (t)),Val (mdims (Manifold (t)))
111
111
M,b,v = spzeros (np,np), zeros (np), f./ d
112
112
for k ∈ 1 : length (t)
113
113
tk = value (t[k])
@@ -158,7 +158,7 @@ function assembledivergence(t,m,g)
158
158
D1,D2 = spzeros (nt,np), spzeros (nt,np)
159
159
for k ∈ 1 : length (t)
160
160
tk,gm = value (t[k]),g[k]* m[k]
161
- for i ∈ 1 : ndims (Manifold (t))
161
+ for i ∈ 1 : mdims (Manifold (t))
162
162
D1[k,tk[i]] = gm[i][1 ]
163
163
D2[k,tk[i]] = gm[i][2 ]
164
164
end
@@ -246,7 +246,7 @@ const solveboundary = solvedirichlet # deprecate
246
246
const edgelengths = volumes # deprecate
247
247
const boundary = pointset # deprecate
248
248
249
- facesindices (t,cols= columns (t)) = ndims (t) == 3 ? edgesindices (t,cols) : throw (error ())
249
+ facesindices (t,cols= columns (t)) = mdims (t) == 3 ? edgesindices (t,cols) : throw (error ())
250
250
251
251
function edgesindices (t,cols= columns (t))
252
252
np,nt = length (points (t)),length (t)
@@ -262,7 +262,7 @@ function neighbor(k::Int,ab...)::Int
262
262
end
263
263
264
264
@generated function neighbors (A:: SparseMatrixCSC ,V,tk,k)
265
- N,F = ndims (Manifold (V)),(x-> x> 0 )
265
+ N,F = mdims (Manifold (V)),(x-> x> 0 )
266
266
N1 = Grassmann. list (1 ,N)
267
267
x = Values {N} ([Symbol (:x ,i) for i ∈ N1])
268
268
f = Values {N} ([:(findall ($ F,A[:,tk[$ i]])) for i ∈ N1])
274
274
function neighbors (t,n2e= incidence (t))
275
275
V,A = Manifold (Manifold (t)),sparse (n2e' )
276
276
nt = length (t)
277
- n = Chain{V,1 ,Int,ndims (V)}[]; resize! (n,nt)
277
+ n = Chain{V,1 ,Int,mdims (V)}[]; resize! (n,nt)
278
278
@threads for k ∈ 1 : nt
279
279
n[k] = neighbors (A,V,t[k],k)
280
280
end
@@ -322,7 +322,7 @@ function nedelecmean(t,t2e,signs,u)
322
322
end
323
323
324
324
function jumps (t,c,a,f,u,m= volumes (t),g= gradienthat (t,m))
325
- N,np,nt = ndims (Manifold (t)),length (points (t)),length (t)
325
+ N,np,nt = mdims (Manifold (t)),length (points (t)),length (t)
326
326
η = zeros (nt)
327
327
if N == 2
328
328
fau = iterable (points (t),f).- a* u
0 commit comments