testing test

This commit is contained in:
Jukka Aho
2015-06-22 23:19:10 +03:00
parent 6a317f0f5b
commit b9f308aee3
3 changed files with 136 additions and 74 deletions
-74
View File
@@ -38,30 +38,6 @@ end
@doc """
Create new field to model.
Parameters
----------
field_type : Dict()
Target topology (model.model, model.nodes, model.elements,
model.element_nodes, model.element_gauss
field_name : str
Field name
Returns
-------
Dict
New field
""" ->
function new_field(field_type, field_name)
d = Dict()
setindex!(field_type, d, field_name)
return d
end
@doc """Get field from model.
@@ -96,56 +72,6 @@ end
@doc """Add new nodes to model.
Parameters
----------
nodes : Dict()
id => coords
Returns
-------
model
Notes
-----
Create new field "coords" to model if not found
""" ->
function add_nodes(model, nodes)
#pri("Adding ", length(nodes), " nodes to model")
field = get_field(model.nodes, "coords"; create_if_doesnt_exist=true)
for (node_id, coords) in nodes
field[node_id] = coords
end
end
@doc """Return subset of nodes from model.
Parameters
----------
node_ids : array
list of node ids to return
Returns
-------
Dict()
id => coords
""" ->
function get_nodes(model, node_ids)
subset = Dict()
for node_id in node_ids
subset[node_id] = model.nodes["coords"][node_id]
end
return subset
end
@doc """Add new elements to model.
Parameters
----------