-
Notifications
You must be signed in to change notification settings - Fork 0
feat: improve and update of geos-mesh utils functions #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ckdataset if it exist
Co-authored-by: paloma-martinez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on the logger !
It looks good to me, I only made a few suggestions on wording
nb_component (int): Nb of components. | ||
nb_elements (int): Nb of elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nb_component (int): Nb of components. | |
nb_elements (int): Nb of elements. | |
nb_component (int): Number of components. | |
nb_elements (int): Number of elements. |
Defaults to False. | ||
value (any, optional): value to fill in the partial atribute. | ||
Defaults to nan. For int vtk array, default value is automatically set to -1. | ||
value (Any, optional): Filling value. It is better to use numpy scalar type for the values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value (Any, optional): Filling value. It is better to use numpy scalar type for the values. | |
value (Any, optional): Filling value. It is recommended to use numpy scalar type for the values. |
attributeName (str): name of the attribute. | ||
componentNames (tuple[str,...], optional): name of the components for vectorial attributes. If one component, give an empty tuple. | ||
object (vtkDataObject): Object (vtkMultiBlockDataSet, vtkDataSet) where to create the attribute. | ||
listValues (list[Any]): List of values of the attribute for each components. It is better to use numpy scalar type for the values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listValues (list[Any]): List of values of the attribute for each components. It is better to use numpy scalar type for the values. | |
listValues (list[Any]): List of values of the attribute for each components. It is recommended to use numpy scalar type for the values. |
) -> bool: | ||
"""Create an attribute with a constant value everywhere if absent. | ||
"""Create a new attribute with a constant value per component on every blocks of the multiBlockDataSet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"""Create a new attribute with a constant value per component on every blocks of the multiBlockDataSet. | |
"""Create a new attribute with a constant value per component on every block of the multiBlockDataSet. |
attributeName (str): name of the attribute. | ||
componentNames (tuple[str,...], optional): name of the components for vectorial attributes. If one component, give an empty tuple. | ||
multiBlockDataSet (vtkMultiBlockDataSet | vtkCompositeDataSet): MultiBlockDataSet where to create the attribute. | ||
listValues (list[Any]): List of values of the attribute for each components. It is better to use numpy scalar type for the values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listValues (list[Any]): List of values of the attribute for each components. It is better to use numpy scalar type for the values. | |
listValues (list[Any]): List of values of the attribute for each components. It is recommended to use numpy scalar type for the values. |
logger.warning( | ||
f"During the creation of the constant attribute { attributeName }, values will be converted from { valueType } to { npType }." | ||
) | ||
logger.warning( "To avoid any issue with the conversion use directly numpy scalar type for the values" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.warning( "To avoid any issue with the conversion use directly numpy scalar type for the values" ) | |
logger.warning( "To avoid any issue with the conversion, please use directly numpy scalar type for the values" ) |
logger.warning( "To avoid any issue with the conversion use directly numpy scalar type for the values" ) | ||
valueType = npType | ||
|
||
# Check the coherency between the given value type and the vtk array type if it exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Check the coherency between the given value type and the vtk array type if it exist. | |
# Check the consistency between the given value type and the vtk array type if it exists. |
vtkDataType (Union[int, None], optional): Vtk data type of the attribute to create. | ||
Defaults to None, the vtk data type is given by the type of the array. | ||
|
||
Warning with int8, uint8 and int64 type, the vtk data type corresponding are multiples. By default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning with int8, uint8 and int64 type, the vtk data type corresponding are multiples. By default: | |
Warning with int8, uint8 and int64 type, the corresponding vtk data type are multiples. By default: |
vtkDataType (Union[int, None], optional): Vtk data type of the attribute to create. | ||
Defaults to None, the vtk data type is given by the type of the values. | ||
|
||
Warning with int8, uint8 and int64 type of value, the vtk data type corresponding are multiples. By default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning with int8, uint8 and int64 type of value, the vtk data type corresponding are multiples. By default: | |
Warning with int8, uint8 and int64 type of value, the corresponding vtk data type are multiples. By default: |
vtkDataType (Union[int, None], optional): Vtk data type of the attribute to create. | ||
Defaults to None, the vtk data type is given by the type of the values. | ||
|
||
Warning with int8, uint8 and int64 type of value, the vtk data type corresponding are multiples. By default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning with int8, uint8 and int64 type of value, the vtk data type corresponding are multiples. By default: | |
Warning with int8, uint8 and int64 type of value, the corresponding vtk data type are multiples. By default: |
This PR updates the utils functions of geos-mesh:
close #108