-
Notifications
You must be signed in to change notification settings - Fork 0
/
MSolution.h
executable file
·86 lines (75 loc) · 2.22 KB
/
MSolution.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef MSOLUTION_H_
#define MSOLUTION_H_
#include "MSimulationData.h"
#include "MOutput.h"
#include "MKernelBSpline.h"
#include "MConstitutive.h"
#include <vector>
#include <string>
#include "MRigidBody.h"
class MSolution
{
protected:
MSolution(MSimulationData *simdata, MOutput *output);
virtual ~MSolution();
public:
static MSolution* Instance(MSimulationData *simdata, MOutput *output);
void DestroyInstance();
private:
static MSolution *_instance;
public:
int Solution();
void AViscosity(MParticle &part);
int CalcCriticalTimestep();
void CalcTotalEnergy();
int Neighbours();
int SetupLinkedList();
int LinkedListNeighbours();
int FindNewMaxNeighbour();
int UpdateH();
void PrintScreenLog(const std::string &msg);
int Strain();
int ClassicStrain();
MKernel *GenerateKernel(real havg);
int Constitutive();
int RhoUpdate();
int Momentum();
int ClassicAcceleration();
int MorrisAcceleration();
int LennardJonesAcceleration();
int UpdateVelocity();
int BoundCond();
int ConstrainQuantity(RealVector &quantity, int code);
int MoveParticles();
int GhostSetup();
int GenerateGhostParticles(IntVector &down_limit, IntVector &up_limit, RealVector &addVec);
// Surface tension handling
int CalculateSurfaceNormals();
// Rigid body methods, names of the methods start with 'RigidBody'
int RigidBodyForce();
int RigidBodyAcceleration();
int RigidBodyVelocity();
inline bool InRigidBody(const MCommonParticle &p)
{ return m_simdata->m_rigidbodydata[1].ID==p.mat; }
// Temporary functions, hardwired stuff
int PlotOutput(const std::string &filename);
int ConstrainVelocityCylinder(MParticle &p);
int PlotDroppingCylinder(const std::string &filename);
// MPI variables and methods
int InitializeMpiProcess();
int HandleMpiMemory(bool reserving);
int TransferParticlesWithPeriodicProcess();
int ExchangeData(int phase);
int TransferParticles(int phase);
int TransferParticlesToRoot(bool rigidBodyParticles);
int PackMpiQuantities(bool packing, int &count, MParticle &part);
int TransferMpiBuffer(bool sending, int &count, int proc, int tag);
real *mpiExchangeTable;
IntVectorL box_procmin;
IntVectorL box_procmax;
// Attributes
protected:
MSimulationData *m_simdata;
MOutput *m_output;
};
#endif /*MSOLUTION_H_*/