SPH
Classes | Namespaces | Typedefs | Enumerations | Functions
Colorizer.h File Reference

Object converting quantity values of particles into colors. More...

#include "gravity/AggregateSolver.h"
#include "gui/Settings.h"
#include "gui/objects/Palette.h"
#include "gui/objects/Point.h"
#include "gui/objects/Texture.h"
#include "gui/renderers/Spectrum.h"
#include "objects/containers/ArrayRef.h"
#include "objects/finders/NeighbourFinder.h"
#include "objects/utility/Dynamic.h"
#include "post/Analysis.h"
#include "quantities/IMaterial.h"
#include "quantities/Particle.h"
#include "sph/kernel/Kernel.h"
#include "system/Factory.h"
#include "thread/Scheduler.h"

Go to the source code of this file.

Classes

class  IColorizer
 Interface for objects assigning colors to particles. More...
 
class  TypedColorizer< Type >
 Default colorizer simply converting quantity value to color using defined palette. More...
 
class  VelocityColorizer
 Displays the magnitudes of particle velocities. More...
 
class  AccelerationColorizer
 Displays the magnitudes of accelerations. More...
 
class  DirectionColorizer
 Shows direction of particle movement in color. More...
 
class  CorotatingVelocityColorizer
 Shows particle velocities with subtracted corotating component. More...
 
class  DensityPerturbationColorizer
 
class  SummedDensityColorizer
 
class  StressColorizer
 
class  EnergyColorizer
 
class  TemperatureColorizer
 
class  YieldReductionColorizer
 
class  DamageActivationColorizer
 
class  BeautyColorizer
 
class  RadiusColorizer
 
class  UvwColorizer
 
class  BoundaryColorizer
 Shows boundary of bodies in the simulation. More...
 
class  IdColorizerTemplate< TDerived >
 
class  ParticleIdColorizer
 
class  ComponentIdColorizer
 
class  AggregateIdColorizer
 
class  IndexColorizer
 
class  MaterialColorizer
 

Namespaces

 Detail
 

Typedefs

using ExtColorizerId = ExtendedEnum< ColorizerId >
 

Enumerations

enum class  ColorizerId {
  VELOCITY = -1 , ACCELERATION = -2 , MOVEMENT_DIRECTION = -3 , COROTATING_VELOCITY = -4 ,
  DISPLACEMENT = -5 , DENSITY_PERTURBATION = -6 , SUMMED_DENSITY = -7 , TOTAL_STRESS = -8 ,
  TOTAL_ENERGY = -9 , TEMPERATURE = -10 , YIELD_REDUCTION = -11 , DAMAGE_ACTIVATION = -12 ,
  RADIUS = -13 , UVW = -15 , BOUNDARY = -16 , PARTICLE_ID = -17 ,
  COMPONENT_ID = -18 , BOUND_COMPONENT_ID = -19 , AGGREGATE_ID = -20 , FLAG = -21 ,
  MATERIAL_ID = -22 , BEAUTY = -23
}
 Special colorizers that do not directly correspond to quantities. More...
 

Functions

template<typename Type >
INLINE float Detail::getColorizerValue (const Type &value)
 
template<>
INLINE float Detail::getColorizerValue (const Vector &value)
 
template<>
INLINE float Detail::getColorizerValue (const TracelessTensor &value)
 
template<>
INLINE float Detail::getColorizerValue (const SymmetricTensor &value)
 
template<typename Type >
INLINE Optional< VectorDetail::getColorizerVector (const Type &UNUSED(value))
 
template<>
INLINE Optional< VectorDetail::getColorizerVector (const Vector &value)
 
 SPH_EXTEND_ENUM (QuantityId, ColorizerId)
 
bool hasVelocity (const Storage &storage)
 

Detailed Description

Object converting quantity values of particles into colors.

Author
Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz)
Date
2016-2021

Definition in file Colorizer.h.

Typedef Documentation

◆ ExtColorizerId

Definition at line 161 of file Colorizer.h.

Enumeration Type Documentation

◆ ColorizerId

enum ColorizerId
strong

Special colorizers that do not directly correspond to quantities.

Must have strictly negative values. Function taking ColorizerId as an argument also acceps QuantityId casted to ColorizerId, interpreting as TypedColorizer with given quantity ID.

Enumerator
VELOCITY 

Particle velocities.

ACCELERATION 

Acceleration of particles.

MOVEMENT_DIRECTION 

Projected direction of motion.

COROTATING_VELOCITY 

Velocities with a respect to the rotating body.

DISPLACEMENT 

Difference between current positions and initial position.

DENSITY_PERTURBATION 

Relative difference of density and initial density (rho/rho0 - 1)

SUMMED_DENSITY 

Density computed from particle masses by direct summation of neighbours.

TOTAL_STRESS 

Total stress (sigma = S - pI)

TOTAL_ENERGY 

Sum of kinetic and internal energy for given particle.

TEMPERATURE 

Temperature, computed from internal energy.

YIELD_REDUCTION 

Reduction of stress tensor due to yielding (1 - f_vonMises)

DAMAGE_ACTIVATION 

Ratio of the stress and the activation strain.

RADIUS 

Radii/smoothing lenghts of particles.

UVW 

Shows UV mapping, u-coordinate in red and v-coordinate in blur.

BOUNDARY 

Shows boundary particles.

PARTICLE_ID 

Each particle drawn with different color.

COMPONENT_ID 

Color assigned to each component (group of connected particles)

BOUND_COMPONENT_ID 

Color assigned to each group of gravitationally bound particles.

AGGREGATE_ID 

Color assigned to each aggregate.

FLAG 

Particles of different bodies are colored differently.

MATERIAL_ID 

Particles with different materials are colored differently.

BEAUTY 

Attempts to show the real-world look.

Definition at line 136 of file Colorizer.h.

Function Documentation

◆ hasVelocity()

bool hasVelocity ( const Storage storage)
inline

Definition at line 222 of file Colorizer.h.

◆ SPH_EXTEND_ENUM()

SPH_EXTEND_ENUM ( QuantityId  ,
ColorizerId   
)