50 for (
int iCg = 0; iCg <
cgFileNames.size(); ++iCg) {
54 std::vector<double> slnData(
partitions[iCg]->getNElement(), iCg);
57 std::vector<std::string> slnNamelist;
58 partitions[iCg]->getSolutionDataNames(slnNamelist);
59 for (
const auto &in : slnNamelist)
60 if (in ==
"partitionOld") {
65 partitions[iCg]->appendSolutionData(
"partitionOld", slnData,
84 std::cout <<
"Meshes stitched successfully." << std::endl;
85 std::cout <<
"Exporting stitched mesh to VTK format." << std::endl;
87 std::size_t pos = newname.find_last_of(
'/');
88 newname = newname.substr(pos + 1);
91 std::cout <<
"Transferring physical quantities to vtk mesh." << std::endl;
93 int outNData, outNDim;
94 std::vector<std::string> slnNameList;
95 std::vector<std::string> appSlnNameList;
96 partitions[0]->getSolutionDataNames(slnNameList);
97 partitions[0]->getAppendedSolutionDataName(appSlnNameList);
98 slnNameList.insert(slnNameList.end(), appSlnNameList.begin(),
99 appSlnNameList.end());
102 for (
auto is = slnNameList.begin(); is < slnNameList.end(); is++) {
103 std::vector<double> physData;
104 partitions[0]->getSolutionDataStitched(*is, physData, outNData, outNDim);
107 std::cout <<
"Embedding nodal " << *is << std::endl;
108 stitchedMesh->setPointDataArray((*is).c_str(), physData);
113 std::cout <<
"Embedding cell-based " << *is << std::endl;
114 stitchedMesh->setCellDataArray((*is).c_str(), physData);
const std::vector< std::string > cgFileNames
std::string trim_fname(const std::string &name, const std::string &ext)
std::shared_ptr< meshBase > stitchedMesh
std::vector< std::shared_ptr< cgnsAnalyzer > > partitions
static std::shared_ptr< meshBase > CreateShared(const std::string &fname)
Create shared ptr from fname.