-
Notifications
You must be signed in to change notification settings - Fork 245
[Utilities] Colors utility
A model part contains entities like nodes, elements and conditions, and even, another model part. The structure of the main model part and it's sub model parts is very helpfull to define the problem we are about to solve.
While a sub model part (a model part) gives us the entities which are stored in, those entities doesn't know about the sub model parts they are stored in. Sometimes we need to know the sub model parts to which an entity belong to, e.g., when we create new entities. This problem is solved across the colors: a color is a key and its corresponding value gives us the sub model part names. The color map is defined as:
typedef std::unordered_map<int,std::vector<std::string>> IntStringMapType;
When an entity belongs to more than one sub model part, there will be a combination of sub model parts and a new color will be defined. Using this concept of color, every entity will have a unique color.
The previous picture show the structure of a model part:
MainModelPart
BodySubModelPart
SkinSubModelPart
LeftSubModelPart
And the possible colors of this model part are:
Color | Names |
---|---|
0 | MainModelPart |
1 | BodySubModelPart |
2 | SkinSubModelPart |
3 | LeftSubModelPart |
4 | BodySubModelPart, SkinSubModelPart |
5 | BodySubModelPArt, SkinSubModelPart, LeftSubModelPart |
Finally, the colors of the entities are maps with the Id of an entity and its corresponding color:
typedef std::unordered_map<IndexType,int> IndexIntMapType;
- Getting Kratos (Last compiled Release)
- Compiling Kratos
- Running an example from GiD
- Kratos input files and I/O
- Data management
- Solving strategies
- Manipulating solution values
- Multiphysics
- Video tutorials
- Style Guide
- Authorship of Kratos files
- Configure .gitignore
- How to configure clang-format
- How to use smart pointer in Kratos
- How to define adjoint elements and response functions
- Visibility and Exposure
- Namespaces and Static Classes
Kratos structure
Conventions
Solvers
Debugging, profiling and testing
- Compiling Kratos in debug mode
- Debugging Kratos using GDB
- Cross-debugging Kratos under Windows
- Debugging Kratos C++ under Windows
- Checking memory usage with Valgind
- Profiling Kratos with MAQAO
- Creating unitary tests
- Using ThreadSanitizer to detect OMP data race bugs
- Debugging Memory with ASAN
HOW TOs
- How to create applications
- Python Tutorials
- Kratos For Dummies (I)
- List of classes and variables accessible via python
- How to use Logger
- How to Create a New Application using cmake
- How to write a JSON configuration file
- How to Access DataBase
- How to use quaternions in Kratos
- How to do Mapping between nonmatching meshes
- How to use Clang-Tidy to automatically correct code
- How to use the Constitutive Law class
- How to use Serialization
- How to use GlobalPointerCommunicator
- How to use PointerMapCommunicator
- How to use the Geometry
- How to use processes for BCs
- How to use Parallel Utilities in futureproofing the code
- Porting to Pybind11 (LEGACY CODE)
- Porting to AMatrix
- How to use Cotire
- Applications: Python-modules
- How to run multiple cases using PyCOMPSs
- How to apply a function to a list of variables
- How to use Kratos Native sparse linear algebra
Utilities
Kratos API
Kratos Structural Mechanics API