Giter Club home page Giter Club logo

Comments (4)

kburns avatar kburns commented on June 4, 2024

Original comment by Benjamin Brown (Bitbucket: Benjamin Brown).


Implementing this in integrator looks like it requires adding a verbosity flag to the integrator call:

#!python
    def __init__(self, problem, domain, timestepper, verbose=True):

        # Input parameters
        self.problem = problem
        self.domain = domain

        # Output control
        self.verbose = verbose

and then in the ok(): def:

#!python
    @property
    def ok(self):
        if self.time >= self.sim_stop_time:
            ok_flag = False
            if (self.verbose): print('Simulation stop time reached.')
        elif (time.time() - self.start_time) >= self.wall_stop_time:
            ok_flag = False
            if (self.verbose): print('Wall stop time reached.')
        elif self.iteration >= self.stop_iteration:
            ok_flag = False
            if (self.verbose): print('Stop iteration reached.')
        else:
            ok_flag = True

        return ok_flag

This implementation appears to work.

from dedalus.

kburns avatar kburns commented on June 4, 2024

Original comment by J. S. Oishi (Bitbucket: jsoishi).


That will work, but a better way would be to have a code-wide verbose flag
using the not-yet-ported from Dedalus 1 configuration subsystem.

from dedalus.

kburns avatar kburns commented on June 4, 2024

Original comment by Keaton Burns (Bitbucket: kburns).


More specifically I'm planning on moving these messages to a logging handler (something like the Dedalus1 version, as well), with a global configuration system like Jeff mentioned that will control what log levels are printed, etc.

from dedalus.

kburns avatar kburns commented on June 4, 2024

Original comment by Keaton Burns (Bitbucket: kburns).


  • changed state from "new" to "resolved"

As of commit acc2cd1, these messages are passed as "info" calls to the logger. Logging levels can be configured for the desired level of verbosity.

from dedalus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.