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.
|
#include <rom_auxiliary_utilities.h>
Public Types | |
Type Definitions | |
using | SizeType = std::size_t |
using | IndexType = std::size_t |
using | NodeType = Node |
using | GeometryType = Geometry< NodeType > |
using | GeometryPointerType = Geometry< NodeType >::Pointer |
using | NodesPointerSetType = ModelPart::NodesContainerType |
using | ElementFacesMapType = std::unordered_map< std::vector< IndexType >, std::pair< bool, GeometryPointerType >, KeyHasherRange< std::vector< IndexType > >, KeyComparorRange< std::vector< IndexType > >> |
Static Public Member Functions | |
Static Operations | |
static void | SetHRomComputingModelPart (const Parameters HRomWeights, const ModelPart &rOriginModelPart, ModelPart &rHRomComputingModelPart) |
Sets the HROM model part from the nodal weights Provided an origin model part and a parameters object containing the HROM weights, this method stores the elements and conditions required by the HROM in the destination model part. The new model part features the same submodelpart hierarchy that the origin has. More... | |
static void | SetHRomComputingModelPartWithNeighbours (const Parameters HRomWeights, ModelPart &rOriginModelPart, ModelPart &rHRomComputingModelPart) |
Sets the HROM model part including neighboring entities based on the nodal weights. More... | |
static void | SetHRomVolumetricVisualizationModelPart (const ModelPart &rOriginModelPart, ModelPart &rHRomVisualizationModelPart) |
Sets the HROM skin visualization model part for a volumetric body This function detects the skin of the origin modelpart and creates the corresponding skin entities (conditions) which are stored in an auxiliary modelpart to visualize the HROM solution It is important to mention that this function only works with volumetric (a.k.a. solid) bodies. More... | |
static std::vector< IndexType > | GetHRomConditionParentsIds (const ModelPart &rModelPart, const std::map< std::string, std::map< IndexType, double >> &rHRomWeights) |
Return the decremented element ids(-1 to account for numpy indexing) of the missing HROM condition parents This function loops the HROM conditions in the HROM weights and searches for their parents in the provided model part. Once these are found, it is checked that they are not already added and returned. Note that this functions requires the NEIGHBOUR_ELEMENTS to be already computed. More... | |
static std::vector< IndexType > | GetNodalNeighbouringElementIdsNotInHRom (ModelPart &rModelPart, ModelPart &rGivenModelPart, const std::map< std::string, std::map< IndexType, double >> &rHRomWeights) |
Retrieve the decremented (-1 to account for numpy indexing) IDs of elements neighboring nodes in a given sub-model part but not present in HRom weights. More... | |
static std::vector< IndexType > | GetNodalNeighbouringElementIds (ModelPart &rModelPart, ModelPart &rGivenModelPart) |
Retrieve the decremented (-1 to account for numpy indexing) IDs of elements neighboring nodes in a given sub-model part. More... | |
static std::vector< IndexType > | GetConditionIdsNotInHRomModelPart (const ModelPart &rModelPartWithConditionsToInclude, std::map< std::string, std::map< IndexType, double >> &rHRomWeights) |
Identifies condition decremented (-1 to account for numpy indexing) IDs from a given ModelPart that are not in the HROM weights This function iterates through the conditions in the provided ModelPart, checks if their IDs exist in the HROM weights, and includes them in a list if they are missing. The decremented (-1 to account for numpy indexing) IDs of the absent conditions are returned. More... | |
static std::vector< IndexType > | GetElementIdsNotInHRomModelPart (const ModelPart &rModelPartWithElementsToInclude, std::map< std::string, std::map< IndexType, double >> &rHRomWeights) |
Identifies element decremented (-1 to account for numpy indexing) IDs from a given ModelPart that are not in the HROM weights This function iterates through the elements in the provided ModelPart, checks if their decremented (-1 to account for numpy indexing) IDs exist in the HROM weights, and includes them in a list if they are missing. The decremented (-1 to account for numpy indexing) IDs of the absent elements are returned. More... | |
static std::vector< IndexType > | GetHRomMinimumConditionsIds (const ModelPart &rModelPart, const std::map< IndexType, double > &rHRomConditionWeights) |
Return the a minimum condition for each HROM submodelpart This function loops the HROM mesh submodelparts and checks if there is at least a minimum condition for each submodelpart in the HROM condition weights. If there are no conditions it adds a null weight condition to the HROM weights. This might be required for the HROM submodelparts visualization or BC imposition. More... | |
static std::vector< IndexType > | GetElementIdsInModelPart (const ModelPart &rModelPart) |
Retrieve the decremented IDs (-1 to account for numpy indexing) of elements present in the provided model part. More... | |
static std::vector< IndexType > | GetConditionIdsInModelPart (const ModelPart &rModelPart) |
Retrieve the decremented IDs (-1 to account for numpy indexing) of conditions present in the provided model part. More... | |
static void | ProjectRomSolutionIncrementToNodes (const std::vector< std::string > &rRomVariableNames, ModelPart &rModelPart) |
Project the ROM solution increment onto the nodal basis For a given model part this function takes the ROM_SOLUTION_INCREMENT, which is assumed to be stored in the root model part, and projects it with the nodal ROM_BASIS to calculate the solution increment. More... | |
static void | GetPhiElemental (Matrix &rPhiElemental, const Element::DofsVectorType &rDofs, const Element::GeometryType &rGeom, const std::unordered_map< Kratos::VariableData::KeyType, Matrix::size_type > &rVarToRowMapping) |
Obtain the elemental basis matrix for a particular element. More... | |
static void | GetPsiElemental (Matrix &rPsiElemental, const Element::DofsVectorType &rDofs, const Element::GeometryType &rGeom, const std::unordered_map< Kratos::VariableData::KeyType, Matrix::size_type > &rVarToRowMapping) |
Obtain the left elemental basis (Psi) matrix for a particular element. More... | |
static void | GetJPhiElemental (Matrix &rJPhiElemental, const Element::DofsVectorType &rDofs, const Matrix &rJPhi) |
Obtain the JPhi elemental matrix for a particular element. JPhi represents the projection of the Jacobian onto the ROM_BASIS. More... | |