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.

resetDependencies()[source]

Clear the list of explicit 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.

  1. 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

  2. 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

  3. 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

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  1. 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

  2. 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

  3. 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

  4. 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.

  5. 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.

  6. 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.

  7. 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.

size(local=True)[source]

Get the size of the matrix

Parameters:

local (bool) –

AssemblyMatrixEliminatedReal object

class code_aster.Objects.AssemblyMatrixEliminatedReal(*args, **kwargs)[source]

Bases: AssemblyMatrixDisplacementReal

AssemblyMatrixPressureComplex object

class code_aster.Objects.AssemblyMatrixPressureComplex(*args, **kwargs)[source]

Bases: BaseAssemblyMatrix

assemble(*args, **kwargs)[source]

Overloaded function.

  1. 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

  2. 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

  3. 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

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  1. 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

  2. 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

  3. 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

  4. 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.

  5. 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.

  6. 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.

  1. 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

  2. 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)

  3. 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

  4. 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.

  5. 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.

  6. 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.

  1. 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

  2. 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

  3. 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

  4. 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.

  5. 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.

  6. 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.

  7. 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.

size(local=True)[source]

Get the size of the matrix

Parameters:

local (bool) –

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

getMesh()[source]

Return the mesh.

Returns:

a pointer to the mesh

Return type:

Mesh

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

isSymmetric()[source]

Return True if matrix is symmetric

print(format='ASTER', unit=6)[source]

Print the matrix in code_aster or matlab format (with information on the DOF).

Parameters:

format (str) – ‘ASTER’ (default) or ‘MATLAB’

symmetrize()[source]

Make the assembly matrix symmetric in place

BaseDOFNumbering object

class code_aster.Objects.BaseDOFNumbering(*args, **kwargs)[source]

Bases: DataStructure

computeNumbering(*args, **kwargs)[source]

Overloaded function.

  1. computeNumbering(self: libaster.BaseDOFNumbering, model: Model, listOfLoads: ListOfLoads, verbose: bool = True) -> bool

  2. 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:

EquationNumbering

getFiniteElementDescriptors()[source]

Returns the objects defining the finite elements.

Returns:

List of finite elements descriptions.

Return type:

list[FiniteElementDescriptor]

getMesh()[source]

Return the mesh

Returns:

a pointer to the mesh

Return type:

MeshPtr

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

build(FED=[])[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

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]

setAsConstant()[source]

To be called for a constant function.

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.

setValues(absc, ordo)[source]

Set the values of abscissa and ordinates.

If the function already exists, its size can not be changed.

Parameters:
  • absc (list) – List of abscissa.

  • ordo (list) – List of ordinates.

size()[source]

Return the number of points of the function.

Returns:

Number of points.

Return type:

int

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:

MeshCoordinatesField

getDimension()[source]

Return the dimension of the mesh.

Returns:

2 or 3

Return type:

int

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:

Table

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

isConnection()[source]

Function to know if a mesh is a ConnectionMesh

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

show(verbosity=1)[source]

Show mesh informations.

Parameters:

verbosity (int) – Verbosity level (default: 1)

updateInternalState()[source]

Update the internal state of the datastructure.

Returns:

True in case of success, False otherwise.

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

getModel()[source]

Return a pointer to the model.

Returns:

model setted.

Return type:

ModelPtr

getMultipleBehaviourField()[source]

Return a pointer to the field for multiple behaviour like cristals.

Returns:

multiple behaviour.

Return type:

ConstantFieldOnCellsChar16Ptr

hasAnnealing()[source]

Returns a flag if annealing post-processing is enabled

Returns:

True if annealing is enabled, False otherwise.

Return type:

bool

hasBehaviour(behaviour)[source]

Return True if the given behaviour name is present.

Parameters:

behaviour (str) – behaviour name

Returns:

True if present, False otherwise.

Return type:

bool

BucklingModeResult object

class code_aster.Objects.BucklingModeResult(*args, **kwargs)[source]

Bases: FullResult

setStiffnessMatrix(*args, **kwargs)[source]

Overloaded function.

  1. setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixDisplacementReal) -> bool

  2. setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixDisplacementComplex) -> bool

  3. setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixTemperatureReal) -> bool

  4. setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.AssemblyMatrixPressureReal) -> bool

  5. setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.GeneralizedAssemblyMatrixReal) -> bool

  6. setStiffnessMatrix(self: libaster.BucklingModeResult, arg0: libaster.GeneralizedAssemblyMatrixComplex) -> bool

CombinedFourierResult object

class code_aster.Objects.CombinedFourierResult(*args, **kwargs)[source]

Bases: Result

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

hasGroupOfNodes(name, local=False)[source]

Allows to know if the given group of nodes is present in the mesh

Parameters:

name (str) – name of the group of nodes

Returns:

True if the group is present

Return type:

bool

isConnection()[source]

Function to know if a mesh is a ConnectionMesh

ConstantFieldOnCellsChar16 object

class code_aster.Objects.ConstantFieldOnCellsChar16(*args, **kwargs)[source]

Bases: DataField

ConstantFieldOnCellsLong object

class code_aster.Objects.ConstantFieldOnCellsLong(*args, **kwargs)[source]

Bases: DataField

ConstantFieldOnCellsReal object

class code_aster.Objects.ConstantFieldOnCellsReal(*args, **kwargs)[source]

Bases: DataField

getValues(arg0)[source]

Return the field values

Returns:

List of values

Return type:

list[float]

size()[source]

Return the size of field

Returns:

size of field

Return type:

int

toSimpleFieldOnCells(arg0)[source]

Convert to SimpleFieldOnCells

Returns:

field converted

Return type:

SimpleFieldOnCellsReal

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

build()[source]

Build and check internal objects

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:

ContactZone

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:

FiniteElementDescriptor

getMesh()[source]

Return the mesh used in the contact definition

Returns:

mesh.

Return type:

Mesh

getModel()[source]

Return the model used in the contact definition

Returns:

model.

Return type:

Model

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

isParallel()[source]

bool: true if parallel contact.

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: DataStructure

Object to create contact pairing.

clearPairing(*args, **kwargs)[source]

Overloaded function.

  1. clearPairing(self: libaster.ContactPairing) -> None

Clean pairing for all zones

Returns:

true if the pairing quantities are cleared

Return type:

bool

  1. 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.

  1. compute(self: libaster.ContactPairing) -> bool

Compute the pairing quantities on all zones

Returns:

True if the pairing quantities are updated appropriately

Return type:

bool

  1. 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:

MeshCoordinatesField

getFiniteElementDescriptor()[source]

Return Finite Element Descriptor for virtual cells from pairing.

Returns:

finite element for virtual cells

Return type:

FiniteElementDescriptor

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.

  1. 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]]

  1. 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]]

getMesh()[source]

Mesh

Returns:

the mesh

Return type:

BaseMesh

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.

  1. getNumberOfPairs(self: libaster.ContactPairing) -> int

Return number of pairs on all zones

Returns:

number of pairs

Return type:

int

  1. 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

getNumberOfZones()[source]

Return the number of zones

Returns:

number of zones

Return type:

int

getVerbosity()[source]

Get level of verbosity

Returns:

level of verbosity

Return type:

integer

setCoordinates(coordinates)[source]

Set the mesh coordinates field

Parameters:

coordinates (MeshCoordinatesField) – coordinates to use for pairing

setVerbosity(verbosity)[source]
Set level of verbosity

0 - without 1 - normal (default) 2 - detailled (text)

Parameters:

level (integer) – level of verbosity

updateCoordinates(disp)[source]

Update the mesh coordinates given a displacement field

Parameters:

disp (FieldOnNodes) – field for displacement

ContactZone object

class code_aster.Objects.ContactZone(*args, **kwargs)[source]

Bases: DSWithCppPickling

Object to define a zone of contact.

build(arg0)[source]

Build and check internal objects

Returns:

success or failure

Return type:

bool

getContactParameter()[source]

Get contact parameters defining method, coefficient…

Returns:

contact parameters

Return type:

ContactParameter

getFrictionParameter()[source]

Get friction parameters defining method, coefficient…

Returns:

friction parameters

Return type:

FrictionParameter

getMesh()[source]

Return the mesh used in the contact zone definition

Returns:

mesh

Return type:

BaseMesh

getMeshPairing()[source]

Get pairing of surface meshes

Returns:

mesh pairing

Return type:

MeshPairing

getModel()[source]

Return the model used in the contact zone definition

Returns:

model

Return type:

Model

getPairingParameter()[source]

Get pairing parameters defining algorithm, distance…

Returns:

pairing parameters

Return type:

PairingParameter

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: DataStructure

Object to create contact pairing.

addZone(zone)[source]

Add a new zone of coupling;

Argument:

zone [CouplingZonePairing]: zone.

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:

FiniteElementDescriptor

getMesh()[source]

Mesh

Returns:

the mesh

Return type:

BaseMesh

getNumberOfPairs()[source]

Return number of pairs

Returns:

number of pairs

Return type:

int

getPairingField()[source]

Get intersection points

Returns:

intersection points.

Return type:

FieldOnCellsReal

CouplingZonePairing object

class code_aster.Objects.CouplingZonePairing(*args, **kwargs)[source]

Bases: DataStructure

Object to create contact pairing.

check(model)[source]

Check common nodes and normals.

Parameters:

[Model] (model) – model.

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.

setSlaveGroupsOfCells(groups_name)[source]

Set slave’s side.

Parameters:

[list[str]] (groups_name) – list of groups.

setVerbosity(verbosity)[source]

Set verbosity.

Parameters:

[float] (verbosity) – verbosity level.

Crack object

class code_aster.Objects.Crack(*args, **kwargs)[source]

Bases: DataStructure

getConfigInit()[source]

Return the crack initial configuration

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:

FieldOnNodesReal

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]

getUpperNormNodes2()[source]

Return the names for nodes on the upper side of cracklip (for POST_JMOD)

Returns:

node names

Return type:

list[str]

isSymmetric()[source]

Return true if crack is symeric

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.

  1. 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]]

  1. 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

useLagrangeDOF()[source]

Lagrange multipliers are used for BC or MPC.

Returns:

True if used, False otherwise.

Return type:

bool

useSingleLagrangeDOF()[source]

Single Lagrange multipliers are used for BC or MPC.

Returns:

True if used, False otherwise.

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

getFieldType()[source]

Get field type between “ELEM”, “ELGA”, “ELNO”, “NOEU”, “CART”.

Returns:

field type

Return type:

str

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

getModel()[source]

Return the model

Returns:

a pointer to the model

Return type:

ModelPtr

getPhysics()[source]

To know the physics supported by the model

Returns:

Mechanics or Thermal or Acoustic

Return type:

str

setSyntax(syntax)[source]

Function to set the syntax used to build object

Parameters:

syntax – the syntax

DistributedHeatFluxReal object

class code_aster.Objects.DistributedHeatFluxReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

DistributedHydraulicFluxReal object

class code_aster.Objects.DistributedHydraulicFluxReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

DistributedPressureReal object

class code_aster.Objects.DistributedPressureReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

DryingResult object

class code_aster.Objects.DryingResult(*args, **kwargs)[source]

Bases: TransientResult

DynamicMacroElement object

class code_aster.Objects.DynamicMacroElement(*args, **kwargs)[source]

Bases: DataStructure

setStiffnessMatrix(*args, **kwargs)[source]

Overloaded function.

  1. setStiffnessMatrix(self: libaster.DynamicMacroElement, arg0: libaster.AssemblyMatrixDisplacementComplex) -> bool

  2. setStiffnessMatrix(self: libaster.DynamicMacroElement, arg0: libaster.AssemblyMatrixDisplacementReal) -> bool

ElasticFourierResult object

class code_aster.Objects.ElasticFourierResult(*args, **kwargs)[source]

Bases: Result

ElasticResult object

class code_aster.Objects.ElasticResult(*args, **kwargs)[source]

Bases: Result

ElementaryCharacteristics object

class code_aster.Objects.ElementaryCharacteristics(*args, **kwargs)[source]

Bases: DataStructure

containsFieldOnCells()[source]

Return True if ElementaryCharacteristics contains FieldOnCells

ElementaryMatrixDisplacementComplex object

class code_aster.Objects.ElementaryMatrixDisplacementComplex(*args, **kwargs)[source]

Bases: BaseElementaryMatrix

addElementaryTerm(*args, **kwargs)[source]

Overloaded function.

  1. addElementaryTerm(self: libaster.ElementaryMatrixDisplacementComplex, arg0: libaster.ElementaryTermComplex) -> None

  2. addElementaryTerm(self: libaster.ElementaryMatrixDisplacementComplex, arg0: list[libaster.ElementaryTermComplex]) -> None

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

ElementaryMatrixDisplacementReal object

class code_aster.Objects.ElementaryMatrixDisplacementReal(*args, **kwargs)[source]

Bases: BaseElementaryMatrix

addElementaryTerm(*args, **kwargs)[source]

Overloaded function.

  1. addElementaryTerm(self: libaster.ElementaryMatrixDisplacementReal, arg0: libaster.ElementaryTermReal) -> None

  2. addElementaryTerm(self: libaster.ElementaryMatrixDisplacementReal, arg0: list[libaster.ElementaryTermReal]) -> None

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

ElementaryMatrixPressureComplex object

class code_aster.Objects.ElementaryMatrixPressureComplex(*args, **kwargs)[source]

Bases: BaseElementaryMatrix

addElementaryTerm(*args, **kwargs)[source]

Overloaded function.

  1. addElementaryTerm(self: libaster.ElementaryMatrixPressureComplex, arg0: libaster.ElementaryTermComplex) -> None

  2. addElementaryTerm(self: libaster.ElementaryMatrixPressureComplex, arg0: list[libaster.ElementaryTermComplex]) -> None

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

ElementaryMatrixTemperatureReal object

class code_aster.Objects.ElementaryMatrixTemperatureReal(*args, **kwargs)[source]

Bases: BaseElementaryMatrix

addElementaryTerm(*args, **kwargs)[source]

Overloaded function.

  1. addElementaryTerm(self: libaster.ElementaryMatrixTemperatureReal, arg0: libaster.ElementaryTermReal) -> None

  2. addElementaryTerm(self: libaster.ElementaryMatrixTemperatureReal, arg0: list[libaster.ElementaryTermReal]) -> None

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

ElementaryTermComplex object

class code_aster.Objects.ElementaryTermComplex(*args, **kwargs)[source]

Bases: DataField

exists()[source]

Return True if it exists

Returns:

True if exist

Return type:

bool

getFiniteElementDescriptor()[source]

Return the finite element descriptor

Returns:

finite element descriptor

Return type:

FiniteElementDescriptor

getLocalMode()[source]

Return the local mode.

Returns:

the local mode

Return type:

str

getMesh()[source]

Return the mesh

Returns:

a pointer to the mesh

Return type:

BaseMesh

getOption()[source]

Return the optior used to compute it

Returns:

name of the option

Return type:

str

getPhysicalQuantity()[source]

Return the physical quantity

Returns:

name of the physical quantity

Return type:

str

ElementaryTermReal object

class code_aster.Objects.ElementaryTermReal(*args, **kwargs)[source]

Bases: DataField

exists()[source]

Return True if it exists

Returns:

True if exist

Return type:

bool

getFiniteElementDescriptor()[source]

Return the finite element descriptor

Returns:

finite element descriptor

Return type:

FiniteElementDescriptor

getLocalMode()[source]

Return the local mode.

Returns:

the local mode

Return type:

str

getMesh()[source]

Return the mesh

Returns:

a pointer to the mesh

Return type:

BaseMesh

getOption()[source]

Return the optior used to compute it

Returns:

name of the option

Return type:

str

getPhysicalQuantity()[source]

Return the physical quantity

Returns:

name of the physical quantity

Return type:

str

getValues()[source]

Return the values of the field.

Returns:

values

Return type:

list[list[float]]

ElementaryVectorComplex object

class code_aster.Objects.ElementaryVectorComplex(*args, **kwargs)[source]

Bases: BaseElementaryVector

addElementaryTerm(*args, **kwargs)[source]

Overloaded function.

  1. addElementaryTerm(self: libaster.ElementaryVectorComplex, term: libaster.ElementaryTermComplex) -> None

    Add elementary term

    Arguments:

    term (ElementaryTermComplex): elementary term

  2. 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.

  1. addElementaryTerm(self: libaster.ElementaryVectorReal, term: libaster.ElementaryTermReal) -> None

    Add elementary term

    Arguments:

    term (ElementaryTermReal): elementary term

  2. 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

class code_aster.Objects.EmpiricalModeResult(*args, **kwargs)[source]

Bases: Result

EquationNumbering object

class code_aster.Objects.EquationNumbering(*args, **kwargs)[source]

Bases: DataStructure

getComponents()[source]

Get list of components

Returns:

list of components

Return type:

list[str]

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.

  1. 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.

  2. 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.

  1. 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

  2. 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.

  1. 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

  2. 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

useLagrangeDOF()[source]

Lagrange multipliers are used for BC or MPC.

Returns:

True if used, False otherwise.

Return type:

bool

useSingleLagrangeDOF()[source]

Single Lagrange multipliers are used for BC or MPC.

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

getDescription()[source]

Return the description associated with the FieldOnCellsChar8 object

Returns:

FiniteElementDescriptor Object

Return type:

FiniteElementDescriptor

getMesh()[source]

Return the Mesh associated with the FieldOnCellsChar8 object

Returns:

Mesh object

Return type:

BaseMesh

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:

BaseMesh

getPhysicalQuantity()[source]

Get physical quantity

Returns:

physical quantity

Return type:

str

getValues(*args, **kwargs)[source]

Overloaded function.

  1. getValues(self: libaster.FieldOnCellsComplex) -> JeveuxVector

    Return a list of values as (x1, y1, z1, x2, y2, z2…)

    Returns:

    list[complex]: List of values.

  2. 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.

  1. setValues(self: libaster.FieldOnCellsComplex, value: complex) -> None

    Set values of the field

    Arguments:

    value (complex): value to set

  2. 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

toFieldOnNodes()[source]

Convert to FieldOnNodes

Returns:

field converted

Return type:

FieldOnCellsComplex

transform(func)[source]

Apply a function to each value of the object.

Parameters:

func (callable) – Callable Python object

Returns:

New FieldOnCells object with the transformed values

Return type:

FieldOnCellsComplex

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:

BaseMesh

getValues(*args, **kwargs)[source]

Overloaded function.

  1. getValues(self: libaster.FieldOnCellsLong) -> JeveuxVector

    Return a list of values as (x1, y1, z1, x2, y2, z2…)

    Returns:

    list[int]: List of values.

  2. 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.

  1. setValues(self: libaster.FieldOnCellsLong, value: int) -> None

    Set values of the field

    Arguments:

    value (complex): value to set

  2. setValues(self: libaster.FieldOnCellsLong, values: list[int]) -> 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

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:

FieldOnCellsReal

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:
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)

copy()[source]

Return a duplicated FieldOnCellsReal as a copy

Returns:

FieldOnCellsReal

dot(other)[source]

Return the dot product of two fields

Parameters:

field (FieldOnCells) – other field

Returns:

dot product

Return type:

float

exists()[source]

The field exists or not ?

Returns:

Bool

getComponents()[source]

Get list of components

Returns:

list of components

Return type:

list[str]

getDescription(*args, **kwargs)[source]

Overloaded function.

  1. getDescription(self: libaster.FieldOnCellsReal) -> libaster.FiniteElementDescriptor

    Return the descriptor associated with the FieldOnCellsReal object

    Returns:

    FiniteElementDescriptor: FiniteElementDescriptor Object

  2. 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:

BaseMesh

getNumberOfComponents()[source]

Get number of components

Returns:

number of components

Return type:

int

getPhysicalQuantity()[source]

Get physical quantity

Returns:

physical quantity

Return type:

str

getValues(*args, **kwargs)[source]

Overloaded function.

  1. getValues(self: libaster.FieldOnCellsReal) -> JeveuxVector

    Return a list of values as (x1, y1, z1, x2, y2, z2…)

    Returns:

    list[float]: List of values.

  2. 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.

  1. setValues(self: libaster.FieldOnCellsReal, value: float) -> None

    Set values of the field

    Arguments:

    value (float): value to set

  2. 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

toFieldOnNodes()[source]

Convert to FieldOnNodes

Returns:

field converted

Return type:

FieldOnNodesReal

toSimpleFieldOnCells()[source]

Convert to SimpleFieldOnNodes

Returns:

field converted

Return type:

SimpleFieldOnNodesReal

toSimpleFieldOnNodes()[source]

Convert to SimpleFieldOnNodes

Returns:

field converted

Return type:

SimpleFieldOnNodesReal

transform(func)[source]

Apply a function to each value of the object.

Parameters:

func (callable) – Callable Python object

Returns:

New FieldOnCells object with the transformed values

Return type:

FieldOnCellsReal

FieldOnNodesChar8 object

class code_aster.Objects.FieldOnNodesChar8(*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

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

getComponents()[source]

Get list of components

Returns:

list of components

Return type:

list[str]

getImaginaryPart()[source]

Extract the imaginary part of the complex field

Returns:

imaginary part

Return type:

FieldOnNodesReal

getLocalization()[source]

Get localization = NOEU

Returns:

“NOEU”

Return type:

str

getMesh(*args, **kwargs)[source]

Overloaded function.

  1. getMesh(self: libaster.FieldOnNodesComplex) -> libaster.BaseMesh

  2. getMesh(self: libaster.FieldOnNodesComplex) -> libaster.BaseMesh

getNumberOfComponents()[source]

Get number of components

Returns:

number of components

Return type:

int

getRealPart()[source]

Extract the real part of the complex field

Returns:

real part

Return type:

FieldOnNodesReal

getValues(*args, **kwargs)[source]

Overloaded function.

  1. getValues(self: libaster.FieldOnNodesComplex) -> JeveuxVector

    Return a list of values as (x1, y1, z1, x2, y2, z2…)

    Returns:

    list[complex]: List of values.

  2. 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.

  3. 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.

  1. setValues(self: libaster.FieldOnNodesComplex, value: complex) -> None

    Set values of the field

    Arguments:

    value (complex): value to set

  2. setValues(self: libaster.FieldOnNodesComplex, values: list[complex]) -> None

    Set values of the field

    Arguments:

    values (list[complex]): list of values to set

toSimpleFieldOnNodes()[source]

Convert to SimpleFieldOnNodes

Returns:

field converted

Return type:

SimpleFieldOnNodesComplex

transform(func)[source]

Apply a function to each value of the object.

Parameters:

func (callable) – Callable Python object

Returns:

New FieldOnNodes object with the transformed values

Return type:

FieldOnNodesComplex

FieldOnNodesLong object

class code_aster.Objects.FieldOnNodesLong(*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

FieldOnNodesReal object

class code_aster.Objects.FieldOnNodesReal(*args, **kwargs)[source]

Bases: DataField

__itruediv__(*args, **kwargs)[source]

Overloaded function.

  1. __itruediv__(self: libaster.FieldOnNodesReal, arg0: float) -> libaster.FieldOnNodesReal

  2. __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:

FieldOnNodesReal

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:

FieldOnNodesReal

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

getComponents()[source]

Get list of components

Returns:

list of components

Return type:

list[str]

getImaginaryPart()[source]

Extract the imaginary part of the real field (a 0-filled field is produced)

Returns:

imaginary part

Return type:

FieldOnNodesReal

getLocalization()[source]

Get localization = NOEU

Returns:

“NOEU”

Return type:

str

getMesh(*args, **kwargs)[source]

Overloaded function.

  1. getMesh(self: libaster.FieldOnNodesReal) -> libaster.BaseMesh

  2. 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:

FieldOnNodesReal

getValues(*args, **kwargs)[source]

Overloaded function.

  1. getValues(self: libaster.FieldOnNodesReal) -> JeveuxVector

    Return a list of values as (x1, y1, z1, x2, y2, z2…)

    Returns:

    list[float]: List of values.

  2. 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.

  3. 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.

  1. setValues(self: libaster.FieldOnNodesReal, value: float) -> None

    Set values of the field

    Arguments:

    value (float): value to set

  2. setValues(self: libaster.FieldOnNodesReal, values: list[float]) -> None

    Set values of the field

    Arguments:

    values (list[float]): list of values to set

  3. 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:

FieldOnCellsReal

toSimpleFieldOnNodes()[source]

Convert to SimpleFieldOnNodes

Returns:

field converted

Return type:

SimpleFieldOnNodesReal

transferFromConnectionToParallelMesh(arg0)[source]

Transfer FieldOnNodes from a ConnectionMesh to a ParallelMesh

Parameters:

[Mesh] (mesh) – the target mesh

Returns:

transfered field

Return type:

FieldOnNodesReal

transfertToConnectionMesh(arg0)[source]

Transfer SimpleFieldOnNodes to a ConnectionMesh

Returns:

transfered field

Return type:

FieldOnNodesReal

transform(func)[source]

Apply a function to each value of the object.

Parameters:

func (callable) – Callable Python object

Returns:

New FieldOnNodes object with the transformed values

Return type:

FieldOnNodesReal

updateGhostValues()[source]

Communicates the values of the ghost DOFs on a FieldOnNodes.

FiniteElementDescriptor object

class code_aster.Objects.FiniteElementDescriptor(*args, **kwargs)[source]

Bases: DataStructure

restrict(*args, **kwargs)[source]

Overloaded function.

  1. restrict(self: libaster.FiniteElementDescriptor, arg0: list[int]) -> libaster.FiniteElementDescriptor

  2. restrict(self: libaster.FiniteElementDescriptor, arg0: list[str]) -> libaster.FiniteElementDescriptor

FluidStructureInteraction object

class code_aster.Objects.FluidStructureInteraction(*args, **kwargs)[source]

Bases: DataStructure

FluidStructureModalBasis object

class code_aster.Objects.FluidStructureModalBasis(*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:

Table

ForceOnEdgeReal object

class code_aster.Objects.ForceOnEdgeReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

ForceOnFaceReal object

class code_aster.Objects.ForceOnFaceReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

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]

setComplex()[source]

Set the type of the formula as complex.

setContext(context)[source]

Define the context holding objects required to evaluate the expression.

Parameters:

context (dict) – Context for the evaluation.

setExpression(expression)[source]

Define the expression of the formula.

If the expression uses non builtin objects, the evaluation context must be defined using :func:setContext.

Parameters:

expression (str) – Expression of the formula.

setVariables(varnames)[source]

Define the variables names.

Parameters:

varnames (list[str]) – List of variables names.

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

class code_aster.Objects.FullResult(*args, **kwargs)[source]

Bases: Result

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]

getValues()[source]

Return a list of the values of the functions as [F1, F2, …] where Fi is (x1, x2, …, y1, y2, …).

Returns:

List of values (size = number of functions).

Return type:

list[list [float]]

FunctionComplex object

class code_aster.Objects.FunctionComplex(*args, **kwargs)[source]

Bases: BaseFunction

setValues(*args, **kwargs)[source]

Overloaded function.

  1. setValues(self: libaster.FunctionComplex, arg0: list[float], arg1: list[float]) -> None

  2. setValues(self: libaster.FunctionComplex, arg0: list[float], arg1: list[complex]) -> None

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

setModalBasis(*args, **kwargs)[source]

Overloaded function.

  1. setModalBasis(self: libaster.GeneralizedAssemblyMatrix, arg0: GeneralizedModeResult) -> bool

  2. setModalBasis(self: libaster.GeneralizedAssemblyMatrix, arg0: ModeResult) -> bool

size()[source]

Return the size of the matrix

Returns:

size of the matrix.

Return type:

int

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

setLowerValues(values)[source]

Set the lower part of the matrix.

Parameters:

[list[complex]] (values) – set lower part of the matrix.

setUpperValues(values)[source]

Set the upper part of the matrix.

Parameters:

[list[complex]] (values) – set upper part of the matrix.

GeneralizedAssemblyMatrixReal object

class code_aster.Objects.GeneralizedAssemblyMatrixReal(*args, **kwargs)[source]

Bases: GeneralizedAssemblyMatrix

allocate(isSymmetric=True)[source]

Allocate the matrix

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

setLowerValues(values)[source]

Set the lower part of the matrix.

Parameters:

[list[float]] (values) – set lower part of the matrix.

setUpperValues(values)[source]

Set the upper part of the matrix.

Parameters:

[list[float]] (values) – set upper part of the matrix.

GeneralizedAssemblyVector object

class code_aster.Objects.GeneralizedAssemblyVector(*args, **kwargs)[source]

Bases: DataStructure

GeneralizedAssemblyVectorComplex object

class code_aster.Objects.GeneralizedAssemblyVectorComplex(*args, **kwargs)[source]

Bases: GeneralizedAssemblyVector

getValues()[source]

Return a list of values as (x1, y1, z1, x2, y2, z2…)

Returns:

List of values.

Return type:

list[complex]

setValues(arg0)[source]

Set values of vector.

Parameters:

values (list[complex]) – set vector.

GeneralizedAssemblyVectorReal object

class code_aster.Objects.GeneralizedAssemblyVectorReal(*args, **kwargs)[source]

Bases: GeneralizedAssemblyVector

getValues()[source]

Return a list of values as (x1, y1, z1, x2, y2, z2…)

Returns:

List of values.

Return type:

list[float]

setValues(arg0)[source]

Set values of vector.

Parameters:

values (list[float]) – set vector.

GeneralizedDOFNumbering object

class code_aster.Objects.GeneralizedDOFNumbering(*args, **kwargs)[source]

Bases: DataStructure

setModalBasis(*args, **kwargs)[source]

Overloaded function.

  1. setModalBasis(self: libaster.GeneralizedDOFNumbering, arg0: ModeResult) -> bool

  2. setModalBasis(self: libaster.GeneralizedDOFNumbering, arg0: GeneralizedModeResult) -> bool

GeneralizedLoad object

class code_aster.Objects.GeneralizedLoad(*args, **kwargs)[source]

Bases: DataStructure

GeneralizedModeResult object

class code_aster.Objects.GeneralizedModeResult(*args, **kwargs)[source]

Bases: FullResult

setStiffnessMatrix(*args, **kwargs)[source]

Overloaded function.

  1. setStiffnessMatrix(self: libaster.GeneralizedModeResult, arg0: libaster.GeneralizedAssemblyMatrixReal) -> bool

  2. setStiffnessMatrix(self: libaster.GeneralizedModeResult, arg0: libaster.GeneralizedAssemblyMatrixComplex) -> bool

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

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()).

Return type:

tuple[str]

setExtrapolation(type)[source]

Define the type of extrapolation.

Supported extrapolation types are: “L” for linear, “C” for constant and “E” for no extrapolation allowed.

Parameters:

type (str) – Type of extrapolation on left and on right. Examples: “CC”, “LE”…

GenericModalBasis object

class code_aster.Objects.GenericModalBasis(*args, **kwargs)[source]

Bases: DataStructure

Grid object

class code_aster.Objects.Grid(*args, **kwargs)[source]

Bases: Mesh

HarmoGeneralizedResult object

class code_aster.Objects.HarmoGeneralizedResult(*args, **kwargs)[source]

Bases: GeneralizedResultComplex

ImposedDisplacementReal object

class code_aster.Objects.ImposedDisplacementReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

ImposedPressureReal object

class code_aster.Objects.ImposedPressureReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

IncompleteMesh object

class code_aster.Objects.IncompleteMesh(*args, **kwargs)[source]

Bases: Mesh

getNodesFromGroup(grpName)[source]

Get node ids (local numbering) of nodes in a group

Parameters:

grpName (str) – node group name

Returns:

list of ids in local numbering

Return type:

list

InternalForceReal object

class code_aster.Objects.InternalForceReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

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

enableXfem()[source]

Enable preconditionning for XFEM modeling.

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

getMatrix()[source]

return the factorized matrix

Returns:

factorized matrix

Return type:

BaseAssemblyMatrix

getPrecondMatrix()[source]

return the preconditionning matrix

Returns:

preconditionning matrix

Return type:

BaseAssemblyMatrix

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.

  1. solve(self: libaster.LinearSolver, rhs: libaster.FieldOnNodesReal, dirichletBC: libaster.FieldOnNodesReal = None) -> libaster.FieldOnNodesReal

  2. solve(self: libaster.LinearSolver, rhs: libaster.FieldOnNodesComplex, dirichletBC: libaster.FieldOnNodesComplex = None) -> libaster.FieldOnNodesComplex

supportParallelMesh()[source]

tell if the solver is enable in HPC

Returns:

True if the solver support ParallelMesh, else False

Return type:

bool

LineicForceReal object

class code_aster.Objects.LineicForceReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

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.

  1. addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC) -> None

  2. addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: Function, arg2: str) -> None

  3. addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: Formula, arg2: str) -> None

  4. addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: Function2D, arg2: str) -> None

  5. addDirichletBC(self: libaster.ListOfLoads, arg0: DirichletBC, arg1: str) -> None

addLoad(*args, **kwargs)[source]

Overloaded function.

  1. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >) -> None

  2. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >) -> None

  3. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: str) -> None

  4. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function, arg2: str) -> None

  5. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: Formula, arg2: str) -> None

  6. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function2D, arg2: str) -> None

  7. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: str) -> None

  8. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function, arg2: str) -> None

  9. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula, arg2: str) -> None

  10. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function2D, arg2: str) -> None

  11. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >) -> None

  12. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function) -> None

  13. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Formula) -> None

  14. addLoad(self: libaster.ListOfLoads, arg0: MechanicalLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function2D) -> None

  15. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >) -> None

  16. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >, arg1: Function) -> None

  17. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >, arg1: Formula) -> None

  18. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<double> >, arg1: Function2D) -> None

  19. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >) -> None

  20. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function) -> None

  21. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula) -> None

  22. addLoad(self: libaster.ListOfLoads, arg0: ThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function2D) -> None

  23. addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >) -> None

  24. addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function) -> None

  25. addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Formula) -> None

  26. addLoad(self: libaster.ListOfLoads, arg0: AcousticLoad<ConstantFieldOnCells<std::complex<double> > >, arg1: Function2D) -> None

  27. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >) -> None

  28. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: str) -> None

  29. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function, arg2: str) -> None

  30. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: Formula, arg2: str) -> None

  31. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<double> >, arg1: Function2D, arg2: str) -> None

  32. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: str) -> None

  33. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function, arg2: str) -> None

  34. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula, arg2: str) -> None

  35. addLoad(self: libaster.ListOfLoads, arg0: ParallelMechanicalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function2D, arg2: str) -> None

  36. addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >) -> None

  37. addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >, arg1: Function) -> None

  38. addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >, arg1: Formula) -> None

  39. addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<double> >, arg1: Function2D) -> None

  40. addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >) -> None

  41. addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Function) -> None

  42. addLoad(self: libaster.ListOfLoads, arg0: ParallelThermalLoad<ConstantFieldOnCells<JeveuxString<24> > >, arg1: Formula) -> None

  43. 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

getModel()[source]

Return the model used

Returns:

model used

Return type:

Model

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

hasDifferential()[source]

Return True if there are DIDI loads or DIDI Dirichlet BCs

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

isBuilt()[source]

The list of loads has been built or not.

Returns:

True if has been built already.

Return type:

bool

setDifferentialDisplacement(arg0)[source]

Set differential displacement field for DIDI loads

LoadResult object

class code_aster.Objects.LoadResult(*args, **kwargs)[source]

Bases: TransientResult

LocalForceOnBeamReal object

class code_aster.Objects.LocalForceOnBeamReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

LocalForceOnShellReal object

class code_aster.Objects.LocalForceOnShellReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

MGISBehaviour object

class code_aster.Objects.MGISBehaviour(*args, **kwargs)[source]

Bases: DataStructure

setBehaviourName(name)[source]

Define the name of the behaviour to be used from the MFront library.

Parameters:

name – Name of the behaviour.

setLibPath(path)[source]

Set the path to the MFront library.

Parameters:

path – Library path.

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

getValueReal(materialName, propertyName)[source]

Return the value of a property stored as a real.

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:

float

size()[source]

Return the number of material names.

Returns:

Number of material names.

Return type:

int

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

build()[source]

Build material field

getMaterialOnCell(arg0)[source]

Get the material properties on a giver cell on the material field

Returns:

material properties

Return type:

Material

getMesh()[source]

Get mesh of material field

Returns:

mesh

Return type:

BaseMesh

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.

  1. 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

  2. hasExternalStateVariable(self: libaster.MaterialField, exteVariIden: str) -> bool

    Detects the presence of an external state variable

    Returns:

    bool: True if has external state variables

  3. 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

hasExternalStateVariableWithReference()[source]

Detects the presence of an external state variable with reference value

Returns:

True if has external state variables with reference value

Return type:

bool

setModel(model)[source]

Set model of the material field

Parameters:

model (Model) – model

updateInternalState()[source]

Update the internal state of the datastructure.

Returns:

True in case of success, False otherwise.

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

addBCOnCells(*args, **kwargs)[source]

Overloaded function.

  1. addBCOnCells(self: libaster.MechanicalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: str) -> bool

  2. addBCOnCells(self: libaster.MechanicalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: list[str]) -> bool

addBCOnNodes(*args, **kwargs)[source]

Overloaded function.

  1. addBCOnNodes(self: libaster.MechanicalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: str) -> bool

  2. addBCOnNodes(self: libaster.MechanicalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: list[str]) -> bool

MechanicalLoadComplex object

class code_aster.Objects.MechanicalLoadComplex(*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:

Table

MechanicalLoadDescriptionReal object

class code_aster.Objects.MechanicalLoadDescriptionReal(arg0, arg1)[source]

Bases: DataStructure

MechanicalLoadFunction object

class code_aster.Objects.MechanicalLoadFunction(*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:

Table

MechanicalLoadReal object

class code_aster.Objects.MechanicalLoadReal(*args, **kwargs)[source]

Bases: DataStructure

getPairingField()[source]

Return pairing intersection.

Returns:

pairing intersection.

Return type:

FieldOnCellsReal

getTable(identifier)[source]

Extract a Table from the datastructure.

Parameters:

identifier (str) – Table identifier.

Returns:

Table stored with the given identifier.

Return type:

Table

setPairingField(pairs)[source]

Set pairing intersection.

Parameters:

pairs (FieldOnCellsReal) – pairing intersection.

Mesh object

class code_aster.Objects.Mesh(*args, **kwargs)[source]

Bases: BaseMesh

addCellLabels(cell_labels)[source]

Add cell labels.

Parameters:

cell_labels (list) – Cell labels.

addNodeLabels(node_labels)[source]

Add node labels.

Parameters:

node_labels (list) – Node labels.

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:

Mesh

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:

Mesh

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:

Mesh

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:

Mesh

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:

Mesh

getCells(*args, **kwargs)[source]

Overloaded function.

  1. 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]

  1. 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:

Mesh

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

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

setGroupOfNodes(group_name, node_ids, localNumbering=False)[source]

Set new group of nodes in the mesh

Parameters:
  • group_name (str) – Name of the new group.

  • node_ids (list[int]) – node ids which are in the group

  • localNumbering=false (bool) – not used (for compatibilty with ParallelMesh)

MeshCoordinatesField object

class code_aster.Objects.MeshCoordinatesField(arg0)[source]

Bases: DataStructure

__add__(*args, **kwargs)[source]

Overloaded function.

  1. __add__(self: libaster.MeshCoordinatesField, arg0: libaster.MeshCoordinatesField) -> libaster.MeshCoordinatesField

  2. __add__(self: libaster.MeshCoordinatesField, arg0: libaster.FieldOnNodesReal) -> libaster.MeshCoordinatesField

  3. __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:

MeshCoordinatesField

getNode(node_id)[source]

Return a node

Parameters:

[int] (node_id) – node id

Returns:

Node object.

Return type:

Node

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]

setNode(node)[source]

Set a node

Parameters:

[Node] (node) – node to set.

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:

FieldOnNodesReal

toNumpy()[source]

Return a numpy array view (no-copy) of values of the coordinates with shape (number of nodes, 3).

Returns:

Array view of coordinates with shape=(number of nodes, 3).

Return type:

np.ndarray

updateValuePointers()[source]

Update values of internal pointer.

MeshPairing object

class code_aster.Objects.MeshPairing(*args, **kwargs)[source]

Bases: DSWithCppPickling

Object 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.

  1. getIntersectionArea(self: libaster.MeshPairing, indexPair: int) -> float

Compute intersection of area

Parameters:

indexPair (integer) – index of pair

Returns:

area of intersection

Return type:

double

  1. 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]

getListOfPairs()[source]

Get pairs

Returns:

pairs (slave-master)

Return type:

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

getMesh()[source]

Return the mesh

Returns:

mesh.

Return type:

Mesh

getNumberOfIntersectionPoints(*args, **kwargs)[source]

Overloaded function.

  1. 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

  1. getNumberOfIntersectionPoints(self: libaster.MeshPairing) -> list[int]

    Get number of intersection points of all pairs

    Returns:

    list: number of intersection points

getNumberOfPairs()[source]

Get number of pairs

Returns:

number of pairs

Return type:

integer

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

getVerbosity()[source]

Get level of verbosity

Returns:

level of verbosity

Return type:

integer

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

setMesh(mesh)[source]

Set Mesh

Parameters:

mesh (BaseMesh) – support mesh

setMethod(method)[source]

Set method of pairing

Parameters:

method (PairingMethod) – method (“OLD”, “Fast”, “Robust)

setPair(groupNameSlav, groupNameMast)[source]

Set pair of meshed surfaces

Parameters:
  • groupNameSlav (str) – slave’s name

  • groupNameMast (str) – master’s name

setVerbosity(level)[source]
Set level of verbosity

0 - without 1 - normal (default) 2 - detailled (text)

Parameters:

level (integer) – level of verbosity

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]

getNodesIds()[source]

Return the ids of the master nodes for the interpolation of the slave nodes

Returns:

master nodes ids for each slave node

Return type:

list[int]

getNumberOfMasterNodes()[source]

Return the number of master nodes implied in the interpolation of the slave nodes

Returns:

number of master nodes for each slave node

Return type:

list[int]

ModeResult object

class code_aster.Objects.ModeResult(*args, **kwargs)[source]

Bases: FullResult

setMassMatrix(*args, **kwargs)[source]

Overloaded function.

  1. setMassMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementReal) -> None

  2. setMassMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixTemperatureReal) -> None

  3. setMassMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementComplex) -> None

  4. setMassMatrix(self: libaster.ModeResult, arg0: libaster.GeneralizedAssemblyMatrixComplex) -> None

setStiffnessMatrix(*args, **kwargs)[source]

Overloaded function.

  1. setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementReal) -> None

  2. setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixTemperatureReal) -> None

  3. setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixDisplacementComplex) -> None

  4. setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixPressureReal) -> None

  5. setStiffnessMatrix(self: libaster.ModeResult, arg0: libaster.AssemblyMatrixPressureReal) -> None

  6. 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.

  1. setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixDisplacementReal) -> bool

  2. setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixDisplacementComplex) -> bool

  3. setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixTemperatureReal) -> bool

  4. setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.AssemblyMatrixPressureReal) -> bool

  5. setStiffnessMatrix(self: libaster.ModeResultComplex, arg0: libaster.GeneralizedAssemblyMatrixReal) -> bool

  6. 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:
banBalancing()[source]

Prohibit model balancing

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:

ConnectionMesh

getGeometricDimension()[source]

To know the geometric dimension supported by the model

Returns:

geometric dimension

Return type:

int

getMesh()[source]

Return the mesh

Returns:

a pointer to the mesh

Return type:

Mesh

getModelisationName()[source]

Get modelisation name used in model

Returns:

modelisation name if single modelisation, else ‘#PLUSIEURS’

Return type:

str

getPartitionMethod()[source]

Get partition method

Returns:

partition method

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:

Table

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

setFrom(model)[source]

Set a model defined on a ConnectionMesh from an other model

Parameters:

model (Model) – Table identifier.

setSplittingMethod(*args, **kwargs)[source]

Overloaded function.

  1. setSplittingMethod(self: libaster.Model, arg0: libaster.ModelSplitingMethod, arg1: libaster.GraphPartitioner) -> None

  2. setSplittingMethod(self: libaster.Model, arg0: libaster.ModelSplitingMethod) -> None

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

class code_aster.Objects.MultipleElasticResult(*args, **kwargs)[source]

Bases: Result

MumpsSolver object

class code_aster.Objects.MumpsSolver(*args, **kwargs)[source]

Bases: LinearSolver

NodalForceReal object

class code_aster.Objects.NodalForceReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

NodalStructuralForceReal object

class code_aster.Objects.NodalStructuralForceReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

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.

setContact(*args, **kwargs)[source]

Overloaded function.

  1. setContact(self: libaster.NonLinearResult, arg0: libaster.Contact) -> None

  2. setContact(self: libaster.NonLinearResult, arg0: libaster.Contact, arg1: int) -> None

NormalSpeedOnFaceReal object

class code_aster.Objects.NormalSpeedOnFaceReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

ParallelContactFEDescriptor object

class code_aster.Objects.ParallelContactFEDescriptor(arg0, arg1, arg2, arg3, arg4, arg5)[source]

Bases: FiniteElementDescriptor

getJoints()[source]

Return the vector of joints between the curent domain and the others subdomains.

Returns:

joints between subdomains.

Return type:

list

ParallelContactNew object

class code_aster.Objects.ParallelContactNew(*args, **kwargs)[source]

Bases: ContactNew

build()[source]

Build and check internal objects

getParallelFiniteElementDescriptor()[source]

Return ParallelFiniteElementDescriptor

isParallel()[source]

bool: true if parallel contact.

ParallelContactPairing object

class code_aster.Objects.ParallelContactPairing(*args, **kwargs)[source]

Bases: ContactPairing

getParallelFiniteElementDescriptor()[source]

Return ParallelFiniteElementDescriptor

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.

  1. 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]]

  1. 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

useLagrangeDOF()[source]

Lagrange multipliers are used for BC or MPC.

Returns:

True if used, False otherwise.

Return type:

bool

useSingleLagrangeDOF()[source]

Single Lagrange multipliers are used for BC or MPC.

Returns:

True if used, False otherwise.

Return type:

bool

ParallelEquationNumbering object

class code_aster.Objects.ParallelEquationNumbering(*args, **kwargs)[source]

Bases: EquationNumbering

getDOFsWithDescription(*args, **kwargs)[source]

Overloaded function.

  1. 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]]

  1. 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.

  1. 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]]

  1. 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]

getNumberOfDOFs(local=False)[source]

Returns the number of DOFs.

Parameters:

local (bool) – local or parallel request

Returns:

number of DOFs.

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

ParallelFiniteElementDescriptor object

class code_aster.Objects.ParallelFiniteElementDescriptor(arg0, arg1, arg2)[source]

Bases: FiniteElementDescriptor

getJoints()[source]

Return the vector of joints between the curent domain and the others subdomains.

Returns:

joints between subdomains.

Return type:

list

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:

ParallelMesh

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:

Mesh

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:

ParallelMesh

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:

ParallelMesh

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:

Mesh

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.

  1. 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]

  1. 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]]

getOppositeDomains()[source]

Returns the list of opposite domains of local process

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

setGroupOfNodes(group_name, node_ids, localNumbering=False)[source]

Set new group of nodes in the mesh

Parameters:
  • group_name (str) – Name of the new group.

  • node_ids (list[int]) – node ids which are in the group

  • localNumbering=false (bool) – ids are given in the local numbering ?

setLastGhostsLayer(node_ids)[source]

Set ids in local numbering of ghost nodes on the last layer

Parameters:

list[int] – List of ghost nodes ids.

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

getPetscOptions()[source]

return the petsc solver options

Returns:

the petsc solver options

Return type:

string

PressureOnPipeReal object

class code_aster.Objects.PressureOnPipeReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

PressureOnShellReal object

class code_aster.Objects.PressureOnShellReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

PrestressingCable object

class code_aster.Objects.PrestressingCable(*args, **kwargs)[source]

Bases: DataStructure

getModel()[source]

Return the Model.

Returns:

Model object.

Return type:

Model

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.

  1. clear(self: libaster.Result) -> None

Clear fields, models, parameters, … in result

  1. 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:

list[ElementaryCharacteristics]

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.

  1. 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:

ElementaryCharacteristics

  1. 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.

  1. 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]

  1. 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:

ListOfLoads

getMaterialField(*args, **kwargs)[source]

Overloaded function.

  1. 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:

MaterialField

  1. 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.

  1. getModel(self: libaster.Result, index: int) -> libaster.Model

Return the model for the given index.

Parameters:

index (int) – index

Returns:

Model object.

Return type:

Model

  1. 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:

Table

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.

  1. 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

  1. hasElementaryCharacteristics(self: libaster.Result) -> bool

hasListOfLoads(*args, **kwargs)[source]

Overloaded function.

  1. 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

  1. 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

printListOfFields()[source]

Print the names of all fields (real, complex, …) stored in the result.

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.

  1. 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.

  1. setElementaryCharacteristics(self: libaster.Result, cara_elem: libaster.ElementaryCharacteristics, index: int) -> None

Set elementary characterictics on the specified index

Parameters:
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.

  1. 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.

  1. 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

setMesh(mesh)[source]

Set the mesh used by the result.

Parameters:

mesh (BaseMesh) – mesh to set

setModel(*args, **kwargs)[source]

Overloaded function.

  1. 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.

  1. 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.

  1. 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

  1. 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

setTime(time, index)[source]

Add time at the specified index

Parameters:
  • time (float) – time value to save

  • index (int) – index where to save time value

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:

SimpleFieldOnCellsReal

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)

getMesh()[source]

Returns base mesh

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.

  1. 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]]]

  1. 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.

  1. 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

  1. 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:

SimpleFieldOnCellsReal

setValue(*args, **kwargs)[source]

Overloaded function.

  1. 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

  1. 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.

  1. 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.

  2. 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:

FieldOnCellsReal

toFieldOnNodes()[source]

Convert to FieldOnNodes

Returns:

field converted

Return type:

FieldOnNodesReal

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)

toSimpleFieldOnNodes()[source]

Convert to SimpleFieldOnNodes

Returns:

field converted

Return type:

SimpleFieldOnNodesReal

SimpleFieldOnNodesComplex object

class code_aster.Objects.SimpleFieldOnNodesComplex(*args, **kwargs)[source]

Bases: DataField

getMesh()[source]

Returns base mesh

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.

  1. __getitem__(self: libaster.SimpleFieldOnNodesReal, arg0: tuple[int, int]) -> float

  2. __getitem__(self: libaster.SimpleFieldOnNodesReal, arg0: tuple[int, str]) -> float

__setitem__(*args, **kwargs)[source]

Overloaded function.

  1. __setitem__(self: libaster.SimpleFieldOnNodesReal, arg0: tuple[int, int], arg1: float) -> float

  2. __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:

SimpleFieldOnNodesReal

getMesh()[source]

Returns base mesh

getValuesWithDescription(*args, **kwargs)[source]

Overloaded function.

  1. 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 ).

  2. 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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

  6. setValues(self: libaster.SimpleFieldOnNodesReal, value: float) -> None

    Set the value everywhere.

    Arguments:

    value [float]: value to set everywhere.

toFieldOnNodes(*args, **kwargs)[source]

Overloaded function.

  1. toFieldOnNodes(self: libaster.SimpleFieldOnNodesReal) -> libaster.FieldOnNodesReal

Convert to FieldOnNodes

Returns:

field converted

Return type:

FieldOnNodesReal

  1. 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:

FieldOnNodesReal

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

class code_aster.Objects.Skeleton(*args, **kwargs)[source]

Bases: BaseMesh

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

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

StructuralForceOnEdgeReal object

class code_aster.Objects.StructuralForceOnEdgeReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

StructuralForceOnShellReal object

class code_aster.Objects.StructuralForceOnShellReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

StructureInterface object

class code_aster.Objects.StructureInterface(*args, **kwargs)[source]

Bases: DataStructure

SuperMesh object

class code_aster.Objects.SuperMesh(*args, **kwargs)[source]

Bases: Mesh

addDynamicMacroElement(arg0)[source]

Add a dynamic macro element.

addStaticMacroElement(arg0)[source]

Add a static macro element.

build()[source]

Returns: bool: true if building is ok

getDynamicMacroElements()[source]

Return all dynamic macro elements.

getNodeLabels()[source]

Get node labels.

getStaticMacroElements()[source]

Return all static macro elements.

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

getParameters()[source]

Return the parameters names.

Returns:

Names of the parameters.

Return type:

list[str]

getValues(arg0)[source]

For internal use only. See get_column().

TableContainer object

class code_aster.Objects.TableContainer(*args, **kwargs)[source]

Bases: Table

addObject(*args, **kwargs)[source]

Overloaded function.

  1. addObject(self: libaster.TableContainer, arg0: str, arg1: ElementaryMatrix<double, (PhysicalQuantityEnum)4>) -> None

  2. addObject(self: libaster.TableContainer, arg0: str, arg1: ElementaryVector<double, (PhysicalQuantityEnum)4>) -> None

  3. addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.FieldOnCellsReal) -> None

  4. addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.FieldOnNodesReal) -> None

  5. addObject(self: libaster.TableContainer, arg0: str, arg1: FunctionComplex) -> None

  6. addObject(self: libaster.TableContainer, arg0: str, arg1: GeneralizedAssemblyMatrix<double>) -> None

  7. addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.DataField) -> None

  8. addObject(self: libaster.TableContainer, arg0: str, arg1: ModeResult) -> None

  9. addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.ConstantFieldOnCellsReal) -> None

  10. addObject(self: libaster.TableContainer, arg0: str, arg1: Function2D) -> None

  11. addObject(self: libaster.TableContainer, arg0: str, arg1: libaster.Table) -> None

  12. 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

class code_aster.Objects.TableOfFunctions(*args, **kwargs)[source]

Bases: Table

addFunction(arg0)[source]

Add a function into the table.

getFunction(pos)[source]

Returns the function stored at a given position.

Parameters:

[int] (pos) – Index of the function to return (0-based).

Returns:

Function stored.

Return type:

Function

getNumberOfFunctions()[source]

Returns the number of functions stored in the table.

Returns:

Number of functions.

Return type:

int

ThermalDirichletBC object

class code_aster.Objects.ThermalDirichletBC(*args, **kwargs)[source]

Bases: DirichletBC

addBCOnCells(*args, **kwargs)[source]

Overloaded function.

  1. addBCOnCells(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: str) -> bool

  2. addBCOnCells(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: list[str]) -> bool

addBCOnNodes(*args, **kwargs)[source]

Overloaded function.

  1. addBCOnNodes(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: str) -> bool

  2. addBCOnNodes(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: float, arg2: list[str]) -> bool

  3. addBCOnNodes(self: libaster.ThermalDirichletBC, arg0: PhysicalQuantityComponent, arg1: libaster.Function, arg2: list[str]) -> bool

ThermalFourierResult object

class code_aster.Objects.ThermalFourierResult(*args, **kwargs)[source]

Bases: Result

ThermalLoadDescriptionReal object

class code_aster.Objects.ThermalLoadDescriptionReal(arg0, arg1)[source]

Bases: DataStructure

ThermalLoadFunction object

class code_aster.Objects.ThermalLoadFunction(*args, **kwargs)[source]

Bases: DataStructure

hasLoadField(arg0)[source]

Return true if the wanted field exists

Parameters:

str – name of the load field

Returns:

field exists

Return type:

bool

hasLoadResult()[source]

Return true if the LoadResult structure exists

Returns:

field exists

Return type:

bool

ThermalLoadReal object

class code_aster.Objects.ThermalLoadReal(*args, **kwargs)[source]

Bases: DataStructure

hasLoadField(arg0)[source]

Return true if the wanted field exists

Parameters:

str – name of the load field

Returns:

field exists

Return type:

bool

hasLoadResult()[source]

Return true if the LoadResult structure exists

Returns:

field exists

Return type:

bool

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

build()[source]

Builds C++ arguments associated to attributes stored by blocks of time indices

getAccelerationValues(*args, **kwargs)[source]

Overloaded function.

  1. getAccelerationValues(self: libaster.TransientGeneralizedResult) -> list[float]

Return generalized accelerations values for all time indices.

Returns:

generalized accelerations values.

Return type:

list[double]

  1. 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]

getDOFNumbering()[source]

Get DOF numbering

Returns:

DOF numbering

Return type:

DOFNumbering

getDisplacementValues(*args, **kwargs)[source]

Overloaded function.

  1. getDisplacementValues(self: libaster.TransientGeneralizedResult) -> list[float]

Return generalized displacements values for all time indices.

Returns:

generalized displacements values.

Return type:

list[double]

  1. 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:

GeneralizedDOFNumbering

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.

  1. getVelocityValues(self: libaster.TransientGeneralizedResult) -> list[float]

Return generalized velocities values for all time indices.

Returns:

generalized velocities values.

Return type:

list[double]

  1. 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

setVelocityValues(idx, val)[source]

Set generalized velocity values at a given time index.

Parameters:
  • idx (int) – time index

  • val (list[double]) – generalized velocity values.

TransientResult object

class code_aster.Objects.TransientResult(*args, **kwargs)[source]

Bases: Result

TurbulentSpectrum object

class code_aster.Objects.TurbulentSpectrum(*args, **kwargs)[source]

Bases: DataStructure

WavePressureOnFaceReal object

class code_aster.Objects.WavePressureOnFaceReal(*args, **kwargs)[source]

Bases: MechanicalLoadReal

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

XfemCrack object

class code_aster.Objects.XfemCrack(*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

getTable(identifier)[source]

Extract a Table from the datastructure.

Parameters:

identifier (str) – Table identifier.

Returns:

Table stored with the given identifier.

Return type:

Table