mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-20 18:18:31 +00:00
if number of shape functions differs from length of field, use length of shape functions (or length of partial derivatives of them) in interpolation, this makes it possible to have longer fields, helping defining elements with variable number of shape functions.
This commit is contained in:
+5
-5
@@ -231,14 +231,13 @@ function Base.:*(N::Matrix, f::DCTI)
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
|
||||
# Multiply DVTI field with another vector T. Vector length
|
||||
# must match to the field length and this can be used mainly
|
||||
# for interpolation purposes, i.e., u = ∑ Nᵢuᵢ
|
||||
#
|
||||
function Base.:*(T::Vector, f::DVTI)
|
||||
@assert length(T) == length(f)
|
||||
return sum([T[i]*f[i] for i=1:length(f)])
|
||||
@assert length(T) <= length(f)
|
||||
return sum([T[i]*f[i] for i=1:length(T)])
|
||||
end
|
||||
|
||||
function vec(field::DVTI)
|
||||
@@ -416,7 +415,8 @@ function (basis::CVTI)(xi::Vector, time::Number)
|
||||
end
|
||||
|
||||
function Base.:*(grad::Matrix, field::DVTI)
|
||||
return sum([kron(grad[:,i], field[i]') for i=1:length(field)])'
|
||||
n, m = size(grad)
|
||||
return sum([kron(grad[:,i], field[i]') for i=1:m])'
|
||||
end
|
||||
|
||||
function DVTV(data::Pair{Float64, Vector}...)
|
||||
|
||||
Reference in New Issue
Block a user