-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
Errors arise if I run (as written in some of the example scripts)
using Pkg
using JuliaFEM
import JuliaFEM
import JuliaFEM: assemble!, get_unknown_field_name, Problem::FieldProblem
type Truss <: FieldProblem
end
function get_unknown_field_name(problem::Problem{Truss})
return "displacement"
end
A working alternative seems to be:
"""
Problem u(X) = u₀ in Γ(d)
"""
mutable struct Dirichlet <: BoundaryProblem
formulation :: Symbol
variational :: Bool
dual_basis :: Bool
order :: Int
end
function Dirichlet()
Dirichlet(:incremental, false, false, 1)
end
""" Return dual basis transformation matrix Ae. """
function get_dualbasis(element::Element, time::Float64, order=1)
nnodes = length(element)
De = zeros(nnodes, nnodes)
Me = zeros(nnodes, nnodes)
for ip in get_integration_points(element, order)
detJ = element(ip, time, Val{:detJ})
w = ip.weight*detJ
N = element(ip, time)
De += w*Matrix(Diagonal(vec(N)))
Me += w*N'*N
end
return De, Me, De*inv(Me)
end
function get_formulation_type(problem::Problem{Dirichlet})
return problem.properties.formulation
end(as listed in the Dirichlet problem .jl file)
Please let me know if I missed something.
Thanks,
Charles
Metadata
Metadata
Assignees
Labels
No labels