ONSAS / ONSAS.jl

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

Split examples into model and tests #366

Closed mforets closed 11 months ago

mforets commented 1 year ago

Split eg. run_uniaxial_compression() into two separate functions such that the structure (maybe the analysis) can be obtained independently of the tests.

Files to revamp:

mvanzulli commented 1 year ago

Okay, we can open an issue to implement this function splitting across the examples. Also, there should be two functions to create the structure: manufactured and via Gmsh.

mvanzulli commented 1 year ago

This examples revamp should remove sub indexes unicode fonts, as sugested @jorgepz

mvanzulli commented 1 year ago

abstract type AbstractCase end
struct FirstCase <: AbstractCase end
struct SecondCase <: AbstractCase end

....
# Implement solve and test for many cases. Note the cases can dispatch on tests too. 
....

"Run the example"
function run()
    for case in (FirstCase(), SecondCase())
        sol = solve(case)
        test(sol, case)
    end
end