Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Int64 type definition from Problem #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ General linearized problem to solve
(K₁+K₂)Δu + C1'*Δλ = f₁+f₂
C2Δu + D*Δλ = g
"""

type Assembly

M :: SparseMatrixCOO # mass matrix
Expand Down Expand Up @@ -103,10 +104,10 @@ julia> prob1 = Problem(Elasticity, "this is my problem", 3)
julia> prob2 = Problem(Elasticity, 3)

"""
function Problem{P<:FieldProblem}(::Type{P}, name::AbstractString, dimension::Int64)
function Problem{P<:FieldProblem, I<:Integer}(::Type{P}, name::AbstractString, dimension::I)
return Problem{P}(name, dimension, "none", [], Dict(), Assembly(), Dict(), Vector(), P())
end
function Problem{P<:FieldProblem}(::Type{P}, dimension::Int64)
function Problem{P<:FieldProblem, I<:Integer}(::Type{P}, dimension::I)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can make this dimension::Integer to make it more succinct.

return Problem(P, "$P problem", dimension)
end

Expand Down