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

Custom unordered map container to be used by the mapper. More...

#include <mapping_variables.h>

Inheritance diagram for Kratos::IndexMap:
Collaboration diagram for Kratos::IndexMap:

Public Member Functions

Life Cycle
 IndexMap ()
 Default constructors. More...
 
virtual ~IndexMap ()
 Destructor. More...
 
Operations
IndexType GetId (IteratorType ThisIterator)
 Returns the id corresponding a iterator. More...
 
IndexType GetOtherId (IteratorType ThisIterator)
 Returns the new entity id corresponding a iterator. More...
 
bool Has (const IndexType IndexOrigin) override
 It checks if an ID exists in the map. More...
 
void AddId (const IndexType IndexOrigin, const IndexType IndexNewEntity=0) override
 It adds a new ID to the map. More...
 
void RemoveId (const IndexType IndexOrigin) override
 It removes one particular pair from the map. More...
 
IndexType GetNewEntityId (const IndexType IndexOrigin) override
 It returns the new created entity ID. More...
 
void SetNewEntityId (const IndexType IndexOrigin, const IndexType IndexNewEntity) override
 It sets the new created entity ID. More...
 
std::string Info () const override
 Turn back information as a string. More...
 
void save (Serializer &rSerializer) const override
 
void load (Serializer &rSerializer) override
 
- Public Member Functions inherited from Kratos::IndexDatabase
 KRATOS_CLASS_POINTER_DEFINITION (IndexDatabase)
 
 IndexDatabase ()
 Default constructors. More...
 
virtual ~IndexDatabase ()
 Destructor. More...
 

Type Definitions

Counted pointer of IndexMap

typedef std::unordered_map< IndexType, IndexTypeBaseType
 
typedef iterator IteratorType
 
 KRATOS_CLASS_POINTER_DEFINITION (IndexMap)
 

Detailed Description

Custom unordered map container to be used by the mapper.

Contains a map of IDs of paired conditions, and the new created condition

Author
Vicente Mataix Ferrandiz

Member Typedef Documentation

◆ BaseType

typedef std::unordered_map<IndexType, IndexType> Kratos::IndexMap::BaseType

◆ IteratorType

Constructor & Destructor Documentation

◆ IndexMap()

Kratos::IndexMap::IndexMap ( )
inline

Default constructors.

◆ ~IndexMap()

virtual Kratos::IndexMap::~IndexMap ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ AddId()

void Kratos::IndexMap::AddId ( const IndexType  IndexOrigin,
const IndexType  IndexNewEntity = 0 
)
inlineoverridevirtual

It adds a new ID to the map.

Parameters
IndexOriginThe condition ID to remove
IndexNewEntityThe new created entity ID

Reimplemented from Kratos::IndexDatabase.

◆ GetId()

IndexType Kratos::IndexMap::GetId ( IteratorType  ThisIterator)
inline

Returns the id corresponding a iterator.

Parameters
ThisIteratorThe iterator of the class
Returns
The ID

◆ GetNewEntityId()

IndexType Kratos::IndexMap::GetNewEntityId ( const IndexType  IndexOrigin)
inlineoverridevirtual

It returns the new created entity ID.

Parameters
IndexOriginThe condition ID to remove
Returns
The new created entity ID

Reimplemented from Kratos::IndexDatabase.

◆ GetOtherId()

IndexType Kratos::IndexMap::GetOtherId ( IteratorType  ThisIterator)
inline

Returns the new entity id corresponding a iterator.

Parameters
ThisIteratorThe iterator of the class
Returns
The ID of the new generated entity

◆ Has()

bool Kratos::IndexMap::Has ( const IndexType  IndexOrigin)
inlineoverridevirtual

It checks if an ID exists in the map.

Parameters
IndexOriginThe condition ID to remove
Returns
If the ID already exists or not

Reimplemented from Kratos::IndexDatabase.

◆ Info()

std::string Kratos::IndexMap::Info ( ) const
inlineoverridevirtual

Turn back information as a string.

Reimplemented from Kratos::IndexDatabase.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::IndexMap::KRATOS_CLASS_POINTER_DEFINITION ( IndexMap  )

◆ load()

void Kratos::IndexMap::load ( Serializer rSerializer)
inlineoverridevirtual

Reimplemented from Kratos::IndexDatabase.

◆ RemoveId()

void Kratos::IndexMap::RemoveId ( const IndexType  IndexOrigin)
inlineoverridevirtual

It removes one particular pair from the map.

Parameters
IndexOriginThe condition ID to remove

Reimplemented from Kratos::IndexDatabase.

◆ save()

void Kratos::IndexMap::save ( Serializer rSerializer) const
inlineoverridevirtual

Reimplemented from Kratos::IndexDatabase.

◆ SetNewEntityId()

void Kratos::IndexMap::SetNewEntityId ( const IndexType  IndexOrigin,
const IndexType  IndexNewEntity 
)
inlineoverridevirtual

It sets the new created entity ID.

Parameters
IndexOriginThe condition ID to remove
IndexNewEntityThe new created entity ID

Reimplemented from Kratos::IndexDatabase.


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