FSI without Delauney Triangulation
| 2055 | |
| 2056 | // FSI without Delauney Triangulation |
| 2057 | int BackgroundMesh::gridFSInoDT() { |
| 2058 | Domain* domain = OPS_GetDomain(); |
| 2059 | if (domain == 0) return 0; |
| 2060 | int ndm = OPS_GetNDM(); |
| 2061 | |
| 2062 | // store cells in a vector |
| 2063 | std::vector<BCell*> cells; |
| 2064 | for (auto& item : bcells) { |
| 2065 | auto& cell = item.second; |
| 2066 | if (cell.getType() == BACKGROUND_STRUCTURE) { |
| 2067 | cells.push_back(&cell); |
| 2068 | } |
| 2069 | } |
| 2070 | |
| 2071 | // create elements in each cell |
| 2072 | int numele = 0; |
| 2073 | if (ndm == 2) { |
| 2074 | // numele = 2; |
| 2075 | numele = 4; |
| 2076 | } else if (ndm == 3) { |
| 2077 | // numele = 6; |
| 2078 | numele = 12; |
| 2079 | } |
| 2080 | VVInt elends(numele * cells.size()); |
| 2081 | VInt gtags(numele * cells.size()); |
| 2082 | VInt contact3Ddir(numele * cells.size(), -1); |
| 2083 | int ndtag = Mesh::nextNodeTag(); |
| 2084 | // #pragma omp parallel for |
| 2085 | for (int j = 0; j < (int)cells.size(); ++j) { |
| 2086 | // get indices |
| 2087 | auto& cindices = cells[j]->getIndices(); |
| 2088 | |
| 2089 | // get bnodes |
| 2090 | auto& cbnodes = cells[j]->getNodes(); |
| 2091 | |
| 2092 | // get types |
| 2093 | VInt types(cbnodes.size()); |
| 2094 | for (int i = 0; i < (int)cbnodes.size(); ++i) { |
| 2095 | types[i] = cbnodes[i]->getType(); |
| 2096 | } |
| 2097 | |
| 2098 | // get fluid and structural local indices |
| 2099 | VInt flocal, slocal, fixlocal, fslocal; |
| 2100 | for (int i = 0; i < (int)types.size(); ++i) { |
| 2101 | int type = types[i]; |
| 2102 | if (type == BACKGROUND_STRUCTURE) { |
| 2103 | slocal.push_back(i); |
| 2104 | } else if (type == BACKGROUND_FLUID_STRUCTURE) { |
| 2105 | fslocal.push_back(i); |
| 2106 | } else if (type == BACKGROUND_FLUID) { |
| 2107 | flocal.push_back(i); |
| 2108 | } else { |
| 2109 | fixlocal.push_back(i); |
| 2110 | } |
| 2111 | } |
| 2112 | |
| 2113 | // FSI or SSI contact |
| 2114 | if ((ndm == 2 && slocal.size() + fslocal.size() == 4) || |
nothing calls this directly
no test coverage detected