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.
id_translator.h
Go to the documentation of this file.
1 // _____ _____ _ __ __ _ _ _ _
2 // / ____|/ ____| | \ \ / / /\ | (_) | | (_)
3 // | | | (___ | |__ __ _ _ __ _ _\ \ /\ / / __ __ _ _ __ _ __ ___ _ __ / \ _ __ _ __ | |_ ___ __ _| |_ _ ___ _ __
4 // | | \___ \| '_ \ / _` | '__| '_ \ \/ \/ / '__/ _` | '_ \| '_ \ / _ \ '__/ /\ \ | '_ \| '_ \| | |/ __/ _` | __| |/ _ \| '_ |
5 // | |____ ____) | | | | (_| | | | |_) \ /\ /| | | (_| | |_) | |_) | __/ | / ____ \| |_) | |_) | | | (_| (_| | |_| | (_) | | | |
6 // \_____|_____/|_| |_|\__,_|_| | .__/ \/ \/ |_| \__,_| .__/| .__/ \___|_|/_/ \_\ .__/| .__/|_|_|\___\__,_|\__|_|\___/|_| |_|
7 // | | | | | | | | | |
8 // |_| |_| |_| |_| |_|
9 //
10 //
11 // License: BSD License
12 // license: CSharpWrapperApplication/license.txt
13 //
14 // Main authors: Hubert Balcerzak
15 // Riccardo Rossi
16 //
17 
18 #if !defined(CSHARP_WRAPPER_APPLICATION_ID_TRANSLATOR_H_INCLUDED )
19 #define CSHARP_WRAPPER_APPLICATION_ID_TRANSLATOR_H_INCLUDED
20 
21 // System includes
22 
23 // External includes
24 
25 // Project includes
26 #include <vector>
27 
29 
30  class IdTranslator {
31  public:
36  void init(std::vector<int> &nodes);
37 
44  int getSurfaceId(int kratosId);
45 
51  int getKratosId(int surfaceId);
52 
59  bool hasSurfaceId(int kratosId);
60 
66  bool hasKratosId(int surfaceId);
67 
73  int safeGetSurfaceId(int kratosId);
74 
80  int safeGetKratosId(int surfaceId);
81 
82  private:
83  int *pmKratosIds;
84  int *pmSurfaceIds;
85  int mSurfaceIdsSize;
86  int mKratosIdsSize;
87  };
88 }
89 
90 #endif /* CSHARP_WRAPPER_APPLICATION_ID_TRANSLATOR_H_INCLUDED */
Definition: id_translator.h:30
bool hasSurfaceId(int kratosId)
Definition: id_translator.cpp:55
void init(std::vector< int > &nodes)
Definition: id_translator.cpp:28
int getSurfaceId(int kratosId)
Definition: id_translator.cpp:43
int getKratosId(int surfaceId)
Definition: id_translator.cpp:47
int safeGetSurfaceId(int kratosId)
Definition: id_translator.cpp:64
bool hasKratosId(int surfaceId)
Definition: id_translator.cpp:51
int safeGetKratosId(int surfaceId)
Definition: id_translator.cpp:59
Definition: id_translator.h:28