Mordicus.Modules.Safran.Containers.InitialConditions.InitialCondition module¶
- class Mordicus.Modules.Safran.Containers.InitialConditions.InitialCondition.InitialCondition[source]¶
Bases:
InitialConditionBase
Class modeling an initial condition
- dataType¶
dictionary with solutionName (str) as keys and the type of initial condition (str: “scalar” or “vector”)
- Type
dict
- initialSnapshot¶
dictionary with solutionName (str) as keys and the values of the initial condition (float or np.ndarray of floats of size (numberOfDofs,))
- Type
dict
- reducedInitialSnapshot¶
dictionary with solutionName (str) as keys and the values of the reduced initial snapshot (np.ndarray of floats of size (numberOfModes,))
- Type
dict
- GetDataType(solutionName)[source]¶
Returns the type of initial condition for a given solutionName
- Returns
type of initial condition (scalar” or “vector”)
- Return type
str
- GetReducedInitialSnapshot(solutionName)[source]¶
Returns the reduced initial snapshot
- Parameters
solutionName (str) – name of the corresponding solution
- Returns
values of the reduced initial snapshot
- Return type
np.ndarray of floats of size (numberOfModes,)
- ReduceInitialSnapshot(reducedOrderBases, snapshotCorrelationOperator=None)[source]¶
Computes and sets the reduced initial snapshot
- Parameters
reducedOrderBases (dict(str: np.ndarray)) – dictionary with solutionNames (str) as keys and reducedOrderBases (np.ndarray of size (numberOfModes, numberOfDOFs)) as values
snapshotCorrelationOperator (scipy.sparse.csr, optional) – correlation operator between the snapshots
- SetDataType(solutionName, dataTy)[source]¶
Sets the type of initial condition
- Parameters
solutionName (str) – name of the corresponding solution
dataTy (str) – type of initial condition (scalar” or “vector”)