KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Static Public Member Functions | List of all members
deprecation_management.DeprecationManager Class Reference

This class is intended to encapsulate common operations that may be needed when dealing with deprecated input variable names. More...

Collaboration diagram for deprecation_management.DeprecationManager:

Static Public Member Functions

def HasDeprecatedVariable (context_string, parameters, old_variable_name, new_variable_name)
 Check if a given deprecated variable is present in a given parameters object (Parameters object) More...
 
def ReplaceDeprecatedVariableName (parameters, old_variable_name, new_variable_name)
 Replace a key by another. More...
 

Detailed Description

This class is intended to encapsulate common operations that may be needed when dealing with deprecated input variable names.

Its original purpose is the management of json-type input, although it may be extended to other input types.

The basic goals that inspired this encapsulation are:

  1. Avoid repeating too much code.
  2. Make these operations more robust.
  3. Facilitate the evolution of terminology by concentrating the changes to be made around a single object.
  4. Encourage better legacy-terminology handling, including appropriate error/warning handling.
  5. Providing standard tools useful in the creation of conventional protocols for the modification of the API.

Member Function Documentation

◆ HasDeprecatedVariable()

def deprecation_management.DeprecationManager.HasDeprecatedVariable (   context_string,
  parameters,
  old_variable_name,
  new_variable_name 
)
static

Check if a given deprecated variable is present in a given parameters object (Parameters object)

◆ ReplaceDeprecatedVariableName()

def deprecation_management.DeprecationManager.ReplaceDeprecatedVariableName (   parameters,
  old_variable_name,
  new_variable_name 
)
static

Replace a key by another.

The old key is assumed to be present.


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