Muscat.FE.Fields.FEField module¶
- class FEField(name=None, mesh=None, space=None, numbering=None, data=None)[source]¶
Bases:
FieldBase
- GetCellRepresentation(fillValue: float64 = 0, method: str | int = 'mean') ndarray [source]¶
Function to push the data from the field into a vector homogeneous to the mesh cell (for visualisation for example). Entities with no dofs are filled with the fillValue (default 0) the method controls to transfer function
- GetPointRepresentation(fillValue=0)[source]¶
Generates a vector representation of the field data corresponding to the mesh.
This function transfers the field’s data into a vector that is compatible in size with the mesh, which can be useful for visualization purposes. If an entity in the mesh does not have degrees of freedom (dofs), it is filled with a specified fill value, which defaults to 0 if not provided.
- Parameters:
fillValue (float, optional) – The value used to fill entities with no degrees of freedom. Default is 0.
- Returns:
A numpy array representing the field data across the entire mesh. Entities that originally had no dofs are filled with the specified fill value.
- Return type:
numpy.ndarray