2015-09-24 21:05:04 +03:00
|
|
|
# This file is a part of JuliaFEM.
|
|
|
|
|
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
|
|
|
|
|
|
|
|
|
abstract Problem
|
2015-10-09 23:45:28 +03:00
|
|
|
abstract BoundaryProblem <: Problem
|
|
|
|
|
abstract FieldProblem <: Problem
|
2015-09-24 21:05:04 +03:00
|
|
|
|
2015-10-27 06:37:58 +02:00
|
|
|
function get_equations(problem::Problem)
|
|
|
|
|
problem.equations
|
2015-10-20 15:54:47 +03:00
|
|
|
end
|
2015-09-24 21:05:04 +03:00
|
|
|
|
2015-10-27 06:37:58 +02:00
|
|
|
function get_unknown_field_dimension(problem::Problem)
|
|
|
|
|
problem.unknown_field_dimension
|
2015-09-24 21:05:04 +03:00
|
|
|
end
|
|
|
|
|
|
2015-10-27 06:37:58 +02:00
|
|
|
function get_unknown_field_name(problem::Problem)
|
|
|
|
|
problem.unknown_field_name
|
2015-09-24 21:05:04 +03:00
|
|
|
end
|
|
|
|
|
|
2015-10-27 06:37:58 +02:00
|
|
|
""" Add new element to problem. """
|
|
|
|
|
function Base.push!(problem::Problem, element::Element)
|
|
|
|
|
element_type = typeof(element)
|
|
|
|
|
equation_type = problem.element_mapping[element_type]
|
|
|
|
|
push!(problem.equations, equation_type(element))
|
2015-10-09 23:45:28 +03:00
|
|
|
end
|
|
|
|
|
|