mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-20 01:59:59 +00:00
moving code
This commit is contained in:
+10
-43
@@ -1,49 +1,6 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
||||
|
||||
# Functions to handle element level things -- integration, assembly, ...
|
||||
|
||||
type FieldAssembly
|
||||
mass_matrix :: SparseMatrixCOO
|
||||
stiffness_matrix :: SparseMatrixCOO
|
||||
force_vector :: SparseMatrixCOO
|
||||
end
|
||||
|
||||
function FieldAssembly()
|
||||
return FieldAssembly(
|
||||
SparseMatrixCOO(),
|
||||
SparseMatrixCOO(),
|
||||
SparseMatrixCOO())
|
||||
end
|
||||
|
||||
typealias Assembly FieldAssembly
|
||||
|
||||
"""
|
||||
"Boundary" matrices C₁, C₂, D, g for general problem type
|
||||
Au + C₁'λ = f
|
||||
C₂u + Dλ = g
|
||||
"""
|
||||
type BoundaryAssembly
|
||||
C1 :: SparseMatrixCOO
|
||||
C2 :: SparseMatrixCOO
|
||||
D :: SparseMatrixCOO
|
||||
g :: SparseMatrixCOO
|
||||
end
|
||||
|
||||
function BoundaryAssembly()
|
||||
return BoundaryAssembly(
|
||||
SparseMatrixCOO(),
|
||||
SparseMatrixCOO(),
|
||||
SparseMatrixCOO(),
|
||||
SparseMatrixCOO())
|
||||
end
|
||||
|
||||
function Base.empty!(assembly::Assembly)
|
||||
empty!(assembly.mass_matrix)
|
||||
empty!(assembly.stiffness_matrix)
|
||||
empty!(assembly.force_vector)
|
||||
end
|
||||
|
||||
function get_mass_matrix
|
||||
end
|
||||
|
||||
@@ -90,6 +47,16 @@ function get_gdofs(element::Element, dim::Int)
|
||||
return gdofs
|
||||
end
|
||||
|
||||
function get_gdofs(element::Element, problem::FieldProblem)
|
||||
dim = problem.dim
|
||||
return get_gdofs(element, dim)
|
||||
end
|
||||
|
||||
function get_gdofs(element::Element, problem::BoundaryProblem)
|
||||
dim = problem.parent_field_dim
|
||||
return get_gdofs(element, dim)
|
||||
end
|
||||
|
||||
""" Assemble element. """
|
||||
function assemble!(assembly::Assembly, problem::Problem, element::Element, time::Number)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user