Skip to content

Extract logging from GMGPolar class #170

@EmilyBourne

Description

@EmilyBourne

The GMGPolar class contains lots of logic that is only useful for debugging or testing. Namely:

  • print statements
  • code related to the exact solution

Currently these objects are excluded using if (verbose). The presence of an exact solution is known at compile-time so it is a shame to check this dynamically repeatedly over the course of a simulation.

I think everything related to exact_solution_ can be extracted to a separate class and only used for testing. The only thing preventing that currently is that exact_solution_ is used in the printing. I see 2 possible solutions for this:

  1. Change the format of the print output so the things related to the exact solution are printed on a separate line that can be handled with the exact_solution_ object
  2. Add a logger class that can take different forms depending on the requirements of the simulation, e.g.:
    • Empty logger, no output
    • Output to log file/cout
    • Ouptut with/without exact_solution_ information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions