Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xbeam/sharpy load ramping in nonlinearstatic solver #191

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
update gen_main to take the new routines framework based on classes
  • Loading branch information
ACea15 committed Feb 14, 2022
commit 0fdeb3555ce684cee290b3551898f9f5cd33d0e5
9 changes: 8 additions & 1 deletion cases/models_generator/gen_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,14 @@ def __init__(self, sim_type, settings_sim={}, case_route='', case_name=''):
@staticmethod
def sharpy_defaults(default_module, default_solution, default_solution_vars):
module = importlib.import_module(default_module)
solution = getattr(module, default_solution)
if hasattr(module, default_solution):
solution = getattr(module, default_solution)
elif hasattr(module, default_module.split('.')[-1].capitalize()):
class_sol = getattr(module, default_module.split('.')[-1].capitalize())
class_inst = class_sol()
solution = getattr(class_inst, default_solution)
else:
raise NameError('default_module and default_solution not found')
flow, settings = solution(**default_solution_vars)

return flow, settings
Expand Down