mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-20 18:18:31 +00:00
Implement new function add_elements!
Add new elements to the problem.
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ export add!, SparseMatrixCOO, SparseVectorCOO, get_nonzero_rows, get_nonzero_col
|
||||
include("problems.jl") # common problem routines
|
||||
export Problem, AbstractProblem, FieldProblem, BoundaryProblem,
|
||||
get_unknown_field_dimension, get_gdofs, Assembly,
|
||||
get_parent_field_name, get_elements
|
||||
get_parent_field_name, get_elements, add_elements!
|
||||
|
||||
include("problems_elasticity.jl")
|
||||
export Elasticity
|
||||
|
||||
+12
-1
@@ -8,7 +8,7 @@ abstract type MixedProblem<:AbstractProblem end
|
||||
|
||||
"""
|
||||
General linearized problem to solve
|
||||
(K₁+K₂)Δu + C1'*Δλ = f₁+f₂
|
||||
(K₁+K₂)Δu + C1*Δλ = f₁+f₂
|
||||
C2Δu + D*Δλ = g
|
||||
"""
|
||||
type Assembly
|
||||
@@ -274,6 +274,17 @@ function update!{P<:BoundaryProblem}(problem::Problem{P}, assembly::Assembly, el
|
||||
end
|
||||
end
|
||||
|
||||
"""
|
||||
add_elements!(problem::Problem, elements)
|
||||
|
||||
Add new elements into the problem.
|
||||
"""
|
||||
function add_elements!(problem::Problem, elements)
|
||||
for element in elements
|
||||
push!(problem.elements, element)
|
||||
end
|
||||
end
|
||||
|
||||
function get_elements(problem::Problem)
|
||||
return problem.elements
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user