Skip to content

Commit

Permalink
Replace some rarely used functions (#188)
Browse files Browse the repository at this point in the history
- `empty!(problem)` -> `empty!(problem.assembly)`
- `get_gdofs(element, ndim)` -> `get_gdofs(problem, element)`
  • Loading branch information
ahojukka5 authored Feb 8, 2018
1 parent d2d860c commit b950ba3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/problems_contact_2d_autodiff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function assemble!(problem::Problem{Contact}, time::Float64,
for element in slave_elements
conn = get_connectivity(element)
push!(S, conn...)
gdofs = get_gdofs(element, field_dim)
gdofs = get_gdofs(problem, element)
X_el = element("geometry", time)
x_el = tuple( (X_el[i] + u[:,j] for (i,j) in enumerate(conn))... )
#=
Expand Down Expand Up @@ -220,8 +220,8 @@ function assemble!(problem::Problem{Contact}, time::Float64,
l = 1/2*abs(xi1[2]-xi1[1])
isapprox(l, 0.0) && continue # no contribution in this master element

slave_dofs = get_gdofs(slave_element, field_dim)
master_dofs = get_gdofs(master_element, field_dim)
slave_dofs = get_gdofs(problem, slave_element)
master_dofs = get_gdofs(problem, master_element)

# 4. loop integration points of segment
for ip in get_integration_points(slave_element, 3)
Expand Down
2 changes: 1 addition & 1 deletion src/problems_dirichlet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function assemble!(assembly::Assembly, problem::Problem{Dirichlet},
nnodes = length(element)
field_dim = get_unknown_field_dimension(problem)
field_name = get_parent_field_name(problem)
gdofs = get_gdofs(element, field_dim)
gdofs = get_gdofs(problem, element)
props = problem.properties

if problem.properties.dual_basis
Expand Down
2 changes: 1 addition & 1 deletion test/test_heat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ end
# Set constant flux g=6 on boundary. Accurate solution is
# u(x,y) = x which equals T=1 on boundary.
# at time t=1.0 all loads should be on.
empty!(problem)
empty!(problem.assembly)
assemble!(problem, 1.0)
A = full(problem.assembly.K)
b = full(problem.assembly.f)
Expand Down

0 comments on commit b950ba3

Please sign in to comment.