Subsampling Methods
Methods used to perform subsampling of simulation runs.
create_reference_subsample(load_path, parts, nr_samples=2000)
Loads the D3plot at load_path, extracts the node coordinates of part 13, returns a random subsample of these nodes
Parameters:
Name | Type | Description | Default |
---|---|---|---|
load_path |
str
|
Filepath of the D3plot |
required |
parts |
Sequence[int]
|
List of parts to be extracted |
required |
nr_samples |
How many nodes are subsampled |
2000
|
Returns:
Name | Type | Description |
---|---|---|
reference_sample |
np.array
|
Numpy array containing the reference sample |
t_total |
float
|
Total time required for subsampling |
t_load |
float
|
Time required to load plot |
err_msg |
str
|
If an error occurs, a string containing the error is returned instead |
remap_random_subsample(load_path, parts, reference_subsample)
Remaps the specified sample onto a new mesh provided by reference subsampl, using knn matching
Parameters:
Name | Type | Description | Default |
---|---|---|---|
load_path |
str
|
Filepath of the desired D3plot |
required |
parts |
list
|
Which parts shall be extracted from the D3plot |
required |
reference_subsample |
np.ndarray
|
Numpy array containing the reference nodes |
required |
Returns:
Name | Type | Description |
---|---|---|
subsampled_displacement |
np.ndarray
|
Subsampled displacement of provided sample |
t_total |
float
|
Total time required to perform subsampling |
t_load |
float
|
Time required to load D3plot |
err_msg |
str
|
If an error occured, a string is returned instead containing the error |