Skip to content

Commit 6b41ac3

Browse files
committed
Remove unnecessary meshType parameter
1 parent 2a0b8d0 commit 6b41ac3

3 files changed

Lines changed: 15 additions & 23 deletions

File tree

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ <h2 id="howtousefeascript"><a name="Getting Started"></a>How to Use FEAScript</h
344344
const { solutionVector, nodesCoordinates } = model.solve();
345345

346346
// Plot results
347-
plotSolution(solutionVector, nodesCoordinates, model.solverConfig, model.meshConfig.meshDimension, "contour", "resultsCanvas", "unstructured");
347+
plotSolution(solutionVector, nodesCoordinates, model.solverConfig, model.meshConfig.meshDimension, "contour", "resultsCanvas");
348348
});
349349
&lt;/script&gt;
350350
&lt;!-- ...rest of body region... --&gt;

tutorials/heat-conduction-2d-fin-gmsh.html

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ <h2 id="gmshfileimport"><a name="gmshfileimport"></a>Gmsh File Import</h2>
183183
model.setSolverConfig("heatConductionScript");
184184

185185
// Parse the mesh file
186-
const result = await importGmshQuadTri(meshFile);
186+
const rect_quad_unstruct = await importGmshQuadTri(meshFile);
187187

188-
// Define mesh configuration with the parsed result
188+
// Define mesh configuration with the parsed rect_quad_unstruct
189189
model.setMeshConfig({
190-
parsedMesh: result,
190+
parsedMesh: rect_quad_unstruct,
191191
meshDimension: "2D",
192192
elementOrder: "quadratic",
193193
});
@@ -209,8 +209,7 @@ <h2 id="gmshfileimport"><a name="gmshfileimport"></a>Gmsh File Import</h2>
209209
model.solverConfig,
210210
model.meshConfig.meshDimension,
211211
"contour",
212-
"resultsCanvas",
213-
"unstructured" // Important: specify unstructured mesh type for Gmsh meshes
212+
"resultsCanvas"
214213
);
215214
});
216215
&lt;/script&gt;
@@ -235,11 +234,6 @@ <h2 id="gmshfileimport"><a name="gmshfileimport"></a>Gmsh File Import</h2>
235234
<code>model.addBoundaryCondition("0", ["constantTemp", 200]); // Gmsh physical group tag 1</code>.
236235
This conversion is necessary because Gmsh uses 1-based indexing while FEAScript uses 0-based indexing.
237236
</li>
238-
<li>
239-
<strong>Unstructured Plotting:</strong> When plotting results from a Gmsh mesh, add the
240-
<code>"unstructured"</code>
241-
parameter to the <code>plotSolution</code> function to ensure correct visualization.
242-
</li>
243237
</ul>
244238

245239
<p>
@@ -369,11 +363,11 @@ <h2 id="results"><a name="results"></a>Results</h2>
369363
} from "https://core.feascript.com/dist/feascript.esm.js";
370364
// Import FEAScript library from a local directory
371365
// import {
372-
// FEAScriptModel,
373-
// importGmshQuadTri,
374-
// plotSolution,
375-
// printVersion,
376-
// logSystem,
366+
// FEAScriptModel,
367+
// importGmshQuadTri,
368+
// plotSolution,
369+
// printVersion,
370+
// logSystem,
377371
// } from "../../FEAScript-core/src/index.js";
378372

379373
window.addEventListener("DOMContentLoaded", async () => {
@@ -400,11 +394,11 @@ <h2 id="results"><a name="results"></a>Results</h2>
400394
gmshModel.setSolverConfig("heatConductionScript");
401395

402396
// Parse the mesh file
403-
const result = await importGmshQuadTri(meshFile);
397+
const rect_quad_unstruct = await importGmshQuadTri(meshFile);
404398

405-
// Define mesh configuration with the parsed result
399+
// Define mesh configuration with the parsed rect_quad_unstruct
406400
gmshModel.setMeshConfig({
407-
parsedMesh: result,
401+
parsedMesh: rect_quad_unstruct,
408402
meshDimension: "2D",
409403
elementOrder: "quadratic",
410404
});
@@ -430,8 +424,7 @@ <h2 id="results"><a name="results"></a>Results</h2>
430424
gmshModel.solverConfig,
431425
gmshModel.meshConfig.meshDimension,
432426
"contour",
433-
"resultsCanvas",
434-
"unstructured"
427+
"resultsCanvas"
435428
);
436429
});
437430
</script>

tutorials/heat-conduction-2d-fin-performance-test.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ <h2>Run Performance Test</h2>
189189
"heatConductionScript",
190190
"2D",
191191
"contour",
192-
"resultsCanvas",
193-
"structured"
192+
"resultsCanvas"
194193
);
195194
}
196195

0 commit comments

Comments
 (0)