#include <model_part_operation_utilities.h>
◆ CNodePointersType
◆ IndexType
◆ RangedKeyMapType
template<class KeyType , class ValueType >
◆ CheckValidityOfModelPartsForOperations()
bool Kratos::ModelPartOperationUtilities::CheckValidityOfModelPartsForOperations |
( |
const ModelPart & |
rMainModelPart, |
|
|
const std::vector< ModelPart const * > & |
rCheckModelParts, |
|
|
const bool |
ThrowError = false |
|
) |
| |
|
static |
Checks the validity of main model part and check model parts to be used within operation utilities.
This method checks whether all the nodes, and geometries in rCheckModelParts are present in the rMainModelPart.
If ThrowError is shown, a meaning full error is shown.
- Parameters
-
rMainModelPart | Main model part. |
rCheckModelParts | List of check model parts. |
ThrowError | To throw an error or not. |
- Returns
- true If the given model parts are valid.
-
false If the given model parts are invalid.
◆ FillSubModelPart()
template<class TModelPartOperation >
static void Kratos::ModelPartOperationUtilities::FillSubModelPart |
( |
ModelPart & |
rOutputSubModelPart, |
|
|
const ModelPart & |
rMainModelPart, |
|
|
const std::vector< ModelPart const * > & |
rOperands, |
|
|
const bool |
AddNeighbourEntities |
|
) |
| |
|
inlinestatic |
Fill a sub model part with the specified operation.
This method finds all the nodes, geometries in rOperands in the rMainModelPart which satisfies the specified TModelPartOperation and adds them to a given rOutputSubModelPart. The TModelPartOperation check is done based on the memory locations of the entities. The corresponding entities from rMainModelPart are used to populate the sub model part. rOutputSubModelPart must be a sub model part of rMainModelPart, but does not necessarily have to be an immediate sub model part.
If AddNeighbourEntities is true, then all the neighbours of the newly created model part is found from rMainModelPart and added as well.
Please make sure to check validity of model parts using
- See also
- CheckValidityOfModelPartsForOperations.
- Exceptions
-
If | rOutputSubModelPart is not a sub model part of rMainModelPart. |
If | rOutputSubModelPart is not empty. |
- Template Parameters
-
TModelPartOperation | Type of the operation. |
- Parameters
-
rOutputSubModelPart | Output sub model part. |
rMainModelPart | Main Model part. |
rOperands | Model parts to to find satisfying entities w.r.t. TModelPartOperation. |
AddNeighbourEntities | To add or not the neighbours. |
- Returns
- ModelPart& Output sub model part.
◆ HasIntersection()
bool Kratos::ModelPartOperationUtilities::HasIntersection |
( |
const std::vector< ModelPart * > & |
rIntersectionModelParts | ) |
|
|
static |
Checks whether given model parts list has an intersection.
This method checks whether rIntersectionModelParts has intersections.
The intersection is carried out by finding all the nodes, geometries in rIntersectionModelParts.
- Parameters
-
rIntersectionModelParts | Model parts to find intersection. |
- Returns
- true If there are entities intersecting.
-
false If there aren't any entities intersecting.
The documentation for this class was generated from the following files: