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

This class is a wrapper of useful utilities for shallow water computations. More...

#include <shallow_water_utilities.h>

Collaboration diagram for Kratos::ShallowWaterUtilities:

Public Types

Type Definitions
typedef Node NodeType
 
typedef Geometry< NodeTypeGeometryType
 
typedef ModelPart::NodesContainerType NodesContainerType
 

Public Member Functions

Pointer definition
 KRATOS_CLASS_POINTER_DEFINITION (ShallowWaterUtilities)
 

Operations

void ComputeFreeSurfaceElevation (ModelPart &rModelPart)
 
void ComputeHeightFromFreeSurface (ModelPart &rModelPart)
 
void ComputeVelocity (ModelPart &rModelPart, bool PerformProjection=false)
 
void ComputeSmoothVelocity (ModelPart &rModelPart)
 
void ComputeMomentum (ModelPart &rModelPart)
 
void ComputeLinearizedMomentum (ModelPart &rModelPart)
 
template<bool THistorical>
void ComputeFroude (ModelPart &rModelPart, const double Epsilon)
 
template<bool THistorical>
void ComputeEnergy (ModelPart &rModelPart)
 
void FlipScalarVariable (Variable< double > &rOriginVariable, Variable< double > &rDestinationVariable, ModelPart &rModelPart)
 
void IdentifySolidBoundary (ModelPart &rModelPart, double SeaWaterLevel, Flags SolidBoundaryFlag)
 
void FlagWetElements (ModelPart &rModelPart, Flags WetFlag, double RelativeDryHeight=-1.0)
 
void ExtrapolateElementalFlagToNodes (ModelPart &rModelPart, Flags Flag)
 
void NormalizeVector (ModelPart &rModelPart, const Variable< array_1d< double, 3 >> &rVariable)
 
template<class TDataType , class TVarType = Variable<TDataType>>
void SmoothHistoricalVariable (const TVarType &rVariable, NodesContainerType &rNodes, const double ElapsedTime, const double SemiPeriod)
 
template<class TVarType >
void CopyVariableToPreviousTimeStep (ModelPart &rModelPart, const TVarType &rVariable)
 
void SetMinimumValue (ModelPart &rModelPart, const Variable< double > &rVariable, double MinValue)
 
void SetMeshZCoordinateToZero (ModelPart &rModelPart)
 Set the z-coordinate of the mesh to zero. More...
 
void SetMeshZ0CoordinateToZero (ModelPart &rModelPart)
 Set the z0-coordinate of the mesh to zero. More...
 
void SetMeshZCoordinate (ModelPart &rModelPart, const Variable< double > &rVariable)
 Move the z-coordinate of the mesh according to a variable. More...
 
void OffsetMeshZCoordinate (ModelPart &rModelPart, const double Increment)
 Move the z-coordinate of the mesh according to a variable. More...
 
void SwapYZCoordinates (ModelPart &rModelPart)
 Swap the Y and Z coordinates of the nodes. More...
 
void SwapY0Z0Coordinates (ModelPart &rModelPart)
 Swap the Y and Z coordinates of the nodes. More...
 
void StoreNonHistoricalGiDNoDataIfDry (ModelPart &rModelPart, const Variable< double > &rVariable)
 Store a double variable as NonHistorical and set the value to no-data if the node is dry. More...
 
void SwapYZComponents (const Variable< array_1d< double, 3 >> &rVariable, NodesContainerType &rNodes)
 Swap the Y and Z components of a vector variable. More...
 
template<class TContainerType >
void SwapYZComponentsNonHistorical (const Variable< array_1d< double, 3 >> &rVariable, TContainerType &rContainer)
 Swap the Y and Z components of a vector variable. More...
 
template<class TContainerType >
void OffsetIds (TContainerType &rContainer, const double Offset)
 Offset the ids of the given container for visualization purpose in GiD. More...
 
template<class TContainerType >
void OffsetIds (TContainerType &rContainer)
 Offset the ids of the given container for visualization purpose in GiD. More...
 
template<bool THistorical>
double ComputeL2Norm (ModelPart &rModelPart, const Variable< double > &rVariable)
 Compute the L-2 norm for the given double variable. More...
 
template<bool THistorical>
double ComputeL2NormAABB (ModelPart &rModelPart, const Variable< double > &rVariable, Point &rLow, Point &rHigh)
 Compute the L-2 norm for the given double variable inside an axis-aligned bounding box. More...
 
template<class TContainerType >
array_1d< double, 3 > ComputeHydrostaticForces (TContainerType &rContainer, const ProcessInfo &rProcessInfo, const double RelativeDryHeight=-1.0)
 Compute the horizontal hydrostatic pressures. More...
 

Detailed Description

This class is a wrapper of useful utilities for shallow water computations.

Member Typedef Documentation

◆ GeometryType

◆ NodesContainerType

◆ NodeType

Member Function Documentation

◆ ComputeEnergy()

template<bool THistorical>
template void Kratos::ShallowWaterUtilities::ComputeEnergy< false > ( ModelPart rModelPart)

◆ ComputeFreeSurfaceElevation()

void Kratos::ShallowWaterUtilities::ComputeFreeSurfaceElevation ( ModelPart rModelPart)

◆ ComputeFroude()

template<bool THistorical>
template void Kratos::ShallowWaterUtilities::ComputeFroude< false > ( ModelPart rModelPart,
const double  Epsilon 
)

◆ ComputeHeightFromFreeSurface()

void Kratos::ShallowWaterUtilities::ComputeHeightFromFreeSurface ( ModelPart rModelPart)

◆ ComputeHydrostaticForces()

template<class TContainerType >
array_1d<double,3> Kratos::ShallowWaterUtilities::ComputeHydrostaticForces ( TContainerType &  rContainer,
const ProcessInfo rProcessInfo,
const double  RelativeDryHeight = -1.0 
)
inline

Compute the horizontal hydrostatic pressures.

◆ ComputeL2Norm()

template<bool THistorical>
template double Kratos::ShallowWaterUtilities::ComputeL2Norm< false > ( ModelPart rModelPart,
const Variable< double > &  rVariable 
)

Compute the L-2 norm for the given double variable.

◆ ComputeL2NormAABB()

template<bool THistorical>
template double Kratos::ShallowWaterUtilities::ComputeL2NormAABB< false > ( ModelPart rModelPart,
const Variable< double > &  rVariable,
Point rLow,
Point rHigh 
)

Compute the L-2 norm for the given double variable inside an axis-aligned bounding box.

◆ ComputeLinearizedMomentum()

void Kratos::ShallowWaterUtilities::ComputeLinearizedMomentum ( ModelPart rModelPart)

◆ ComputeMomentum()

void Kratos::ShallowWaterUtilities::ComputeMomentum ( ModelPart rModelPart)

◆ ComputeSmoothVelocity()

void Kratos::ShallowWaterUtilities::ComputeSmoothVelocity ( ModelPart rModelPart)

◆ ComputeVelocity()

void Kratos::ShallowWaterUtilities::ComputeVelocity ( ModelPart rModelPart,
bool  PerformProjection = false 
)

◆ CopyVariableToPreviousTimeStep()

template<class TVarType >
void Kratos::ShallowWaterUtilities::CopyVariableToPreviousTimeStep ( ModelPart rModelPart,
const TVarType &  rVariable 
)
inline

◆ ExtrapolateElementalFlagToNodes()

void Kratos::ShallowWaterUtilities::ExtrapolateElementalFlagToNodes ( ModelPart rModelPart,
Flags  Flag 
)

◆ FlagWetElements()

void Kratos::ShallowWaterUtilities::FlagWetElements ( ModelPart rModelPart,
Flags  WetFlag,
double  RelativeDryHeight = -1.0 
)

◆ FlipScalarVariable()

void Kratos::ShallowWaterUtilities::FlipScalarVariable ( Variable< double > &  rOriginVariable,
Variable< double > &  rDestinationVariable,
ModelPart rModelPart 
)

◆ IdentifySolidBoundary()

void Kratos::ShallowWaterUtilities::IdentifySolidBoundary ( ModelPart rModelPart,
double  SeaWaterLevel,
Flags  SolidBoundaryFlag 
)

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::ShallowWaterUtilities::KRATOS_CLASS_POINTER_DEFINITION ( ShallowWaterUtilities  )

◆ NormalizeVector()

void Kratos::ShallowWaterUtilities::NormalizeVector ( ModelPart rModelPart,
const Variable< array_1d< double, 3 >> &  rVariable 
)

◆ OffsetIds() [1/2]

template<class TContainerType >
void Kratos::ShallowWaterUtilities::OffsetIds ( TContainerType &  rContainer)
inline

Offset the ids of the given container for visualization purpose in GiD.

◆ OffsetIds() [2/2]

template<class TContainerType >
void Kratos::ShallowWaterUtilities::OffsetIds ( TContainerType &  rContainer,
const double  Offset 
)
inline

Offset the ids of the given container for visualization purpose in GiD.

◆ OffsetMeshZCoordinate()

void Kratos::ShallowWaterUtilities::OffsetMeshZCoordinate ( ModelPart rModelPart,
const double  Increment 
)

Move the z-coordinate of the mesh according to a variable.

◆ SetMeshZ0CoordinateToZero()

void Kratos::ShallowWaterUtilities::SetMeshZ0CoordinateToZero ( ModelPart rModelPart)

Set the z0-coordinate of the mesh to zero.

◆ SetMeshZCoordinate()

void Kratos::ShallowWaterUtilities::SetMeshZCoordinate ( ModelPart rModelPart,
const Variable< double > &  rVariable 
)

Move the z-coordinate of the mesh according to a variable.

◆ SetMeshZCoordinateToZero()

void Kratos::ShallowWaterUtilities::SetMeshZCoordinateToZero ( ModelPart rModelPart)

Set the z-coordinate of the mesh to zero.

◆ SetMinimumValue()

void Kratos::ShallowWaterUtilities::SetMinimumValue ( ModelPart rModelPart,
const Variable< double > &  rVariable,
double  MinValue 
)

◆ SmoothHistoricalVariable()

template<class TDataType , class TVarType = Variable<TDataType>>
void Kratos::ShallowWaterUtilities::SmoothHistoricalVariable ( const TVarType &  rVariable,
NodesContainerType rNodes,
const double  ElapsedTime,
const double  SemiPeriod 
)
inline

◆ StoreNonHistoricalGiDNoDataIfDry()

void Kratos::ShallowWaterUtilities::StoreNonHistoricalGiDNoDataIfDry ( ModelPart rModelPart,
const Variable< double > &  rVariable 
)

Store a double variable as NonHistorical and set the value to no-data if the node is dry.

◆ SwapY0Z0Coordinates()

void Kratos::ShallowWaterUtilities::SwapY0Z0Coordinates ( ModelPart rModelPart)

Swap the Y and Z coordinates of the nodes.

◆ SwapYZComponents()

void Kratos::ShallowWaterUtilities::SwapYZComponents ( const Variable< array_1d< double, 3 >> &  rVariable,
NodesContainerType rNodes 
)
inline

Swap the Y and Z components of a vector variable.

◆ SwapYZComponentsNonHistorical()

template<class TContainerType >
void Kratos::ShallowWaterUtilities::SwapYZComponentsNonHistorical ( const Variable< array_1d< double, 3 >> &  rVariable,
TContainerType &  rContainer 
)
inline

Swap the Y and Z components of a vector variable.

◆ SwapYZCoordinates()

void Kratos::ShallowWaterUtilities::SwapYZCoordinates ( ModelPart rModelPart)

Swap the Y and Z coordinates of the nodes.


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