Skip to content

Commit

Permalink
Merge branch 'ChangePythonMeshInterface' into 'master'
Browse files Browse the repository at this point in the history
[App/Python] Change connectivity data layout in OGSPython mesh.

See merge request ogs/ogs!5147
  • Loading branch information
endJunction committed Nov 1, 2024
2 parents 6efb29f + 3ee9132 commit 32da72c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion Applications/Python/ogs.mesh/OGSMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ std::pair<std::vector<int>, std::vector<int>> OGSMesh::getCells() const
std::vector<int> cell_types;
for (auto const* element : elements)
{
cells.push_back(static_cast<int>(element->getNumberOfNodes()));
ranges::copy(element->nodes() | MeshLib::views::ids,
std::back_inserter(cells));
cell_types.push_back(OGSToVtkCellType(element->getCellType()));
Expand Down
10 changes: 5 additions & 5 deletions Tests/Python/test_simulator_mesh_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ def checkCells(cells, celltypes, points):
# structured mesh with equal size cells
for c in range(len(celltypes)):
area = computeQuadArea(
points[cells[5 * c + 1]],
points[cells[5 * c + 2]],
points[cells[5 * c + 3]],
points[cells[5 * c + 4]],
points[cells[4 * c + 0]],
points[cells[4 * c + 1]],
points[cells[4 * c + 2]],
points[cells[4 * c + 3]],
)
if abs(area - 1.0 / 9.0) > sys.float_info.epsilon:
print(
Expand All @@ -76,7 +76,7 @@ def checkCells(cells, celltypes, points):
+ " is: "
+ str(area)
+ ", expected value is "
+ str(1.0 / 1.9)
+ str(1.0 / 9.0)
)


Expand Down

0 comments on commit 32da72c

Please sign in to comment.