17 for (
unsigned int iter = 0; iter < ConfigData_Ptr->getThreadsNumber(); iter++) {
18 if (ConfigData_Ptr->getThreadStringParam(iter,
"GridType") ==
"VDB") {
19 if (ConfigData_Ptr->getThreadParamLength(iter,
"NodeFilePath") > 0) {
20 if (ConfigData_Ptr->getThreadIntParam(iter,
"NodeTypeID") == 0) {
21 auto nodeID = (int16_t) ConfigData_Ptr->getThreadIntParam(iter,
"NodeTypeID");
22 std::string FilePath =
23 ConfigData_Ptr->CaseFolder + ConfigData_Ptr->getProgramStringParam(
"GeometryFolder") +
24 ConfigData_Ptr->getThreadStringParam(iter,
"NodeFilePath");
25 auto data_Ptr = std::make_unique<std::vector<double>>();
26 std::vector<std::string> VariableNameList{
27 ConfigData_Ptr->getThreadStringVectorParam(0, iter,
"NodeCoordinateFileColumnNames"),
28 ConfigData_Ptr->getThreadStringVectorParam(1, iter,
"NodeCoordinateFileColumnNames"),
29 ConfigData_Ptr->getThreadStringVectorParam(2, iter,
"NodeCoordinateFileColumnNames")};
31 auto accessor = VDBGrid->getAccessor();
33 int32_t &i = xyz[0], &j = xyz[1], &h = xyz[2];
35 for (
auto it = data_Ptr->begin(); it < data_Ptr->end(); it += 3) {
37 j = int32_t(*(it + 1));
38 h = int32_t(*(it + 2));
41 nodeTMP.
node_id.
Node.uidThreadNr = (uint16_t) iter + 1;
struct MF::GB::NodeID::@0::@1 Node
A class that allows to determine the proper NodeID from combined nodeType, uidThreadNr, ThreadCount, ComponentNr and PhaseNr.
static void DataReadFromCSVFile(const std::string &DataFilePath, const std::vector< std::string > &VariableNameList, std::vector< double > *pDataArray)
Reads data from text file.
static void VDBSolidAdd(const openvdb::Int64Grid::Ptr &VDBGrid, const std::shared_ptr< MF::Database::ConfigData > &ConfigData_Ptr)
union MF::GB::NodeID::@0 node_id