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

Class representing a snapshot of a ModelPart state and its associated output file on the filesystem. More...

Inheritance diagram for SnapshotFS:
Collaboration diagram for SnapshotFS:

Public Member Functions

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...
 
"SnapshotFS" FromFile (typing.Type["SnapshotFS"] cls, KratosMultiphysics.Parameters parameters)
 Construct a Snapshot instance from a snapshot file. More...
 
"SnapshotFS" FromModelPart (typing.Type["SnapshotFS"] cls, KratosMultiphysics.ModelPart model_part, typing.Union[KratosMultiphysics.Parameters, None] parameters=None)
 Deduce variables from an input ModelPart and construct a SnapshotFS. More...
 
list Collect (typing.Type["SnapshotFS"] cls, str pattern, KratosMultiphysics.Parameters parameters)
 Find and read all snapshot files that match the provided file name pattern. More...
 
- Public Member Functions inherited from Snapshot
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...
 
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)
 

Additional Inherited Members

- Static Public Member Functions inherited from Snapshot
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 and its associated output file on the filesystem.

@classname SnapshotFS

Member Function Documentation

◆ Collect()

list Collect ( typing.Type["SnapshotFS"]  cls,
str  pattern,
KratosMultiphysics.Parameters  parameters 
)

Find and read all snapshot files that match the provided file name pattern.

Parameters
patternthe file name pattern compatible with CheckpointPattern to search for.
parametersParameters to instantiate the Snapshot with.
Returns
A list of SnapsotFS loaded from discovered snapshot files, sorted in ascending order (comparison is performed with respect to CheckpointID).

◆ Erase()

None Erase (   self,
KratosMultiphysics.DataCommunicator  communicator 
)

Erase stored data related to this snapshot.

Reimplemented from Snapshot.

Reimplemented in HDF5Snapshot.

◆ Exists()

bool Exists (   self)

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

Reimplemented from Snapshot.

◆ FromFile()

"SnapshotFS" FromFile ( typing.Type["SnapshotFS"]  cls,
KratosMultiphysics.Parameters  parameters 
)

Construct a Snapshot instance from a snapshot file.

Parameters
file_pathpath to a snapshot file to parse.
input_parametersParameters to instantiate an input processor from.
output_parametersParameters to instantiate an output processor from.

◆ FromModelPart()

"SnapshotFS" FromModelPart ( typing.Type["SnapshotFS"]  cls,
KratosMultiphysics.ModelPart  model_part,
typing.Union[KratosMultiphysics.Parameters,None]   parameters = None 
)

Deduce variables from an input ModelPart and construct a SnapshotFS.

Input- and output parameters are defaulted if they are not specified by the user. The related file name defaults to "<model_part_name>_step_<step>_path_<path>.h5".

◆ IsValid()

bool IsValid (   self)

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

Reimplemented from Snapshot.


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