SPH
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MonolithicBodyIc Class Reference

Creates a single monolithic body. More...

#include <InitialConditionJobs.h>

Inheritance diagram for MonolithicBodyIc:
IParticleJob MaterialProvider IJob Polymorphic ImpactorIc

Public Member Functions

 MonolithicBodyIc (const std::string &name, const BodySettings &overrides=EMPTY_SETTINGS)
 
virtual std::string className () const override
 Name representing the type of the job (e.e. "SPH"). More...
 
virtual UnorderedMap< std::string, ExtJobTyperequires () const override
 List of slots that need to be connected to evaluate the job. More...
 
virtual UnorderedMap< std::string, ExtJobTypegetSlots () const override
 Lists all potential inputs of the job. More...
 
virtual VirtualSettings getSettings () override
 Returns a settings object which allows to query and modify the state of the job. More...
 
virtual void evaluate (const RunSettings &global, IRunCallbacks &UNUSED(callbacks)) override
 
- Public Member Functions inherited from IParticleJob
 IParticleJob (const std::string &name)
 
 ~IParticleJob () override
 
virtual Optional< ExtJobTypeprovides () const override final
 Specifies the type of the job, i.e. what kind of data the job provides. More...
 
virtual JobContext getResult () const override final
 Returns the result of the job. More...
 
- Public Member Functions inherited from IJob
 IJob (const std::string &name)
 
virtual std::string instanceName () const
 Unique name representing this job. More...
 
virtual void evaluate (const RunSettings &global, IRunCallbacks &callbacks)=0
 Runs the operation provided by the job. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 
- Public Member Functions inherited from MaterialProvider
 MaterialProvider (const BodySettings &overrides=EMPTY_SETTINGS)
 

Protected Member Functions

virtual void addParticleCategory (VirtualSettings &settings)
 
- Protected Member Functions inherited from IJob
template<typename T >
SharedPtr< T > getInput (const std::string &name) const
 Convenient function to return input data for slot of given name. More...
 
- Protected Member Functions inherited from MaterialProvider
void addMaterialEntries (VirtualSettings::Category &category, Function< bool()> enabler)
 

Protected Attributes

struct {
   bool   shape = false
 
   bool   material = false
 
slotUsage
 
- Protected Attributes inherited from IParticleJob
SharedPtr< ParticleDataresult
 Data filled by the job when it finishes. More...
 
- Protected Attributes inherited from IJob
std::string instName
 
UnorderedMap< std::string, JobContextinputs
 Contains all input data, identified by names of input slots. More...
 
- Protected Attributes inherited from MaterialProvider
BodySettings body
 

Detailed Description

Creates a single monolithic body.

Definition at line 10 of file InitialConditionJobs.h.

Constructor & Destructor Documentation

◆ MonolithicBodyIc()

NAMESPACE_SPH_BEGIN MonolithicBodyIc::MonolithicBodyIc ( const std::string &  name,
const BodySettings overrides = EMPTY_SETTINGS 
)

Definition at line 27 of file InitialConditionJobs.cpp.

Member Function Documentation

◆ addParticleCategory()

void MonolithicBodyIc::addParticleCategory ( VirtualSettings settings)
protectedvirtual

Definition at line 45 of file InitialConditionJobs.cpp.

◆ className()

virtual std::string MonolithicBodyIc::className ( ) const
inlineoverridevirtual

Name representing the type of the job (e.e. "SPH").

Implements IJob.

Reimplemented in ImpactorIc.

Definition at line 20 of file InitialConditionJobs.h.

◆ evaluate()

void MonolithicBodyIc::evaluate ( const RunSettings global,
IRunCallbacks UNUSEDcallbacks 
)
overridevirtual
Todo:
less retarded way – particle count has no place in material settings

Reimplemented in ImpactorIc.

Definition at line 157 of file InitialConditionJobs.cpp.

◆ getSettings()

VirtualSettings MonolithicBodyIc::getSettings ( )
overridevirtual

Returns a settings object which allows to query and modify the state of the job.

It is not necessary to expose all state variables this way. This is mainly intended for (de)serialization of the job state and for connection with UI controls.

Implements IJob.

Definition at line 54 of file InitialConditionJobs.cpp.

◆ getSlots()

virtual UnorderedMap<std::string, ExtJobType> MonolithicBodyIc::getSlots ( ) const
inlineoverridevirtual

Lists all potential inputs of the job.

This is the superset of slots returned by function requires and it has to be fixed, i.e. cannot change when internal state of the job changes.

Implements IJob.

Reimplemented in ImpactorIc.

Definition at line 27 of file InitialConditionJobs.h.

◆ requires()

UnorderedMap< std::string, ExtJobType > MonolithicBodyIc::requires ( ) const
overridevirtual

List of slots that need to be connected to evaluate the job.

The returned map shall contain names of the slots and their types. No two slots can have the same name. This list can can be changed, based on internal state of the job.

Reimplemented from IJob.

Reimplemented in ImpactorIc.

Definition at line 33 of file InitialConditionJobs.cpp.

Member Data Documentation

◆ material

bool MonolithicBodyIc::material = false

Definition at line 14 of file InitialConditionJobs.h.

◆ shape

bool MonolithicBodyIc::shape = false

Definition at line 13 of file InitialConditionJobs.h.

◆ 

struct { ... } MonolithicBodyIc::slotUsage

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