ONSAS / ONSAS.jl

An Open Nonlinear Structural Analysis Solver in Julia
MIT License
7 stars 1 forks source link

Revamp clamped truss example #445

Closed mvanzulli closed 1 year ago

mvanzulli commented 1 year ago

Closes a subtask from #366.

Please if the reviewer finds this structure useful I would define it in the issue for the remaining examples to refactor.

mforets commented 1 year ago

Please if the reviewer finds this structure useful I would define it in the issue for the remaining examples to refactor.

i think it makes sense. we can later abstract the common testing utilities, since the way you wrote them, it is likely we can define a generic run method for structural problems.

mvanzulli commented 1 year ago

Please if the reviewer finds this structure useful I would define it in the issue for the remaining examples to refactor.

i think it makes sense. we can later abstract the common testing utilities, since the way you wrote them, it is likely we can define a generic run method for structural problems.

Indeed, let's see if this run signature works for other examples. Do you think we need a singleton for the Example

example = ClampedTruss()

....

function run(example::AbstractExample)
      sol = solve(example)
      test(example, sol)
end
mforets commented 1 year ago

yes, that lgtm