@@ -30,9 +30,9 @@ export class FEAScriptWorker {
3030 }
3131
3232 /**
33- * Function to initialize the web worker and wrap it using Comlink.
33+ * Function to initialize the web worker and wrap it using Comlink
3434 * @private
35- * @throws Will throw an error if the worker fails to initialize.
35+ * @throws Will throw an error if the worker fails to initialize
3636 */
3737 async _initWorker ( ) {
3838 try {
@@ -55,10 +55,10 @@ export class FEAScriptWorker {
5555 }
5656
5757 /**
58- * Function to ensure that the worker is ready before performing any operations.
58+ * Function to ensure that the worker is ready before performing any operations
5959 * @private
60- * @returns {Promise<void> } Resolves when the worker is ready.
61- * @throws Will throw an error if the worker is not ready within the timeout period.
60+ * @returns {Promise<void> } Resolves when the worker is ready
61+ * @throws Will throw an error if the worker is not ready within the timeout period
6262 */
6363 async _ensureReady ( ) {
6464 if ( this . isReady ) return Promise . resolve ( ) ;
@@ -82,20 +82,20 @@ export class FEAScriptWorker {
8282 }
8383
8484 /**
85- * Function to set the solver configuration in the worker.
86- * @param {string } solverConfig - The solver configuration to set.
87- * @returns {Promise<boolean> } Resolves when the configuration is set.
85+ * Function to set the model configuration in the worker
86+ * @param {string } modelConfig - The model configuration to set
87+ * @returns {Promise<boolean> } Resolves when the configuration is set
8888 */
89- async setSolverConfig ( solverConfig ) {
89+ async setModelConfig ( modelConfig ) {
9090 await this . _ensureReady ( ) ;
91- basicLog ( `FEAScriptWorker: Setting solver config to: ${ solverConfig } ` ) ;
92- return this . feaWorker . setSolverConfig ( solverConfig ) ;
91+ basicLog ( `FEAScriptWorker: Setting model config to: ${ modelConfig } ` ) ;
92+ return this . feaWorker . setModelConfig ( modelConfig ) ;
9393 }
9494
9595 /**
96- * Sets the mesh configuration in the worker.
97- * @param {object } meshConfig - The mesh configuration to set.
98- * @returns {Promise<boolean> } Resolves when the configuration is set.
96+ * Function to set the mesh configuration in the worker
97+ * @param {object } meshConfig - The mesh configuration to set
98+ * @returns {Promise<boolean> } Resolves when the configuration is set
9999 */
100100 async setMeshConfig ( meshConfig ) {
101101 await this . _ensureReady ( ) ;
@@ -104,10 +104,10 @@ export class FEAScriptWorker {
104104 }
105105
106106 /**
107- * Adds a boundary condition to the worker.
108- * @param {string } boundaryKey - The key identifying the boundary.
109- * @param {array } condition - The boundary condition to add.
110- * @returns {Promise<boolean> } Resolves when the boundary condition is added.
107+ * Function to add a boundary condition to the worker
108+ * @param {string } boundaryKey - The key identifying the boundary
109+ * @param {array } condition - The boundary condition to add
110+ * @returns {Promise<boolean> } Resolves when the boundary condition is added
111111 */
112112 async addBoundaryCondition ( boundaryKey , condition ) {
113113 await this . _ensureReady ( ) ;
@@ -116,9 +116,9 @@ export class FEAScriptWorker {
116116 }
117117
118118 /**
119- * Sets the solver method in the worker.
120- * @param {string } solverMethod - The solver method to set.
121- * @returns {Promise<boolean> } Resolves when the solver method is set.
119+ * Function to set the solver method in the worker
120+ * @param {string } solverMethod - The solver method to set
121+ * @returns {Promise<boolean> } Resolves when the solver method is set
122122 */
123123 async setSolverMethod ( solverMethod ) {
124124 await this . _ensureReady ( ) ;
@@ -127,8 +127,8 @@ export class FEAScriptWorker {
127127 }
128128
129129 /**
130- * Requests the worker to solve the problem.
131- * @returns {Promise<object> } Resolves with the solution result.
130+ * Function to request the worker to solve the problem
131+ * @returns {Promise<object> } Resolves with the solution result
132132 */
133133 async solve ( ) {
134134 await this . _ensureReady ( ) ;
@@ -143,25 +143,25 @@ export class FEAScriptWorker {
143143 }
144144
145145 /**
146- * Retrieves model information from the worker.
147- * @returns {Promise<object> } Resolves with the model information.
146+ * Function to retrieve model information from the worker
147+ * @returns {Promise<object> } Resolves with the model information
148148 */
149149 async getModelInfo ( ) {
150150 await this . _ensureReady ( ) ;
151151 return this . feaWorker . getModelInfo ( ) ;
152152 }
153153
154154 /**
155- * Sends a ping request to the worker to check its availability.
156- * @returns {Promise<boolean> } Resolves if the worker responds.
155+ * Function to send a ping request to the worker to check its availability
156+ * @returns {Promise<boolean> } Resolves if the worker responds
157157 */
158158 async ping ( ) {
159159 await this . _ensureReady ( ) ;
160160 return this . feaWorker . ping ( ) ;
161161 }
162162
163163 /**
164- * Terminates the worker and cleans up resources.
164+ * Function to terminate the worker and clean up resources
165165 */
166166 terminate ( ) {
167167 if ( this . worker ) {
0 commit comments