Skip to content

Commit ec1427e

Browse files
committed
Add boundary element handling for 1D mesh generation
1 parent 6104cc8 commit ec1427e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mesh/meshGenerationScript.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ export class meshGeneration {
234234
}
235235

236236
if (this.meshDimension === "1D") {
237-
console.log("Unsupported dimension or element order");
237+
// Left boundary (element 0, side 0)
238+
boundaryElements[0].push([0, 0]);
239+
240+
// Right boundary (last element, side 1)
241+
boundaryElements[1].push([this.numElementsX - 1, 1]);
238242
} else if (this.meshDimension === "2D") {
239243
for (let elementIndexX = 0; elementIndexX < this.numElementsX; elementIndexX++) {
240244
for (let elementIndexY = 0; elementIndexY < this.numElementsY; elementIndexY++) {

0 commit comments

Comments
 (0)