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

Default clock sequence #275

Open
subhacom opened this issue Jun 6, 2023 · 2 comments
Open

Default clock sequence #275

subhacom opened this issue Jun 6, 2023 · 2 comments
Assignees
Labels

Comments

@subhacom
Copy link
Collaborator

subhacom commented Jun 6, 2023

In older versions, one needed to set the timestep (dt) for the various clock ticks and assign them to specific function (process/init) in classes/objects selected by wildcard in order to run things in a desired order.

The setDefaultDt and assignDefaultTicks in moose.utility submodule were written by Aditya (Gilra) and others as wrappers over setClock and useClock to facilitate this.

IIRC, there were plans to automate the setup and assignment of these clockticks. However, if I try to simulate the cells from Traub 2005 model now, I get flat lines, which is usually a symptom of incorrect/absent clocktick assignment. The useClock and setClock docs do not seem to have changes. So I am wondering what is the ideal way to setup clockticks now.

Also, the moose.utility submodule has become disfunctional now as it uses the parser module, which has been deprecated.

@upibhalla
Copy link
Contributor

Hi, Subha,
There is already a reasonable set of default dt assigned to each clock tick in the C++ code. In almost all cases, this will allow simulations to run reasonably without any attention to the setclock and useclock functions.
If you can point me to the scripts in the Traub2005 model that are not working, I'll see why they are flatlining.
I think the moose.utility submodule can be deprecated.
-- Upi

@subhacom
Copy link
Collaborator Author

subhacom commented Jun 6, 2023

I made some fixes to replace PyQt4 dependency with PyQt5 in the examples:
https://github.com/subhacom/moose-examples
The issue can be seen by running the moose-examples/traub_2005/py/gui.py

The following function in that file sets up the simulation (line 359 ff):

    def simulateSelected(self):
        cellnames = [str(c.text()) for c in self.cellListWidget.selectedItems()]
        assert(len(cellnames) == 1)        
        name = cellnames[0]
        params = self.createCell(name)
        # hsolve = moose.HSolve('%s/solver' % (params['cell'].path))
        # hsolve.dt = simdt
        # hsolve.target = params['cell'].path
        # setDefaultDt(elecdt=simdt, plotdt2=plotdt)
        # assignDefaultTicks(modelRoot=params['modelRoot'],
        #                           dataRoot=params['dataRoot'],
        #                           solver='hsolve')

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants