Configuration¶
config
¶
QUERY_TYPE
¶
Bases: Enum
Methods to query neighbors in the mechanical mesh.
INTERPOLATED_LOAD_TYPE
¶
Bases: Enum
Types of loads that can be interpolated.
InterpolationConfig
dataclass
¶
InterpolationConfig(method: QUERY_TYPE, param: int | float, max_distance: float, coincidence_tolerance: float, kernel: INTERPOLATION_KERNEL, multithread: bool, interpolated_load: INTERPOLATED_LOAD_TYPE, accept_no_neighbor: bool = False)
Class containing all needed parameters to customize the interpolation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method
|
QUERY_TYPE
|
Method to query neighbors in the mechanical mesh. |
required |
param
|
int | float
|
Parameter for the chosen query method. Radius in meters for RADIUS method, number of neighbors for K method. |
required |
max_distance
|
float
|
Maximum distance [m] to consider a mechanical node as neighbor. |
required |
coincidence_tolerance
|
float
|
Tolerance [m] to consider two nodes as coincident. |
required |
kernel
|
INTERPOLATION_KERNEL
|
Kernel for interpolation. |
required |
multithread
|
bool
|
Whether to use multithreading for interpolation. |
required |
interpolated_load
|
INTERPOLATED_LOAD_TYPE
|
Type of load to interpolate. |
required |
accept_no_neighbor
|
bool
|
Whether to accept points with no neighbors within max_distance. If False, an error will be raised. If true, interpolated value will be set to zero for these points. By default False. |
False
|
Raises:
| Type | Description |
|---|---|
ValueError
|
if parameter for K method is not an integer. |
ColumnsConfig
dataclass
¶
Describe the indices of the columns of both the source file(s) and of the destination mesh file. Indices are 0-based, i.e., the first column has index 0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_xyz
|
int
|
Index of the first column containing the x coordinate of the source mesh. y, and z coordinates are expected to be in the next two columns. |
required |
value
|
int
|
Index of the column containing the values to be interpolated from the source mesh. |
required |
dest_xyz
|
int
|
Index of the first column containing the x coordinate of the destination mesh. y, and z coordinates are expected to be in the next two columns. |
required |
id
|
int
|
Index of the column containing the destination mesh node IDs. |
required |
volume_area
|
int | None
|
Index of the column containing the volume or area of the destination mesh. |
None
|