fix up function parameters of getData/giveData

use 'const word&' instead of 'word' to avoid duplication of word and
correct constness
This commit is contained in:
danielque
2020-09-21 17:54:29 +02:00
parent d605ea1701
commit 139506a28c
12 changed files with 74 additions and 74 deletions

View File

@ -129,31 +129,31 @@ public:
template <typename T>
void getData
(
word name,
word type,
const word& name,
const word& type,
T ** const& field
) const { getData(name,type,field,couplingStep_-1); }
virtual void getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const = 0;
virtual void getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label step
) const = 0;
virtual void giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype="double"
) const = 0;

View File

@ -78,24 +78,24 @@ public:
// Member Functions
void getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const {}
void getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label step
) const {}
void giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype = ""
) const {}

View File

@ -84,8 +84,8 @@ oneWayVTK::~oneWayVTK()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void oneWayVTK::getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const
@ -194,8 +194,8 @@ void oneWayVTK::getData
void oneWayVTK::giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype
) const

View File

@ -87,16 +87,16 @@ public:
// Member Functions
void getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const;
void getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label step
) const
@ -104,8 +104,8 @@ public:
void giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype = ""
) const;

View File

@ -80,7 +80,7 @@ twoWayFiles::~twoWayFiles()
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
fileName twoWayFiles::getFilePath(word& name, bool in) const
fileName twoWayFiles::getFilePath(const word& name, bool in) const
{
char timeStep[40];
@ -100,7 +100,7 @@ fileName twoWayFiles::getFilePath(word& name, bool in) const
return particleFilePathOld;
}
void twoWayFiles::renameFilePath(fileName& particleFilePathOld,word& name) const
void twoWayFiles::renameFilePath(const fileName& particleFilePathOld, const word& name) const
{
char timeStep[40];
@ -116,8 +116,8 @@ void twoWayFiles::renameFilePath(fileName& particleFilePathOld,word& name) const
// * * * * * * * * * * * * * * * public Member Functions * * * * * * * * * * * * * //
void twoWayFiles::getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const
@ -164,8 +164,8 @@ void twoWayFiles::getData
void twoWayFiles::giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype
) const

View File

@ -65,9 +65,9 @@ private:
// private member functions
fileName getFilePath(word&, bool) const;
fileName getFilePath(const word&, bool) const;
void renameFilePath(fileName&,word&) const;
void renameFilePath(const fileName&, const word&) const;
public:
@ -92,24 +92,24 @@ public:
// Member Functions
void getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const;
void getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label step
) const { FatalError<<"function not implemented !!! twoWayFiles::getData!!!\n" << abort(FatalError); }
void giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype = ""
) const;

View File

@ -138,8 +138,8 @@ double twoWayMPI::DEMVariableValue(word variablename)
void twoWayMPI::getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label /*step*/
) const
@ -149,8 +149,8 @@ void twoWayMPI::getData
void twoWayMPI::getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label /*step*/
) const
@ -160,8 +160,8 @@ void twoWayMPI::getData
void twoWayMPI::giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype
) const

View File

@ -107,24 +107,24 @@ public:
// Member Functions
void getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const;
void getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label step
) const;
void giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype
) const;

View File

@ -178,8 +178,8 @@ twoWayMany2Many::~twoWayMany2Many()
// * * * * * * * * * * * * * * * public Member Functions * * * * * * * * * * * * * //
void twoWayMany2Many::getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label /*step*/
) const
@ -231,8 +231,8 @@ void twoWayMany2Many::getData
void twoWayMany2Many::getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label /*step*/
) const
@ -242,8 +242,8 @@ void twoWayMany2Many::getData
void twoWayMany2Many::giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* /*datatype*/
) const

View File

@ -157,24 +157,24 @@ public:
// Member Functions
void getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const;
void getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label step
) const;
void giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype
) const;

View File

@ -253,8 +253,8 @@ twoWayOne2One::~twoWayOne2One()
// * * * * * * * * * * * * * * * public Member Functions * * * * * * * * * * * * * //
void twoWayOne2One::getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label /*step*/
) const
@ -361,8 +361,8 @@ void twoWayOne2One::getData
void twoWayOne2One::getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label /*step*/
) const
@ -383,8 +383,8 @@ void twoWayOne2One::getData
void twoWayOne2One::giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype
) const

View File

@ -152,24 +152,24 @@ public:
// Member Functions
void getData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
label step
) const;
void getData
(
word name,
word type,
const word& name,
const word& type,
int ** const& field,
label step
) const;
void giveData
(
word name,
word type,
const word& name,
const word& type,
double ** const& field,
const char* datatype
) const;