mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-10 22:06:40 +00:00
docstrings + 0.5
This commit is contained in:
+9
-10
@@ -10,10 +10,13 @@ abstract Variable <: AbstractField
|
||||
abstract TimeVariant <: AbstractField
|
||||
abstract TimeInvariant <: AbstractField
|
||||
|
||||
|
||||
type Field{A<:Union{Discrete,Continuous}, B<:Union{Constant,Variable}, C<:Union{TimeVariant,TimeInvariant}}
|
||||
data
|
||||
end
|
||||
|
||||
typealias FieldSet Dict{ASCIIString, Field}
|
||||
|
||||
### Basic data structure for discrete field
|
||||
|
||||
type Increment{T}
|
||||
@@ -210,20 +213,20 @@ function Base.(:-)(f1::DVTI, f2::DVTI)
|
||||
return DVTI(f1.data - f2.data)
|
||||
end
|
||||
|
||||
""" Multiply DCTI field with a constant ``c``. """
|
||||
function Base.(:*){T<:Real}(c::T, field::DVTI)
|
||||
return DVTI(c*field.data)
|
||||
end
|
||||
|
||||
""" Interpolate with basis functions. """
|
||||
function Base.(:*)(N::Matrix, f::DCTI)
|
||||
return f.data*N'
|
||||
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ᵢ
|
||||
"""
|
||||
|
||||
#
|
||||
# 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)])
|
||||
@@ -407,7 +410,3 @@ function Base.(:*)(grad::Matrix, field::DVTI)
|
||||
return sum([kron(grad[:,i], field[i]') for i=1:length(field)])'
|
||||
end
|
||||
|
||||
### FIELDSET ###
|
||||
|
||||
typealias FieldSet Dict{ASCIIString, Field}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user