FEDEM Solver  R8.0
Source code of the dynamics solver
FFaFunctionManager.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
13 #ifndef FFA_FUNCTION_MANAGER_H
14 #define FFA_FUNCTION_MANAGER_H
15 
16 #include <vector>
17 #include <string>
18 
19 class FaVec3;
20 
21 
23 {
24  using IntVec = std::vector<int>;
25  using RealVec = std::vector<double>;
26 
33  double getValue(int baseID, const IntVec& intVars,
34  const RealVec& realVars, const double x, int& ierr);
35 
43  double getValue(int baseID, int fType, int extrap,
44  const RealVec& realVars, const double x, int& ierr);
45 
53  double getDerivative(int baseID, int fType, int extrap,
54  const RealVec& realVars, const double x, int& ierr);
55 
64  int getSmartPoints(int funcType, int extrap,
65  const double start, const double stop,
66  const RealVec& realVars,
67  RealVec& xtofill, RealVec& ytofill);
68 
70  int getTypeID(const std::string& functionType);
71 
77  bool initWaveFunction(const std::string& fileName, const int nWave,
78  const int rSeed, RealVec& realVars);
86  bool initWaveFunction(const int iop, const int nWave, const int nDir,
87  const int sprExp, const int rSeed, RealVec& realVars);
93  bool initWaveFunction(const int iop, const double g, double d,
94  RealVec& realVars);
103  bool initWaveFunction(const int iop, const int nWave, const int rSeed,
104  const double g, const double d,
105  IntVec& intVars, RealVec& realVars);
106 
115  double getWaveValue(const RealVec& realVars,
116  const double g, const double d, const FaVec3& x,
117  const double t, int iop = 0);
127  double getWaveValue(const IntVec& intVars, const RealVec& realVars,
128  const double g, const double d, const FaVec3& x,
129  const double t, int iop = 0);
141  double getWaveValue(const IntVec& intVars, const RealVec& realVars,
142  const double g, const double d, const FaVec3& x,
143  const double t, FaVec3& v, FaVec3& a, int iop = 0);
144 }
145 
146 #endif
Class for point vectors in 3D space.
Definition: FFaVec3.H:40
Explicit function manager.
Definition: FFaFunctionManager.H:23
int getTypeID(const std::string &functionType)
Returns the function type ID for a given functionType name.
Definition: FFaFunctionManager.C:194
bool initWaveFunction(const std::string &fileName, const int nWave, const int rSeed, RealVec &realVars)
Initializes parameters for a wave function from given file.
Definition: FFaFunctionManager.C:219
double getWaveValue(const RealVec &realVars, const double g, const double d, const FaVec3 &x, const double t, int iop=0)
Evaluates a wave profile function.
Definition: FFaFunctionManager.C:324
double getDerivative(int baseID, int fType, int extrap, const RealVec &realVars, const double x, int &ierr)
Evaluates the derivative of an explicit function.
Definition: FFaFunctionManager.C:164
int getSmartPoints(int funcType, int extrap, const double start, const double stop, const RealVec &realVars, RealVec &xtofill, RealVec &ytofill)
Finds the so-called smart points of an explicit function.
Definition: FFaFunctionManager.C:207
std::vector< int > IntVec
Convenience type alias.
Definition: FFaFunctionManager.H:24
double getValue(int baseID, const IntVec &intVars, const RealVec &realVars, const double x, int &ierr)
Evaluates an explicit function.
Definition: FFaFunctionManager.C:101
std::vector< double > RealVec
Convenience type alias.
Definition: FFaFunctionManager.H:25
real(sp), dimension(:,:,:), pointer a
Definition: diffractionModule.f90:21
real(dp), save, private g
Definition: FNVwaveForceModule.f90:42
static int iop
Internal operation status variable.
Definition: solverInterface.C:50