WRApplication
External kratos "application" for multiscale time integration.
DatasetMap Class Reference

DatasetTransform that uses a Mapper to map datasets before assigning them to the target ModelPart. More...

Inheritance diagram for DatasetMap:
Collaboration diagram for DatasetMap:

Public Member Functions

None Execute (self)
 
"DatasetMap" Factory (cls, "WRApp.AsyncSolver" solver, KratosMultiphysics.Parameters parameters)
 Construct a DatasetMap and its related Mapper. More...
 
KratosMultiphysics.Parameters GetDefaultParameters (cls)
 

Detailed Description

DatasetTransform that uses a Mapper to map datasets before assigning them to the target ModelPart.

@classname DatasetMap

This operation consists of 3 subtasks: 1) Fetch variables from the source ModelPart. 2) Map the fetched data from the source ModelPart to the target ModelPart. 3) Assign the transformed data to the target ModelPart.

Fetching and assigning data can only be performed on variables, but the source and target variables need not be the same variable, or even be defined on the same entity types.

Default parameters:

{
"sources" : [], // <== source datasets
"transform" : {
"source_model_part_name" : "", // <== name of the model part to map from
"target_model_part_name" : "", // <== name of the model part to map to
"mapper_parameters" : {}, // <== parameters passed on to the mapper factory
"swap_signs" : false // <== indicates whether to swap signs before assigning the target dataset
},
"target" : [] // <== target_datasets
}

Source and target variables can be defined in the same manner, specifying the entity types they belong to ("nodal_historical", "nodal", "element", or "condition") and the name of the variable. The number of source and target variables must be equal, as each transformed source dataset is assigned to the target dataset at the matching position. Example for DatasetMap:

{
"sources" : [
{
"model_part_name" : "FluidInterface",
"container_type" : "nodal_historical",
"variable_name" : "REACTION"
}
],
"transform" : {
"source_model_part_name" : "FluidInterface",
"target_model_part_name" : "SolidInterface",
"mapper_parameters" : {
"mapper_type" : "nearest_neighbor"
}
"swap_signs" : true
},
"targets" : [
{
"model_part_name" : "SolidInterface",
"container_type" : "nodal",
"variable_name" : "TRACTION"
}
] // "targets"
}

The example parameters above configure DatasetMap to fetch data from the REACTION historical variable defined on the nodes of the "FluidInterface" model part, maps it to the nearest neighbour in the target model part, and assign it to the TRACTION non-historical variable defined on the nodes of the "SolidInterface" model part.

Member Function Documentation

◆ Execute()

None Execute (   self)

Reimplemented from DatasetTransform.

◆ Factory()

"DatasetMap" Factory (   cls,
"WRApp.AsyncSolver"  solver,
KratosMultiphysics.Parameters  parameters 
)

Construct a DatasetMap and its related Mapper.

Reimplemented from DatasetTransform.

◆ GetDefaultParameters()

KratosMultiphysics.Parameters GetDefaultParameters (   cls)

Reimplemented from DatasetTransform.


The documentation for this class was generated from the following file: