Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Simple file IO for grids not considered in examples #267

@Kalimer

Description

@Kalimer

I'm working on something based off of this example: https://sgpp.sparsegrids.org/docs/example_predictiveRefinement_py.html

I have a ModBSplineGrid and I've refined it to conform to a set error tolerance, with the coefficients from solving the hierarchisation in a separate DataVector. What is the simplest way to save this grid and load it from file to reuse later? There does not seem to be a generic (whatever grid you happen to be working with).save(filename) or .load(filename).

A GridDataBase (my best guess right now)? Or a Checkpoint? Or break everything up into DataMatrix's and DataVector's and save those? But how do I reinstate my grid from these?
I'm probably just not "seeing the forest for the trees", but I also feel like it shouldn't be this difficult to find a clear answer for this for any given grid.

In a next step I need to port over a uniform sparse grid from a non-SGpp-implementation for refinement, so I definitely need a way to convert from numpy-array to DataMatrix (easy enough), to ModBSplineGrid (no clue right now).

I would appreciate some guidance on this. Saving and loading grids should be covered by the examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions