FEDEM Solver  R8.0
Source code of the dynamics solver
FiCurveASCFile.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 
8 #ifndef FI_CURVE_ASC_FILE_H
9 #define FI_CURVE_ASC_FILE_H
10 
11 #include "FiDeviceFunctionBase.H"
12 
26 {
27 public:
29  FiCurveASCFile(const char* devicename);
30  virtual ~FiCurveASCFile() {}
31 
32  virtual size_t getValueCount() const { return myXValues.size(); }
33 
34  virtual double getValue(double, int, bool, double, double) { return 0.0; }
35  virtual bool getValues(double, double,
36  std::vector<double>& x, std::vector<double>& y,
37  int, bool, double, double);
38  virtual void getRawData(std::vector<double>& x, std::vector<double>& y,
39  double, double, int);
40 
41  virtual void setValue(double x, double y);
42  virtual bool setData(const std::vector<double>& x,
43  const std::vector<double>& y);
44 
45  virtual void setPrecision(int type) { outputFormat = type; }
46 
47 protected:
48  virtual bool concludingDeviceWrite(bool);
49  virtual bool initialDeviceRead();
50  virtual bool preliminaryDeviceWrite() { return true; }
51 
52 private:
53  std::vector<double> myXValues;
54  std::vector<double> myYValues;
55 
57 };
58 
59 #endif
ASCII file for curve plotting.
Definition: FiCurveASCFile.H:26
virtual void setPrecision(int type)
Definition: FiCurveASCFile.H:45
virtual ~FiCurveASCFile()
Definition: FiCurveASCFile.H:30
FiCurveASCFile()
Definition: FiCurveASCFile.C:16
virtual void setValue(double x, double y)
Definition: FiCurveASCFile.C:146
std::vector< double > myYValues
Definition: FiCurveASCFile.H:54
virtual double getValue(double, int, bool, double, double)
Definition: FiCurveASCFile.H:34
virtual void getRawData(std::vector< double > &x, std::vector< double > &y, double, double, int)
Definition: FiCurveASCFile.C:165
int outputFormat
Definition: FiCurveASCFile.H:56
virtual bool setData(const std::vector< double > &x, const std::vector< double > &y)
Definition: FiCurveASCFile.C:153
virtual bool initialDeviceRead()
Definition: FiCurveASCFile.C:28
virtual size_t getValueCount() const
Definition: FiCurveASCFile.H:32
std::vector< double > myXValues
Definition: FiCurveASCFile.H:53
virtual bool preliminaryDeviceWrite()
Definition: FiCurveASCFile.H:50
virtual bool getValues(double, double, std::vector< double > &x, std::vector< double > &y, int, bool, double, double)
Definition: FiCurveASCFile.C:173
virtual bool concludingDeviceWrite(bool)
Definition: FiCurveASCFile.C:93
Definition: FiDeviceFunctionBase.H:19
integer(ptr), save, private x
Definition: extCtrlSysRoutinesModule.f90:16
character(len=40) type
Function type flag.
Definition: initiateFunctionTypeModule.f90:33