@@ -162,7 +162,7 @@ <h2 id="gmshfileimport"><a name="gmshfileimport"></a>Gmsh File Import</h2>
162162 <!-- ...body region... -->
163163 <script type="module">
164164 // Import FEAScript library
165- import { FEAScriptModel, importGmshQuadTri, plotSolution , printVersion } from "https://core.feascript.com/dist/feascript.esm.js";
165+ import { FEAScriptModel, importGmshQuadTri, plotInterpolatedSolution , printVersion } from "https://core.feascript.com/dist/feascript.esm.js";
166166
167167 window.addEventListener("DOMContentLoaded", async () => {
168168 // Print FEAScript version in the console
@@ -200,17 +200,10 @@ <h2 id="gmshfileimport"><a name="gmshfileimport"></a>Gmsh File Import</h2>
200200
201201 // Solve
202202 model.setSolverMethod("lusolve");
203- const { solutionVector, nodesCoordinates } = model.solve();
203+ const result = model.solve();
204204
205205 // Plot results
206- plotSolution(
207- solutionVector,
208- nodesCoordinates,
209- model.solverConfig,
210- model.meshConfig.meshDimension,
211- "contour",
212- "resultsCanvas"
213- );
206+ plotInterpolatedSolution(model, result, "contour", "resultsCanvas");
214207 });
215208 </script>
216209 <!-- ... rest of body region... -->
@@ -358,14 +351,14 @@ <h2 id="results"><a name="results"></a>Results</h2>
358351 import {
359352 FEAScriptModel ,
360353 importGmshQuadTri ,
361- plotSolution ,
354+ plotInterpolatedSolution ,
362355 printVersion ,
363356 } from "https://core.feascript.com/dist/feascript.esm.js" ;
364357 // Import FEAScript library from a local directory
365358 // import {
366359 // FEAScriptModel,
367360 // importGmshQuadTri,
368- // plotSolution ,
361+ // plotInterpolatedSolution ,
369362 // printVersion,
370363 // logSystem,
371364 // } from "../../FEAScript-core/src/index.js";
@@ -414,18 +407,10 @@ <h2 id="results"><a name="results"></a>Results</h2>
414407 gmshModel . setSolverMethod ( "lusolve" ) ;
415408
416409 // Solve the problem and get the solution
417- const { solutionVector : gmshSolutionVector , nodesCoordinates : gmshNodesCoordinates } =
418- gmshModel . solve ( ) ;
419-
420- // Plot the GMSH solution
421- plotSolution (
422- gmshSolutionVector ,
423- gmshNodesCoordinates ,
424- gmshModel . solverConfig ,
425- gmshModel . meshConfig . meshDimension ,
426- "contour" ,
427- "resultsCanvas"
428- ) ;
410+ const result = gmshModel . solve ( ) ;
411+
412+ // Plot the Gmsh solution
413+ plotInterpolatedSolution ( gmshModel , result , "contour" , "resultsCanvas" ) ;
429414 } ) ;
430415 </ script >
431416
0 commit comments