WRApplication
External kratos "application" for multiscale time integration.
Snapshot Class Reference

Class representing a snapshot of a ModelPart state. More...

Inheritance diagram for Snapshot:
Collaboration diagram for Snapshot:

Public Member Functions

None Load (self, KratosMultiphysics.ModelPart model_part)
 Load data from this snapshot to the specified model part. More...
 
None Write (self, KratosMultiphysics.ModelPart model_part)
 Write data from the current state of the specified model part to the snapshot. More...
 
None Erase (self, KratosMultiphysics.DataCommunicator communicator)
 Erase stored data related to this snapshot. More...
 
bool Exists (self)
 Check whether the data related to this Snapshot has already been written. More...
 
bool IsValid (self)
 Check whether the stored data matches the ID of the Snapshot. More...
 
typing.Type["SnapshotManager"] GetManagerType (cls)
 Return the manager type associated with the specialized Snapshot type. More...
 
KratosMultiphysics.Parameters GetDefaultParameters (cls)
 
"Snapshot" FromModelPart (cls, KratosMultiphysics.ModelPart model_part, KratosMultiphysics.Parameters parameters)
 
int analysis_path (self)
 
int step (self)
 
WRApp.CheckpointID id (self)
 

Static Public Member Functions

typing.Type[SnapshotIOGetInputType ()
 Get the class responsible for reading snapshot data. More...
 
typing.Type[SnapshotIOGetOutputType ()
 Get the class responsible for writing snapshot data. More...
 
list GetSolutionPath (list snapshots)
 Pick snapshots from the provided list that are part of the solution path. More...
 

Detailed Description

Class representing a snapshot of a ModelPart state.

@classname Snapshot

A snapshot is uniquely defined by its path ID and step index for a specific analysis. The path ID indicates how many times the solution loop jumped back and continued from an earlier Checkpoint, while the step index counts the number of steps since the analysis began, disregarding steps that branched off the current analysis path.

Note
Specialized for keeping data in memory or on disk.

Member Function Documentation

◆ analysis_path()

int analysis_path (   self)

◆ Erase()

None Erase (   self,
KratosMultiphysics.DataCommunicator  communicator 
)

Erase stored data related to this snapshot.

Reimplemented in SnapshotInMemory, SnapshotFS, and HDF5Snapshot.

◆ Exists()

bool Exists (   self)

Check whether the data related to this Snapshot has already been written.

Reimplemented in SnapshotInMemory, and SnapshotFS.

◆ FromModelPart()

"Snapshot" FromModelPart (   cls,
KratosMultiphysics.ModelPart  model_part,
KratosMultiphysics.Parameters  parameters 
)

◆ GetDefaultParameters()

KratosMultiphysics.Parameters GetDefaultParameters (   cls)
{
"input_parameters" : {} // <== default parameters for the input type,
"output_parameters" : {} // <== default parameters for the output type
}

◆ GetInputType()

typing.Type[SnapshotIO] GetInputType ( )
static

Get the class responsible for reading snapshot data.

Note
Override this member if you need a custom read logic.

Reimplemented in SnapshotInMemory, and HDF5Snapshot.

◆ GetManagerType()

typing.Type["SnapshotManager"] GetManagerType (   cls)

Return the manager type associated with the specialized Snapshot type.

Reimplemented in SnapshotInMemory, and HDF5Snapshot.

◆ GetOutputType()

typing.Type[SnapshotIO] GetOutputType ( )
static

Get the class responsible for writing snapshot data.

Note
Override this member if you need a custom write logic.

Reimplemented in SnapshotInMemory, and HDF5Snapshot.

◆ GetSolutionPath()

list GetSolutionPath ( list  snapshots)
static

Pick snapshots from the provided list that are part of the solution path.

Parameters
snapshotslist of snapshots of the analysis.
Returns
A sorted list of snapshots that make up the solution path.

A path is assembled backtracking from the last snapshot, recreating the solution path iff the input list contains the solution path. Otherwise the assembled path is the one that has a dead-end at the last snapshot.

◆ id()

WRApp.CheckpointID id (   self)

◆ IsValid()

bool IsValid (   self)

Check whether the stored data matches the ID of the Snapshot.

Reimplemented in SnapshotInMemory, and SnapshotFS.

◆ Load()

None Load (   self,
KratosMultiphysics.ModelPart  model_part 
)

Load data from this snapshot to the specified model part.

◆ step()

int step (   self)

◆ Write()

None Write (   self,
KratosMultiphysics.ModelPart  model_part 
)

Write data from the current state of the specified model part to the snapshot.


The documentation for this class was generated from the following file: