MolSim
Loading...
Searching...
No Matches
StrategyFactory.h
Go to the documentation of this file.
1
10#pragma once
13#include "utils/Arguments.h"
14#include <functional>
15#include <tuple>
16
20 using VFunc = void (*)(ParticleContainer &, double);
22 using XFunc = void (*)(ParticleContainer &, double, double, CellContainer *, bool);
24
29
37};
38
41 public:
43 using FFunc = void (*)(ParticleContainer &, double, CellContainer *);
44
51 static std::tuple<TimeIntegrationFuncs, FFunc> getSimulationFunctions(Arguments &args);
52};
Configurable program and simulation arguments.
SimulationType
Enum containg each possible Simulation to be performed.
Definition Arguments.h:23
Class for holding a vector of Cells that divide a domain of Particle objects.
Class for encapsulating and iterating over multiple Particle objects.
Cell encapsulation class for implementing the linked cell method.
Definition CellContainer.h:31
Class for encapsulating multiple Particle objects..
Definition ParticleContainer.h:17
Factory class for choosing the appropriate functions based on the Simulation.
Definition StrategyFactory.h:40
static std::tuple< TimeIntegrationFuncs, FFunc > getSimulationFunctions(Arguments &args)
Return a 2-tuple of the physics functions corresponding to the chosen simulation.
void(*)(ParticleContainer &, double, CellContainer *) FFunc
Typedef for force-calculating functions.
Definition StrategyFactory.h:43
Enumeration class corresponding to the type schema type.
Definition vtk-unstructured.h:2125
Struct containing each option configurable via command line arguments.
Definition Arguments.h:31
Class for encapsulating the position and velocity functions.
Definition StrategyFactory.h:18
XFunc xf
The position-calculating function.
Definition StrategyFactory.h:28
TimeIntegrationFuncs(SimulationType type, bool lc)
Constructor for choosing the appropriate functions based on the simulation type.
void(*)(ParticleContainer &, double, double, CellContainer *, bool) XFunc
Typedef for position-calculating functions.
Definition StrategyFactory.h:22
void(*)(ParticleContainer &, double) VFunc
Typedef for velocity-calculating functions.
Definition StrategyFactory.h:20
VFunc vf
Typedef for velocity-calculating functions for the linked cell method.
Definition StrategyFactory.h:26