SOFA API  1c8b807d
Open source framework for multi-physics simuation
sofa::simulation Namespace Reference

Namespaces

 Colors
 
 common
 
 core
 
 graph
 
 mechanicalvisitor
 
 node
 
 xml
 

Classes

class  FindByTypeVisitor
 
class  SceneLoaderPHP
 
class  SceneLoaderXML
 
class  TransformationVisitor
 
class  AnimateBeginEvent
 
class  AnimateEndEvent
 
class  AnimateVisitor
 
class  BaseMechanicalVisitor
 
class  BehaviorUpdatePositionVisitor
 
class  CleanupVisitor
 
class  CollisionAnimationLoop
 Component responsible for main simulation algorithms, managing how and when collisions and integrations computations happen. More...
 
class  CollisionBeginEvent
 
class  CollisionEndEvent
 
class  BaseCollisionVisitor
 
class  ProcessGeometricalDataVisitor
 
class  CollisionVisitor
 Compute collision reset, detection and response in one step. More...
 
class  CollisionResetVisitor
 Remove collision response from last step. More...
 
class  CollisionDetectionVisitor
 Compute collision detection. More...
 
class  CollisionResponseVisitor
 Compute collision response. More...
 
class  CpuTask
 
class  CpuTaskStatus
 
class  DeactivationVisitor
 
class  DefaultAnimationLoop
 Default Animation Loop to be created when no AnimationLoop found on simulation::node. More...
 
class  StdTaskAllocator
 
class  DefaultTaskScheduler
 
class  DefaultVisualManagerLoop
 Default VisualManager Loop to be created when no VisualManager found on simulation::node. More...
 
class  DeleteVisitor
 
class  BuildConstraintSystemEndEvent
 
class  SimulationInitDoneEvent
 
class  SimulationInitStartEvent
 
class  SimulationInitTexturesDoneEvent
 
class  SimulationStartEvent
 
class  SimulationStopEvent
 
class  SolveConstraintSystemEndEvent
 
class  InitGnuplotVisitor
 
class  ExportGnuplotVisitor
 
class  ExportVisualModelOBJVisitor
 
class  InitPerThreadDataTask
 
class  InitVisitor
 
class  IntegrateBeginEvent
 
class  IntegrateEndEvent
 
class  SpinLock
 
class  ScopedLock
 
class  MainTaskSchedulerFactory
 
class  MainTaskSchedulerRegistry
 
class  MechanicalVisitor
 
class  MechanicalVPrintVisitor
 
class  MechanicalVPrintWithElapsedTimeVisitor
 
class  DofPrintVisitor
 
class  MutationListener
 Generic API to handle mutations of the graph. More...
 
class  NodeSequence
 
class  NodeSingle
 
class  Node
 
struct  Range
 
class  ParallelSparseMatrixProduct
 
class  PauseEvent
 
class  PipelineImpl
 
class  PositionEvent
 
class  PrintVisitor
 
class  PropagateEventVisitor
 
class  RequiredPlugin
 
class  ResetVisitor
 
class  StoreResetStateVisitor
 
class  SceneCheck
 
class  SceneCheckMainRegistry
 
class  SceneCheckRegistry
 
class  SceneLoader
 Main class used to register scene file loaders. More...
 
class  SceneLoaderFactory
 
class  Simulation
 
class  SolveVisitor
 
class  SolveVisitorTask
 A task to provide to a task scheduler in which a solver solves. More...
 
class  StateChangeVisitor
 
class  Task
 
class  TaskScheduler
 
class  TaskSchedulerFactory
 
class  TaskSchedulerRegistry
 
class  TopologyChangeVisitor
 
class  UpdateBoundingBoxVisitor
 
class  UpdateContextVisitor
 
class  UpdateSimulationContextVisitor
 
class  UpdateVisualContextVisitor
 
class  UpdateInternalDataVisitor
 
class  UpdateLinksVisitor
 
class  UpdateMappingEndEvent
 
class  UpdateMappingVisitor
 
class  VelocityThresholdVisitor
 
class  Visitor
 Base class for visitors propagated recursively through the scenegraph. More...
 
class  VisualVisitor
 
class  VisualDrawVisitor
 
class  VisualUpdateVisitor
 
class  VisualInitVisitor
 
class  VisualComputeBBoxVisitor
 
class  VisualClearVisitor
 
class  WorkerThread
 
class  WriteStateVisitor
 
class  XMLPrintVisitor
 

Typedefs

typedef sofa::core::sptr< NodeNodeSPtr
 
typedef sofa::core::sptr< SimulationSimulationSPtr
 

Enumerations

enum class  ForEachExecutionPolicy : bool { SEQUENTIAL = false , PARALLEL }
 

Functions

void setSimulation (Simulation *s)=delete
 Set the (unique) simulation which controls the scene. More...
 
SOFA_SIMULATION_CORE_API SimulationgetSimulation ()
 
void initThreadLocalData ()
 
template<class InputIt , class Distance >
void advance (InputIt &it, Distance n)
 
template<class InputIt >
sofa::type::vector< Range< InputIt > > makeRangesForLoop (const InputIt first, const InputIt last, const unsigned int nbRangesHint)
 
template<class InputIt , class UnaryFunction >
UnaryFunction forEach (InputIt first, InputIt last, UnaryFunction f)
 
template<class InputIt , class UnaryFunction >
UnaryFunction forEachRange (InputIt first, InputIt last, UnaryFunction f)
 
template<class InputIt , class UnaryFunction >
UnaryFunction parallelForEachRange (TaskScheduler &taskScheduler, InputIt first, InputIt last, UnaryFunction f)
 
template<class InputIt , class UnaryFunction >
UnaryFunction parallelForEach (TaskScheduler &taskScheduler, InputIt first, InputIt last, UnaryFunction f)
 
template<class InputIt , class UnaryFunction >
UnaryFunction forEachRange (const ForEachExecutionPolicy execution, TaskScheduler &taskScheduler, InputIt first, InputIt last, UnaryFunction f)
 
template<class InputIt , class UnaryFunction >
UnaryFunction forEach (const ForEachExecutionPolicy execution, TaskScheduler &taskScheduler, InputIt first, InputIt last, UnaryFunction f)
 
SOFA_SIMULATION_API void init ()
 

Variables

const SceneLoaderloaderPHP = SceneLoaderFactory::getInstance()->addEntry(new SceneLoaderPHP())
 
const SceneLoaderloaderXML = SceneLoaderFactory::getInstance()->addEntry(new SceneLoaderXML())
 
int DefaultAnimationLoopClass
 
const bool DefaultTaskSchedulerRegistered
 
int DefaultVisualManagerLoopClass
 
int RequiredPluginClass
 

Typedef Documentation

◆ NodeSPtr

◆ SimulationSPtr

Enumeration Type Documentation

◆ ForEachExecutionPolicy

Enumerator
SEQUENTIAL 
PARALLEL 

Function Documentation

◆ advance()

template<class InputIt , class Distance >
void sofa::simulation::advance ( InputIt &  it,
Distance  n 
)

◆ forEach() [1/2]

template<class InputIt , class UnaryFunction >
UnaryFunction sofa::simulation::forEach ( const ForEachExecutionPolicy  execution,
TaskScheduler taskScheduler,
InputIt  first,
InputIt  last,
UnaryFunction  f 
)

◆ forEach() [2/2]

template<class InputIt , class UnaryFunction >
UnaryFunction sofa::simulation::forEach ( InputIt  first,
InputIt  last,
UnaryFunction  f 
)

Applies the given function object f to the result of dereferencing every iterator in the range [first, last), in order.

◆ forEachRange() [1/2]

template<class InputIt , class UnaryFunction >
UnaryFunction sofa::simulation::forEachRange ( const ForEachExecutionPolicy  execution,
TaskScheduler taskScheduler,
InputIt  first,
InputIt  last,
UnaryFunction  f 
)

◆ forEachRange() [2/2]

template<class InputIt , class UnaryFunction >
UnaryFunction sofa::simulation::forEachRange ( InputIt  first,
InputIt  last,
UnaryFunction  f 
)

Applies the given function object f to the Range [first, last)

The signature of the function f should be equivalent to the following: void fun(const Range<InputIt>& a); The signature does not need to have const &

◆ getSimulation()

Simulation * sofa::simulation::getSimulation ( )

Get the (unique) simulation which controls the scene. Automatically creates one if no Simulation has been set.

◆ init()

SOFA_SIMULATION_API void sofa::simulation::init ( )

◆ initThreadLocalData()

SOFA_SIMULATION_CORE_API void sofa::simulation::initThreadLocalData ( )

◆ makeRangesForLoop()

template<class InputIt >
sofa::type::vector<Range<InputIt> > sofa::simulation::makeRangesForLoop ( const InputIt  first,
const InputIt  last,
const unsigned int  nbRangesHint 
)

Function returning a list of ranges from an iterable container. The number of ranges depends on: 1) the desired number of ranges provided in a parameter 2) the number of elements in the container The number of elements in each range is homogeneous, except for the last range which may contain more elements.

◆ parallelForEach()

template<class InputIt , class UnaryFunction >
UnaryFunction sofa::simulation::parallelForEach ( TaskScheduler taskScheduler,
InputIt  first,
InputIt  last,
UnaryFunction  f 
)

Applies the given function object f to the result of dereferencing every iterator in the range [first, last), in parallel.

◆ parallelForEachRange()

template<class InputIt , class UnaryFunction >
UnaryFunction sofa::simulation::parallelForEachRange ( TaskScheduler taskScheduler,
InputIt  first,
InputIt  last,
UnaryFunction  f 
)

Applies in parallel the given function object f to a list of ranges generated from [first, last)

The signature of the function f should be equivalent to the following: void fun(const Range<InputIt>& a); The signature does not need to have const &.

A task scheduler must be provided and correctly initialized. The number of generated ranges depends on the threads available in the task scheduler.

◆ setSimulation()

void sofa::simulation::setSimulation ( Simulation s)
delete

Set the (unique) simulation which controls the scene.

Variable Documentation

◆ DefaultAnimationLoopClass

int sofa::simulation::DefaultAnimationLoopClass
Initial value:
= core::RegisterObject("Simulation loop to use in scene without constraints nor contact.")
.add<DefaultAnimationLoop>()
.addDocumentationURL(std::string(sofa::SOFA_DOCUMENTATION_URL) + std::string("components/animationloops/defaultanimationloop/"))
.addDescription(R"(
This loop triggers the following steps:
- build and solve all linear systems in the scene : collision and time integration to compute the new values of the dofs
- update the context (dt++)
- update the mappings
- update the bounding box (volume covering all objects of the scene))")

◆ DefaultTaskSchedulerRegistered

const bool sofa::simulation::DefaultTaskSchedulerRegistered
Initial value:
= MainTaskSchedulerFactory::registerScheduler(
DefaultTaskScheduler::name(),
&DefaultTaskScheduler::create)

◆ DefaultVisualManagerLoopClass

int sofa::simulation::DefaultVisualManagerLoopClass
Initial value:
= core::RegisterObject("The simplest Visual Loop Manager, created by default when user do not put on scene")
.add< DefaultVisualManagerLoop >()

◆ loaderPHP

const SceneLoader* sofa::simulation::loaderPHP = SceneLoaderFactory::getInstance()->addEntry(new SceneLoaderPHP())

◆ loaderXML

const SceneLoader* sofa::simulation::loaderXML = SceneLoaderFactory::getInstance()->addEntry(new SceneLoaderXML())

◆ RequiredPluginClass

int sofa::simulation::RequiredPluginClass
Initial value:
= core::RegisterObject("Load the required plugins")
.add< RequiredPlugin >()