KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Classes | Static Public Member Functions | List of all members
Kratos::Wind::ModelSubdivisionUtilities Class Reference

Utility for populating sub model parts. More...

#include <model_subdivision_utilities.h>

Collaboration diagram for Kratos::Wind::ModelSubdivisionUtilities:

Classes

class  Slab
 A subset of R^3 between two parallel planes. More...
 
class  SlabStack
 
class  ThreadSafeIndexSet
 

Static Public Member Functions

static std::vector< Kratos::shared_ptr< ModelPart > > SortNodesBySlabs (ModelPart &rModelPart, const array_1d< double, 3 > &rBottomPoint, const array_1d< double, 3 > &rTopPoint, std::size_t numberOfSlabs, bool isRootSlabOpen)
 
static void SortNodes (ModelPart &rModelPart, std::function< ModelPart *(const Node &)> sortFunction, std::vector< ModelPart * > &rSubModelParts)
 
static void SortElements (ModelPart &rModelPart, std::function< ModelPart *(const Element &)> sortFunction, std::vector< ModelPart * > &rSubModelParts)
 
static void SortConditions (ModelPart &rModelPart, std::function< ModelPart *(const Condition &)> sortFunction, std::vector< ModelPart * > &rSubModelParts)
 

Detailed Description

Utility for populating sub model parts.

Member Function Documentation

◆ SortConditions()

void Kratos::Wind::ModelSubdivisionUtilities::SortConditions ( ModelPart rModelPart,
std::function< ModelPart *(const Condition &)>  sortFunction,
std::vector< ModelPart * > &  rSubModelParts 
)
static

Sort conditions into sub model parts

Parameters
rModelPartmodel part containing conditions to sort
sortFunctionfunction that decides which sub model part a condition is added to (NULL means it is skipped)
rSubModelPartsset of sub model parts to sort conditions into

calls sortFunction for every condition in rModelPart, and adds each of them to a sub model part in rSubModelParts. If sortFunction returns NULL, the condition is skipped and is not added to any of the model parts.

◆ SortElements()

void Kratos::Wind::ModelSubdivisionUtilities::SortElements ( ModelPart rModelPart,
std::function< ModelPart *(const Element &)>  sortFunction,
std::vector< ModelPart * > &  rSubModelParts 
)
static

Sort elements into sub model parts

Parameters
rModelPartmodel part containing elements to sort
sortFunctionfunction that decides which sub model part a element is added to (NULL means it is skipped)
rSubModelPartsset of sub model parts to sort elements into

calls sortFunction for every element in rModelPart, and adds each of them to a sub model part in rSubModelParts. If sortFunction returns NULL, the element is skipped and is not added to any of the model parts.

◆ SortNodes()

void Kratos::Wind::ModelSubdivisionUtilities::SortNodes ( ModelPart rModelPart,
std::function< ModelPart *(const Node &)>  sortFunction,
std::vector< ModelPart * > &  rSubModelParts 
)
static

Sort nodes into sub model parts

Parameters
rModelPartmodel part containing nodes to sort
sortFunctionfunction that decides which sub model part a node is added to (NULL means it is skipped)
rSubModelPartsset of sub model parts to sort nodes into

calls sortFunction for every node in rModelPart, and adds each of them to a sub model part in rSubModelParts. If sortFunction returns NULL, the node is skipped and is not added to any of the model parts.

◆ SortNodesBySlabs()

std::vector< Kratos::shared_ptr< ModelPart > > Kratos::Wind::ModelSubdivisionUtilities::SortNodesBySlabs ( ModelPart rModelPart,
const array_1d< double, 3 > &  rBottomPoint,
const array_1d< double, 3 > &  rTopPoint,
std::size_t  numberOfSlabs,
bool  isRootSlabOpen 
)
static

Sort nodes in a model part depending on their location within a stack of slabs

construct a set of slabs of equal height between the two specified points. Nodes in the model part are then assigned to newly created sub model parts, based on which constructed slab they are located in.

Parameters
rModelPartmodel part containing nodes to sort
rBottomPointpoint on the bottom plane of the bottom slab
rTopPointpoint on the top plane of the top slab
numberOfSlabsnumber of slabs to construct between the two points (an equal number of sub model parts are created as well)
isRootSlabOpendefines whether the top and bottom planes of the top and bottom slabs respectively are considered to be inside the domain (true: not considered inside).

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