59 template <
typename TValue>
66 template <
typename TValue>
73 template <
typename TValue>
106 explicit IJob(
const std::string& name)
160 template <
typename T>
220 std::string shortName,
221 std::string category,
223 std::string tooltip);
268 explicit IRunJob(
const std::string& name);
Object defining computational domain.
ArrayView< const AutoPtr< IJobDesc > > enumerateRegisteredJobs()
Returns a view of all currently registered jobs.
@ GEOMETRY
Job providing geometry.
@ MATERIAL
Job providing a material.
@ PARTICLES
Job providing particles.
VirtualSettings::Category & addGenericCategory(VirtualSettings &connector, std::string &instanceName)
Adds a common settings category, used by all jobs.
RawPtr< IJobDesc > getJobDesc(const std::string &name)
Returns a job descriptor for given class name.
#define NAMESPACE_SPH_END
const NothingType NOTHING
Statistics gathered and periodically displayed during the run.
Container for storing particle quantities and materials.
Key-value associative container.
Object providing connection between component parameters and values exposed to the user.
Object providing safe access to continuous memory of data.
Base class for jobs providing a geometric shape.
IGeometryJob(const std::string &name)
virtual Optional< ExtJobType > provides() const override final
Specifies the type of the job, i.e. what kind of data the job provides.
SharedPtr< IDomain > result
Data filled by the job when it finishes.
virtual JobContext getResult() const override final
Returns the result of the job.
Provides a descriptor of a job that allows to create new instances.
virtual AutoPtr< IJob > create(Optional< std::string > instanceName) const =0
Creates a new job instance.
virtual std::string category() const =0
Returns a name of the category of job.
virtual std::string className() const =0
Returns the class name of the job.
virtual std::string tooltip() const
Returns a help message, explaining what the job does and how it should be used.
Base class for all object performing an operation in a simulation hierarchy.
virtual JobContext getResult() const =0
Returns the result of the job.
virtual UnorderedMap< std::string, ExtJobType > getSlots() const =0
Lists all potential inputs of the job.
virtual VirtualSettings getSettings()=0
Returns a settings object which allows to query and modify the state of the job.
virtual std::string instanceName() const
Unique name representing this job.
virtual std::string className() const =0
Name representing the type of the job (e.e. "SPH").
virtual UnorderedMap< std::string, ExtJobType > requires() const
List of slots that need to be connected to evaluate the job.
SharedPtr< T > getInput(const std::string &name) const
Convenient function to return input data for slot of given name.
virtual Optional< ExtJobType > provides() const =0
Specifies the type of the job, i.e. what kind of data the job provides.
IJob(const std::string &name)
virtual void evaluate(const RunSettings &global, IRunCallbacks &callbacks)=0
Runs the operation provided by the job.
UnorderedMap< std::string, JobContext > inputs
Contains all input data, identified by names of input slots.
Base class for jobs providing a material.
IMaterialJob(const std::string &name)
virtual Optional< ExtJobType > provides() const override final
Specifies the type of the job, i.e. what kind of data the job provides.
SharedPtr< IMaterial > result
Data filled by the job when it finishes.
virtual JobContext getResult() const override final
Returns the result of the job.
Material settings and functions specific for one material.
Base class for jobs providing no data.
virtual Optional< ExtJobType > provides() const override final
Specifies the type of the job, i.e. what kind of data the job provides.
INullJob(const std::string &name)
virtual JobContext getResult() const override final
Returns the result of the job.
Base class for all jobs providing particle data.
virtual JobContext getResult() const override final
Returns the result of the job.
virtual Optional< ExtJobType > provides() const override final
Specifies the type of the job, i.e. what kind of data the job provides.
SharedPtr< ParticleData > result
Data filled by the job when it finishes.
IParticleJob(const std::string &name)
Callbacks executed by the simulation to provide feedback to the user.
Base class for jobs running a simulation.
IRunJob(const std::string &name)
virtual AutoPtr< IRun > getRun(const RunSettings &overrides) const =0
Returns the actual simulation object.
virtual void evaluate(const RunSettings &global, IRunCallbacks &callbacks) override final
Runs the operation provided by the job.
Defines the interface for a run.
JobContext clone() const
Duplicates the stored data.
void release()
Releases all allocated data.
SharedPtr< TValue > tryGetValue() const
Returns the stored value or nullptr if the provided type TValue does not match the type of the stored...
SharedPtr< TValue > getValue() const
Returns the stored value.
Building block of a simulation hierarchy.
Wrapper of type value of which may or may not be present.
Non-owning wrapper of pointer.
Object holding various statistics about current run.
Container storing all quantities used within the simulations.
Holds a map of virtual entries, associated with a unique name.
Generic storage and input/output routines of settings.
const EmptySettingsTag EMPTY_SETTINGS
Helper class, allowing to register job into the global list of jobs.
JobRegistrar(std::string className, std::string category, CreateJobFunc func, std::string tooltip)
Registers a new job.
Storage storage
Holds all particle positions and other quantities.
Statistics stats
Final statistics of the simulation.
RunSettings overrides
Overrides associated with the particle state.
Base class for all polymorphic objects.