This commit is contained in:
jakob.schratter 2026-01-27 17:17:40 +01:00
commit a052937ec3
3 changed files with 23 additions and 6 deletions

View file

@ -851,10 +851,16 @@ const std::vector<int> Mesh::TopNodes() const
{
vector<int> topNodes;
for (size_t i = 0; i < _outerEdgesNodes.size(); ++i)
vector<int> outerNodes = Index_DirichletNodes();
for (size_t i = 0; i < outerNodes.size(); ++i)
{
int nodeIndex = _outerEdgesNodes[i];
if (abs(_xc[2*nodeIndex + 1] - 105.0) < 0.01 ) // if y-coordinate of node is 105, i.e. node is on top
int nodeIndex = outerNodes[i];
//cout << nodeIndex << endl;
//cout << "x: " << _xc[2*nodeIndex] << " y: " << _xc[2*nodeIndex+1] << endl;
if (abs(_xc[2*nodeIndex + 1] - 0.105) < 0.0001 ) // if y-coordinate of node is 105, i.e. node is on top
{
topNodes.push_back(nodeIndex);
}