wet
This commit is contained in:
parent
da569352cc
commit
a052937ec3
3 changed files with 23 additions and 6 deletions
|
|
@ -851,10 +851,16 @@ const std::vector<int> Mesh::TopNodes() const
|
||||||
{
|
{
|
||||||
vector<int> topNodes;
|
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];
|
int nodeIndex = outerNodes[i];
|
||||||
if (abs(_xc[2*nodeIndex + 1] - 105.0) < 0.01 ) // if y-coordinate of node is 105, i.e. node is on top
|
|
||||||
|
//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);
|
topNodes.push_back(nodeIndex);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -111,13 +111,22 @@ int main(int argc, char **argv )
|
||||||
vector<int> wetNodes = mesh_c.TopNodes();
|
vector<int> wetNodes = mesh_c.TopNodes();
|
||||||
int numberOfVertices = wetNodes.size();
|
int numberOfVertices = wetNodes.size();
|
||||||
|
|
||||||
|
cout << numberOfVertices << " TOP NODES " << endl;
|
||||||
|
|
||||||
// Determine coordinates of "wet" vertices
|
// Determine coordinates of "wet" vertices
|
||||||
std::vector<double> allCoords = mesh_c.GetCoords();
|
std::vector<double> allCoords = mesh_c.GetCoords();
|
||||||
std::vector<double> coords(numberOfVertices*meshDim);
|
std::vector<double> coords(numberOfVertices*meshDim);
|
||||||
for (size_t i = 0; i < numberOfVertices*meshDim; ++i)
|
for (size_t i = 0; i < numberOfVertices; ++i)
|
||||||
{
|
{
|
||||||
coords.push_back(allCoords[2*wetNodes[i]]); // x-coord of node
|
int currentNode = wetNodes[i];
|
||||||
coords.push_back(allCoords[2*wetNodes[i + 1]]); // y-coord of node
|
double x = allCoords[2*wetNodes[i]]; // x-coord of node
|
||||||
|
double y = allCoords[2*wetNodes[i] + 1]; // y-coord of node
|
||||||
|
|
||||||
|
// cout << "x: " << x << " y: " << y << endl;
|
||||||
|
|
||||||
|
coords[2*i] = x;
|
||||||
|
coords[2*i + 1] = y;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> vertexIDs(numberOfVertices);
|
std::vector<int> vertexIDs(numberOfVertices);
|
||||||
|
|
@ -159,6 +168,8 @@ int main(int argc, char **argv )
|
||||||
vector<double> G(Mdt.Nrows(), 0.0);
|
vector<double> G(Mdt.Nrows(), 0.0);
|
||||||
Mdt.Mult(G, uv); // G = M/dt * u_{n}
|
Mdt.Mult(G, uv); // G = M/dt * u_{n}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vector<double> H = fv;
|
vector<double> H = fv;
|
||||||
for (size_t i = 0; i < Mdt.Nrows(); ++i)
|
for (size_t i = 0; i < Mdt.Nrows(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue