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::OptimizationUtilities Class Reference

Short class definition. More...

#include <optimization_utilities.h>

Collaboration diagram for Kratos::OptimizationUtilities:

Static Public Member Functions

Operations
static void ComputeControlPointUpdate (ModelPart &rModelPart, const double StepSize, const bool Normalize)
 
static void AddFirstVariableToSecondVariable (ModelPart &rModelPart, const Variable< array_3d > &rFirstVariable, const Variable< array_3d > &rSecondVariable)
 
static double ComputeL2NormOfNodalVariable (ModelPart &rModelPart, const Variable< array_3d > &rVariable)
 
static double ComputeL2NormOfNodalVariable (ModelPart &rModelPart, const Variable< double > &rVariable)
 
static double ComputeMaxNormOfNodalVariable (ModelPart &rModelPart, const Variable< array_3d > &rVariable)
 
static double ComputeMaxNormOfNodalVariable (ModelPart &rModelPart, const Variable< double > &rVariable)
 
static void ComputeSearchDirectionSteepestDescent (ModelPart &rModelPart)
 
static void ComputeProjectedSearchDirection (ModelPart &rModelPart)
 
static double CorrectProjectedSearchDirection (ModelPart &rModelPart, const double PrevConstraintValue, const double ConstraintValue, const double CorrectionScaling, const bool IsAdaptive)
 
static double ComputeCorrectionFactor (ModelPart &rModelPart, const double PrevConstraintValue, const double ConstraintValue, double &CorrectionScaling, const bool IsAdaptive)
 
static void AssembleVector (ModelPart &rModelPart, Vector &rVector, const Variable< double > &rVariable)
 
static void AssembleVector (ModelPart &rModelPart, Vector &rVector, const Variable< array_3d > &rVariable)
 
static void AssignVectorToVariable (ModelPart &rModelPart, const Vector &rVector, const Variable< double > &rVariable)
 
static void AssignVectorToVariable (ModelPart &rModelPart, const Vector &rVector, const Variable< array_3d > &rVariable)
 
static void AssembleMatrix (ModelPart &rModelPart, Matrix &rMatrix, const std::vector< Variable< array_3d > * > &rVariables)
 
static void CalculateProjectedSearchDirectionAndCorrection (Vector &rObjectiveGradient, Matrix &rConstraintGradients, Vector &rConstraintValues, LinearSolver< DenseSpace, DenseSpace > &rSolver, Vector &rProjectedSearchDirection, Vector &rRestoration)
 
static void AssembleBufferMatrix (Matrix &rMatrix, const std::vector< double > &rVariables)
 
static void CalculateRelaxedProjectedSearchDirectionAndCorrection (Vector &rObjectiveGradient, Matrix &rConstraintGradients, Matrix &rRelaxationCoefficients, Vector &rCorrectionCoefficients, LinearSolver< DenseSpace, DenseSpace > &rSolver, Vector &rProjectedSearchDirection, Vector &rCorrection)
 

Type Definitions

typedef array_1d< double, 3 > array_3d
 
typedef UblasSpace< double, Matrix, VectorDenseSpace
 
 KRATOS_CLASS_POINTER_DEFINITION (OptimizationUtilities)
 Pointer definition of OptimizationUtilities. More...
 

Detailed Description

Short class definition.

Detail class definition.

Member Typedef Documentation

◆ array_3d

◆ DenseSpace

Member Function Documentation

◆ AddFirstVariableToSecondVariable()

void Kratos::OptimizationUtilities::AddFirstVariableToSecondVariable ( ModelPart rModelPart,
const Variable< array_3d > &  rFirstVariable,
const Variable< array_3d > &  rSecondVariable 
)
static

◆ AssembleBufferMatrix()

static void Kratos::OptimizationUtilities::AssembleBufferMatrix ( Matrix rMatrix,
const std::vector< double > &  rVariables 
)
inlinestatic

Assemble a list of Numbers into a diagonal Matrix, independent of the model part

◆ AssembleMatrix()

void Kratos::OptimizationUtilities::AssembleMatrix ( ModelPart rModelPart,
Matrix rMatrix,
const std::vector< Variable< array_3d > * > &  rVariables 
)
static

Assemble the values of the nodal vector variables into a dense matrix. One column per variable is created.

◆ AssembleVector() [1/2]

void Kratos::OptimizationUtilities::AssembleVector ( ModelPart rModelPart,
Vector rVector,
const Variable< array_3d > &  rVariable 
)
static

Assemble the values of the nodal vector variable into a vector

◆ AssembleVector() [2/2]

void Kratos::OptimizationUtilities::AssembleVector ( ModelPart rModelPart,
Vector rVector,
const Variable< double > &  rVariable 
)
static

Assemble the values of the scalar variable into a vector

◆ AssignVectorToVariable() [1/2]

void Kratos::OptimizationUtilities::AssignVectorToVariable ( ModelPart rModelPart,
const Vector rVector,
const Variable< array_3d > &  rVariable 
)
static

Assigns the values of a vector to the nodal vector variables

◆ AssignVectorToVariable() [2/2]

void Kratos::OptimizationUtilities::AssignVectorToVariable ( ModelPart rModelPart,
const Vector rVector,
const Variable< double > &  rVariable 
)
static

Assigns the values of a vector to the scalar variables

◆ CalculateProjectedSearchDirectionAndCorrection()

void Kratos::OptimizationUtilities::CalculateProjectedSearchDirectionAndCorrection ( Vector rObjectiveGradient,
Matrix rConstraintGradients,
Vector rConstraintValues,
LinearSolver< DenseSpace, DenseSpace > &  rSolver,
Vector rProjectedSearchDirection,
Vector rRestoration 
)
static

Calculate the projection of the objective gradient into the subspace tangent to the active constraint gradients. In a second step, calculate the restoration move accounting for the current violation of the constraints. Variable naming and implementation based on https://msulaiman.org/onewebmedia/GradProj_2.pdf

◆ CalculateRelaxedProjectedSearchDirectionAndCorrection()

static void Kratos::OptimizationUtilities::CalculateRelaxedProjectedSearchDirectionAndCorrection ( Vector rObjectiveGradient,
Matrix rConstraintGradients,
Matrix rRelaxationCoefficients,
Vector rCorrectionCoefficients,
LinearSolver< DenseSpace, DenseSpace > &  rSolver,
Vector rProjectedSearchDirection,
Vector rCorrection 
)
inlinestatic

Calculate the relaxed projection of the objective gradient into the subspace tangent to the active constraint gradients. In a second step, calculate correction move

◆ ComputeControlPointUpdate()

void Kratos::OptimizationUtilities::ComputeControlPointUpdate ( ModelPart rModelPart,
const double  StepSize,
const bool  Normalize 
)
static

◆ ComputeCorrectionFactor()

double Kratos::OptimizationUtilities::ComputeCorrectionFactor ( ModelPart rModelPart,
const double  PrevConstraintValue,
const double  ConstraintValue,
double CorrectionScaling,
const bool  IsAdaptive 
)
static

◆ ComputeL2NormOfNodalVariable() [1/2]

double Kratos::OptimizationUtilities::ComputeL2NormOfNodalVariable ( ModelPart rModelPart,
const Variable< array_3d > &  rVariable 
)
static

◆ ComputeL2NormOfNodalVariable() [2/2]

double Kratos::OptimizationUtilities::ComputeL2NormOfNodalVariable ( ModelPart rModelPart,
const Variable< double > &  rVariable 
)
static

◆ ComputeMaxNormOfNodalVariable() [1/2]

double Kratos::OptimizationUtilities::ComputeMaxNormOfNodalVariable ( ModelPart rModelPart,
const Variable< array_3d > &  rVariable 
)
static

◆ ComputeMaxNormOfNodalVariable() [2/2]

double Kratos::OptimizationUtilities::ComputeMaxNormOfNodalVariable ( ModelPart rModelPart,
const Variable< double > &  rVariable 
)
static

◆ ComputeProjectedSearchDirection()

void Kratos::OptimizationUtilities::ComputeProjectedSearchDirection ( ModelPart rModelPart)
static

◆ ComputeSearchDirectionSteepestDescent()

void Kratos::OptimizationUtilities::ComputeSearchDirectionSteepestDescent ( ModelPart rModelPart)
static

◆ CorrectProjectedSearchDirection()

double Kratos::OptimizationUtilities::CorrectProjectedSearchDirection ( ModelPart rModelPart,
const double  PrevConstraintValue,
const double  ConstraintValue,
const double  CorrectionScaling,
const bool  IsAdaptive 
)
static

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::OptimizationUtilities::KRATOS_CLASS_POINTER_DEFINITION ( OptimizationUtilities  )

Pointer definition of OptimizationUtilities.


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