-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Hopefully someday coming 2d implementation is in separate file beam2d.jl. - Instead of import FEMBase: <function>, use directly FEMBase.<function>
- Loading branch information
Showing
5 changed files
with
47 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This file is a part of JuliaFEM. | ||
# License is MIT: see https://github.com/JuliaFEM/FEMBeam.jl/blob/master/LICENSE | ||
|
||
type Beam2D <: FieldProblem | ||
end | ||
|
||
function FEMBase.get_unknown_field_name(::Problem{Beam2D}) | ||
return "displacement" | ||
end | ||
|
||
function FEMBase.assemble_elements!{B}(::Problem{Beam2D}, ::Assembly, | ||
elements::Vector{Element{B}}, ::Float64) | ||
|
||
for element in elements | ||
info("Not doing anything useful right now.") | ||
end | ||
|
||
return nothing | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This file is a part of JuliaFEM. | ||
# License is MIT: see https://github.com/JuliaFEM/FEMBeam.jl/blob/master/LICENSE | ||
|
||
using FEMBeam | ||
using FEMBase.Test | ||
beam_element = Element(Seg2, [1, 2]) | ||
problem = Problem(Beam2D, "test problem", 3) | ||
add_elements!(problem, [beam_element]) | ||
|
||
@test get_unknown_field_name(problem) == "displacement" | ||
@test assemble!(problem, 0.0) == nothing |