SPH
|
Base class for all object performing an operation in a simulation hierarchy. More...
#include <Job.h>
Public Member Functions | |
IJob (const std::string &name) | |
virtual std::string | instanceName () const |
Unique name representing this job. More... | |
virtual std::string | className () const =0 |
Name representing the type of the job (e.e. "SPH"). More... | |
virtual UnorderedMap< std::string, ExtJobType > | requires () const |
List of slots that need to be connected to evaluate the job. More... | |
virtual UnorderedMap< std::string, ExtJobType > | getSlots () const =0 |
Lists all potential inputs of the job. More... | |
virtual Optional< ExtJobType > | provides () const =0 |
Specifies the type of the job, i.e. what kind of data the job provides. More... | |
virtual VirtualSettings | getSettings ()=0 |
Returns a settings object which allows to query and modify the state of the job. More... | |
virtual void | evaluate (const RunSettings &global, IRunCallbacks &callbacks)=0 |
Runs the operation provided by the job. More... | |
virtual JobContext | getResult () const =0 |
Returns the result of the job. More... | |
![]() | |
virtual | ~Polymorphic () |
Protected Member Functions | |
template<typename T > | |
SharedPtr< T > | getInput (const std::string &name) const |
Convenient function to return input data for slot of given name. More... | |
Protected Attributes | |
std::string | instName |
UnorderedMap< std::string, JobContext > | inputs |
Contains all input data, identified by names of input slots. More... | |
Friends | |
class | JobNode |
Base class for all object performing an operation in a simulation hierarchy.
There are currently three type of jobs: particle jobs, derived from class IParticleJob, represent all simulations, initial conditions, particle hand-offs and other particle transforms, etc. IGeometryJob provides generic geometric shapes, which can be used to define bodies, specify boundary conditions etc. Finally IMaterialJob provides material of bodies.
Each job defines a number of inputs, which are provided by other jobs. This number does not have to be fixed, it may depend on internal state of the job. The inputs should not be assigned by the jobs itself, this is provided by class JobNode, which connects the jobs in the job hierarchy.
|
pure virtual |
Name representing the type of the job (e.e. "SPH").
Implemented in BatchJob, VdbJob, AnimationJob, FisheyeCameraJob, PerspectiveCameraJob, OrthoCameraJob, NBodyJob, SphStabilizationJob, SphJob, CompareJob, SubsampleJob, EmplaceComponentsAsFlagsJob, ExtractParticlesInDomainJob, MergeComponentsJob, RemoveParticlesJob, ExtractComponentJob, SmoothedToSolidHandoff, CollisionGeometrySetup, ChangeMaterialJob, CenterParticlesJob, TransformParticlesJob, MultiJoinParticlesJob, OrbitParticlesJob, JoinParticlesJob, DisableDerivativeCriterionJob, MaterialJob, SaveMeshJob, SaveFileJob, FileSequenceJob, LoadFileJob, GalaxyIc, IsothermalSphereIc, PolytropicStarIc, NBodyIc, NoiseQuantityIc, ModifyQuantityIc, EquilibriumIc, ImpactorIc, SingleParticleIc, DifferentiatedBodyIc, MonolithicBodyIc, BooleanGeometryJob, TransformGeometryJob, InvertGeometryJob, SpheresGeometryJob, ParticleGeometryJob, MeshGeometryJob, GaussianSphereJob, HalfSpaceJob, MaclaurinSpheroidJob, CylinderJob, EllipsoidJob, BlockJob, and SphereJob.
|
pure virtual |
Runs the operation provided by the job.
Function may be called only after required inputs are assigned; this is provided by class JobNode, the job should not be used directly.
global | Global settings, shared by all jobs. Contains parameters like number of threads, etc. |
callbacks | Interface allowing to get notified about current progress of the job. |
InvalidSetup | if required input is missing or job encountered a problem in initialization. |
Implemented in IRunJob, ICameraJob, EmplaceComponentsAsFlagsJob, ExtractParticlesInDomainJob, MergeComponentsJob, RemoveParticlesJob, ExtractComponentJob, ChangeMaterialJob, CenterParticlesJob, TransformParticlesJob, MultiJoinParticlesJob, OrbitParticlesJob, JoinParticlesJob, SaveFileJob, FileSequenceJob, LoadFileJob, BooleanGeometryJob, TransformGeometryJob, InvertGeometryJob, SpheresGeometryJob, ParticleGeometryJob, MeshGeometryJob, and SphereJob.
|
protected |
|
pure virtual |
Returns the result of the job.
This can only be called after the job is evaluated. The result is cached by the job, so the function getResult can be called multiple times once the job finishes.
Implemented in ICameraJob, INullJob, IMaterialJob, IGeometryJob, and IParticleJob.
|
pure virtual |
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.
Implemented in BatchJob, VdbJob, AnimationJob, FisheyeCameraJob, PerspectiveCameraJob, OrthoCameraJob, NBodyJob, SphStabilizationJob, SphJob, CompareJob, SubsampleJob, EmplaceComponentsAsFlagsJob, ExtractParticlesInDomainJob, MergeComponentsJob, RemoveParticlesJob, ExtractComponentJob, SmoothedToSolidHandoff, CollisionGeometrySetup, ChangeMaterialJob, CenterParticlesJob, TransformParticlesJob, MultiJoinParticlesJob, OrbitParticlesJob, JoinParticlesJob, DisableDerivativeCriterionJob, MaterialJob, SaveMeshJob, SaveFileJob, FileSequenceJob, LoadFileJob, GalaxyIc, IsothermalSphereIc, PolytropicStarIc, NBodyIc, NoiseQuantityIc, ModifyQuantityIc, EquilibriumIc, SingleParticleIc, DifferentiatedBodyIc, MonolithicBodyIc, BooleanGeometryJob, TransformGeometryJob, InvertGeometryJob, SpheresGeometryJob, ParticleGeometryJob, MeshGeometryJob, GaussianSphereJob, HalfSpaceJob, MaclaurinSpheroidJob, CylinderJob, EllipsoidJob, BlockJob, and SphereJob.
|
pure virtual |
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.
Implemented in BatchJob, VdbJob, AnimationJob, ICameraJob, NBodyJob, SphJob, CompareJob, SubsampleJob, EmplaceComponentsAsFlagsJob, ExtractParticlesInDomainJob, MergeComponentsJob, RemoveParticlesJob, ExtractComponentJob, SmoothedToSolidHandoff, CollisionGeometrySetup, ChangeMaterialJob, CenterParticlesJob, TransformParticlesJob, MultiJoinParticlesJob, OrbitParticlesJob, JoinParticlesJob, DisableDerivativeCriterionJob, MaterialJob, SaveMeshJob, SaveFileJob, FileSequenceJob, LoadFileJob, GalaxyIc, IsothermalSphereIc, PolytropicStarIc, NBodyIc, NoiseQuantityIc, ModifyQuantityIc, EquilibriumIc, ImpactorIc, SingleParticleIc, DifferentiatedBodyIc, MonolithicBodyIc, BooleanGeometryJob, TransformGeometryJob, InvertGeometryJob, SpheresGeometryJob, ParticleGeometryJob, MeshGeometryJob, GaussianSphereJob, HalfSpaceJob, MaclaurinSpheroidJob, CylinderJob, EllipsoidJob, BlockJob, and SphereJob.
|
inlinevirtual |
Unique name representing this job.
Reimplemented in SaveFileJob, and LoadFileJob.
|
pure virtual |
Specifies the type of the job, i.e. what kind of data the job provides.
May be NOTHING for jobs like "save file", etc.
Implemented in ICameraJob, INullJob, IMaterialJob, IGeometryJob, and IParticleJob.
|
inlinevirtual |
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 in VdbJob, AnimationJob, SphJob, ChangeMaterialJob, ImpactorIc, and MonolithicBodyIc.
|
protected |