Skip to content

Commit e0d8060

Browse files
committed
Add ping method to FEAWorkerWrapper for worker responsiveness check; update import for GMSH file handling in meshGenerationScript
1 parent bb12656 commit e0d8060

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/FEAWrapperScript.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,19 @@ class FEAWorkerWrapper {
137137
throw error;
138138
}
139139
}
140+
141+
/**
142+
* Simple ping method to check if the worker is responsive.
143+
* @returns {boolean} Returns true to indicate the worker is available.
144+
*/
145+
ping() {
146+
try {
147+
return true;
148+
} catch (error) {
149+
console.error("FEA Worker: Error in ping", error);
150+
throw error;
151+
}
152+
}
140153
}
141154

142155
Comlink.expose(FEAWorkerWrapper);

src/mesh/meshGenerationScript.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Class to handle the generation of structured finite element meshes
1313
*/
1414

15-
import { importGmsh } from '../readers/gmshQuadReader.js';
15+
import { importGmshQuadTri } from '../readers/gmshQuadReader.js';
1616

1717
export class meshGeneration {
1818
/**
@@ -95,7 +95,7 @@ export class meshGeneration {
9595
async generateMeshFromMshFile(file){
9696

9797
//for now i have made a parsing of simple quadrilateral .msh file of version 4.1
98-
const outputMesh = await importGmsh(file)
98+
const outputMesh = await importGmshQuadTri(file);
9999

100100
return outputMesh
101101
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy