sjbronkhorst / Stripper

2 stars 0 forks source link

S-S Strip not working from UI #2

Closed sjbronkhorst closed 9 years ago

sjbronkhorst commented 9 years ago

Deflections of a S-S model cannot be calculated from UI because:

a) Strips read from a file are automatically initialized as Strip_General type whereas for S-S case they need to be Strip_SS type.

b) The solver sees Series_SS was chosen and then assumes that the strips are of type Strip_SS

EatonEmmerich commented 9 years ago

In what function and file is this happening? TIP: you can link the file as https://github.com/sjbronkhorst/Stripper/blame/master/src/stripper/series/Integrator.java.

sjbronkhorst commented 9 years ago

Part a is caused by https://github.com/sjbronkhorst/Stripper/blame/master/src/stripper/FileHandler.java line 132 Part b caused by https://github.com/sjbronkhorst/Stripper/blame/master/src/UI/SystemEquation.java line 102 to 126

EatonEmmerich commented 9 years ago

for part A: define as an object of type Strip (superclass for both Strip_general and Strip_SS) whereafter the class can be specifeid by casting with constructor. so probably something like: in file handler:

\\Create object upon reading
strips.add(new Strip(n1, n2));

when you know what type the object must be Strip_SS:

strips[i]=new Strip_SS(strips[i]);

This will require a constructor for Strips_SS of prototype: public Strip_SS(Strip myparentObject);

What is the basic rule that requires Strip_SS and Strip_General to be seperate classes?

sjbronkhorst commented 9 years ago

Strip_SS assumes S-S boundary conditions and because of this assumption the stiffness matrix can be simplified to not include integrals -> this increases performance because all integrals are done numerically using iterative gaussian quadrature which is an expensive procedure. The program should automatically use Strip_SS types in the case of S-S boundary conditions and Strip_General types for anything else. I fixed the problem by introducing UIStrip -> a dummy strip that only saves everything that will later be added to a Strip_SS or Strip_General. Then in Strip_SS and Strip_General I added a constructor eg Strip_SS(UI Strip uistrip) so either Strip_SS types or Strip_General type can be created from dummy UIStrip type. This also keeps model and viewer "more " seperate.