SPH
Public Member Functions | List of all members
SolidMaterial Class Reference

Generalization of material with equation of state. More...

#include <Materials.h>

Inheritance diagram for SolidMaterial:
EosMaterial IMaterial Polymorphic

Public Member Functions

 SolidMaterial (const BodySettings &body, AutoPtr< IEos > &&eos, AutoPtr< IRheology > &&rheology)
 
 SolidMaterial (const BodySettings &body)
 
virtual void create (Storage &storage, const MaterialInitialContext &context) override
 Create all quantities needed by the material. More...
 
virtual void initialize (IScheduler &scheduler, Storage &storage, const IndexSequence sequence) override
 Initialize all quantities and material parameters. More...
 
virtual void finalize (IScheduler &scheduler, Storage &storage, const IndexSequence sequence) override
 Finalizes the material for the time step. More...
 
- Public Member Functions inherited from EosMaterial
 EosMaterial (const BodySettings &body, AutoPtr< IEos > &&eos)
 Creates the material by specifying an equation of state. More...
 
 EosMaterial (const BodySettings &body)
 Creates the material. More...
 
Pair< Floatevaluate (const Float rho, const Float u) const
 
const IEosgetEos () const
 Returns the equation of state. More...
 
virtual void finalize (IScheduler &UNUSED(scheduler), Storage &UNUSED(storage), const IndexSequence UNUSED(sequence)) override
 
- Public Member Functions inherited from IMaterial
 IMaterial (const BodySettings &settings)
 
template<typename TValue >
INLINE IMaterialsetParam (const BodySettingsId paramIdx, TValue &&value)
 
template<typename TValue >
INLINE TValue getParam (const BodySettingsId paramIdx) const
 Returns a parameter associated with given particle. More...
 
INLINE const BodySettingsgetParams () const
 Returns settings containing material parameters. More...
 
void setRange (const QuantityId id, const Interval &range, const Float minimal)
 Sets the timestepping parameters of given quantity. More...
 
INLINE void setRange (const QuantityId id, const BodySettingsId rangeId, const BodySettingsId minimalId)
 Sets the timestepping parameters of given quantity. More...
 
INLINE Float minimal (const QuantityId id) const
 Returns the scale value of the quantity. More...
 
INLINE const Interval range (const QuantityId id) const
 Returns the range of allowed quantity values. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Additional Inherited Members

- Protected Attributes inherited from IMaterial
BodySettings params
 Per-material parameters. More...
 
FlatMap< QuantityId, Floatminimals
 Minimal values used in timestepping, do not affect values of quantities themselves. More...
 
FlatMap< QuantityId, Intervalranges
 Allowed range of quantities. More...
 
- Static Protected Attributes inherited from IMaterial
static const Interval DEFAULT_RANGE = Interval::unbounded()
 Default values. More...
 
static const Float DEFAULT_MINIMAL = 0._f
 

Detailed Description

Generalization of material with equation of state.

It holds a rheology implementation that modifies pressure and stress tensor. This is done in initialize function, function finalize then integrates the fragmentation model (if used, of course).

Definition at line 60 of file Materials.h.

Constructor & Destructor Documentation

◆ SolidMaterial() [1/2]

SolidMaterial::SolidMaterial ( const BodySettings body,
AutoPtr< IEos > &&  eos,
AutoPtr< IRheology > &&  rheology 
)

Definition at line 63 of file Materials.cpp.

◆ SolidMaterial() [2/2]

SolidMaterial::SolidMaterial ( const BodySettings body)
explicit

Definition at line 67 of file Materials.cpp.

Member Function Documentation

◆ create()

void SolidMaterial::create ( Storage storage,
const MaterialInitialContext context 
)
overridevirtual

Create all quantities needed by the material.

Reimplemented from EosMaterial.

Definition at line 70 of file Materials.cpp.

◆ finalize()

void SolidMaterial::finalize ( IScheduler scheduler,
Storage storage,
const IndexSequence  sequence 
)
overridevirtual

Finalizes the material for the time step.

Called after derivatives are computed.

Parameters
schedulerScheduler potentially used for parallelization
storageStorage containing the particles and materials
sequenceIndex sequence of the particles with this material

Implements IMaterial.

Definition at line 84 of file Materials.cpp.

◆ initialize()

void SolidMaterial::initialize ( IScheduler scheduler,
Storage storage,
const IndexSequence  sequence 
)
overridevirtual

Initialize all quantities and material parameters.

Called once every step before loop.

Parameters
schedulerScheduler potentially used for parallelization
storageStorage containing the particles and materials
sequenceIndex sequence of the particles with this material
Todo:
now we can easily pass sequence into the EoS and iterate inside, to avoid calling virtual function (and we could also optimize with SSE)

Reimplemented from EosMaterial.

Definition at line 77 of file Materials.cpp.


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