85 virtual std::string
name()
const = 0;
98 template <
typename Type>
107 return float(result);
111 return float(
sqrt(
ddot(value, value)));
115 return float(
sqrt(
ddot(value, value)));
122 template <
typename Type>
168 template <
typename Type>
181 return storage.
has(
id);
217 virtual std::string
name()
const override {
249 virtual std::string
name()
const override {
272 virtual std::string
name()
const override {
273 return "Acceleration";
298 return !values.
empty();
304 return palette(this->
evalScalar(idx).value());
317 palette = newPalette;
320 virtual std::string
name()
const override {
333 struct BodyMetadata {
342 : palette(
std::move(palette)) {}
356 return palette(
float(
getLength(this->getCorotatingVelocity(idx))));
360 return this->getCorotatingVelocity(idx);
372 palette = newPalette;
375 virtual std::string
name()
const override {
376 return "Corot. velocity";
380 Vector getCorotatingVelocity(
const Size idx)
const {
381 const BodyMetadata& body = data[matIds[idx]];
382 return v[idx] -
cross(body.omega, r[idx] - body.center);
394 : palette(
std::move(palette)) {}
404 for (
Size i = 0; i < rho.
size(); ++i) {
415 return palette(
float(rho[idx] / rho0[idx] - 1._f));
427 palette = newPalette;
430 virtual std::string
name()
const override {
431 return "Delta Density";
464 return palette(sum(idx));
476 palette = newPalette;
479 virtual std::string
name()
const override {
480 return "Summed Density";
484 float sum(
const Size idx)
const;
494 : palette(
std::move(palette)) {}
510 return palette(this->
evalScalar(idx).value());
518 return float(
sqrt(
ddot(sigma, sigma)));
535 palette = newPalette;
538 virtual std::string
name()
const override {
539 return "Total stress";
550 : palette(
std::move(palette)) {}
566 return palette(this->
evalScalar(idx).value());
588 palette = newPalette;
591 virtual std::string
name()
const override {
592 return "Total energy";
614 return float(this->
values[idx] / cp);
629 virtual std::string
name()
const override {
630 return "Temperature";
646 virtual std::string
name()
const override {
647 return "Yield reduction";
658 : palette(
std::move(palette)) {}
665 return !ratio.
empty();
669 return palette(ratio[idx]);
681 palette = newPalette;
684 virtual std::string
name()
const override {
685 return "Damage activation ratio";
694 const float u_0 = 3.e4f;
695 const float u_red = 3.e5f;
696 const float u_glow = 0.5f * u_red;
697 const float u_yellow = 5.e6f;
718 return palette(
float(u[idx]));
723 return max(0.f, (f - f_glow) / (1.f - f_glow));
735 palette = newPalette;
738 virtual std::string
name()
const override {
766 virtual std::string
name()
const override {
785 return !uvws.
empty();
790 return Rgba(
float(uvws[idx][
X]), 0.f,
float(uvws[idx][
Y]));
803 virtual std::string
name()
const override {
858 virtual std::string
name()
const override {
863 bool isBoundary(
const Size idx)
const;
866 template <
typename TDerived>
869 Rgba backgroundColor;
900 if (!persistentIdxs.
empty() && idx < persistentIdxs.
size()) {
901 return persistentIdxs[idx];
919 virtual std::string
name()
const override {
920 return "Particle ID";
953 connectivity = newConnectivity;
962 return components[idx];
974 return !components.
empty();
977 virtual std::string
name()
const override;
988 if (ids[idx] !=
Size(-1)) {
1004 return ids !=
nullptr;
1007 virtual std::string
name()
const override {
1008 return "Aggregate ID";
1027 return storage.
has(
id);
1035 return !idxs.
empty();
1038 virtual std::string
name()
const override {
Various function for interpretation of the results of a simulation.
INLINE bool isReal(const AntisymmetricTensor &t)
INLINE Float ddot(const AntisymmetricTensor &t1, const AntisymmetricTensor &t2)
Double-dot product t1 : t2 = sum_ij t1_ij t2_ij.
ArrayRef< T > makeArrayRef(Array< T > &data, const RefEnum type)
#define SPH_ASSERT(x,...)
bool hasVelocity(const Storage &storage)
SPH_EXTEND_ENUM(QuantityId, ColorizerId)
ColorizerId
Special colorizers that do not directly correspond to quantities.
@ TOTAL_STRESS
Total stress (sigma = S - pI)
@ FLAG
Particles of different bodies are colored differently.
@ COROTATING_VELOCITY
Velocities with a respect to the rotating body.
@ MOVEMENT_DIRECTION
Projected direction of motion.
@ RADIUS
Radii/smoothing lenghts of particles.
@ SUMMED_DENSITY
Density computed from particle masses by direct summation of neighbours.
@ DENSITY_PERTURBATION
Relative difference of density and initial density (rho/rho0 - 1)
@ COMPONENT_ID
Color assigned to each component (group of connected particles)
@ YIELD_REDUCTION
Reduction of stress tensor due to yielding (1 - f_vonMises)
@ PARTICLE_ID
Each particle drawn with different color.
@ TOTAL_ENERGY
Sum of kinetic and internal energy for given particle.
@ BOUND_COMPONENT_ID
Color assigned to each group of gravitationally bound particles.
@ DAMAGE_ACTIVATION
Ratio of the stress and the activation strain.
@ BOUNDARY
Shows boundary particles.
@ BEAUTY
Attempts to show the real-world look.
Object holding a single values of various types.
uint32_t Size
Integral type used to index arrays (by default).
double Float
Precision used withing the code. Use Float instead of float or double where precision is important.
Base class for all particle materials.
constexpr INLINE T max(const T &f1, const T &f2)
INLINE T sqrt(const T f)
Return a squared root of a value.
#define INLINE
Macros for conditional compilation based on selected compiler.
#define NAMESPACE_SPH_END
const NothingType NOTHING
@ VELOCITY
Current velocities of particles, always a vector quantity.
@ POSITION
Positions of particles, always a vector quantity.
@ ENERGY
Specific internal energy, always a scalar quantity.
@ SMOOTHING_LENGTH
Smoothing lenghts of particles.
@ MATERIAL_ID
ID of material, indexed from 0 to (#bodies - 1).
QuantityMetadata getMetadata(const QuantityId key)
Returns the quantity information using quantity ID.
QuantityId
Unique IDs of basic quantities of SPH particles.
@ DISPLACEMENT
Displacement vector, a solution of the stress analysis.
@ DEVIATORIC_STRESS
Deviatoric stress tensor, always a traceless tensor.
@ PRESSURE
Pressure, affected by yielding and fragmentation model, always a scalar quantity.
@ POSITION
Positions (velocities, accelerations) of particles, always a vector quantity,.
@ ENERGY
Specific internal energy, always a scalar quantity.
@ AGGREGATE_ID
Index of the aggregate containing this particle.
@ DENSITY
Density, always a scalar quantity.
@ TEMPERATURE
Temperature, always a scalar quantity.
@ STRESS_REDUCING
Total stress reduction factor due to damage and yielding. Is always scalar.
@ MATERIAL_ID
Index of material of the particle. Can be generally different than the flag value.
@ UVW
Texture mapping coordinates,.
@ SECOND
Quantity with 1st and 2nd derivative.
@ FIRST
Quantity with 1st derivative.
Interface for executing tasks (potentially) asynchronously.
Palette getEmissionPalette(const Interval range)
INLINE Float getLength(const Vector &v)
Returns the length of the vector. Enabled only for vectors of floating-point precision.
INLINE Float getSqrLength(const Vector &v)
INLINE BasicVector< float > cross(const BasicVector< float > &v1, const BasicVector< float > &v2)
Cross product between two vectors.
Displays the magnitudes of accelerations.
virtual std::string name() const override
Returns the name of the colorizer.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
AccelerationColorizer(Palette palette)
INLINE Optional< Size > evalId(const Size idx) const
virtual void initialize(const Storage &storage, const RefEnum UNUSED(ref)) override
virtual std::string name() const override
Returns the name of the colorizer.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
INLINE bool empty() const
void resize(const TCounter newSize)
Resizes the array to new size.
INLINE bool empty() const noexcept
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual std::string name() const override
Returns the name of the colorizer.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual Optional< float > evalScalar(const Size idx) const override
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
Shows boundary of bodies in the simulation.
ArrayRef< const Size > values
virtual void setPalette(const Palette &UNUSED(newPalette)) override
virtual Optional< Particle > getParticle(const Size UNUSED(idx)) const override
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual std::string name() const override
Returns the name of the colorizer.
ArrayRef< const Vector > values
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
BoundaryColorizer(const Detection detection, const Float threshold=15._f)
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
void setConnectivity(const Flags< Post::ComponentFlag > newConnectivity)
virtual std::string name() const override
Returns the name of the colorizer.
void setHighlightIdx(const Optional< Size > newHighlightIdx)
Flags< Post::ComponentFlag > getConnectivity() const
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
ComponentIdColorizer(const GuiSettings &gui, const Flags< Post::ComponentFlag > connectivity, const Optional< Size > highlightIdx=NOTHING)
INLINE Optional< Size > evalId(const Size idx) const
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
Optional< Size > getHighlightIdx() const
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
Shows particle velocities with subtracted corotating component.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual Optional< Vector > evalVector(const Size idx) const override
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual std::string name() const override
Returns the name of the colorizer.
CorotatingVelocityColorizer(Palette palette)
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Optional< Particle > getParticle(const Size UNUSED(idx)) const override
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual std::string name() const override
Returns the name of the colorizer.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
DamageActivationColorizer(const Palette &palette)
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
DensityPerturbationColorizer(Palette palette)
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual std::string name() const override
Returns the name of the colorizer.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
Shows direction of particle movement in color.
virtual std::string name() const override
Returns the name of the colorizer.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
DirectionColorizer(const Vector &axis, const Palette &palette)
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
virtual Optional< float > evalScalar(const Size idx) const override
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual Optional< float > evalScalar(const Size idx) const override
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual std::string name() const override
Returns the name of the colorizer.
virtual Optional< Vector > evalVector(const Size UNUSED(idx)) const override
Returns the vector representation of the colorized quantity for idx-th particle.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
EnergyColorizer(Palette palette)
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
Helper type allowing to "derive" from enum class.
INLINE TValue get(const GuiSettingsId id) const
Interface for objects assigning colors to particles.
virtual Optional< Palette > getPalette() const =0
Returns recommended palette for drawing this colorizer.
virtual std::string name() const =0
Returns the name of the colorizer.
virtual Optional< Particle > getParticle(const Size idx) const =0
Returns the original value of the displayed quantity.
virtual Optional< Vector > evalVector(const Size UNUSED(idx)) const
Returns the vector representation of the colorized quantity for idx-th particle.
virtual void initialize(const Storage &storage, const RefEnum ref)=0
Initialize the colorizer before by getting necessary quantities from storage.
virtual bool hasData(const Storage &storage) const =0
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Rgba evalColor(const Size idx) const =0
Returns the color of idx-th particle.
virtual Optional< float > evalScalar(const Size UNUSED(idx)) const
Returns the scalar representation of the colorized quantity for idx-th particle.
virtual void setPalette(const Palette &newPalette)=0
Modifies the palette used by ths colorizer.
virtual bool isInitialized() const =0
Checks if the colorizer has been initialized.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
void setSeed(const Size newSeed)
virtual void setPalette(const Palette &UNUSED(newPalette)) override
IdColorizerTemplate(const GuiSettings &gui)
IndexColorizer(const QuantityId id, const GuiSettings &gui)
INLINE Optional< Size > evalId(const Size idx) const
virtual std::string name() const override
Returns the name of the colorizer.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
Object representing a 1D interval of real numbers.
MaterialColorizer(const GuiSettings &gui)
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
INLINE Type & value()
Returns the reference to the stored value.
Represents a color palette, used for mapping arbitrary number to a color.
float paletteToRelative(const float value) const
Inverse transform to relativeToPalette.
INLINE Optional< Size > evalId(const Size idx) const
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual bool hasData(const Storage &UNUSED(storage)) const override
virtual std::string name() const override
Returns the name of the colorizer.
Object holding information about single particle.
Particle & addD2t(const QuantityId id, const Dynamic &value)
Adds another quantity 2nd derivative or updates the 2nd derivative of quantity previously stored.
Particle & addValue(const QuantityId id, const Dynamic &value)
Adds another quantity value or updates the value of quantity previously stored.
Particle & addDt(const QuantityId id, const Dynamic &value)
Adds another quantity derivative or updates the derivative of quantity previously stored.
RadiusColorizer(Palette palette)
virtual bool hasData(const Storage &UNUSED(storage)) const override
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual std::string name() const override
Returns the name of the colorizer.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
Container storing all quantities used within the simulations.
Size getMaterialCnt() const
Return the number of materials in the storage.
MaterialView getMaterialOfParticle(const Size particleIdx) const
Returns material view for material of given particle.
Array< TValue > & getDt(const QuantityId key)
Retrieves a quantity derivative from the storage, given its key and value type.
SharedPtr< IStorageUserData > getUserData() const
Returns the stored user data.
Array< TValue > & getD2t(const QuantityId key)
Retrieves a quantity second derivative from the storage, given its key and value type.
MaterialView getMaterial(const Size matIdx) const
Returns an object containing a reference to given material.
bool has(const QuantityId key) const
Checks if the storage contains quantity with given key.
Array< TValue > & getValue(const QuantityId key)
Retrieves a quantity values from the storage, given its key and value type.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
StressColorizer(Palette palette)
virtual Optional< Vector > evalVector(const Size UNUSED(idx)) const override
Returns the vector representation of the colorized quantity for idx-th particle.
virtual Optional< float > evalScalar(const Size idx) const override
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual std::string name() const override
Returns the name of the colorizer.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual std::string name() const override
Returns the name of the colorizer.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
SummedDensityColorizer(const RunSettings &settings, Palette palette)
virtual Optional< float > evalScalar(const Size idx) const override
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual bool hasData(const Storage &UNUSED(storage)) const override
Symmetric tensor of 2nd order.
static INLINE SymmetricTensor identity()
Returns an identity tensor.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual Optional< float > evalScalar(const Size idx) const override
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual std::string name() const override
Returns the name of the colorizer.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
Symmetric traceless 2nd order tensor.
Default colorizer simply converting quantity value to color using defined palette.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual Optional< Vector > evalVector(const Size idx) const override
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual Optional< float > evalScalar(const Size idx) const override
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
ArrayRef< const Type > values
virtual std::string name() const override
Returns the name of the colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual void setPalette(const Palette &newPalette) override
Modifies the palette used by ths colorizer.
TypedColorizer(const QuantityId id, Palette palette)
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual void setPalette(const Palette &UNUSED(newPalette)) override
virtual std::string name() const override
Returns the name of the colorizer.
virtual Optional< Palette > getPalette() const override
Returns recommended palette for drawing this colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual bool isInitialized() const override
Checks if the colorizer has been initialized.
virtual Optional< Particle > getParticle(const Size UNUSED(idx)) const override
Displays the magnitudes of particle velocities.
virtual bool hasData(const Storage &storage) const override
Checks if the storage constains all data necessary to initialize the colorizer.
virtual Optional< Particle > getParticle(const Size idx) const override
Returns the original value of the displayed quantity.
virtual std::string name() const override
Returns the name of the colorizer.
virtual void initialize(const Storage &storage, const RefEnum ref) override
Initialize the colorizer before by getting necessary quantities from storage.
virtual Optional< Vector > evalVector(const Size idx) const override
VelocityColorizer(Palette palette)
YieldReductionColorizer(Palette palette)
virtual std::string name() const override
Returns the name of the colorizer.
virtual Rgba evalColor(const Size idx) const override
Returns the color of idx-th particle.
Creating code components based on values from settings.
@ ACCELERATION
Time step computed from ratio of acceleration and smoothing length.
@ DENSITY
Density at zero pressure.
@ HEAT_CAPACITY
Heat capacity at constant pressure,.
Simple 2D vector with integer coordinates. Provides conversion from and to wxPoint.
INLINE Optional< Vector > getColorizerVector(const Type &UNUSED(value))
INLINE float getColorizerValue(const Type &value)
Overload of std::swap for Sph::Array.
Base class for all polymorphic objects.