Closed simonempeter closed 7 months ago
Can you provide a sample file here? This looks like a part of the TopOpt code that wasn't tested and is throwing a runtime error. If you provide a test file, I will be happy to look into it.
Please find the sample files attached. Using the predefined problem formulation, the code runs; however, with the geometry definition via MBB.inp, it throws the error above. MBB.inp.txt MBB_min_volume_testfile.txt
I'm trying to use my own problem definition with a .inp file. However, I get the following error message when trying to run the topology optimization:
ERROR: UndefVarError: "sumdiag" not defined
I get reasonable results using the provided problem formulations, so I assume I got something wrong in my .inp file definition. I defined it with the following structure
*Heading ** Job name: SampleAnalysis Model name: Model-1 *Preprint, echo=NO, model=NO, history=NO, contact=NO *Node, NSET=Nall 1, 0.0, 0.0 2, 1.0, 0.0 3, 1.0, 1.0 4, 0.0, 1.0 *Element, TYPE=CPS4, ELSET=EALL 1, 1, 2, 3, 4 *MATERIAL, NAME=Steel *ELASTIC 210000, 0.3 *NSET, NSET=roller_support 1 *NSET, NSET=fixed_support 2 *BOUNDARY roller_support, 1 fixed_support, 1 fixed_support, 2 *CLOAD 3, 2, -3 *End Step
and printing the content of it with
problem = InpStiffness(filename); print(problem.inp_content)
gives me the following result
TopOpt.TopOptProblems.InputOutput.INP.Parser.InpContent{2, Float64, 4, Int64}([(0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0)], "CPS4", [(1, 2, 3, 4)], Dict("fixed_support" => [2], "roller_support" => [1]), Dict("EALL" => [1]), 210000.0, 0.3, 0.0, Dict("fixed_support" => [(1, 0.0), (2, 0.0)], "roller_support" => [(1, 0.0)]), Dict{Int64, Vector{Float64}}(), Dict{String, Vector{Tuple{Int64, Int64}}}(), Dict{String, Float64}())
If I understand it correctly, it looks like the loads are not being input correctly? That's why I assumed the problem lies in the .inp file structure.