Skip to content

Commit d5b8c94

Browse files
committed
Update findBoundaryElements() documentation
1 parent bcec128 commit d5b8c94

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/mesh/meshGenerationScript.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ export class meshGeneration {
5656
// Validate required geometry parameters based on mesh dimension
5757
if (this.meshDimension === "1D") {
5858
if (this.numElementsX === null || this.maxX === null) {
59-
const errorMessage =
60-
"numElementsX and maxX are required parameters when generating a 1D mesh from geometry";
61-
errorLog(errorMessage);
62-
throw new Error(errorMessage);
59+
errorLog("numElementsX and maxX are required parameters when generating a 1D mesh from geometry");
6360
}
6461
} else if (this.meshDimension === "2D") {
6562
if (
@@ -68,10 +65,9 @@ export class meshGeneration {
6865
this.numElementsY === null ||
6966
this.maxY === null
7067
) {
71-
const errorMessage =
72-
"numElementsX, maxX, numElementsY, and maxY are required parameters when generating a 2D mesh from geometry";
73-
errorLog(errorMessage);
74-
throw new Error(errorMessage);
68+
errorLog(
69+
"numElementsX, maxX, numElementsY, and maxY are required parameters when generating a 2D mesh from geometry"
70+
);
7571
}
7672
}
7773

@@ -196,19 +192,20 @@ export class meshGeneration {
196192
}
197193

198194
/**
199-
* Function to find the elements that belong to each boundary for a simple domain
195+
* Function to find the elements that belong to each boundary of a domain
200196
* @returns {array} An array containing arrays of elements and their adjacent boundary side for each boundary
201-
* Each element in the array is of the form [elementIndex, side], where:
197+
* Each element in the array is of the form [elementIndex, side], where 'side' indicates which side
198+
* of the reference element is in contact with the physical boundary:
202199
*
203200
* For 1D domains (line segments):
204-
* 0 - Left endpoint
205-
* 1 - Right endpoint
201+
* 0 - Left node of reference element (maps to physical left endpoint)
202+
* 1 - Right node of reference element (maps to physical right endpoint)
206203
*
207204
* For 2D domains (rectangular):
208-
* 0 - Bottom side
209-
* 1 - Left side
210-
* 2 - Top side
211-
* 3 - Right side
205+
* 0 - Bottom side of reference element (maps to physical bottom boundary)
206+
* 1 - Left side of reference element (maps to physical left boundary)
207+
* 2 - Top side of reference element (maps to physical top boundary)
208+
* 3 - Right side of reference element (maps to physical right boundary)
212209
*/
213210
findBoundaryElements() {
214211
const boundaryElements = [];

0 commit comments

Comments
 (0)