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.
Public Member Functions | List of all members
CSharpKratosWrapper::IdTranslator Class Reference

#include <id_translator.h>

Collaboration diagram for CSharpKratosWrapper::IdTranslator:

Public Member Functions

void init (std::vector< int > &nodes)
 
int getSurfaceId (int kratosId)
 
int getKratosId (int surfaceId)
 
bool hasSurfaceId (int kratosId)
 
bool hasKratosId (int surfaceId)
 
int safeGetSurfaceId (int kratosId)
 
int safeGetKratosId (int surfaceId)
 

Member Function Documentation

◆ getKratosId()

int IdTranslator::getKratosId ( int  surfaceId)

Translates surface id to Kratos id.

Returns
Kratos node id
See also
safeGetKratosId

◆ getSurfaceId()

int IdTranslator::getSurfaceId ( int  kratosId)

Translates Kratos node id to surface id

Parameters
kratosIdKratos node id. Must be on the surface.
Returns
surface id of this node
See also
safeGetSurfaceId

◆ hasKratosId()

bool IdTranslator::hasKratosId ( int  surfaceId)

Checks whether it is possible to translate given surface id.

Parameters
surfaceIdsurface id to check
Returns
true if corresponding node exists

◆ hasSurfaceId()

bool IdTranslator::hasSurfaceId ( int  kratosId)

Checks whether it is possible to translate given Kratos id. It is true if and only if corresponding node is on the surface.

Parameters
kratosIdKratos id to check
Returns
true if corresponding surface Id exists

◆ init()

void IdTranslator::init ( std::vector< int > &  nodes)

Initializes translator.

Parameters
nodesSorted vector of Kratos ids of surface nodes

◆ safeGetKratosId()

int IdTranslator::safeGetKratosId ( int  surfaceId)

Performs safety check and translates given surface id to Kratos node id. Returns -1 if translation is not possible.

Parameters
surfaceIdsurface id to translate
Returns
Kratos node id or -1

◆ safeGetSurfaceId()

int IdTranslator::safeGetSurfaceId ( int  kratosId)

Performs safety check and translates given Kratos id to surface id. Returns -1 if translation is not possible.

Parameters
kratosIdKratos id to translate
Returns
surface node id or -1

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