all tests pass now

This commit is contained in:
Jukka Aho
2016-07-03 21:16:03 +03:00
parent eec6db657d
commit 757ba2b3d9
52 changed files with 607 additions and 853 deletions
+16
View File
@@ -103,6 +103,9 @@ function get_field_assembly(solver::Solver; show_info=true)
M = sparse(M, solver.ndofs, solver.ndofs)
K = sparse(K, solver.ndofs, solver.ndofs)
if nnz(K) == 0
warn("Field assembly seems to be empty. Check that elements are pushed to problem and formulation is correct.")
end
Kg = sparse(Kg, solver.ndofs, solver.ndofs)
f = sparse(f, solver.ndofs, 1)
fg = sparse(fg, solver.ndofs, 1)
@@ -171,6 +174,14 @@ function get_boundary_assembly(solver::Solver)
return K, C1, C2, D, f, g
end
function resize!(A::SparseMatrixCSC, m::Int64, n::Int64)
(n == A.n) && (m == A.m) && return
@assert n >= A.n
@assert m >= A.m
append!(A.colptr, A.colptr[end]*ones(Int, m-A.m))
A.n = n
A.m = m
end
"""
Given C and g, construct new basis such that v = P*u + g
@@ -450,6 +461,11 @@ function NonlinearSolver(problems...)
end
return solver
end
function NonlinearSolver(name::ASCIIString, problems::Problem...)
solver = NonlinearSolver(problems...)
solver.name = name
return solver
end
### Linear quasistatic solver