Subclasses of DataStructure¶
DataStructure object¶
- class code_aster.Objects.DataStructure(*args, **kwargs)[source]¶
Bases:
object- addDependency(ds)[source]¶
Add a dependency to a DataStructure.
- Parameters:
ds (DataStructure) – Parent DataStructure to depend on.
- build()[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
- debugPrint(unit=6, synchro=True)[source]¶
Print the raw content of a DataStructure on the selected file.
- Parameters:
unit (int) – File number (default: 6, means stdout).
synchro (bool) – To synchronize prints between processors (default: True).
- getDependencies()[source]¶
Return the explicit dependencies.
- Returns:
List of parents (dependencies) DataStructure.
- Return type:
list[DataStructure]
- getName()[source]¶
Return the internal (Jeveux) name of the DataStructure.
- Returns:
Internal/Jeveux name.
- Return type:
str
- getTitle()[source]¶
Return the tile of the DataStructure .
- Returns:
Title of the DataStructure.
- Return type:
str
- getType()[source]¶
Return the name of the DataStructure type.
- Returns:
Name of the DataStructure type.
- Return type:
str
- id()[source]¶
Return the identity of the object.
- Returns:
Identifier (address as int).
- Return type:
int
- removeDependency(ds)[source]¶
Remove a dependency to a DataStructure.
- Parameters:
ds (DataStructure) – Parent DataStructure to be removed from dependencies.
- setTitle(title)[source]¶
Set the tile of the DataStructure .
- Parameters:
[str] (title) – Title of the DataStructure.
- property userName¶
Name of the user variable that holds this object.
- Type:
str
AcousticDirichletBC object¶
- class code_aster.Objects.AcousticDirichletBC(*args, **kwargs)[source]¶
Bases:
DirichletBC
AcousticLoadComplex object¶
- class code_aster.Objects.AcousticLoadComplex(*args, **kwargs)[source]¶
Bases:
DataStructure
AcousticModeResult object¶
- class code_aster.Objects.AcousticModeResult(*args, **kwargs)[source]¶
Bases:
FullResult
AssemblyMatrixDisplacementComplex object¶
- class code_aster.Objects.AssemblyMatrixDisplacementComplex(*args, **kwargs)[source]¶
Bases:
BaseAssemblyMatrix- assemble(*args, **kwargs)[source]¶
Overloaded function.
assemble(self: libaster.AssemblyMatrixDisplacementComplex, elemMatrix: ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>, listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixDisplacementComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixDisplacementComplex, elemMatrix: list[tuple[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>, float]], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixDisplacementComplex, elemMatrix: ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>, dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixDisplacementComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>], dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixDisplacementComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>], dirichlet: list[DirichletBC]) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (list[DirichletBC]) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixDisplacementComplex, elemMatrix: list[tuple[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>, float]], dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
- setValues(arg0, arg1, arg2)[source]¶
Erase the assembly matrix and set new values in it.
The new values are in coordinate format (i, j, aij). The matrix must be stored in CSR format. There is no rule for the indices - they can be in arbitrary order and can be repeated. Repeated indices are sumed according to an assembly process.
- Parameters:
idx (list[int]) – List of the row indices.
jdx (list[int]) – List of the column indices.
values (list[float]) – List of the values.
AssemblyMatrixDisplacementReal object¶
- class code_aster.Objects.AssemblyMatrixDisplacementReal(*args, **kwargs)[source]¶
Bases:
BaseAssemblyMatrix- applyDirichletBC(arg0, arg1)[source]¶
Apply the DirichletBC into the Rhs (aka kinematic aka no Lagrange multipliers).
- Parameters:
DirichletBC. (DirichletBC [FieldOnNodes] the values on the) –
modified. (Rhs [FieldOnNodes] The residual to be) –
- assemble(*args, **kwargs)[source]¶
Overloaded function.
assemble(self: libaster.AssemblyMatrixDisplacementReal, elemMatrix: ElementaryMatrix<double, (PhysicalQuantityEnum)4>, listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixDisplacementReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)4>], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixDisplacementReal, elemMatrix: list[tuple[ElementaryMatrix<double, (PhysicalQuantityEnum)4>, float]], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixDisplacementReal, elemMatrix: ElementaryMatrix<double, (PhysicalQuantityEnum)4>, dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixDisplacementReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)4>], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixDisplacementReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)4>], dirichlet: list[DirichletBC]) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (list[DirichletBC]) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixDisplacementReal, elemMatrix: list[tuple[ElementaryMatrix<double, (PhysicalQuantityEnum)4>, float]], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
- scale(arg0, arg1)[source]¶
Scale the matrix in place using right and left multiplication by diagonal matrices stored as vectors
- Parameters:
lvect (list[float]) – List of the values.
rvect (list[float]) – List of the values.
- setValues(arg0, arg1, arg2)[source]¶
Erase the assembly matrix and set new values in it.
The new values are in coordinate format (i, j, aij). The matrix must be stored in CSR format. There is no rule for the indices - they can be in arbitrary order and can be repeated. Repeated indices are sumed according to an assembly process.
- Parameters:
idx (list[int]) – List of the row indices.
jdx (list[int]) – List of the column indices.
values (list[float]) – List of the values.
AssemblyMatrixEliminatedReal object¶
AssemblyMatrixPressureComplex object¶
- class code_aster.Objects.AssemblyMatrixPressureComplex(*args, **kwargs)[source]¶
Bases:
BaseAssemblyMatrix- assemble(*args, **kwargs)[source]¶
Overloaded function.
assemble(self: libaster.AssemblyMatrixPressureComplex, elemMatrix: ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>, listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixPressureComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixPressureComplex, elemMatrix: list[tuple[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>, float]], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixPressureComplex, elemMatrix: ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>, dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixPressureComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixPressureComplex, elemMatrix: list[tuple[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>, float]], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixPressureComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>], dirichlet: list[DirichletBC]) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (list[DirichletBC]) : dirichlet BC to impose.
AssemblyMatrixPressureReal object¶
- class code_aster.Objects.AssemblyMatrixPressureReal(*args, **kwargs)[source]¶
Bases:
BaseAssemblyMatrix- applyDirichletBC(arg0, arg1)[source]¶
Apply the DirichletBC into the Rhs (aka kinematic aka no Lagrange multipliers).
- Parameters:
DirichletBC. (DirichletBC [FieldOnNodes] the values on the) –
modified. (Rhs [FieldOnNodes] The residual to be) –
- assemble(*args, **kwargs)[source]¶
Overloaded function.
assemble(self: libaster.AssemblyMatrixPressureReal, elemMatrix: ElementaryMatrix<double, (PhysicalQuantityEnum)5>, listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixPressureReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)5>], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixPressureReal, elemMatrix: list[tuple[ElementaryMatrix<double, (PhysicalQuantityEnum)5>, float]], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixPressureReal, elemMatrix: ElementaryMatrix<double, (PhysicalQuantityEnum)5>, dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixPressureReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)5>], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixPressureReal, elemMatrix: list[tuple[ElementaryMatrix<double, (PhysicalQuantityEnum)5>, float]], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
- setValues(arg0, arg1, arg2)[source]¶
Erase the assembly matrix and set new values in it.
The new values are in coordinate format (i, j, aij). The matrix must be stored in CSR format. There is no rule for the indices - they can be in arbitrary order and can be repeated. Repeated indices are sumed according to an assembly process.
- Parameters:
idx (list[int]) – List of the row indices.
jdx (list[int]) – List of the column indices.
values (list[float]) – List of the values.
AssemblyMatrixTemperatureComplex object¶
- class code_aster.Objects.AssemblyMatrixTemperatureComplex(*args, **kwargs)[source]¶
Bases:
BaseAssemblyMatrix- assemble(*args, **kwargs)[source]¶
Overloaded function.
assemble(self: libaster.AssemblyMatrixTemperatureComplex, elemMatrix: ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)6>, listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixTemperatureComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)6>], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices added.
- Arguments:
clean (bool) : Clean elementary matrices after building (default = true)
assemble(self: libaster.AssemblyMatrixTemperatureComplex, elemMatrix: list[tuple[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)6>, float]], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixTemperatureComplex, elemMatrix: ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)6>, dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixTemperatureComplex, elemMatrix: list[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)6>], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixTemperatureComplex, elemMatrix: list[tuple[ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)6>, float]], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
AssemblyMatrixTemperatureReal object¶
- class code_aster.Objects.AssemblyMatrixTemperatureReal(*args, **kwargs)[source]¶
Bases:
BaseAssemblyMatrix- applyDirichletBC(arg0, arg1)[source]¶
Apply the DirichletBC into the Rhs (aka kinematic aka no Lagrange multipliers).
- Parameters:
DirichletBC. (DirichletBC [FieldOnNodes] the values on the) –
modified. (Rhs [FieldOnNodes] The residual to be) –
- assemble(*args, **kwargs)[source]¶
Overloaded function.
assemble(self: libaster.AssemblyMatrixTemperatureReal, elemMatrix: ElementaryMatrix<double, (PhysicalQuantityEnum)6>, listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixTemperatureReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)6>], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixTemperatureReal, elemMatrix: list[tuple[ElementaryMatrix<double, (PhysicalQuantityEnum)6>, float]], listOfLoads: libaster.ListOfLoads = None) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. listOfLoads (ListOfLoads) : list of loads to assemble
assemble(self: libaster.AssemblyMatrixTemperatureReal, elemMatrix: ElementaryMatrix<double, (PhysicalQuantityEnum)6>, dirichlet: DirichletBC) -> None
Assembly matrix from elementar matrices and list of loads.
- Arguments:
elemMatrix (ElementaryMatrixReal) : elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixTemperatureReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)6>], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixTemperatureReal, elemMatrix: list[ElementaryMatrix<double, (PhysicalQuantityEnum)6>], dirichlet: list[DirichletBC]) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal]) : list elementary matrix to assemble. dirichlet (list[DirichletBC]) : dirichlet BC to impose.
assemble(self: libaster.AssemblyMatrixTemperatureReal, elemMatrix: list[tuple[ElementaryMatrix<double, (PhysicalQuantityEnum)6>, float]], dirichlet: DirichletBC) -> None
- Arguments:
elemMatrix (list[ElementaryMatrixReal, float]) : list of pair composed of an elementary matrix and the multiplicatif coefficent to assemble. dirichlet (DirichletBC) : dirichlet BC to impose.
- scale(arg0, arg1)[source]¶
Scale the matrix in place using right and left multiplication by diagonal matrices stored as vectors
- Parameters:
lvect (list[float]) – List of the values.
rvect (list[float]) – List of the values.
- setValues(arg0, arg1, arg2)[source]¶
Erase the assembly matrix and set new values in it.
The new values are in coordinate format (i, j, aij). The matrix must be stored in CSR format. There is no rule for the indices - they can be in arbitrary order and can be repeated. Repeated indices are sumed according to an assembly process.
- Parameters:
idx (list[int]) – List of the row indices.
jdx (list[int]) – List of the column indices.
values (list[float]) – List of the values.
BaseAssemblyMatrix object¶
- class code_aster.Objects.BaseAssemblyMatrix(*args, **kwargs)[source]¶
Bases:
DataStructure- getCalculOption()[source]¶
Return the option of CALCUL.
- Returns:
Name of the option.
- Return type:
str
- getDirichletBCDOFs()[source]¶
Return a vector with DOFs eliminated by Dirichlet boundaries conditions (if it exists)
- Returns:
- a vector with DOFs eliminated by Dirichlet boundaries conditions of
size = neq + 1, tuple(ieq = 0, neq - 1) = 1 then DOF eliminated else 0, tuple(neq) = number of DOFs eliminated.
- Return type:
tuple(int)
- getLagrangeScaling()[source]¶
Return the scaling used for Lagrange multipliers. It returns 1 if no Lagrange.
- Returns:
scaling used for Lagrange multipliers. It returns 1 if no Lagrange are present.
- Return type:
float
- hasDirichletEliminationDOFs()[source]¶
Tell if matrix has some DOFs eliminated by Dirichlet boundaries conditions.
- Returns:
True if matrix has some DOFs eliminated by Dirichlet boundaries conditions else False
- Return type:
bool
- isBuilt()[source]¶
Tell if the matrix has already been built.
- Returns:
True if the matrix has been built.
- Return type:
bool
- isFactorized()[source]¶
Tell if the matrix is factorized.
- Returns:
True if the matrix is factorized, False otherwise.
- Return type:
bool
BaseDOFNumbering object¶
- class code_aster.Objects.BaseDOFNumbering(*args, **kwargs)[source]¶
Bases:
DataStructure- computeNumbering(*args, **kwargs)[source]¶
Overloaded function.
computeNumbering(self: libaster.BaseDOFNumbering, model: Model, listOfLoads: ListOfLoads, verbose: bool = True) -> bool
computeNumbering(self: libaster.BaseDOFNumbering, matrix: list[Union[ElementaryMatrix<double, (PhysicalQuantityEnum)4>, ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)4>, ElementaryMatrix<double, (PhysicalQuantityEnum)6>, ElementaryMatrix<std::complex<double>, (PhysicalQuantityEnum)5>]], verbose: bool = True) -> bool
- getEquationNumbering()[source]¶
Returns the global equation numbering object
- Returns:
global equation numbering.
- Return type:
- getFiniteElementDescriptors()[source]¶
Returns the objects defining the finite elements.
- Returns:
List of finite elements descriptions.
- Return type:
list[FiniteElementDescriptor]
- getPhysicalQuantity()[source]¶
Returns the name of the physical quantity that is numbered.
- Returns:
physical quantity name.
- Return type:
str
- isParallel()[source]¶
The numbering is distributed across MPI processes for High Performance Computing.
- Returns:
True if used, False otherwise.
- Return type:
bool
- setFiniteElementDescriptors(descr)[source]¶
Returns the object defining the finite elements.
- Parameters:
descr (list[FiniteElementDescriptor]) – List of finite elements descriptions.
BaseElementaryMatrix object¶
- class code_aster.Objects.BaseElementaryMatrix(*args, **kwargs)[source]¶
Bases:
DataStructure
BaseElementaryVector object¶
- class code_aster.Objects.BaseElementaryVector(*args, **kwargs)[source]¶
Bases:
DSWithCppPickling
BaseFunction object¶
- class code_aster.Objects.BaseFunction(*args, **kwargs)[source]¶
Bases:
GenericFunction- getValues()[source]¶
Return a list of the values of the function as (x1, x2, …, y1, y2, …)
- Returns:
List of values (size = 2 * size()).
- Return type:
list[float]
- setInterpolation(type)[source]¶
Define the type of interpolation.
Supported interpolation types are: “LIN” for linear, “LOG” for logarithmic and “NON” for no interpolation allowed.
- Parameters:
type (str) – Type of interpolation for abscissa and ordinates. Examples: “LIN LIN”, “LIN LOG”…
- setParameterName(name)[source]¶
Define the name of the abscissa.
- Parameters:
name (str) – Name of the abscissa.
- setResultName(name)[source]¶
Define the name of the ordinates.
- Parameters:
name (str) – Name of the ordinates.
BaseMesh object¶
- class code_aster.Objects.BaseMesh(*args, **kwargs)[source]¶
Bases:
DataStructure- build()[source]¶
Build list of Tables based on the mesh
- Returns:
true if building is ok
- Return type:
bool
- check(tolerance)[source]¶
Check some properties of the mesh.
- Parameters:
tolerance (float) – Tolerance used to detect flat cells.
- getCellType(index)[source]¶
Return the type of the given cell
- Parameters:
index (int) – index of the cell (0-based)
- Returns:
the cell type
- Return type:
int
- getCellTypeName(index)[source]¶
Return the type name of the given cell
- Parameters:
index (int) – index of the cell (0-based)
- Returns:
name of the cell type (stripped)
- Return type:
str
- getConnectivity()[source]¶
Return the connectivity of the mesh as Python lists.
- Returns:
List of, for each cell, a list of the nodes indexes.
- Return type:
list[list[int]]
- getCoordinates()[source]¶
Return the coordinates of the mesh.
- Returns:
Field of the coordinates.
- Return type:
- getLocalToGlobalCellIds()[source]¶
Returns local to global IDs mapping for cells
- Returns:
local to global IDs mapping.
- Return type:
list[int]
- getLocalToGlobalNodeIds()[source]¶
Returns local to global node Ids mapping
- Returns:
local to global IDs mapping.
- Return type:
list[int]
- getMedCellsTypes()[source]¶
Return the Med type of each cell.
- Returns:
List of Med types.
- Return type:
list[int]
- getMedConnectivity()[source]¶
Return the connectivity of the mesh as Python lists following the Med IDs.
- Returns:
List of, for each cell, a list of the nodes indexes.
- Return type:
list[list[int]]
- getMinMaxEdgeSizes(arg0)[source]¶
Get minimum and maximum length of edges in group of cells
- Returns:
values of min and max edges
- Return type:
tuple(real)
- getNumberOfCells()[source]¶
Return the number of cells of the mesh.
- Returns:
Number of cells.
- Return type:
int
- getNumberOfNodes()[source]¶
Return the number of nodes of the mesh.
- Returns:
Number of nodes.
- Return type:
int
- getOriginalToRestrictedCellsIds()[source]¶
If the mesh is created as restriction of an initial mesh, It returns a dict between the cell id of the initial mesh and the current cell id.
- Returns:
a dict between the cell id of the initial mesh and the current cell id.
- Return type:
dict[int]
- getOriginalToRestrictedNodesIds()[source]¶
If the mesh is created as a restriction of an initial mesh, It returns a dict betweenn the node id of the initial mesh and the current node id.
- Returns:
a dict betweenn the node id of the initial mesh and the current node id.
- Return type:
dict[int]
- getRestrictedToOriginalCellsIds()[source]¶
If the mesh is created as restriction of an initial mesh, It returns for each cells, the cell id of the initial mesh.
- Returns:
for each cells, the cell id of the initial mesh.
- Return type:
list[int]
- getRestrictedToOriginalNodesIds()[source]¶
If the mesh is created as a restriction of an initial mesh, It returns for each nodes, the node id of the initial mesh.
- Returns:
for each nodes, the node id of the initial mesh.
- Return type:
list[int]
- getTable(identifier)[source]¶
Extract a Table from the datastructure.
- Parameters:
identifier (str) – Table identifier.
- Returns:
Table stored with the given identifier.
- Return type:
- hasCellsOfType(type)[source]¶
Return True if mesh contains at least one cell of given type
- Parameters:
type (str) – cell type
- Returns:
True if mesh contains at least one cell of given type, else False
- Return type:
bool
- isIncomplete()[source]¶
Tell if the mesh is complete on parallel instances.
- Returns:
False for a centralized or parallel mesh, True for an incomplete mesh.
- Return type:
bool
- isParallel()[source]¶
Tell if the mesh is distributed on parallel instances.
- Returns:
False for a centralized mesh, True for a parallel mesh.
- Return type:
bool
- printMedFile(fileName, local=True, version=[0, 0, 0])[source]¶
Print the mesh in the MED format
- Parameters:
filename (Path|str) – Name of the file
local (bool=True) – print local values only (relevant for a ParallelMesh only)
version (list) – list of size 3 ([major, minor, release])
- Returns:
True if of
- Return type:
Bool
BehaviourDefinition object¶
- class code_aster.Objects.BehaviourDefinition(*args, **kwargs)[source]¶
Bases:
DataStructure
BehaviourProperty object¶
- class code_aster.Objects.BehaviourProperty(*args, **kwargs)[source]¶
Bases:
DataStructure- getBehaviourField()[source]¶
Return a pointer to the field for behaviour.
- Returns:
behaviour.
- Return type:
ConstantFieldOnCellsChar16Ptr
- getConvergenceCriteria()[source]¶
Return a pointer to the field for convergence criteria.
- Returns:
convergence criteria.
- Return type:
ConstantFieldOnCellsRealPtr
- getMaterialField()[source]¶
Return a pointer to the material field.
- Returns:
material field setted.
- Return type:
MaterialFieldPtr
- getMultipleBehaviourField()[source]¶
Return a pointer to the field for multiple behaviour like cristals.
- Returns:
multiple behaviour.
- Return type:
ConstantFieldOnCellsChar16Ptr
BucklingModeResult object¶
- class code_aster.Objects.BucklingModeResult(*args, **kwargs)[source]¶
Bases:
FullResult- setStiffnessMatrix(*args, **kwargs)[source]¶
Overloaded function.
setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixDisplacementReal) -> bool
setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixDisplacementComplex) -> bool
setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixTemperatureReal) -> bool
setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixPressureReal) -> bool
setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.GeneralizedAssemblyMatrixReal) -> bool
setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.GeneralizedAssemblyMatrixComplex) -> bool
CombinedFourierResult object¶
ConnectionMesh object¶
- class code_aster.Objects.ConnectionMesh(*args, **kwargs)[source]¶
Bases:
BaseMesh- getCells(group_name='')[source]¶
Return the list of the indexes of the cells that belong to a group of cells.
- Parameters:
group_name (str) – Name of the local group.
- Returns:
Indexes of the cells of the local group.
- Return type:
list[int]
- getGroupsOfCells(local=False)[source]¶
Return the list of the existing groups of cells.
- Returns:
List of groups names (stripped).
- Return type:
list[str]
- getGroupsOfNodes(local=False)[source]¶
Return the list of the existing groups of nodes.
- Returns:
List of groups names (stripped).
- Return type:
list[str]
- getNodesGlobalNumbering()[source]¶
Return a tuple of the nodes of the mesh with a global numbering
- Returns:
list of nodes with global numbering
- Return type:
tuple[int]
- getNodesLocalNumbering()[source]¶
Return a tuple of the nodes of the mesh with a local numbering. The local numbering is the one coming from the owner of the node, hence some nodes can have the same local numbering
- Returns:
list of nodes with local numbering
- Return type:
tuple[int]
- getParallelMesh()[source]¶
Return a pointer to the ParallelMesh used to built it.
- Returns:
pointer to the ParallelMesh
- Return type:
ParallelMeshPtr
- hasGroupOfCells(name, local=False)[source]¶
Allows to know if the given group of cells is present in the mesh
- Parameters:
name (str) – name of the group of cell
- Returns:
True if the group is present
- Return type:
bool
ConstantFieldOnCellsChar16 object¶
ConstantFieldOnCellsLong object¶
ConstantFieldOnCellsReal object¶
Contact object¶
- class code_aster.Objects.Contact(*args, **kwargs)[source]¶
Bases:
DataStructure
ContactNew object¶
- class code_aster.Objects.ContactNew(*args, **kwargs)[source]¶
Bases:
DSWithCppPickling- appendContactZone(zone)[source]¶
Append a new contact zone to the contact definition
- Parameters:
zone (ContactZone) – contact zone to append
- getContactZone(zone_id)[source]¶
Return the specified contact zone
- Parameters:
zone_id (int) – index of the contact zone (0-based)
- Returns:
contact zone.
- Return type:
- getContactZones()[source]¶
Return the list of contact zones
- Returns:
List of contact zones.
- Return type:
List[ContactZone]
- getFiniteElementDescriptor()[source]¶
Return the finite element descriptor to define virtual cells for Lagrange multipliers
- Returns:
fed.
- Return type:
- getNumberOfContactZones()[source]¶
Return the number of contact zones used
- Returns:
number of contact zones.
- Return type:
inter
- getVerbosity()[source]¶
- Get level of verbosity:*
0- without 1- normal 2- detailled
- Returns:
level of verbosity
- Return type:
integer
- setVerbosity(level)[source]¶
- Set level of verbosity:
0- without 1- normal (default) 2- detailled
- Parameters:
level (int) – level of verbosity
- property hasFriction¶
enable or disable the use of friction.
- Type:
bool
- property hasSmoothing¶
enable or disable the use of smoothing.
- Type:
bool
ContactPairing object¶
- class code_aster.Objects.ContactPairing(*args, **kwargs)[source]¶
Bases:
DataStructureObject to create contact pairing.
- clearPairing(*args, **kwargs)[source]¶
Overloaded function.
clearPairing(self: libaster.ContactPairing) -> None
Clean pairing for all zones
- Returns:
true if the pairing quantities are cleared
- Return type:
bool
clearPairing(self: libaster.ContactPairing, zone_index: int) -> None
Clean pairing for a zone
- Parameters:
zone_index (int) – index of zone
- Returns:
true if the pairing quantities are cleared
- Return type:
bool
- compute(*args, **kwargs)[source]¶
Overloaded function.
compute(self: libaster.ContactPairing) -> bool
Compute the pairing quantities on all zones
- Returns:
True if the pairing quantities are updated appropriately
- Return type:
bool
compute(self: libaster.ContactPairing, zone_index: int) -> bool
Compute the pairing quantities on a zone
- Parameters:
zone_index (int) –
- Returns:
True if the pairing quantities are updated appropriately
- Return type:
bool
- getCoordinates()[source]¶
Coordinates of nodes used for pairing (almost always different from the intial mesh).
- Returns:
the coordinates field
- Return type:
- getFiniteElementDescriptor()[source]¶
Return Finite Element Descriptor for virtual cells from pairing.
- Returns:
finite element for virtual cells
- Return type:
- getIntersectionPoints(zone_index, CoordinatesSpace=1)[source]¶
Get the intersection points between master and slave cells
- Parameters:
zone_index (int) – index of zone
CoordinatesSpace (CoordinatesSpace) – space to describe coordinates
- Returns:
list of pair of coordinates of intersection points
- Return type:
list[pair]
- getListOfPairs(*args, **kwargs)[source]¶
Overloaded function.
getListOfPairs(self: libaster.ContactPairing, zone_index: int) -> list[tuple[int, int]]
Get list of contact pairs for a contact zone
- Parameters:
zone_index (int) –
- Returns:
list of contact pairs
- Return type:
list[tuple[int, int]]
getListOfPairs(self: libaster.ContactPairing) -> list[tuple[int, int]]
Get list of contact pairs on all zones
- Returns:
list of contact pairs
- Return type:
list[tuple[int, int]]
- getNumberOfIntersectionPoints(zone_index)[source]¶
Get list of the number of intersection points beetween a master and slave cells.
- Parameters:
zone_index (int) – index of zone
- Returns:
list of number of intersection points
- Return type:
list
- getNumberOfPairs(*args, **kwargs)[source]¶
Overloaded function.
getNumberOfPairs(self: libaster.ContactPairing) -> int
Return number of pairs on all zones
- Returns:
number of pairs
- Return type:
int
getNumberOfPairs(self: libaster.ContactPairing, zone_index: int) -> int
Return the number of pairs on a zone
- Parameters:
zone_index (int) –
- Returns:
number of pairs
- Return type:
int
- setCoordinates(coordinates)[source]¶
Set the mesh coordinates field
- Parameters:
coordinates (MeshCoordinatesField) – coordinates to use for pairing
ContactZone object¶
- class code_aster.Objects.ContactZone(*args, **kwargs)[source]¶
Bases:
DSWithCppPicklingObject to define a zone of contact.
- getContactParameter()[source]¶
Get contact parameters defining method, coefficient…
- Returns:
contact parameters
- Return type:
- getFrictionParameter()[source]¶
Get friction parameters defining method, coefficient…
- Returns:
friction parameters
- Return type:
- getModel()[source]¶
Return the model used in the contact zone definition
- Returns:
model
- Return type:
- getPairingParameter()[source]¶
Get pairing parameters defining algorithm, distance…
- Returns:
pairing parameters
- Return type:
- getSlaveCells()[source]¶
Get slave’s cells index
- Returns:
slave’s cells index
- Return type:
list[int]
- getSlaveNodes()[source]¶
Get slave’s nodes index
- Returns:
slave’s nodes index
- Return type:
list[int]
- getVerbosity()[source]¶
Get level of verbosity 0- without 1- normal 2- detailled
- Returns:
level of verbosity
- Return type:
int
- setContactParameter(contParam)[source]¶
Set contact parameters defining method, coefficient…
- Parameters:
contParam (ContactParameter) – contact parameters
- setExcludedSlaveGroupOfCells(cellGroupsName)[source]¶
Set excluded groups of cells on slave side
- Parameters:
cellGroupsName (str) – excluded groups’ names
- setExcludedSlaveGroupOfNodes(nodeGroupsName)[source]¶
Set excluded groups of nodes on slave side
- Parameters:
nodeGroupsName (str) – excluded groups’ names
- setFrictionParameter(fricParam)[source]¶
Set friction parameters defining method, coefficient…
- Parameters:
fricParam (FrictionParameter) – friction parameters
- setMasterGroupOfCells(master_name)[source]¶
Set master’s name of group of cells
- Parameters:
master_name (str) – name of group for master cells
- setPairingParameter(pairParam)[source]¶
Set pairing parameters defining algorithm, distance…
- Parameters:
pairParam (PairingParameter) – pairing parameters
- setSlaveGroupOfCells(slave_name)[source]¶
Set slave’s name of group of cells
- Parameters:
slave_name (str) – name of group for slave cells
- setVerbosity(level)[source]¶
Set level of verbosity 0- without 1- normal (default) 2- detailled
- Parameters:
level (int) – level of verbosity
- property checkNormals¶
attribute that holds the checking of outwards normals.
- Type:
bool
- property hasFriction¶
Get status of friction
- Returns:
friction or not
- Return type:
bool
- property hasSmoothing¶
Smoothing of normals
- Returns:
smoothing or not
- Return type:
bool
CouplingPairing object¶
- class code_aster.Objects.CouplingPairing(arg0, arg1)[source]¶
Bases:
DataStructureObject to create contact pairing.
- compute()[source]¶
Compute the pairing quantitie
- Returns:
True if the pairing quantities are updated appropriately
- Return type:
bool
- getFiniteElementDescriptor()[source]¶
Return Finite Element Descriptor for virtual cells from pairing.
- Returns:
finite element for virtual cells
- Return type:
CouplingZonePairing object¶
- class code_aster.Objects.CouplingZonePairing(*args, **kwargs)[source]¶
Bases:
DataStructureObject to create contact pairing.
- setCoefficient(coef_pena)[source]¶
Set penalization’s coefficient.
- Parameters:
[float] (coef_pena) – penalization’s coefficient.
- setMasterGroupsOfCells(groups_name)[source]¶
Set master’s side.
- Parameters:
[list[str]] (groups_name) – list of groups.
- setMethod(method)[source]¶
Set method.
- Returns:
method.
- Return type:
method [CouplingMethod]
- setPairingParameters(parameters)[source]¶
Set pairing parameters.
- Parameters:
[PairingParameter] (parameters) – PairingParameterPtr.
Crack object¶
- class code_aster.Objects.Crack(*args, **kwargs)[source]¶
Bases:
DataStructure- getCrackFrontAbsCurv()[source]¶
Return the crack front absc curv
- Returns:
the crack front absc curv
- Return type:
list[float]
- getCrackFrontBasis()[source]¶
Return the crack front basis
- Returns:
the crack front basis
- Return type:
list[float]
- getCrackFrontNodeBasis()[source]¶
Return the basis at each crack front node
- Returns:
field of the crack front basis
- Return type:
- getCrackFrontNodes()[source]¶
Return the crack front nodes
- Returns:
the crack nodes
- Return type:
list[str]
- getCrackFrontPosition()[source]¶
Return the crack front Position
- Returns:
the crack front Position
- Return type:
list[float]
- getCrackFrontRadius()[source]¶
Return the crack front Radius
- Returns:
the crack front Radius
- Return type:
float
- getCrackTipCellsType()[source]¶
Return the crack front cell type
- Returns:
the crack front cell type
- Return type:
str
- getLowerLipGroupName()[source]¶
Return the group name used to define lower side of cracklip
- Returns:
group name
- Return type:
str
- getLowerNormNodes()[source]¶
Return the names for nodes on the lower side of cracklip
- Returns:
node names
- Return type:
list[str]
- getLowerNormNodes2()[source]¶
Return the names for nodes on the lower side of cracklip (for POST_JMOD)
- Returns:
node names
- Return type:
list[str]
- getNormal()[source]¶
Return vector normal of the crack surface
- Returns:
normal to the crack surface
- Return type:
list[float]
- getUpperLipGroupName()[source]¶
Return the group name used to define upper side of cracklip
- Returns:
group name
- Return type:
str
- getUpperNormNodes()[source]¶
Return the names for nodes on the upper side of cracklip
- Returns:
node names
- Return type:
list[str]
CyclicSymmetryMode object¶
- class code_aster.Objects.CyclicSymmetryMode(*args, **kwargs)[source]¶
Bases:
DataStructure
DOFNumbering object¶
- class code_aster.Objects.DOFNumbering(*args, **kwargs)[source]¶
Bases:
BaseDOFNumbering- getComponentFromDOF(dof, local=False)[source]¶
Returns the component name associated to a dof index.
If the dof is associated to a physical DOF, the name of the component is returned.
If the dof is associated to a Lagrange multiplier DOF for a Dirichlet boundary condition, the name of the component which is constrained by the multiplier is returned, precedeed by ‘LAGR:’, e.g. ‘LAGR:DX’.
If the dof is associated to a Lagrange multiplier DOF for a multipoint-constraint (MPC) implying several DOF, ‘LAGR:MPC’ is returned (since no component can be identified).
- Parameters:
dof (int) – Index of the dof.
local (bool, optional) – not used (default: false).
- Returns:
component name.
- Return type:
str
- getComponentFromNode(node, local=False)[source]¶
Returns the components name associated to a node index.
- Parameters:
node (int) – Index of the node.
local (bool, optional) – not used (default: false).
- Returns:
component names.
- Return type:
str
- getComponents()[source]¶
Returns all the component names assigned in the numbering.
- Returns:
component names.
- Return type:
str
- getDOFFromNodeAndComponent(node, cmp, local=False)[source]¶
Returns the DOF index associated to a node and component.
- Parameters:
node (int) – Index of the node.
cmp (str) – name of the component
local (bool, optional) – not used (default: false).
- Returns:
index of the dof.
- Return type:
int
- getDictOfLagrangeDOFs(local=False)[source]¶
Returns the Rows Associated to the first and second Lagrange Multipliers Dof
- Parameters:
local (bool, optional) – not used (default: false).
- Returns:
- {1indexes of the first Lagrange multipliers dof,
2 : indexes of the second Lagrange multipliers dof }
- Return type:
[dict]
- getLagrangeDOFs(local=False)[source]¶
Returns the indexes of the Lagrange multipliers dof.
- Parameters:
local (bool, optional) – not used (default: false).
- Returns:
indexes of the Lagrange multipliers dof.
- Return type:
[int]
- getNoGhostDOFs(local=False)[source]¶
Returns the indexes of the DOFs owned locally (aka not ghost).
- Returns:
indexes of the DOFs owned locally.
- Return type:
int
- getNodeAndComponentFromDOF(*args, **kwargs)[source]¶
Overloaded function.
getNodeAndComponentFromDOF(self: libaster.DOFNumbering, local: bool = False) -> list[tuple[int, str]]
Return the list of node id and name of component for each dofs
- Parameters:
local (bool, optional) – not used (default: false).
- Returns:
node id and name of component for each dofs
- Return type:
list[tuple[int, str]]
getNodeAndComponentFromDOF(self: libaster.DOFNumbering, dof: int, local: bool = False) -> tuple[int, str]
Return the node id and name of component for given DOF
- Parameters:
dof (int) – DOF index
local (bool, optional) – not used (default: false).
- Returns:
node id and name of component
- Return type:
tuple[int, str]
- getNodeFromDOF(dof, local=False)[source]¶
Returns the node index associated to a dof index.
- Parameters:
dof (int) – Index of the dof.
local (bool, optional) – not used (default: false).
- Returns:
index of the node.
- Return type:
int
- getNumberOfDOFs(local=False)[source]¶
Returns the number of DOFs.
- Parameters:
local (bool, optional) – not used (default: false).
- Returns:
number of DOFs.
- Return type:
int
- getPhysicalDOFs(local=False)[source]¶
Returns the indexes of the physical dof.
- Parameters:
local (bool, optional) – not used (default: false).
- Returns:
indexes of the physical dof.
- Return type:
[int]
- isPhysicalDOF(dof, local=False)[source]¶
If the dof is associated to a physical DOF, return True
- If the dof is associated to a Lagrange multiplier DOF for a Dirichlet boundary
condition, return False
- Parameters:
dof (int) – Index of the dof.
local (bool, optional) – not used (default: false).
- Returns:
True if the DOF is a physical DOF else False.
- Return type:
bool
DSWithCppPickling object¶
- class code_aster.Objects.DSWithCppPickling(*args, **kwargs)[source]¶
Bases:
DataStructure
DataField object¶
- class code_aster.Objects.DataField(*args, **kwargs)[source]¶
Bases:
DSWithCppPickling
DirichletBC object¶
- class code_aster.Objects.DirichletBC(*args, **kwargs)[source]¶
Bases:
DataStructure- build()[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
DistributedHeatFluxReal object¶
- class code_aster.Objects.DistributedHeatFluxReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
DistributedHydraulicFluxReal object¶
- class code_aster.Objects.DistributedHydraulicFluxReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
DistributedPressureReal object¶
- class code_aster.Objects.DistributedPressureReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
DryingResult object¶
- class code_aster.Objects.DryingResult(*args, **kwargs)[source]¶
Bases:
TransientResult
DynamicMacroElement object¶
- class code_aster.Objects.DynamicMacroElement(*args, **kwargs)[source]¶
Bases:
DataStructure
ElasticFourierResult object¶
ElasticResult object¶
ElementaryCharacteristics object¶
- class code_aster.Objects.ElementaryCharacteristics(*args, **kwargs)[source]¶
Bases:
DataStructure
ElementaryMatrixDisplacementComplex object¶
- class code_aster.Objects.ElementaryMatrixDisplacementComplex(*args, **kwargs)[source]¶
Bases:
BaseElementaryMatrix- addElementaryTerm(*args, **kwargs)[source]¶
Overloaded function.
addElementaryTerm(self: libaster.ElementaryMatrixDisplacementComplex, arg0: libaster.ElementaryTermComplex) -> None
addElementaryTerm(self: libaster.ElementaryMatrixDisplacementComplex, arg0: list[libaster.ElementaryTermComplex]) -> None
ElementaryMatrixDisplacementReal object¶
- class code_aster.Objects.ElementaryMatrixDisplacementReal(*args, **kwargs)[source]¶
Bases:
BaseElementaryMatrix
ElementaryMatrixPressureComplex object¶
- class code_aster.Objects.ElementaryMatrixPressureComplex(*args, **kwargs)[source]¶
Bases:
BaseElementaryMatrix
ElementaryMatrixTemperatureReal object¶
- class code_aster.Objects.ElementaryMatrixTemperatureReal(*args, **kwargs)[source]¶
Bases:
BaseElementaryMatrix
ElementaryTermComplex object¶
- class code_aster.Objects.ElementaryTermComplex(*args, **kwargs)[source]¶
Bases:
DataField- getFiniteElementDescriptor()[source]¶
Return the finite element descriptor
- Returns:
finite element descriptor
- Return type:
ElementaryTermReal object¶
- class code_aster.Objects.ElementaryTermReal(*args, **kwargs)[source]¶
Bases:
DataField- getFiniteElementDescriptor()[source]¶
Return the finite element descriptor
- Returns:
finite element descriptor
- Return type:
- getOption()[source]¶
Return the optior used to compute it
- Returns:
name of the option
- Return type:
str
ElementaryVectorComplex object¶
- class code_aster.Objects.ElementaryVectorComplex(*args, **kwargs)[source]¶
Bases:
BaseElementaryVector- addElementaryTerm(*args, **kwargs)[source]¶
Overloaded function.
addElementaryTerm(self: libaster.ElementaryVectorComplex, term: libaster.ElementaryTermComplex) -> None
Add elementary term
- Arguments:
term (ElementaryTermComplex): elementary term
addElementaryTerm(self: libaster.ElementaryVectorComplex, terms: list[libaster.ElementaryTermComplex]) -> None
Add vector of elementary term
- Arguments:
terms (list[ElementaryTermComplex]): vector of elementary term
ElementaryVectorDisplacementReal object¶
- class code_aster.Objects.ElementaryVectorDisplacementReal(*args, **kwargs)[source]¶
Bases:
ElementaryVectorReal
ElementaryVectorPressureComplex object¶
- class code_aster.Objects.ElementaryVectorPressureComplex(*args, **kwargs)[source]¶
Bases:
ElementaryVectorComplex
ElementaryVectorReal object¶
- class code_aster.Objects.ElementaryVectorReal(*args, **kwargs)[source]¶
Bases:
BaseElementaryVector- addElementaryTerm(*args, **kwargs)[source]¶
Overloaded function.
addElementaryTerm(self: libaster.ElementaryVectorReal, term: libaster.ElementaryTermReal) -> None
Add elementary term
- Arguments:
term (ElementaryTermReal): elementary term
addElementaryTerm(self: libaster.ElementaryVectorReal, terms: list[libaster.ElementaryTermReal]) -> None
Add vector of elementary term
- Arguments:
terms (list[ElementaryTermReal]): vector of elementary term
ElementaryVectorTemperatureReal object¶
- class code_aster.Objects.ElementaryVectorTemperatureReal(*args, **kwargs)[source]¶
Bases:
ElementaryVectorReal
EmpiricalModeResult object¶
EquationNumbering object¶
- class code_aster.Objects.EquationNumbering(*args, **kwargs)[source]¶
Bases:
DataStructure- getComponentsIdToName()[source]¶
Get map between id and name of components
- Returns:
map between id and name
- Return type:
dict[int]
- getComponentsNameToId()[source]¶
Get map between id and name of components
- Returns:
map between id and name
- Return type:
dict[int]
- getDOFFromNodeAndComponent(local=True)[source]¶
Return the dict of dofs with the pair (node id, component’s name) as keys
- Parameters:
local (bool) – if True use local dof index else use global index in HPC
- Returns:
dofs id for each node id and component’s name
- Return type:
dict[int, str]
- getDOFFromNodeAndComponentId(local=True)[source]¶
Return the dict of dofs with the pair (node id, name id) as keys
- Parameters:
local (bool) – if True use local DOF index else use global index in HPC
- Returns:
dofs id for each node id and component id
- Return type:
dict[int, str]
- getDOFs(sameRank=False, list_cmp=[], list_grpno=[])[source]¶
Return list of DOFs
- Parameters:
False (sameRank =) – Use only owned nodes / False: Use all nodes
[] (list_grpno =) – Use all cmp / keep only cmp given
[] – Use all nodes / keep only nodes given
- Returns:
list of dofs.
- Return type:
list[int]
- getDOFsWithDescription(*args, **kwargs)[source]¶
Overloaded function.
getDOFsWithDescription(self: libaster.EquationNumbering, cmps: list[str] = [], groupNames: list[str] = [], local: bool = True, same_rank: int = <PythonBool.NONE: -1>) -> tuple[tuple[list[int], list[str]], list[int]]
Get the dofs associated to the given component restricted to the given group.
- Arguments:
cmps (list[str]): components to extract. groupNames (list[str]): group names to filter. local (bool): if True use local dof index else use global index in HPC.
- Returns:
pair[list[int], list[str]]: list of nodes and list of components. list[int]: list of dofs.
getDOFsWithDescription(self: libaster.EquationNumbering, cmps: list[str] = [], nodes: list[int] = [], local: bool = True, same_rank: int = <PythonBool.NONE: -1>) -> tuple[tuple[list[int], list[str]], list[int]]
Get the dofs associated to the given component restricted to the given nodes.
- Arguments:
cmps (list[str]): components to extract. nodes (list[int]): list of nodes to filter. local (bool): if True use local dof index else use global index in HPC.
- Returns:
pair[list[int], list[str]]: list of nodes and list of components. list[int]: list of dofs.
- getNoGhostDOFs(local=False)[source]¶
Returns the indexes of the DOFs owned locally (aka not ghost).
Returns: int: indexes of the DOFs owned locally.
- getNodeAndComponentFromDOF(*args, **kwargs)[source]¶
Overloaded function.
getNodeAndComponentFromDOF(self: libaster.EquationNumbering, local: bool = True) -> list[tuple[int, str]]
Return the list of node id and name of component for each dofs
- Arguments:
local (bool) = True: if True use local node index else use global index in HPC
- Returns:
list[tuple[int, str]] : node id and name of component for each dofs
getNodeAndComponentFromDOF(self: libaster.EquationNumbering, dof: int, local: bool = True) -> tuple[int, str]
Return the node id and name of component for given DOF
- Arguments:
dof (int): DOF index local (bool) = True: if True use local node index else use global index in HPC
- Returns:
tuple[int, str] : node id and name of component
- getNodeAndComponentIdFromDOF(*args, **kwargs)[source]¶
Overloaded function.
getNodeAndComponentIdFromDOF(self: libaster.EquationNumbering, local: bool = True) -> list[tuple[int, int]]
Return the list of node id and component id for each dofs
- Arguments:
local (bool) = True: if True use local node index else use global index in HPC
- Returns:
list[tuple[int, int]] : node id and component if for each dofs
getNodeAndComponentIdFromDOF(self: libaster.EquationNumbering, dof: int, local: bool = True) -> tuple[int, int]
Return the node id and component id for given DOF
- Arguments:
dof (int): DOF index local (bool) = True: if True use local node index else use global index in HPC
- Returns:
tuple[int, int] : node id and component if for each dofs
- getNumberOfDOFs(local=False)[source]¶
Returns the number of DOFs.
- Parameters:
local (bool) – not used.
- Returns:
number of DOFs.
- Return type:
int
- getPhysicalQuantity()[source]¶
Returns the name of the physical quantity that is numbered.
- Returns:
physical quantity name.
- Return type:
str
- isParallel()[source]¶
The numbering is distributed across MPI processes for High Performance Computing.
- Returns:
True if used, False otherwise.
- Return type:
bool
ExternalStateVariablesResult object¶
- class code_aster.Objects.ExternalStateVariablesResult(*args, **kwargs)[source]¶
Bases:
TransientResult
FiberGeometry object¶
- class code_aster.Objects.FiberGeometry(*args, **kwargs)[source]¶
Bases:
DataStructure
FieldOnCellsChar8 object¶
- class code_aster.Objects.FieldOnCellsChar8(*args, **kwargs)[source]¶
Bases:
DataField- build(feds=[])[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
FieldOnCellsComplex object¶
- class code_aster.Objects.FieldOnCellsComplex(*args, **kwargs)[source]¶
Bases:
DataField- build(feds=[])[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
- getLocalization()[source]¶
Get localization between ELEM, ELNO and ELGA
- Returns:
localization
- Return type:
str
- getMesh()[source]¶
Return the Mesh associated with the FieldOnCellsReal object
- Returns:
Mesh object
- Return type:
- getValues(*args, **kwargs)[source]¶
Overloaded function.
getValues(self: libaster.FieldOnCellsComplex) -> JeveuxVector
Return a list of values as (x1, y1, z1, x2, y2, z2…)
- Returns:
list[complex]: List of values.
getValues(self: libaster.FieldOnCellsComplex, dofs: list[int] = []) -> list[complex]
Return a list of values as (x1, y1, z1, x2, y2, z2…) corresponding to list of dofs
- Arguments:
dofs: dofs to extract
- Returns:
list[complex]: List of values.
- printMedFile(filename, local=True, version='')[source]¶
Print the field in MED format.
- Parameters:
filename (Path|str) – Path to the file to be printed.
local (bool) – Print local values only (relevant for ParallelMesh only, default: True)
version (str) – Version of MED file.
- Returns:
True if succeeds, False otherwise.
- Return type:
bool
- setValues(*args, **kwargs)[source]¶
Overloaded function.
setValues(self: libaster.FieldOnCellsComplex, value: complex) -> None
Set values of the field
- Arguments:
value (complex): value to set
setValues(self: libaster.FieldOnCellsComplex, values: list[complex]) -> None
Set values of the field
- Arguments:
values (list[complex]): list of values to set
- size()[source]¶
Return the size of the field
- Returns:
number of element in the field
- Return type:
int
FieldOnCellsLong object¶
- class code_aster.Objects.FieldOnCellsLong(*args, **kwargs)[source]¶
Bases:
DataField- build(feds=[])[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
- getMesh()[source]¶
Return the Mesh associated with the FieldOnCellsReal object
- Returns:
Mesh object
- Return type:
- getValues(*args, **kwargs)[source]¶
Overloaded function.
getValues(self: libaster.FieldOnCellsLong) -> JeveuxVector
Return a list of values as (x1, y1, z1, x2, y2, z2…)
- Returns:
list[int]: List of values.
getValues(self: libaster.FieldOnCellsLong, dofs: list[int] = []) -> list[int]
Return a list of values as (x1, y1, z1, x2, y2, z2…) corresponding to list of dofs
- Arguments:
dofs: dofs to extract
- Returns:
list[int]: List of values.
- printMedFile(filename, local=True, version='')[source]¶
Print the field in MED format.
- Parameters:
filename (Path|str) – Path to the file to be printed.
local (bool) – Print local values only (relevant for ParallelMesh only, default: True)
version (str) – Version of MED file.
- Returns:
True if succeeds, False otherwise.
- Return type:
bool
- setValues(*args, **kwargs)[source]¶
Overloaded function.
setValues(self: libaster.FieldOnCellsLong, value: int) -> None
Set values of the field
- Arguments:
value (complex): value to set
setValues(self: libaster.FieldOnCellsLong, values: list[int]) -> None
Set values of the field
- Arguments:
values (list[complex]): list of values to set
FieldOnCellsReal object¶
- class code_aster.Objects.FieldOnCellsReal(*args, **kwargs)[source]¶
Bases:
DataField- asLocalization(loc)[source]¶
Return a new field interpolated at the given localozation.
- Parameters:
[str] (loc) – name of localization (ELEM, ELNO or ELGA)
- Returns:
new field with new localization.
- Return type:
- build(feds=[])[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
- checkInternalStateVariables(prevBehaviour, currBehaviour, newFEDesc)[source]¶
Check consistency of internal states variables with behaviour. If you give previous behaviour, check is more precise (name of beahviour for instance)
- Parameters:
prevBehaviour (ConstantFieldOnCellsChar16) – previous behaviour
currBehaviour (ConstantFieldOnCellsChar16) – current behaviour
newFEDesc (FiniteElementDescriptorPtr) – new finite element descriptor
- compareShape(fieldModel, projectOnLigrel, paraName)[source]¶
Compare structure of field with another one and project on new model if require
- Parameters:
fieldModel (FieldOnCellsRealPtr) – field as model
projectOnLigrel (bool) – project field on new model (from model field)
paraName (string) – name of parameter to complete the new values in field
- Returns:
error code
- Return type:
iret (integer)
- dot(other)[source]¶
Return the dot product of two fields
- Parameters:
field (FieldOnCells) – other field
- Returns:
dot product
- Return type:
float
- getDescription(*args, **kwargs)[source]¶
Overloaded function.
getDescription(self: libaster.FieldOnCellsReal) -> libaster.FiniteElementDescriptor
Return the descriptor associated with the FieldOnCellsReal object
- Returns:
FiniteElementDescriptor: FiniteElementDescriptor Object
getDescription(self: libaster.FieldOnCellsReal) -> libaster.FiniteElementDescriptor
- getLocalization()[source]¶
Get localization between ELEM, ELNO and ELGA
- Returns:
localization
- Return type:
str
- getMesh()[source]¶
Return the Mesh associated with the FieldOnCellsReal object
- Returns:
Mesh object
- Return type:
- getNumberOfComponents()[source]¶
Get number of components
- Returns:
number of components
- Return type:
int
- getValues(*args, **kwargs)[source]¶
Overloaded function.
getValues(self: libaster.FieldOnCellsReal) -> JeveuxVector
Return a list of values as (x1, y1, z1, x2, y2, z2…)
- Returns:
list[float]: List of values.
getValues(self: libaster.FieldOnCellsReal, dofs: list[int] = []) -> list[float]
Return a list of values as (x1, y1, z1, x2, y2, z2…) corresponding to list of dofs
- Arguments:
dofs: dofs to extract
- Returns:
list[float]: List of values.
- norm(arg0)[source]¶
Return the euclidean norm of the field
- Parameters:
normType (str) – “NORM_1”, “NORM_2”, “NORM_INFINITY”
- Returns:
euclidean norm
- Return type:
float
- printMedFile(filename, local=True, version='')[source]¶
Print the field in MED format.
- Parameters:
filename (Path|str) – Path to the file to be printed.
local (bool) – Print local values only (relevant for ParallelMesh only, default: True)
version (str) – Version of MED file.
- Returns:
True if succeeds, False otherwise.
- Return type:
bool
- setValues(*args, **kwargs)[source]¶
Overloaded function.
setValues(self: libaster.FieldOnCellsReal, value: float) -> None
Set values of the field
- Arguments:
value (float): value to set
setValues(self: libaster.FieldOnCellsReal, values: list[float]) -> None
Set values of the field
- Arguments:
values (list[float]): list of values to set
- size()[source]¶
Return the size of the field
- Returns:
number of element in the field
- Return type:
int
FieldOnNodesChar8 object¶
FieldOnNodesComplex object¶
- class code_aster.Objects.FieldOnNodesComplex(*args, **kwargs)[source]¶
Bases:
DataField- build(mesh=None)[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
- dot(other)[source]¶
Return the dot product of two complex fields
- Parameters:
other (FieldOnNodes) – other field
- Returns:
dot product
- Return type:
complex
- getImaginaryPart()[source]¶
Extract the imaginary part of the complex field
- Returns:
imaginary part
- Return type:
- getMesh(*args, **kwargs)[source]¶
Overloaded function.
getMesh(self: libaster.FieldOnNodesComplex) -> libaster.BaseMesh
getMesh(self: libaster.FieldOnNodesComplex) -> libaster.BaseMesh
- getNumberOfComponents()[source]¶
Get number of components
- Returns:
number of components
- Return type:
int
- getValues(*args, **kwargs)[source]¶
Overloaded function.
getValues(self: libaster.FieldOnNodesComplex) -> JeveuxVector
Return a list of values as (x1, y1, z1, x2, y2, z2…)
- Returns:
list[complex]: List of values.
getValues(self: libaster.FieldOnNodesComplex, cmps: list[str] = [], groupsOfNodes: list[str] = []) -> list[complex]
Return a list of values as (x1, y1, z1, x2, y2, z2…)
- Arguments:
cmps[list[str]]: filter on list of components groupsOfNodes[list[str]]: filter on list of groups of nodes (default=” “). If empty, the full mesh is used
- Returns:
list[complex]: List of values.
getValues(self: libaster.FieldOnNodesComplex, dofs: list[int] = []) -> list[complex]
Return a list of values as (x1, y1, z1, x2, y2, z2…) corresponding to list of dofs
- Arguments:
dofs: dofs to extract
- Returns:
list[complex]: List of values.
- norm(normType='NORM_INFINITY', list_cmp=[])[source]¶
Return the euclidean norm of the field
- Parameters:
normType (str) – “NORM_1”, “NORM_2”, “NORM_INFINITY” (default: “NORM_INFINITY”)
list_cmp (list[str]) – list of components used to compute norm (default: all)
- Returns:
euclidean norm
- Return type:
float
- scale(vect)[source]¶
Scale in-place the field by a diagonal matrix stored as an array
- Parameters:
vect (float) – diagonal matrix stored as an array
- setValues(*args, **kwargs)[source]¶
Overloaded function.
setValues(self: libaster.FieldOnNodesComplex, value: complex) -> None
Set values of the field
- Arguments:
value (complex): value to set
setValues(self: libaster.FieldOnNodesComplex, values: list[complex]) -> None
Set values of the field
- Arguments:
values (list[complex]): list of values to set
FieldOnNodesLong object¶
FieldOnNodesReal object¶
- class code_aster.Objects.FieldOnNodesReal(*args, **kwargs)[source]¶
Bases:
DataField- __itruediv__(*args, **kwargs)[source]¶
Overloaded function.
__itruediv__(self: libaster.FieldOnNodesReal, arg0: float) -> libaster.FieldOnNodesReal
__itruediv__(self: libaster.FieldOnNodesReal, arg0: libaster.FieldOnNodesReal) -> libaster.FieldOnNodesReal
- applyLagrangeScaling(scaling)[source]¶
Multiply in-place the Lagrange multipliers DOFs by the scaling value
- Parameters:
scaling (float) – scaling velue
- asPhysicalQuantity(physQuantity, map_cmps)[source]¶
Return a new field with a new physical quantity and renamed components.
- Parameters:
[str] (physQuantity) – name of the new physical quantity
map_cmps[dict[str – dict to rename components
str]] – dict to rename components
keeped) ((only renamed component will be) –
- Returns:
field with name physical quantity.
- Return type:
- build(mesh=None)[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
- copyUsingDescription(desc, warn=True)[source]¶
Return a new field using the description. Be careful, Lagrange DOFs are set to zero. Moreover, components that are not present in the field are also set to zero in the output field.
- Parameters:
[EquationNumbering] (desc) – description of equations
[bool] (warn) – If set to true, raises a warning if values are set to zero
- Returns:
field using new description.
- Return type:
- dot(other)[source]¶
Return the dot product of two fields
- Parameters:
other (FieldOnNodes) – other field
- Returns:
dot product
- Return type:
float
- fromPetsc(vec, scaling=1.0, local=False)[source]¶
Import a PETSc vector into the field.
- Parameters:
vec (Vec) – The PETSc vector
scaling (float) – The scaling of the Lagrange DOFs
local (bool) – Only import the dof that are local to the subdomain
- getImaginaryPart()[source]¶
Extract the imaginary part of the real field (a 0-filled field is produced)
- Returns:
imaginary part
- Return type:
- getMesh(*args, **kwargs)[source]¶
Overloaded function.
getMesh(self: libaster.FieldOnNodesReal) -> libaster.BaseMesh
getMesh(self: libaster.FieldOnNodesReal) -> libaster.BaseMesh
- getNumberOfComponents()[source]¶
Get number of components
- Returns:
number of components
- Return type:
int
- getRealPart()[source]¶
Extract the real part of the real field (the field is duplicated)
- Returns:
real part
- Return type:
- getValues(*args, **kwargs)[source]¶
Overloaded function.
getValues(self: libaster.FieldOnNodesReal) -> JeveuxVector
Return a list of values as (x1, y1, z1, x2, y2, z2…)
- Returns:
list[float]: List of values.
getValues(self: libaster.FieldOnNodesReal, cmps: list[str] = [], groupsOfNodes: list[str] = []) -> list[float]
Return a list of values as (x1, y1, z1, x2, y2, z2…)
- Arguments:
cmps[list[str]]: filter on list of components groupsOfNodes[list[str]]: filter on list of groups of nodes (default=” “). If empty, the full mesh is used
- Returns:
list[double]: List of values.
getValues(self: libaster.FieldOnNodesReal, dofs: list[int] = []) -> list[float]
Return a list of values as (x1, y1, z1, x2, y2, z2…) corresponding to list of dofs
- Arguments:
dofs: dofs to extract
- Returns:
list[double]: List of values.
- norm(normType='NORM_INFINITY', list_cmp=[])[source]¶
Return the euclidean norm of the field
- Parameters:
normType (str) – “NORM_1”, “NORM_2”, “NORM_INFINITY” (default: “NORM_INFINITY”)
list_cmp (list[str]) – list of components used to compute norm (default: all)
- Returns:
euclidean norm
- Return type:
float
- scale(vect)[source]¶
Scale in-place the field by a diagonal matrix stored as an array
- Parameters:
vect (float) – diagonal matrix stored as an array
- setValues(*args, **kwargs)[source]¶
Overloaded function.
setValues(self: libaster.FieldOnNodesReal, value: float) -> None
Set values of the field
- Arguments:
value (float): value to set
setValues(self: libaster.FieldOnNodesReal, values: list[float]) -> None
Set values of the field
- Arguments:
values (list[float]): list of values to set
setValues(self: libaster.FieldOnNodesReal, value: dict[str, float], groupsOfNodes: list[str] = []) -> None
Set values of the field where components and values are given as a dict. If the component is not present in the field then it is discarded Example: { “X1” : 0.0, “X3” : 0.0 }
- Arguments:
value (dict[str, float]): dict of values to set (key: str, value: float) groupsOfNodes (list[str]): list of groups. If empty, the full mesh is considered
- size()[source]¶
Return the size of the field
- Returns:
number of element in the field
- Return type:
int
- toFieldOnCells(fed, loc)[source]¶
Converts to FieldOnCells
- Parameters:
[FiniteElementDescriptor] (fed) – finite element descriptor
[str] (loc) – name of localization like ‘ELGA’.
- Returns:
field converted.
- Return type:
- transferFromConnectionToParallelMesh(arg0)[source]¶
Transfer FieldOnNodes from a ConnectionMesh to a ParallelMesh
- Parameters:
[Mesh] (mesh) – the target mesh
- Returns:
transfered field
- Return type:
- transfertToConnectionMesh(arg0)[source]¶
Transfer SimpleFieldOnNodes to a ConnectionMesh
- Returns:
transfered field
- Return type:
FiniteElementDescriptor object¶
- class code_aster.Objects.FiniteElementDescriptor(*args, **kwargs)[source]¶
Bases:
DataStructure
FluidStructureInteraction object¶
- class code_aster.Objects.FluidStructureInteraction(*args, **kwargs)[source]¶
Bases:
DataStructure
FluidStructureModalBasis object¶
ForceOnEdgeReal object¶
- class code_aster.Objects.ForceOnEdgeReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
ForceOnFaceReal object¶
- class code_aster.Objects.ForceOnFaceReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
Formula object¶
- class code_aster.Objects.Formula(*args, **kwargs)[source]¶
Bases:
GenericFunction- evaluate(*val)[source]¶
Evaluate the formula with the given variables values.
- Parameters:
val (list[float]) – List of the values of the variables.
- Returns:
Value of the formula for these values.
- Return type:
float/complex
- getContext()[source]¶
Return the context used to evaluate the formula.
- Returns:
Context used for evaluation.
- Return type:
dict
- getExpression()[source]¶
Return expression of the formula.
- Returns:
Expression of the formula.
- Return type:
str
- getProperties()[source]¶
Return the properties of the formula (for compatibility with function objects).
- Returns:
List of 6 strings as function objects contain.
- Return type:
list[str]
- getVariables()[source]¶
Return the variables names.
- Returns:
List of the names of the variables.
- Return type:
list[str]
- setContext(context)[source]¶
Define the context holding objects required to evaluate the expression.
- Parameters:
context (dict) – Context for the evaluation.
FrictionNew object¶
- class code_aster.Objects.FrictionNew(*args, **kwargs)[source]¶
Bases:
ContactNew
FullHarmonicAcousticResult object¶
- class code_aster.Objects.FullHarmonicAcousticResult(*args, **kwargs)[source]¶
Bases:
FullResult
FullHarmonicResult object¶
- class code_aster.Objects.FullHarmonicResult(*args, **kwargs)[source]¶
Bases:
FullResult
FullResult object¶
FullTransientResult object¶
- class code_aster.Objects.FullTransientResult(*args, **kwargs)[source]¶
Bases:
FullResult
Function object¶
- class code_aster.Objects.Function(*args, **kwargs)[source]¶
Bases:
BaseFunction
Function2D object¶
- class code_aster.Objects.Function2D(*args, **kwargs)[source]¶
Bases:
GenericFunction- getParameters()[source]¶
Return a list of the values of the parameter as (x1, x2, …)
- Returns:
List of values (size = number of functions).
- Return type:
list[float]
- getProperties()[source]¶
Returns the properties of the function.
- Returns:
Tuple containing: type of the function (same as getType()), type of interpolation, parameter name, result name, type of extrapolation, object name (same as getName()), parameter name of functions + a list of dict for each functions that contain the type of interpolation and extrapolation.
- Return type:
tuple[str]
FunctionComplex object¶
- class code_aster.Objects.FunctionComplex(*args, **kwargs)[source]¶
Bases:
BaseFunction
GcpcSolver object¶
- class code_aster.Objects.GcpcSolver(*args, **kwargs)[source]¶
Bases:
LinearSolver
GeneralizedAssemblyMatrix object¶
- class code_aster.Objects.GeneralizedAssemblyMatrix(*args, **kwargs)[source]¶
Bases:
DataStructure- exists()[source]¶
Return True if the matrix exists
- Returns:
True if the matrix exists else False.
- Return type:
bool
- isDense()[source]¶
Return True if the matrix is dense
- Returns:
True if the matrix is dense else False.
- Return type:
bool
- isDiagonal()[source]¶
Return True if the matrix is diagonal
- Returns:
True if the matrix is diagonal else False.
- Return type:
bool
GeneralizedAssemblyMatrixComplex object¶
- class code_aster.Objects.GeneralizedAssemblyMatrixComplex(*args, **kwargs)[source]¶
Bases:
GeneralizedAssemblyMatrix- getLowerValues()[source]¶
Return the lower part of the matrix.
- Returns:
lower part of the matrix.
- Return type:
list[complex]
- getUpperValues()[source]¶
Return the upper part of the matrix.
- Returns:
upper part of the matrix.
- Return type:
list[complex]
- isSymmetric()[source]¶
Return True if the matrix is symmetric
- Returns:
True if the matrix is symmetric else False.
- Return type:
bool
GeneralizedAssemblyMatrixReal object¶
- class code_aster.Objects.GeneralizedAssemblyMatrixReal(*args, **kwargs)[source]¶
Bases:
GeneralizedAssemblyMatrix- getLowerValues()[source]¶
Return the lower part of the matrix.
- Returns:
lower part of the matrix.
- Return type:
list[float]
- getUpperValues()[source]¶
Return the upper part of the matrix.
- Returns:
upper part of the matrix.
- Return type:
list[float]
- isSymmetric()[source]¶
Return True if the matrix is symmetric
- Returns:
True if the matrix is symmetric else False.
- Return type:
bool
GeneralizedAssemblyVector object¶
- class code_aster.Objects.GeneralizedAssemblyVector(*args, **kwargs)[source]¶
Bases:
DataStructure
GeneralizedAssemblyVectorComplex object¶
- class code_aster.Objects.GeneralizedAssemblyVectorComplex(*args, **kwargs)[source]¶
Bases:
GeneralizedAssemblyVector
GeneralizedAssemblyVectorReal object¶
- class code_aster.Objects.GeneralizedAssemblyVectorReal(*args, **kwargs)[source]¶
Bases:
GeneralizedAssemblyVector
GeneralizedDOFNumbering object¶
- class code_aster.Objects.GeneralizedDOFNumbering(*args, **kwargs)[source]¶
Bases:
DataStructure
GeneralizedLoad object¶
- class code_aster.Objects.GeneralizedLoad(*args, **kwargs)[source]¶
Bases:
DataStructure
GeneralizedModeResult object¶
- class code_aster.Objects.GeneralizedModeResult(*args, **kwargs)[source]¶
Bases:
FullResult
GeneralizedModel object¶
- class code_aster.Objects.GeneralizedModel(*args, **kwargs)[source]¶
Bases:
DataStructure
GeneralizedResultComplex object¶
- class code_aster.Objects.GeneralizedResultComplex(*args, **kwargs)[source]¶
Bases:
DataStructure
GeneralizedResultReal object¶
- class code_aster.Objects.GeneralizedResultReal(*args, **kwargs)[source]¶
Bases:
DataStructure
GenericFunction object¶
- class code_aster.Objects.GenericFunction(*args, **kwargs)[source]¶
Bases:
DataStructure
GenericModalBasis object¶
- class code_aster.Objects.GenericModalBasis(*args, **kwargs)[source]¶
Bases:
DataStructure
Grid object¶
HarmoGeneralizedResult object¶
- class code_aster.Objects.HarmoGeneralizedResult(*args, **kwargs)[source]¶
Bases:
GeneralizedResultComplex
ImposedDisplacementReal object¶
- class code_aster.Objects.ImposedDisplacementReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
ImposedPressureReal object¶
- class code_aster.Objects.ImposedPressureReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
IncompleteMesh object¶
InternalForceReal object¶
- class code_aster.Objects.InternalForceReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
InterspectralMatrix object¶
- class code_aster.Objects.InterspectralMatrix(*args, **kwargs)[source]¶
Bases:
DataStructure
LdltSolver object¶
- class code_aster.Objects.LdltSolver(*args, **kwargs)[source]¶
Bases:
LinearSolver
LinearSolver object¶
- class code_aster.Objects.LinearSolver(*args, **kwargs)[source]¶
Bases:
DataStructure- build()[source]¶
build internal objects of the solver
- Returns:
True if the building is a success, else False
- Return type:
bool
- deleteFactorizedMatrix()[source]¶
delete the factorized matrix and its preconditionner if created. This is the case for Mumps and Petsc.
- Returns:
True if success, else False
- Return type:
bool
- factorize(matrix, raiseException=False)[source]¶
Factorize the matrix.
- Parameters:
matrix (BaseAssemblyMatrix) – matrix to factorize
raiseException (bool) – if True an exception is raised in case of error,
(default (otherwise it stops with an error) – False).
- Returns:
True if factorization is a success, else False
- Return type:
bool
- getPrecondMatrix()[source]¶
return the preconditionning matrix
- Returns:
preconditionning matrix
- Return type:
- getSolverName()[source]¶
Get the name of the solver used between ‘MUMPS’, ‘PETSC’, ‘MULT_FRONT’ and ‘PETSC’
- Returns:
name of the solver used
- Return type:
str
- setCataPath(path)[source]¶
Set the path of the catalog that defines the solver keywords. It can be command name or a path as code_aster.Cata.Commons.xxxx.
- Parameters:
path (str) – command name or path of the catalog.
- solve(*args, **kwargs)[source]¶
Overloaded function.
solve(self: libaster.LinearSolver, rhs: libaster.FieldOnNodesReal, dirichletBC: libaster.FieldOnNodesReal = None) -> libaster.FieldOnNodesReal
solve(self: libaster.LinearSolver, rhs: libaster.FieldOnNodesComplex, dirichletBC: libaster.FieldOnNodesComplex = None) -> libaster.FieldOnNodesComplex
LineicForceReal object¶
- class code_aster.Objects.LineicForceReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
ListOfFloats object¶
- class code_aster.Objects.ListOfFloats(*args, **kwargs)[source]¶
Bases:
DataStructure
ListOfIntegers object¶
- class code_aster.Objects.ListOfIntegers(*args, **kwargs)[source]¶
Bases:
DataStructure
ListOfLoads object¶
- class code_aster.Objects.ListOfLoads(*args, **kwargs)[source]¶
Bases:
DataStructure- addDirichletBC(*args, **kwargs)[source]¶
Overloaded function.
addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC) -> None
addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: Function, arg2: str) -> None
addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: Formula, arg2: str) -> None
addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: Function2D, arg2: str) -> None
addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: str) -> None
- addLoad(*args, **kwargs)[source]¶
Overloaded function.
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: Formula, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function2D, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function2D, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Formula) -> None
addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function2D) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >, arg1: Function) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >, arg1: Formula) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >, arg1: Function2D) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula) -> None
addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function2D) -> None
addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >) -> None
addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function) -> None
addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Formula) -> None
addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function2D) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: Formula, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function2D, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function2D, arg2: str) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >, arg1: Function) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >, arg1: Formula) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >, arg1: Function2D) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula) -> None
addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function2D) -> None
- getDirichletBCs()[source]¶
Return list of DirichletBCs
- Returns:
a list of DirichletBC
- Return type:
ListDiriBC
- getLoadNames()[source]¶
Returns list of load’s names.
- Returns:
list of load’s names.
- Return type:
list[str]
- getMechanicalLoadsFunction()[source]¶
Return list of Function mechanical loads
- Returns:
a list of Function mechanical loads
- Return type:
ListMecaLoadFunction
- getMechanicalLoadsReal()[source]¶
Return list of real mechanical loads
- Returns:
a list of real mechanical loads
- Return type:
ListMecaLoadReal
- getParallelMechanicalLoadsFunction()[source]¶
Return list of function parallel mechanical loads
- Returns:
a list of function parallel mechanical loads
- Return type:
ListParaMecaLoadFunction
- getParallelMechanicalLoadsReal()[source]¶
Return list of real parallel mechanical loads
- Returns:
a list of real parallel mechanical loads
- Return type:
ListParaMecaLoadReal
- hasDirichletBC()[source]¶
Dirichlet BCs have been added or not ?
- Returns:
True if Dirichlet BCs have been added
- Return type:
bool
- hasExternalLoad()[source]¶
External load (= not Dirichlet BCs) have been added or not ?
- Returns:
True if External load have been added
- Return type:
bool
LoadResult object¶
- class code_aster.Objects.LoadResult(*args, **kwargs)[source]¶
Bases:
TransientResult
LocalForceOnBeamReal object¶
- class code_aster.Objects.LocalForceOnBeamReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
LocalForceOnShellReal object¶
- class code_aster.Objects.LocalForceOnShellReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
MGISBehaviour object¶
- class code_aster.Objects.MGISBehaviour(*args, **kwargs)[source]¶
Bases:
DataStructure
Material object¶
- class code_aster.Objects.Material(*args, **kwargs)[source]¶
Bases:
DataStructure- getFunction(materialName, propertyName)[source]¶
Return the value of a property stored as a function.
Raise an exception if the property does not exist.
- Parameters:
materialName (str) – Material name (without “_FO”).
propertyName (str) – Property name.
- Returns:
Function object, None if the property does not exist or is not a function.
- Return type:
Function
- getMaterialNames()[source]¶
Return the list of the material names.
- Returns:
List of material names (without “_FO”)
- Return type:
list[str]
- getValueComplex(materialName, propertyName)[source]¶
Return the value of a property stored as a complex.
Raise an exception if the property does not exist.
- Parameters:
materialName (str) – Material name (without “_FO”).
propertyName (str) – Property name.
- Returns:
Property value.
- Return type:
complex
MaterialField object¶
- class code_aster.Objects.MaterialField(*args, **kwargs)[source]¶
Bases:
DataStructure- addBehaviourOnGroupOfCells(behaviour, nameOfGroups)[source]¶
Add behaviour (from DEFI_COMPOR) on group of cells
- Parameters:
behaviour (BehaviourDefinition) – Behaviour (from DEFI_COMPOR)
nameOfGroups (list(str)) – list of names of groups of cells
- addBehaviourOnMesh(behaviour)[source]¶
Add behaviour (from DEFI_COMPOR) on mesh
- Parameters:
behaviour (BehaviourDefinition) – Behaviour (from DEFI_COMPOR)
- addExternalStateVariable(exteVari)[source]¶
Add external state variable in material field
- Parameters:
exteVari (ExternalStateVariablePtr) – external state variable
- addMaterialOnGroupOfCells(material, nameOfGroups)[source]¶
Add a material properties on list of groups of cells
- Parameters:
material (Material) – material properties
nameOfGroups (list(str)) – list of names of groups of cells
- addMaterialOnMesh(material)[source]¶
Add material properties on mesh
- Parameters:
material (Material) – material properties
- addMultipleMaterialOnGroupOfCells(material, nameOfGroups)[source]¶
Add a vector of multiple material properties on group of cells
- Parameters:
material (list(Material)) – list of material properties
nameOfGroups (list(str)) – list of names of groups of cells
- addMultipleMaterialOnMesh(material)[source]¶
Add a vector of multiple material properties on mesh
- Parameters:
material (list(Material)) – list of material properties
- getMaterialOnCell(arg0)[source]¶
Get the material properties on a giver cell on the material field
- Returns:
material properties
- Return type:
- getVectorOfMaterial()[source]¶
Get vector of all the material properties on the material field
- Returns:
vector of material properties
- Return type:
list(Material)
- getVectorOfPartOfMaterialField()[source]¶
Get vector of all the material properties with mesh entities on the material field
- Returns:
vector of material properties with mesh entities
- Return type:
list(PartOfMaterial)
- hasExternalStateVariable(*args, **kwargs)[source]¶
Overloaded function.
hasExternalStateVariable(self: libaster.MaterialField, exteVariIden: externVarEnumInt) -> bool
Detects the presence of an external state variable
- Arguments:
exteVariIden (externVarEnumInt or str): identifier for external state variable
- Returns:
bool: True if has external state variables
hasExternalStateVariable(self: libaster.MaterialField, exteVariIden: str) -> bool
Detects the presence of an external state variable
- Returns:
bool: True if has external state variables
hasExternalStateVariable(self: libaster.MaterialField) -> bool
Detects the presence of any external state variable
- Returns:
bool: True if has external state variables
- hasExternalStateVariableForLoad()[source]¶
Detects the presence of an external state variable for loads
- Returns:
True if has external state variables for loads
- Return type:
bool
MatrixStorage object¶
- class code_aster.Objects.MatrixStorage(arg0)[source]¶
Bases:
DataStructure
MechanicalDirichletBC object¶
- class code_aster.Objects.MechanicalDirichletBC(*args, **kwargs)[source]¶
Bases:
DirichletBC
MechanicalLoadComplex object¶
MechanicalLoadDescriptionReal object¶
- class code_aster.Objects.MechanicalLoadDescriptionReal(arg0, arg1)[source]¶
Bases:
DataStructure
MechanicalLoadFunction object¶
MechanicalLoadReal object¶
- class code_aster.Objects.MechanicalLoadReal(*args, **kwargs)[source]¶
Bases:
DataStructure- getTable(identifier)[source]¶
Extract a Table from the datastructure.
- Parameters:
identifier (str) – Table identifier.
- Returns:
Table stored with the given identifier.
- Return type:
- setPairingField(pairs)[source]¶
Set pairing intersection.
- Parameters:
pairs (FieldOnCellsReal) – pairing intersection.
Mesh object¶
- class code_aster.Objects.Mesh(*args, **kwargs)[source]¶
Bases:
BaseMesh- convertToBiQuadratic(info=1)[source]¶
Convert the mesh to a bi-quadratic one. For cells that have no bi-quadratic version, the quadratic version is used.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the bi-quadratic mesh.
- Return type:
- convertToCubic(info=1)[source]¶
Convert the mesh to a cubic one.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the cubic mesh.
- Return type:
- convertToLinear(info=1)[source]¶
Convert the mesh to a linear one.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the linearized mesh.
- Return type:
- convertToQuadratic(info=1)[source]¶
Convert the mesh to a quadratic one.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the quadratic mesh.
- Return type:
- fix(remove_orphan=True, positive_measure=True, outward_normal=True, double_nodes=True, double_cells=True, tole=1e-07, info=1)[source]¶
Fix potential problems.
- Parameters:
remove_orphan (bool) – remove orphelan nodes.
positive_measure (bool) – reorder nodes to have a positive measure of cells.
outward_normal (bool) – reorder nodes to have an outward normal for boundary faces.
double_nodes (bool) – merge double nodes with almost same coordinates.
double_cells (bool) – merge double cells with same nodes.
tole (float) – tolerance for double nodes
info (int) – verbosity mode (0 or 1 or 2).
- Returns:
fixed mesh
- Return type:
- getCells(*args, **kwargs)[source]¶
Overloaded function.
getCells(self: libaster.Mesh, group_name: str) -> list[int]
Return the list of the indexes of the cells that belong to a group of cells.
- Parameters:
group_name (str) – Name of the local group.
- Returns:
Indexes of the cells of the local group.
- Return type:
list[int]
getCells(self: libaster.Mesh, groups_name: list[str] = []) -> list[int]
Return the list of the indexes of the cells that belong to the groups of cells.
- Parameters:
groups_name (str) – Name of the local groups.
- Returns:
Indexes of the cells of the local groups.
- Return type:
list[int]
- getGroupsOfCells(local=False)[source]¶
Return the list of the existing groups of cells.
- Returns:
List of groups names (stripped).
- Return type:
list[str]
- getGroupsOfNodes(local=False)[source]¶
Return the list of the existing groups of nodes.
- Parameters:
local (bool) – not used (for compatibilty with ParallelMesh)
- Returns:
List of groups names (stripped).
- Return type:
list[str]
- getInnerNodes()[source]¶
Return the list of the indexes of the nodes in the mesh
- Returns:
Indexes of the nodes.
- Return type:
list[int]
- getOctreeMesh(nb_max_pt=1, nb_max_level=20)[source]¶
Get the octree mesh.
- Parameters:
nb_max_pt (int) – maximum number of points for the last level.
nb_max_level (int) – maximum number of level.
- Returns:
octree mesh.
- Return type:
- hasGroupOfCells(group_name, local=False)[source]¶
The group exists in the mesh
- Parameters:
group_name (str) – Name of the group.
local (bool) – not used (for compatibilty with ParallelMesh)
- Returns:
True if exists, False otherwise.
- Return type:
bool
- hasGroupOfNodes(group_name, local=False)[source]¶
The group exists in the mesh
- Parameters:
group_name (str) – Name of the group.
local (bool) – not used (for compatibilty with ParallelMesh)
- Returns:
True if exists, False otherwise.
- Return type:
bool
- isQuadratic(local=False)[source]¶
Tells if the mesh contains quadratic cells.
- Parameters:
local (bool) – not used (for compatibilty with ParallelMesh)
- Returns:
True if the mesh contains quadratic cells, False otherwise.
- Return type:
bool
- printMedFile(fileName, local=True, version=[0, 0, 0])[source]¶
Print the mesh in the MED format
- Parameters:
filename (Path|str) – Name of the file
local (bool=True) – print local values only (relevant for a ParallelMesh only)
version (list) – list of size 3 ([major, minor, release])
- Returns:
True if of
- Return type:
Bool
- readAsterFile(filename)[source]¶
Read a mesh file from ASTER format.
- Parameters:
filename (Path|str) – Path to the file to be read.
- Returns:
True if succeeds, False otherwise.
- Return type:
bool
- readGibiFile(filename)[source]¶
Read a mesh file from GIBI format.
- Parameters:
filename (Path|str) – Path to the file to be read.
- Returns:
True if succeeds, False otherwise.
- Return type:
bool
- readGmshFile(filename)[source]¶
Read a mesh file from GMSH format.
- Parameters:
filename (Path|str) – Path to the file to be read.
- Returns:
True if succeeds, False otherwise.
- Return type:
bool
MeshCoordinatesField object¶
- class code_aster.Objects.MeshCoordinatesField(arg0)[source]¶
Bases:
DataStructure- __add__(*args, **kwargs)[source]¶
Overloaded function.
__add__(self: libaster.MeshCoordinatesField, arg0: libaster.MeshCoordinatesField) -> libaster.MeshCoordinatesField
__add__(self: libaster.MeshCoordinatesField, arg0: libaster.FieldOnNodesReal) -> libaster.MeshCoordinatesField
__add__(self: libaster.FieldOnNodesReal, arg0: libaster.MeshCoordinatesField) -> libaster.MeshCoordinatesField
- __getitem__(node_id)[source]¶
Return the coordinates (x,y,z) at of Node node_id in the vector.
The value is the same as getValues()[3*node_id:3*node_id+2] without creating the entire vector.
- Returns:
coordinates (x,y,z).
- Return type:
tuple[float]
- copy()[source]¶
Return a copy of MeshCoordinatesField object
- Returns:
MeshCoordinatesField object
- Return type:
- getNode(node_id)[source]¶
Return a node
- Parameters:
[int] (node_id) – node id
- Returns:
Node object.
- Return type:
- getValues()[source]¶
Return a list of values of the coordinates as (x1, y1, z1, x2, y2, z2…)
- Returns:
List of coordinates (size = 3 * number of nodes).
- Return type:
list[float]
- size()[source]¶
Return the size of the field
- Returns:
number of values of MeshCoordinatesField object
- Return type:
int
- toFieldOnNodes(mesh)[source]¶
Convert to FieldOnNodes
- Parameters:
mesh[Mesh] – the mesh where the coordinates come from
- Returns:
the corresponding field
- Return type:
MeshPairing object¶
- class code_aster.Objects.MeshPairing(*args, **kwargs)[source]¶
Bases:
DSWithCppPicklingObject to create a pairing operator between two meshed surfaces.
- checkNormals(model)[source]¶
Check orientation of normals
- Parameters:
ModelPtr – a pointer to the model
- Returns:
nothing
- compute(dist_pairing=-1.0, pair_tole=1e-08, area_tole=1e-08)[source]¶
Compute pairing
- Parameters:
dist_pairing (real) – tolerance from DIST_RATIO (projection outside cell)
pair_tole (real) – tolerance for pairing
area_tole (real) – tolerance for removing intersection cells
- getIntersectionArea(*args, **kwargs)[source]¶
Overloaded function.
getIntersectionArea(self: libaster.MeshPairing, indexPair: int) -> float
Compute intersection of area
- Parameters:
indexPair (integer) – index of pair
- Returns:
area of intersection
- Return type:
double
getIntersectionArea(self: libaster.MeshPairing, indexPair: int) -> float
Get area of intersection for a given pair
- Parameters:
indexPair (integer) – index of pair
- Returns:
area of intersection
- Return type:
real
- getIntersectionPoints(indexPair, CoordinatesSpace=1)[source]¶
Get coordinates of intersection points for a given pair
- Parameters:
indexPair (integer) – index of pair
CoordinatesSpace (CoordinatesSpace) – space to describe coordinates
- Returns:
coordinates in given space
- Return type:
list[list]
- getMasterCellNeighbors(cell_number)[source]¶
Get the master cells in the neighbor of a given master cell number
- Parameters:
int – master cell number
- Returns:
master neighbors cells
- Return type:
list
- getMasterCellsFromNode(node_number)[source]¶
Get the master cells associated with a node number
- Parameters:
int – node number
- Returns:
master cells associated
- Return type:
list
- getNumberOfIntersectionPoints(*args, **kwargs)[source]¶
Overloaded function.
getNumberOfIntersectionPoints(self: libaster.MeshPairing, indexPair: int) -> int
Get number of intersection points
- Parameters:
indexPair (integer) – index of pair
- Returns:
number of intersection points
- Return type:
integer
getNumberOfIntersectionPoints(self: libaster.MeshPairing) -> list[int]
Get number of intersection points of all pairs
- Returns:
list: number of intersection points
- getQuadraturePoints(indexPair)[source]¶
Get coordinates of quadrature points for a given pair in global space
- Parameters:
indexPair (integer) – index of pair
- Returns:
quadrature points
- Return type:
list
- getSlaveCellNeighbors(cell_number)[source]¶
Get the slave cells in the neighbor of a given slave cell number
- Parameters:
int – slave cell number
- Returns:
slave neighbors cells
- Return type:
list
- getSlaveCellsFromNode(node_number)[source]¶
Get the slave cells associated with a node number
- Parameters:
int – node number
- Returns:
slave cells associated
- Return type:
list
- setExcludedSlaveGroupOfCells(groups)[source]¶
Set excluded groups of cells on slave side
- Parameters:
str – excluded groups’ names
- setExcludedSlaveGroupOfNodes(groups)[source]¶
Set excluded groups of nodes on slave side
- Parameters:
str – excluded groups’ names
- setMethod(method)[source]¶
Set method of pairing
- Parameters:
method (PairingMethod) – method (“OLD”, “Fast”, “Robust)
MeshesMapping object¶
- class code_aster.Objects.MeshesMapping(*args, **kwargs)[source]¶
Bases:
DataStructure- getCoefficients()[source]¶
Return the coefficients of the interpolation of the slave nodes on the master cells
- Returns:
interpolation coefficients for each slave node
- Return type:
list[real]
ModeResult object¶
- class code_aster.Objects.ModeResult(*args, **kwargs)[source]¶
Bases:
FullResult- setMassMatrix(*args, **kwargs)[source]¶
Overloaded function.
setMassMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementReal) -> None
setMassMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixTemperatureReal) -> None
setMassMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementComplex) -> None
setMassMatrix(self: libaster.ModeResult, arg0: libaster.GeneralizedAssemblyMatrixComplex) -> None
- setStiffnessMatrix(*args, **kwargs)[source]¶
Overloaded function.
setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementReal) -> None
setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixTemperatureReal) -> None
setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementComplex) -> None
setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixPressureReal) -> None
setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixPressureReal) -> None
setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.GeneralizedAssemblyMatrixReal) -> None
ModeResultComplex object¶
- class code_aster.Objects.ModeResultComplex(*args, **kwargs)[source]¶
Bases:
ModeResult- setStiffnessMatrix(*args, **kwargs)[source]¶
Overloaded function.
setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixDisplacementReal) -> bool
setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixDisplacementComplex) -> bool
setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixTemperatureReal) -> bool
setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixPressureReal) -> bool
setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.GeneralizedAssemblyMatrixReal) -> bool
setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.GeneralizedAssemblyMatrixComplex) -> bool
Model object¶
- class code_aster.Objects.Model(*args, **kwargs)[source]¶
Bases:
DataStructure- addModelingOnGroupOfCells(physics, modeling, grpma, formulation=0)[source]¶
Add modeling on all mesh
- Parameters:
physics (Physics) – Physics
modeling (Modelings) – Modeling
grpma (str) – Name of element group
formulation (Formulation) – Formulation (optional)
- addModelingOnMesh(physics, modeling, formulation=0)[source]¶
Add modeling on all mesh
- Parameters:
physics (Physics) – Physics
modeling (Modelings) – Modeling
formulation (Formulation) – Formulation (optional)
- build()[source]¶
Update the DataStructure attributes from the Jeveux objects. Only use internally after calling fortran subroutines.
- Returns:
True if all went ok, False otherwise.
- Return type:
bool
- existsRdM()[source]¶
To know if the model has RdM elements
- Returns:
True if the model contains beam, shell or discret elements, else False
- Return type:
bool
- getConnectionMesh()[source]¶
Return the ConnectionMesh
- Returns:
a pointer to the ConnectionMesh
- Return type:
- getGeometricDimension()[source]¶
To know the geometric dimension supported by the model
- Returns:
geometric dimension
- Return type:
int
- getModelisationName()[source]¶
Get modelisation name used in model
- Returns:
modelisation name if single modelisation, else ‘#PLUSIEURS’
- Return type:
str
- getPhysics()[source]¶
To know the physics supported by the model
- Returns:
Mechanics or Thermal or Acoustic
- Return type:
str
- getTable(identifier)[source]¶
Extract a Table from the datastructure.
- Parameters:
identifier (str) – Table identifier.
- Returns:
Table stored with the given identifier.
- Return type:
- isAcoustic()[source]¶
To know if the model is acoustic or not
- Returns:
True - if the model is acoustic
- Return type:
bool
- isAxis()[source]¶
To know if the model is Axisymmetric
- Returns:
True if the model is axisymmetric, else False
- Return type:
bool
- isMechanical()[source]¶
To know if the model is mechanical or not
- Returns:
True - if the model is mechanical
- Return type:
bool
- isThermal()[source]¶
To know if the model is thermal or not
- Returns:
True - if the model is thermal
- Return type:
bool
MorseStorage object¶
- class code_aster.Objects.MorseStorage(*args, **kwargs)[source]¶
Bases:
MatrixStorage
MultFrontSolver object¶
- class code_aster.Objects.MultFrontSolver(*args, **kwargs)[source]¶
Bases:
LinearSolver
MultipleElasticResult object¶
MumpsSolver object¶
- class code_aster.Objects.MumpsSolver(*args, **kwargs)[source]¶
Bases:
LinearSolver
NodalForceReal object¶
- class code_aster.Objects.NodalForceReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
NodalStructuralForceReal object¶
- class code_aster.Objects.NodalStructuralForceReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
NonLinearResult object¶
- class code_aster.Objects.NonLinearResult(*args, **kwargs)[source]¶
Bases:
TransientResult- printMedFile(filename, medname='', local=False, internalVar=True, fields=[], version='')[source]¶
Print the result in a MED file.
- Parameters:
filename (Path|str) – Path to the output file.
medname (str) – Name of the result in the MED file. (default: “”)
local (bool) – Print only the local domain if True. (default: True)
internalVarl (bool) – True)
fields (list[str]) – Name of fields to save. (default: all)
version (str) – Version of MED file.
NormalSpeedOnFaceReal object¶
- class code_aster.Objects.NormalSpeedOnFaceReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
ParallelContactFEDescriptor object¶
- class code_aster.Objects.ParallelContactFEDescriptor(arg0, arg1, arg2, arg3, arg4, arg5)[source]¶
Bases:
FiniteElementDescriptor
ParallelContactNew object¶
ParallelContactPairing object¶
- class code_aster.Objects.ParallelContactPairing(*args, **kwargs)[source]¶
Bases:
ContactPairing
ParallelDOFNumbering object¶
- class code_aster.Objects.ParallelDOFNumbering(*args, **kwargs)[source]¶
Bases:
BaseDOFNumbering- getComponentFromDOF(dof, local=False)[source]¶
Returns the component name associated to a dof index.
If the dof is associated to a physical DOF, the name of the component is returned.
If the dof is associated to a Lagrange multiplier DOF for a Dirichlet boundary condition, the name of the component which is constrained by the multiplier is returned, precedeed by ‘LAGR:’, e.g. ‘LAGR:DX’.
If the dof is associated to a Lagrange multiplier DOF for a multipoint-constraint (MPC) implying several DOF, ‘LAGR:MPC’ is returned (since no component can be identified).
- Parameters:
node (int) – Index of the node.
local (bool) – dof in local or global numbering
- Returns:
component names.
- Return type:
str
- getComponentFromNode(node, local=False)[source]¶
Returns the components name associated to a node index.
- Parameters:
node (int) – Index of the node.
local (bool, optional) – local or global numbering of nodes (default: false).
- Returns:
component names.
- Return type:
str
- getComponents()[source]¶
Returns all the component names assigned in the numbering.
- Returns:
component names.
- Return type:
str
- getDictOfLagrangeDOFs(local=False)[source]¶
Returns the Rows Associated to the first and second Lagrange Multipliers Dof
- Parameters:
local (bool, optional) – local or global numbering of DOFs (default: false).
- Returns:
- {1indexes of the first Lagrange multipliers dof,
2 : indexes of the second Lagrange multipliers dof }
- Return type:
[dict]
- getGhostDOFs(local=True)[source]¶
Returns the indexes of the ghost DOFs.
- Parameters:
local (bool) – local or global numbering
- Returns:
indexes of the ghost DOFs.
- Return type:
int
- getLagrangeDOFs(local=False)[source]¶
Returns the indexes of the Lagrange multipliers dof.
- Parameters:
local (bool, optional) – local or global numbering of DOFs (default: false).
- Returns:
indexes of the Lagrange multipliers dof.
- Return type:
int
- getLocalToGlobalMapping()[source]¶
Returns the mapping from the local to the global number of the DOFs.
- Returns:
global number of the DOF.
- Return type:
int
- getNoGhostDOFs(local=True)[source]¶
Returns the indexes of the DOFs owned locally (aka not ghost).
- Parameters:
local (bool) – local or global numbering
- Returns:
indexes of the DOFs owned locally.
- Return type:
int
- getNodeAndComponentFromDOF(*args, **kwargs)[source]¶
Overloaded function.
getNodeAndComponentFromDOF(self: libaster.ParallelDOFNumbering, local: bool = True) -> list[tuple[int, str]]
Return the list of node id and name of component for each dofs
- Parameters:
local (bool) – if True use local node index else use global index in HPC
- Returns:
node id and name of component for each dofs
- Return type:
list[tuple[int, str]]
getNodeAndComponentFromDOF(self: libaster.ParallelDOFNumbering, dof: int, local: bool = True) -> tuple[int, str]
Return the node id and name of component for given DOF
- Parameters:
dof (int) – DOF index
local (bool) – if True use local node index else use global index in HPC
- Returns:
node id and name of component
- Return type:
tuple[int, str]
- getNodeFromDOF(dof, local=False)[source]¶
Returns the node index associated to a dof index.
- Parameters:
dof (int) – Index of the dof.
local (bool, optional) – local or global numbering of DOFs (default: false).
- Returns:
index of the dof.
- Return type:
int
- getNumberOfDOFs(local=False)[source]¶
Returns the number of DOFs.
- Parameters:
local (bool) – local or parallel request
- Returns:
number of DOFs.
- Return type:
int
- getPhysicalDOFs(local=False)[source]¶
Returns the indexes of the physical dof.
- Parameters:
local (bool, optional) – local or global numbering of DOFs (default: false).
- Returns:
indexes of the physical dof.
- Return type:
int
- globalToLocalDOF(glob)[source]¶
Returns the local number of a global DOF.
- Parameters:
glob (int) – global DOF number
- Returns:
local number of the DOF.
- Return type:
int
- isPhysicalDOF(dof, local=False)[source]¶
If the dof is associated to a physical DOF, return True
- If the dof is associated to a Lagrange multiplier DOF for a Dirichlet boundary
condition, return False
- Parameters:
dof (int) – Index of the dof.
local (bool, optional) – local or global numbering of DOFs (default: false).
- Returns:
index of the dof.
- Return type:
int
- localToGlobalDOF(loc)[source]¶
Returns the global number of a local DOF.
- Parameters:
loc (int) – local DOF number
- Returns:
global number of the DOF.
- Return type:
int
ParallelEquationNumbering object¶
- class code_aster.Objects.ParallelEquationNumbering(*args, **kwargs)[source]¶
Bases:
EquationNumbering- getDOFsWithDescription(*args, **kwargs)[source]¶
Overloaded function.
getDOFsWithDescription(self: libaster.ParallelEquationNumbering, cmps: list[str] = [], groupNames: list[str] = [], local: bool = True, same_rank: int = <PythonBool.NONE: -1>) -> tuple[tuple[list[int], list[str]], list[int]]
Get the dofs associated to the given component restricted to the given group.
- Parameters:
cmps (list[str]) – components to extract.
groupNames (list[str]) – group names to filter.
local (bool) – if True use local dof index else use global index in HPC
same_rank –
None: keep all nodes (default: None)
True: keep the nodes which are owned by the current MPI-rank
False: keep the nodes which are not owned by the current MPI-rank
- Returns:
list of nodes and list of components list[int]: list of dofs
- Return type:
pair[list[int], list[str]]
getDOFsWithDescription(self: libaster.ParallelEquationNumbering, cmps: list[str] = [], nodes: list[int] = [], local: bool = True, same_rank: int = <PythonBool.NONE: -1>) -> tuple[tuple[list[int], list[str]], list[int]]
Get the dofs associated to the given component restricted to the given nodes.
- Parameters:
cmps (list[str]) – components to extract.
nodes (list[int]) – list of nodes to filter.
local (bool) – if True use local dof index else use global index in HPC
same_rank –
None: keep all nodes (default: None)
True: keep the nodes which are owned by the current MPI-rank
False: keep the nodes which are not owned by the current MPI-rank
- Returns:
list of nodes and list of components. list[int]: list of dofs.
- Return type:
pair[list[int], list[str]]
- getGhostDOFs(local=True, lastLayerOnly=False)[source]¶
Returns the indexes of the ghost DOFs.
- Parameters:
local (bool) – local or global numbering
lastLayerOnly (bool) – last ghosts layer or all
- Returns:
indexes of the ghost DOFs.
- Return type:
int
- getLocalToGlobalMapping()[source]¶
Returns the mapping from the local to the global number of the DOFs.
- Returns:
global number of the DOF.
- Return type:
int
- getNoGhostDOFs(local=True)[source]¶
Returns the indexes of the DOFs owned locally (aka not ghost).
- Returns:
indexes of the DOFs owned locally.
- Return type:
int
- getNodeAndComponentFromDOF(*args, **kwargs)[source]¶
Overloaded function.
getNodeAndComponentFromDOF(self: libaster.ParallelEquationNumbering, local: bool = True) -> list[tuple[int, str]]
Return the list of node id and name of component for each dofs
- Parameters:
local (bool) – if True use local node index else use global index in HPC
- Returns:
node id and name of component for each dofs
- Return type:
list[tuple[int, str]]
getNodeAndComponentFromDOF(self: libaster.ParallelEquationNumbering, dof: int, local: bool = True) -> tuple[int, str]
Return the node id and name of component for given DOF
- Parameters:
dof (int) – DOF index
local (bool) – if True use local node index else use global index in HPC
- Returns:
node id and name of component
- Return type:
tuple[int, str]
ParallelFiniteElementDescriptor object¶
- class code_aster.Objects.ParallelFiniteElementDescriptor(arg0, arg1, arg2)[source]¶
Bases:
FiniteElementDescriptor
ParallelFrictionNew object¶
- class code_aster.Objects.ParallelFrictionNew(*args, **kwargs)[source]¶
Bases:
ParallelContactNew
ParallelMechanicalLoadFunction object¶
- class code_aster.Objects.ParallelMechanicalLoadFunction(*args, **kwargs)[source]¶
Bases:
DataStructure
ParallelMechanicalLoadReal object¶
- class code_aster.Objects.ParallelMechanicalLoadReal(*args, **kwargs)[source]¶
Bases:
DataStructure- setRebuildParameters(syntax, grpNo, grpMa)[source]¶
Set parameters to be able to rebuild object in case of balancing
- Parameters:
syntax (SyntaxSaver) – syntax used to build object
grpNo (list of strings) – list of node groups
grpMa (list of strings) – list of cell groups
ParallelMesh object¶
- class code_aster.Objects.ParallelMesh(*args, **kwargs)[source]¶
Bases:
BaseMesh- convertToBiQuadratic(info=1)[source]¶
Convert the mesh to a bi-quadratic one. For cells that have no bi-quadratic version, the quadratic version is used.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the bi-quadratic mesh.
- Return type:
- convertToCubic(info=1)[source]¶
Convert the mesh to a cubic one.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the cubic mesh.
- Return type:
- convertToLinear(info=1)[source]¶
Convert the mesh to a linear one.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the linearized mesh.
- Return type:
- convertToQuadratic(info=1)[source]¶
Convert the mesh to a quadratic one.
- Parameters:
info (int) – verbosity mode (1 or 2). Default 1.
- Returns:
the quadratic mesh.
- Return type:
- fix(remove_orphan=True, positive_measure=True, outward_normal=True, double_nodes=True, double_cells=True, tole=1e-07, info=1)[source]¶
Fix potential problems.
- Parameters:
remove_orphan (bool) – remove orphelan nodes.
positive_measure (bool) – reorder nodes to have a positive measure of cells.
outward_normal (bool) – reorder nodes to have an outward normal for boundary faces.
double_nodes (bool) – merge double nodes with almost same coordinates.
double_cells (bool) – merge double cells with same nodes.
tole (float) – tolerance for double nodes
info (int) – verbosity mode (0 or 1 or 2).
- Returns:
fixed mesh
- Return type:
- getAllMedCellsTypes()[source]¶
Return all Med types available in mesh (for all processors).
- Returns:
List of Med types.
- Return type:
list[int]
- getCells(*args, **kwargs)[source]¶
Overloaded function.
getCells(self: libaster.ParallelMesh, group_name: str) -> list[int]
Return the list of the indexes of the cells that belong to a group of cells.
- Parameters:
group_name (str) – Name of the local group.
- Returns:
Indexes of the cells of the local group.
- Return type:
list[int]
getCells(self: libaster.ParallelMesh, groups_name: list[str] = []) -> list[int]
Return the list of the indexes of the cells that belong to the groups of cells.
- Parameters:
groups_name (str) – Name of the local groups.
- Returns:
Indexes of the cells of the local groups.
- Return type:
list[int]
- getCellsOwner()[source]¶
Return the rank of the processor which owns the cells
- Returns:
MPI-Rank of the owners of the cells
- Return type:
list[int]
- getCellsRanks()[source]¶
Return the rank of the sub-domains which have the cells. The first subdomain given for a cell is its owner.
- Returns:
MPI-Rank of of the subdomains
- Return type:
list[list[int]]
- getGlobalToLocalNodeIds()[source]¶
Returns global to local IDs mapping for nodes
- Returns:
global to local IDs mapping.
- Return type:
dict[int]
- getGroupsOfCells(local=False)[source]¶
Return the list of the existing (local or global) groups of cells.
- Parameters:
local (bool) – search in local or global groups
- Returns:
List of (local or global) groups names (stripped).
- Return type:
list[str]
- getGroupsOfNodes(local=False)[source]¶
Return the list of the existing (local or global) groups of nodes.
- Parameters:
local (bool) – search in local or global groups
- Returns:
List of (local or global) groups names (stripped).
- Return type:
list[str]
- getInnerCells()[source]¶
Return the list of the indexes of the inner cells in the mesh
- Returns:
Indexes of the cells.
- Return type:
list[int]
- getInnerNodes()[source]¶
Return the list of the indexes of the inner nodes in the mesh
- Returns:
Indexes of the nodes.
- Return type:
list[int]
- getLastGhostsLayer()[source]¶
Return ids in local numbering of ghost nodes on the last layer
- Returns:
List of Nodes ids.
- Return type:
list[int]
- getNodesOwner()[source]¶
Return the rank of the processor which owns the nodes
- Returns:
MPI-Rank of the owner of the nodes
- Return type:
list[int]
- getNodesRanks()[source]¶
Return the rank of the sub-domains which have the nodes. The first subdomain given for a node is its owner.
- Returns:
MPI-Rank of of the subdomains
- Return type:
list[list[int]]
- getOuterCells()[source]¶
Return the list of the indexes of the outer cells in the mesh
- Returns:
Indexes of the cells.
- Return type:
list[int]
- getOuterNodes()[source]¶
Return the list of the indexes of the outer nodes in the mesh
- Returns:
Indexes of the nodes.
- Return type:
list[int]
- getReceiveJoint(rank)[source]¶
Returns ids of nodes in joint (inner nodes) for an opposite process
- Parameters:
rank – Rank of opposite domain
- getSendJoint(rank)[source]¶
Returns ids of nodes in joint (inner nodes) for an opposite process
- Parameters:
rank – Rank of opposite domain
- hasGroupOfCells(group_name, local=False)[source]¶
The global group exists in the mesh
- Parameters:
group_name (str) – Name of the global group.
local (bool) – search in local or global groups
- Returns:
True if exists, False otherwise.
- Return type:
bool
- hasGroupOfNodes(group_name, local=False)[source]¶
The (local or global) group exists in the mesh
- Parameters:
group_name (str) – Name of the (local or global) group.
local (bool) – search local or global groups
- Returns:
True if exists, False otherwise.
- Return type:
bool
- isQuadratic(local=False)[source]¶
Tells if the mesh contains quadratic cells.
- Parameters:
local (bool) – if True only local cells are checked.
- Returns:
True if the mesh contains quadratic cells, False otherwise.
- Return type:
bool
- printMedFile(fileName, local=True, version=[0, 0, 0])[source]¶
Print the mesh in the MED format
- Parameters:
filename (Path|str) – Name of the file
local (bool=True) – print local values only (relevant for a ParallelMesh only)
version (list) – list of size 3 ([major, minor, release])
- Returns:
True if of
- Return type:
Bool
- setGroupOfCells(group_name, cell_ids)[source]¶
Set new group of cells in the mesh
- Parameters:
group_name (str) – Name of the new group.
cell_ids (list[int]) – cell ids which are in the group
ParallelThermalLoadFunction object¶
- class code_aster.Objects.ParallelThermalLoadFunction(*args, **kwargs)[source]¶
Bases:
DataStructure
ParallelThermalLoadReal object¶
- class code_aster.Objects.ParallelThermalLoadReal(*args, **kwargs)[source]¶
Bases:
DataStructure- setRebuildParameters(syntax, grpNo, grpMa)[source]¶
Set parameters to be able to rebuild object in case of balancing
- Parameters:
syntax (SyntaxSaver) – syntax used to build object
grpNo (list of strings) – list of node groups
grpMa (list of strings) – list of cell groups
PetscSolver object¶
- class code_aster.Objects.PetscSolver(*args, **kwargs)[source]¶
Bases:
LinearSolver
PressureOnPipeReal object¶
- class code_aster.Objects.PressureOnPipeReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
PressureOnShellReal object¶
- class code_aster.Objects.PressureOnShellReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
PrestressingCable object¶
- class code_aster.Objects.PrestressingCable(*args, **kwargs)[source]¶
Bases:
DataStructure
Result object¶
- class code_aster.Objects.Result(*args, **kwargs)[source]¶
Bases:
DataStructure- allocate(nb_index)[source]¶
Allocate result
- Parameters:
nb_index (int) – number of index to allocate
- clear(*args, **kwargs)[source]¶
Overloaded function.
clear(self: libaster.Result) -> None
Clear fields, models, parameters, … in result
clear(self: libaster.Result, index: int) -> None
Clear fields, models, parameters, … in result from the given index
- Parameters:
index (int) – index from begin cleaning
- createIndexFromParameter(para_name, para_value)[source]¶
Create an index in the result
- Parameters:
para_name (str) – parameter name to store
para_value (str) – parameter value to store
- exists()[source]¶
The result exists or nor
- Returns:
True if the result exists else False
- Return type:
bool
- getAccessParameters(only_access=True)[source]¶
Return the access parameters of the result as Python dict.
- Returns:
list[int,float,str]}: Dict of values for each access variable.
- Return type:
dict{str
- getAllElementaryCharacteristics()[source]¶
Return the list of all elementary characteristics used in the result
- Returns:
list of ElementaryCharacteristics.
- Return type:
- getConstantFieldsOnCellsChar16Names()[source]¶
Return the names of the contant char16 fields on cells as Python list.
- Returns:
List of names of the contant fields on cells.
- Return type:
list(str)
- getConstantFieldsOnCellsRealNames()[source]¶
Return the names of the contant real fields on cells as Python list.
- Returns:
List of names of the contant fields on cells.
- Return type:
list(str)
- getElementaryCharacteristics(*args, **kwargs)[source]¶
Overloaded function.
getElementaryCharacteristics(self: libaster.Result, index: int) -> libaster.ElementaryCharacteristics
Get elementary characterictics at the specfied index
- Parameters:
index (int) – index
- Returns:
a pointer to elementary characterictics.
- Return type:
getElementaryCharacteristics(self: libaster.Result) -> libaster.ElementaryCharacteristics
- getEquationNumberings()[source]¶
Get list of field’s description to build internal FieldOnNodes
- Returns:
list of field’s description
- Return type:
list[EquationNumbering]
- getFieldsNames(*args, **kwargs)[source]¶
Overloaded function.
getFieldsNames(self: libaster.Result) -> list[str]
Return the list of names of stored fields
- Returns:
List of names of stored fields.
- Return type:
list[str]
getFieldsNames(self: libaster.Result) -> list[str]
Return the list of names of stored fields
- Returns:
List of names of stored fields.
- Return type:
list[str]
- getFieldsOnCellsComplexNames()[source]¶
Return the names of the complex fields on cells as Python list.
- Returns:
List of names of the complex fields on cells.
- Return type:
list(str)
- getFieldsOnCellsLongNames()[source]¶
Return the names of the integer fields on cells as Python list.
- Returns:
List of names of the integer fields on cells.
- Return type:
list(str)
- getFieldsOnCellsRealNames()[source]¶
Return the names of the real fields on cells as Python list.
- Returns:
List of names of the real fields on cells.
- Return type:
list(str)
- getFieldsOnNodesComplexNames()[source]¶
Return the names of the complex fields on nodes as Python list.
- Returns:
List of names of the complex fields on nodes.
- Return type:
list(str)
- getFieldsOnNodesRealNames()[source]¶
Return the names of the real fields on nodes as Python list.
- Returns:
List of names of the real fields on nodes.
- Return type:
list(str)
- getFiniteElementDescriptors()[source]¶
Get list of finite element descriptor to build internal FieldOnCells
- Returns:
list of finite element descriptor
- Return type:
list[FiniteElementDescriptor]
- getFirstIndex()[source]¶
Get the first index stored in the result
- Returns:
first index stored.
- Return type:
int
- getGeneralizedVectorComplexNames()[source]¶
Return the names of the complex generalized vectors as Python list.
- Returns:
List of names of the complex generalized vectors.
- Return type:
list(str)
- getGeneralizedVectorRealNames()[source]¶
Return the names of the real generalized vectors as Python list.
- Returns:
List of names of the real generalized vectors.
- Return type:
list(str)
- getIndexes()[source]¶
Return the list of indexes used to store fields
- Returns:
List of indexs used to store fields.
- Return type:
list[int]
- getIndexesForFieldName(arg0)[source]¶
- Returns the list of indexes used to store a specific field,
indicated by its name.
- Returns:
List of indexs used to store fields.
- Return type:
list[int]
- getLastIndex()[source]¶
Get the last index stored in the result
- Returns:
last index stored.
- Return type:
int
- getLastTime()[source]¶
Get the last time value stored in the result
- Returns:
last time value.
- Return type:
float
- getListOfLoads(index)[source]¶
Get list of loads on the specified index
- Parameters:
index (int) – index to get
- Returns:
a pointer to list of loads.
- Return type:
- getMaterialField(*args, **kwargs)[source]¶
Overloaded function.
getMaterialField(self: libaster.Result, index: int) -> libaster.MaterialField
Return the material field for the given index.
- Parameters:
index (int) – index
- Returns:
Material field.
- Return type:
getMaterialField(self: libaster.Result) -> libaster.MaterialField
- getMaterialFields()[source]¶
Return the list of all material fields used in the result
- Returns:
list of material field.
- Return type:
list[MaterialField]
- getMesh()[source]¶
Return a pointer to mesh
- Returns:
a pointer to the mesh.
- Return type:
mesh (Mesh)
- getModel(*args, **kwargs)[source]¶
Overloaded function.
getModel(self: libaster.Result, index: int) -> libaster.Model
Return the model for the given index.
- Parameters:
index (int) – index
- Returns:
Model object.
- Return type:
getModel(self: libaster.Result) -> libaster.Model
- getModels()[source]¶
Return the list of all models used in the result
- Returns:
list of models.
- Return type:
list[Model]
- getNumberOfIndexes()[source]¶
Get the number of index stored in the result
- Returns:
number of index stored.
- Return type:
int
- getParameters(only_access=False)[source]¶
Return the parameters of the result as Python dict.
- Returns:
list[int,float,str]}: Dict of values for each parameter variable.
- Return type:
dict{str
- getTable(identifier)[source]¶
Extract a Table from the datastructure.
- Parameters:
identifier (str) – Table identifier.
- Returns:
Table stored with the given identifier.
- Return type:
- getTime(index)[source]¶
Get time at the specified index
- Parameters:
index (int) – index where to save time value
- Returns
float: time value
- hasElementaryCharacteristics(*args, **kwargs)[source]¶
Overloaded function.
hasElementaryCharacteristics(self: libaster.Result, index: int) -> bool
Test if a elementary characterictics is used at the specfied index
- Parameters:
index (int) – index
- Returns:
True if at least one elementary characterictics used else False.
- Return type:
bool
hasElementaryCharacteristics(self: libaster.Result) -> bool
- hasListOfLoads(*args, **kwargs)[source]¶
Overloaded function.
hasListOfLoads(self: libaster.Result, index: int) -> bool
Test if a list of loads is used at the specfied index
- Parameters:
index (int) – index
- Returns:
True if at least one list of loads is used else False.
- Return type:
bool
hasListOfLoads(self: libaster.Result) -> bool
- hasMaterialField(index)[source]¶
Test if a material field is used at the specfied index
- Parameters:
index (int) – index
- Returns:
True if at a material field used else False.
- Return type:
bool
- hasModel(index)[source]¶
Test if a model is used at the specfied index
- Parameters:
index (int) – index
- Returns:
True if at a model used else False.
- Return type:
bool
- printMedFile(filename, medname='', local=True, internalVar=True, fields=[], version='')[source]¶
Print the result in a MED file.
- Parameters:
filename (Path|str) – Path to the output file.
medname (str) – Name of the result in the MED file. (default: “”)
local (bool) – Print only the local domain if True. (default: True)
fields (list[str]) – Name of fields to save. (default: all)
version (str) – Version of MED file.
- resize(nbIndexes)[source]¶
Resize the object.
- Parameters:
nbIndexes (int) – new expected size. Should be greater than the current size, otherwise the size is unchanged.
- setElementaryCharacteristics(*args, **kwargs)[source]¶
Overloaded function.
setElementaryCharacteristics(self: libaster.Result, cara_elem: libaster.ElementaryCharacteristics, exists_ok: bool = False) -> None
Set elementary characterictics on all indexs
- Parameters:
cara_elem (ElementaryCharacteristics) – elementary characterictics to set.
exists_ok (bool) – If True, pass silently if a Model is already defined. False by default.
setElementaryCharacteristics(self: libaster.Result, cara_elem: libaster.ElementaryCharacteristics, index: int) -> None
Set elementary characterictics on the specified index
- Parameters:
cara_elem (ElementaryCharacteristics) – elementary characterictics to set.
index (int) – index to set
- setListOfLoads(load, index)[source]¶
Set list of loads on the specified index
- Parameters:
load (ListOfLoads) – list of loads to set.
index (int) – index to set
- setMaterialField(*args, **kwargs)[source]¶
Overloaded function.
setMaterialField(self: libaster.Result, mater: libaster.MaterialField, exists_ok: bool = False) -> None
Set material field on all indexs
- Parameters:
mater (MaterialField) – material field to set.
exists_ok (bool) – If True, pass silently if a Model is already defined. False by default.
setMaterialField(self: libaster.Result, mater: libaster.MaterialField, index: int) -> None
Set material field on the specified index
- Parameters:
mater (MaterialField) – material field to set.
index (int) – index to set
- setModel(*args, **kwargs)[source]¶
Overloaded function.
setModel(self: libaster.Result, model: libaster.Model, exists_ok: bool = False) -> None
Set model on all indexs
- Parameters:
model (Model) – Model to be assigned.
exists_ok (bool) – If True, pass silently if a Model is already defined. False by default.
setModel(self: libaster.Result, model: libaster.Model, index: int) -> None
Set model on the specified index
- Parameters:
model (Model) – model to set
index (int) – index to set
- setParameterValue(*args, **kwargs)[source]¶
Overloaded function.
setParameterValue(self: libaster.Result, para_name: str, para_value: float, index: int) -> None
Add parameter at the specified index
- Parameters:
para_name (float) – parameter name to store
para_value (float) – parameter value to store
index (int) – index where to save value of parameter
setParameterValue(self: libaster.Result, para_name: str, para_value: str, index: int) -> None
Add parameter at the specified index
- Parameters:
para_name (float) – parameter name to store
para_value (str) – parameter value to store
index (int) – index where to save value of parameter
RitzBasis object¶
- class code_aster.Objects.RitzBasis(*args, **kwargs)[source]¶
Bases:
GenericModalBasis
SimpleFieldOnCellsReal object¶
- class code_aster.Objects.SimpleFieldOnCellsReal(*args, **kwargs)[source]¶
Bases:
DataField- allocate(loc, quantity, cmps, nbPG, nbSP=1, zero=False)[source]¶
Allocate the field.
- Parameters:
[str] (quantity) – localization like ‘ELEM’
[str] – physical quantity like ‘DEPL_R’
[list[str]] (cmps) – list of components.
[int] (nbSP) – number of Gauss Point by cell
[int] – number of sub-point by point.
- asPhysicalQuantity(physQuantity, map_cmps)[source]¶
Return a new field with a new physical quantity and renamed components.
- Parameters:
[str] (physQuantity) – name of the new physical quantity
[dict[str (map_cmps) – dict to rename components
str]] – dict to rename components
keeped) ((only renamed component will be) –
- Returns:
field with name physical quantity.
- Return type:
- getCellsWithValues()[source]¶
Returns the list of cells where the field is defined.
- Returns:
Indexes of cells where the field is defined.
- Return type:
tuple (int)
- getValue(ima, icmp, ipt, ispt=0)[source]¶
Returns the value of the icmp component of the field on the ima cell, at the ipt point, at the ispt sub-point.
- Parameters:
ima (int) – Index of cells.
icmp (int) – Index of component.
ipt (int) – Index of point.
ispt (int) – Index of sub-point (default = 0).
- Returns:
- Value of field at ima, of icmp, at ipt, at ispt;
NaN if the position is not allocated.
- Return type:
float
- getValuesWithDescription(*args, **kwargs)[source]¶
Overloaded function.
getValuesWithDescription(self: libaster.SimpleFieldOnCellsReal, cmps: list[str], cells: list[int]) -> tuple[list[float], tuple[list[int], list[str], list[int], list[int]]]
Returns values and description corresponding to given cmp and given cells
- Parameters:
cmps (list[str]) – components to extract.
cells (list[int]) – list of cells.
- Returns:
values[list[double], tuple[cells[list[int]], cmps[list[int]] points[list[int]], subpoints[list[int]]]
getValuesWithDescription(self: libaster.SimpleFieldOnCellsReal, cmps: list[str] = [], cells: list[str] = []) -> tuple[list[float], tuple[list[int], list[str], list[int], list[int]]]
Returns values and description corresponding to given cmp and given cells
- Parameters:
cmps (list[str]) – components to extract.
groupsOfCells (list[str]) – list of groups of cells to use.
- Returns:
values[list[double], tuple[cells[list[int]], cmps[list[int]] points[list[int]], subpoints[list[int]]]
- hasValue(*args, **kwargs)[source]¶
Overloaded function.
hasValue(self: libaster.SimpleFieldOnCellsReal, ima: int, icmp: int, ipt: int, ispt: int = 0) -> bool
Returns True if the value of the icmp component of the field on the ima cell, at the ipt point, at the ispt sub-point is affected.
- Parameters:
ima (int) – Index of cells.
icmp (int) – Index of component.
ipt (int) – Index of point.
ispt (int) – Index of sub-point (default = 0).
- Returns:
True if the value is affected
- Return type:
bool
hasValue(self: libaster.SimpleFieldOnCellsReal, ima: int, cmp: str, ipt: int, ispt: int = 0) -> bool
Returns True if the value of the icmp component of the field on the ima cell, at the ipt point, at the ispt sub-point is affected.
- Parameters:
ima (int) – Index of cells.
cmp (str) – name of component.
ipt (int) – Index of point.
ispt (int) – Index of sub-point (default = 0).
- Returns:
True if the value is affected
- Return type:
bool
- norm(arg0)[source]¶
Return the norm of the field
- Parameters:
normType (str) – “NORM_1”, “NORM_2”, “NORM_INFINITY”
- Returns:
norm
- Return type:
float
- restrict(cmps=[], groupsOfCells=[])[source]¶
Return a new field restricted to the list of components and groups of cells given
- Parameters:
cmps[list[str]] – filter on list of components
empty (If) –
used (the full mesh is) –
groupsOfCells[list[str]] – filter on list of groups of cells (default=” “).
empty –
used –
- Returns:
field restricted.
- Return type:
- setValue(*args, **kwargs)[source]¶
Overloaded function.
setValue(self: libaster.SimpleFieldOnCellsReal, ima: int, icmp: int, ipt: int, ispt: int, val: float) -> None
Set the value of the icmp component of the field on the ima cell, at the ipt point, at the ispt sub-point.
- Parameters:
ima (int) – Index of cells.
icmp (int) – Index of component.
ipt (int) – Index of point.
ispt (int) – Index of sub-point.
val (float) – value to set
setValue(self: libaster.SimpleFieldOnCellsReal, ima: int, icmp: int, ipt: int, val: float) -> None
Set the value of the icmp component of the field on the ima cell, at the ipt point, at the ispt=0 sub-point.
- Parameters:
ima (int) – Index of cells.
icmp (int) – Index of component.
ipt (int) – Index of point.
val (float) – value to set
- setValues(*args, **kwargs)[source]¶
Overloaded function.
setValues(self: libaster.SimpleFieldOnCellsReal, cells: list[int], cmps: list[str], npg: list[int], spt: list[int], values: list[float]) -> None
Set values for a given list of tuple (cell, cmp, ipg, isp, value). Each value of the tuple is given as a separated list.
- Arguments:
cells (list[int]): list of cells. cmps (list[str)]: list of components npg (list[int]): list of point spt (list[int]): list of sub-point values (list[float]): list of values to set.
setValues(self: libaster.SimpleFieldOnCellsReal, values: list[float]) -> None
Set values for each cells and components as (cell_0_val_0, cell_0_val_1, …)
- Arguments:
values (list[float]): list of values to set.
- toFieldOnCells(fed, option='', nompar='', zeroExtension=True)[source]¶
Converts to FieldOnCells
- Parameters:
[FiniteElementDescriptor] (fed) – finite element descriptor
[str] (nompar) – name of option like TOUT_INI_ELGA (default: “ “)
[str] – name of parameter like DEPL_R (default: “ “)
[bool] (zeroExtension) – true if field could be extended to zero (default: True)
- Returns:
field converted.
- Return type:
- toNumpy()[source]¶
Returns two numpy arrays with shape ( number_of_cells_with_components, number_of_components ) The first array contains the field values while the second one is a mask which is True if the corresponding value exists, False otherwise.
Where the mask is False the corresponding value is set to zero.
- Returns:
Field values. ndarray (bool): Mask for the field values.
- Return type:
ndarray (float)
SimpleFieldOnNodesComplex object¶
- class code_aster.Objects.SimpleFieldOnNodesComplex(*args, **kwargs)[source]¶
Bases:
DataField- toNumpy()[source]¶
Returns two numpy arrays with shape ( number_of_components, space_dimension ) The first array contains the field values while the second one is a mask which is True if the corresponding value exists, False otherwise.
Where the mask is False the corresponding value is set to zero.
- Returns:
Field values. ndarray (bool): Mask for the field values.
- Return type:
ndarray (complex)
SimpleFieldOnNodesReal object¶
- class code_aster.Objects.SimpleFieldOnNodesReal(*args, **kwargs)[source]¶
Bases:
DataField- __getitem__(*args, **kwargs)[source]¶
Overloaded function.
__getitem__(self: libaster.SimpleFieldOnNodesReal, arg0: tuple[int, int]) -> float
__getitem__(self: libaster.SimpleFieldOnNodesReal, arg0: tuple[int, str]) -> float
- __setitem__(*args, **kwargs)[source]¶
Overloaded function.
__setitem__(self: libaster.SimpleFieldOnNodesReal, arg0: tuple[int, int], arg1: float) -> float
__setitem__(self: libaster.SimpleFieldOnNodesReal, arg0: tuple[int, str]) -> float
- allocate(quantity, cmps, zero=False)[source]¶
Allocate the field.
- Parameters:
[str] (quantity) – physical quantity like ‘DEPL_R’
[list[str]] (cmps) – list of components.
- asPhysicalQuantity(physQuantity, map_cmps)[source]¶
Return a new field with a new physical quantity and renamed components.
- Parameters:
[str] (physQuantity) – name of the new physical quantity
[dict[str (map_cmps) – dict to rename components
str]] – dict to rename components
keeped) ((only renamed component will be) –
- Returns:
field with name physical quantity.
- Return type:
- getValuesWithDescription(*args, **kwargs)[source]¶
Overloaded function.
getValuesWithDescription(self: libaster.SimpleFieldOnNodesReal, cmps: list[str] = [], groupsOfNodes: list[str] = []) -> tuple[list[float], tuple[list[int], list[str]]]
Return the values of components of the field.
- Arguments:
cmps (list[str]) : Extracted components or all components if it is empty. groups (list[str]): The extraction is limited to the given groups of nodes.
- Returns:
- tuple( values, description ): List of values and description.
The description provides a tuple with( nodes ids, components ).
getValuesWithDescription(self: libaster.SimpleFieldOnNodesReal, cmps: list[str], nodes: list[int]) -> tuple[list[float], tuple[list[int], list[str]]]
Return the values of components of the field.
- Arguments:
cmps (list[str]) : Extracted components or all components if it is empty. nodes (list[int]): The extraction is limited to the given nodes.
- Returns:
- tuple( values, description ): List of values and description.
The description provides a tuple with( nodes ids, components ).
- norm(arg0)[source]¶
Return the norm of the field
- Parameters:
normType (str) – “NORM_1”, “NORM_2”, “NORM_INFINITY”
- Returns:
norm
- Return type:
float
- setValues(*args, **kwargs)[source]¶
Overloaded function.
setValues(self: libaster.SimpleFieldOnNodesReal, nodes: list[int], cmps: list[str], values: list[float]) -> None
Set values for a given list of triplet (node, cmp, value). Each value of the triplet is given as a separated list.
- Arguments:
nodes (list[int]): list of nodes. cmps (list[str]): list of comp components values (list[float]): list of values to set.
setValues(self: libaster.SimpleFieldOnNodesReal, values: list[float]) -> None
Set values for each nodes and components as (node_0_val_0, node_0_val_1, …)
- Arguments:
values (list[float]): list of values to set.
setValues(self: libaster.SimpleFieldOnNodesReal, values: list[list[float]]) -> None
Set values for each nodes and components.
- Arguments:
values (list[list[float]]): list of values to set. For each node, give the values for all component is a list.
setValues(self: libaster.SimpleFieldOnNodesReal, value: dict[str, float], nodes: list[int]) -> None
Set values of the field where components and values are given as a dict. If the component is not present in the field then it is discarded Example: { “X1” : 0.0, “X3” : 0.0 }
- Arguments:
value (dict[str, float]): dict of values to set (key: str, value: float) nodes (list[int]): list of nodes.
setValues(self: libaster.SimpleFieldOnNodesReal, value: dict[str, float], groupsOfNodes: list[str] = []) -> None
Set values of the field where components and values are given as a dict. If the component is not present in the field then it is discarded Example: { “X1” : 0.0, “X3” : 0.0 }
- Arguments:
value (dict[str, float]): dict of values to set (key: str, value: float) groupsOfNodes (list[str]): list of groups. If empty, the full mesh is considered
setValues(self: libaster.SimpleFieldOnNodesReal, value: float) -> None
Set the value everywhere.
- Arguments:
value [float]: value to set everywhere.
- toFieldOnNodes(*args, **kwargs)[source]¶
Overloaded function.
toFieldOnNodes(self: libaster.SimpleFieldOnNodesReal) -> libaster.FieldOnNodesReal
Convert to FieldOnNodes
- Returns:
field converted
- Return type:
toFieldOnNodes(self: libaster.SimpleFieldOnNodesReal, dofNum: libaster.BaseDOFNumbering, zeroExtension: bool = <PythonBool.FALSE: 0>) -> libaster.FieldOnNodesReal
Convert to FieldOnNodes
- Parameters:
dofNum (BaseDOFNumbering) – DOF numbering used to build FieldOnNodes
zeroExtension (bool) – true if field can be extended to zero (when missing values)
- Returns:
field converted
- Return type:
- toNumpy()[source]¶
Returns two numpy arrays with shape ( number_of_components, space_dimension ) The first array contains the field values while the second one is a mask which is True if the corresponding value exists, False otherwise.
Where the mask is False the corresponding value is set to zero.
- Returns:
Field values. ndarray (bool): Mask for the field values.
- Return type:
ndarray (float)
Skeleton object¶
StandardModalBasis object¶
- class code_aster.Objects.StandardModalBasis(*args, **kwargs)[source]¶
Bases:
GenericModalBasis
StaticMacroElement object¶
- class code_aster.Objects.StaticMacroElement(*args, **kwargs)[source]¶
Bases:
DataStructure
StructuralForceOnBeamReal object¶
- class code_aster.Objects.StructuralForceOnBeamReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
StructuralForceOnEdgeReal object¶
- class code_aster.Objects.StructuralForceOnEdgeReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
StructuralForceOnShellReal object¶
- class code_aster.Objects.StructuralForceOnShellReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
StructureInterface object¶
- class code_aster.Objects.StructureInterface(*args, **kwargs)[source]¶
Bases:
DataStructure
SuperMesh object¶
Table object¶
- class code_aster.Objects.Table(*args, **kwargs)[source]¶
Bases:
DataStructure- getColumnType(param)[source]¶
Return the type of values in a column.
- Parameters:
param (str) – Parameter name.
- Returns:
“I” for integers, “R” for reals, “C” for complex, “Knn” for strings.
- Return type:
str
- getNumberOfLines()[source]¶
Returns the number of lines of the table.
- Returns:
Number of lines.
- Return type:
int
TableContainer object¶
- class code_aster.Objects.TableContainer(*args, **kwargs)[source]¶
Bases:
Table- addObject(*args, **kwargs)[source]¶
Overloaded function.
addObject(self: libaster.TableContainer, arg0: str, arg1: ElementaryMatrix<double, (PhysicalQuantityEnum)4>) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: ElementaryVector<double, (PhysicalQuantityEnum)4>) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.FieldOnCellsReal) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.FieldOnNodesReal) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: FunctionComplex) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: GeneralizedAssemblyMatrix<double>) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.DataField) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: ModeResult) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.ConstantFieldOnCellsReal) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: Function2D) -> None
addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.Table) -> None
addObject(self: libaster.TableContainer, name: str, object: Function) -> None
Store a DataStructure in the table.
- Arguments:
name (str): String to identify the object in the table. object (misc): Object to be inserted, can be a Function, Mesh, Fields…
TableOfFunctions object¶
ThermalDirichletBC object¶
- class code_aster.Objects.ThermalDirichletBC(*args, **kwargs)[source]¶
Bases:
DirichletBC- addBCOnCells(*args, **kwargs)[source]¶
Overloaded function.
addBCOnCells(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: str) -> bool
addBCOnCells(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: list[str]) -> bool
- addBCOnNodes(*args, **kwargs)[source]¶
Overloaded function.
addBCOnNodes(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: str) -> bool
addBCOnNodes(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: list[str]) -> bool
addBCOnNodes(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: libaster.Function, arg2: list[str]) -> bool
ThermalFourierResult object¶
ThermalLoadDescriptionReal object¶
- class code_aster.Objects.ThermalLoadDescriptionReal(arg0, arg1)[source]¶
Bases:
DataStructure
ThermalLoadFunction object¶
- class code_aster.Objects.ThermalLoadFunction(*args, **kwargs)[source]¶
Bases:
DataStructure
ThermalLoadReal object¶
- class code_aster.Objects.ThermalLoadReal(*args, **kwargs)[source]¶
Bases:
DataStructure
ThermalResult object¶
- class code_aster.Objects.ThermalResult(*args, **kwargs)[source]¶
Bases:
TransientResult
TimesList object¶
- class code_aster.Objects.TimesList(*args, **kwargs)[source]¶
Bases:
DataStructure
TransientGeneralizedResult object¶
- class code_aster.Objects.TransientGeneralizedResult(*args, **kwargs)[source]¶
Bases:
GeneralizedResultReal- getAccelerationValues(*args, **kwargs)[source]¶
Overloaded function.
getAccelerationValues(self: libaster.TransientGeneralizedResult) -> list[float]
Return generalized accelerations values for all time indices.
- Returns:
generalized accelerations values.
- Return type:
list[double]
getAccelerationValues(self: libaster.TransientGeneralizedResult, idx: int) -> list[float]
Return generalized accelerations values at a given time index.
- Parameters:
idx (int) – time index
- Returns:
generalized accelerations values.
- Return type:
list[double]
- getDisplacementValues(*args, **kwargs)[source]¶
Overloaded function.
getDisplacementValues(self: libaster.TransientGeneralizedResult) -> list[float]
Return generalized displacements values for all time indices.
- Returns:
generalized displacements values.
- Return type:
list[double]
getDisplacementValues(self: libaster.TransientGeneralizedResult, idx: int) -> list[float]
Return generalized displacements values at a given time index.
- Parameters:
idx (int) – time index
- Returns:
generalized displacements values.
- Return type:
list[double]
- getGeneralizedDOFNumbering()[source]¶
Get generalized DOF numbering
- Returns:
generalized DOF numbering
- Return type:
- getIndexes()[source]¶
Returns time indices of the transient calculation
- Returns:
time indices
- Return type:
list[int]
- getNumberOfModes()[source]¶
Returns the number of vectors in the generalized basis
- Returns:
number of vectors in the generalized basis
- Return type:
int
- getTimes()[source]¶
Returns values of instants of the transient calculation
- Returns:
instants values
- Return type:
list[float]
- getVelocityValues(*args, **kwargs)[source]¶
Overloaded function.
getVelocityValues(self: libaster.TransientGeneralizedResult) -> list[float]
Return generalized velocities values for all time indices.
- Returns:
generalized velocities values.
- Return type:
list[double]
getVelocityValues(self: libaster.TransientGeneralizedResult, idx: int) -> list[float]
Return generalized velocities values at a given time index.
- Parameters:
idx (int) – time index
- Returns:
generalized velocities values.
- Return type:
list[double]
- setAccelerationValues(idx, val)[source]¶
Set generalized acceleration values at a given time index.
- Parameters:
idx (int) – time index
val (list[double]) – generalized acceleration values.
- setDOFNumbering(dofn)[source]¶
Set DOF numbering
- Parameters:
dofn (DOFNumbering) – DOF numbering
- setDisplacementValues(idx, val)[source]¶
Set generalized displacement values at a given time index.
- Parameters:
idx (int) – time index
val (list[double]) – generalized displacement values.
- setGeneralizedDOFNumbering(dofg)[source]¶
Set generalized DOF numbering
- Parameters:
dofg (GeneralizedDOFNumbering) – generalized DOF numbering
TransientResult object¶
TurbulentSpectrum object¶
- class code_aster.Objects.TurbulentSpectrum(*args, **kwargs)[source]¶
Bases:
DataStructure
WavePressureOnFaceReal object¶
- class code_aster.Objects.WavePressureOnFaceReal(*args, **kwargs)[source]¶
Bases:
MechanicalLoadReal
XfemCrack object¶
- class code_aster.Objects.XfemCrack(*args, **kwargs)[source]¶
Bases:
DataStructure