-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
CouplingDataUser.C
66 lines (55 loc) · 1.82 KB
/
CouplingDataUser.C
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
#include "CouplingDataUser.H"
preciceAdapter::CouplingDataUser::CouplingDataUser()
{
}
bool preciceAdapter::CouplingDataUser::hasScalarData()
{
return dataType_ == scalar;
}
bool preciceAdapter::CouplingDataUser::hasVectorData()
{
return dataType_ == vector;
}
void preciceAdapter::CouplingDataUser::setDataName(std::string dataName)
{
dataName_ = std::move(dataName);
}
const std::string& preciceAdapter::CouplingDataUser::dataName()
{
return dataName_;
}
void preciceAdapter::CouplingDataUser::setPatchIDs(std::vector<int> patchIDs)
{
patchIDs_ = patchIDs;
}
void preciceAdapter::CouplingDataUser::setCellSetNames(std::vector<std::string> cellSetNames)
{
cellSetNames_ = cellSetNames;
}
void preciceAdapter::CouplingDataUser::setLocationsType(LocationType locationsType)
{
locationType_ = locationsType;
}
void preciceAdapter::CouplingDataUser::checkDataLocation(const bool meshConnectivity) const
{
if (this->isLocationTypeSupported(meshConnectivity) == false)
{
std::string location("none");
if (locationType_ == LocationType::faceCenters)
location = "faceCenters";
else if (locationType_ == LocationType::faceNodes)
location = "faceNodes";
else if (locationType_ == LocationType::volumeCenters)
location = "volumeCenters";
adapterInfo("\"locations = " + location + "\" is not supported for the data \""
+ getDataName() + "\". Please select a different "
"location type, a different data set or provide "
"additional connectivity information.",
"error");
}
}
// Dummy implementation which can be overwritten in derived classes if required
void preciceAdapter::CouplingDataUser::initialize()
{
return;
}