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.
List of all members
Kratos::SensitivityUtilities Class Reference

#include <sensitivity_utilities.h>

Collaboration diagram for Kratos::SensitivityUtilities:

Static Public Member Functions

Static Operations
template<class TContainerType >
static void AssignEntityDerivativesToNodes (ModelPart &rModelPart, const int DerivativeDimension, const Variable< Matrix > &rDerivativeVariable, const std::unordered_map< int, std::vector< int >> &rNeighbourNodeIdsMap, const double Weight, const Flags &rFlag, const bool CheckValue=true)
 Assigns entity derivatives to nodes based on a given constant weighting. More...
 

Member Function Documentation

◆ AssignEntityDerivativesToNodes()

template<class TContainerType >
void Kratos::SensitivityUtilities::AssignEntityDerivativesToNodes ( ModelPart rModelPart,
const int  DerivativeDimension,
const Variable< Matrix > &  rDerivativeVariable,
const std::unordered_map< int, std::vector< int >> &  rNeighbourNodeIdsMap,
const double  Weight,
const Flags rFlag,
const bool  CheckValue = true 
)
static

Assigns entity derivatives to nodes based on a given constant weighting.

This method assigns derivatives of a value calculated on given entity to nodes. The derivatives given by entity should have the following order in the matrix

[ M\left(a, i\right) = \frac{\partial y^i}{\partial x^c_k} ]

Where $a = c * DerivativeDimension + k$, and $i$ is the value dimension, $c$ is derivative node and $k$ is derivative node's direction When these derivatives are stored on nodes, following order is assumed. Firstly, derivatives w.r.t. itself Then in the order of rNeighbourNodeIdsMap[current_node.Id] vector

rNeighbourNodeIdsMap can be generated using FindGlobalNodalNeighboursProcess

See also
FindGlobalNodalNeighboursProcess
Template Parameters
TContainerTypeContainer type
Parameters
rModelPartModel part to use entities and nodes
DerivativeDimensionDimensionality of derivative variable
rDerivativeVariableMatrix type derivative variable which holds derivatives in an entity.
rNeighbourNodeIdsMapNeighbour node ids map for all the nodes in rModelPart
WeightConstant weighting
rFlagFlag to check in entities whether entity derivatives should be distributed to nodes or not
CheckValueFlag check value

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