Skip to content

Commit 3531e78

Browse files
committed
Remove loglevel logger integration and replace logging with console statements
1 parent ca7e763 commit 3531e78

5 files changed

Lines changed: 0 additions & 66 deletions

File tree

src/FEAScript.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
// Website: https://feascript.com/ \__| //
1010

1111
import { assembleSolidHeatTransferMat } from "./solvers/solidHeatTransferScript.js";
12-
import loggers from "./utilities/loggerScript.js";
13-
14-
const log = loggers.main;
1512

1613
/**
1714
* FEAScript: An open-source finite element simulation library developed in JavaScript

src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@
1111
export { FEAScriptModel } from "./FEAScript.js";
1212
export { plotSolution } from "./visualization/plotSolutionScript.js";
1313
export { printVersion, setLogLevel } from "./utilities/utilitiesScript.js";
14-
export { default as loggers } from "./utilities/loggerScript.js";

src/solvers/solidHeatTransferScript.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ import { basisFunctions } from "../mesh/basisFunctionsScript.js";
1212
import { numericalIntegration } from "../methods/numericalIntegrationScript.js";
1313
import { meshGeneration } from "../mesh/meshGenerationScript.js";
1414
import { ThermalBoundaryConditions } from "../methods/thermalBoundaryConditionsScript.js";
15-
import loggers from "../utilities/loggerScript.js";
16-
17-
const log = loggers.solver;
1815

1916
/**
2017
* Assemble the solid heat transfer matrix
@@ -26,7 +23,6 @@ const log = loggers.solver;
2623
* - nodesCoordinates: Object containing x and y coordinates of nodes
2724
*/
2825
export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
29-
// log.info("Starting solid heat transfer matrix assembly");
3026
console.log("Starting solid heat transfer matrix assembly");
3127

3228
// Extract mesh details from the configuration object
@@ -39,7 +35,6 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
3935
elementOrder, // The order of elements
4036
} = meshConfig;
4137

42-
// log.debug(`Mesh configuration: ${meshDimension}, Elements: ${numElementsX}x${numElementsY || 1}, Size: ${maxX}x${maxY || 0}, Order: ${elementOrder}`);
4338
console.log(
4439
`Mesh configuration: ${meshDimension}, Elements: ${numElementsX}x${numElementsY || 1}, Size: ${maxX}x${
4540
maxY || 0
@@ -54,15 +49,13 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
5449
if (boundaryCondition[0] === "convection") {
5550
convectionHeatTranfCoeff[key] = boundaryCondition[1];
5651
convectionExtTemp[key] = boundaryCondition[2];
57-
// log.debug(`Convection boundary condition on boundary ${key}: h=${boundaryCondition[1]}, T=${boundaryCondition[2]}`);
5852
console.log(
5953
`Convection boundary condition on boundary ${key}: h=${boundaryCondition[1]}, T=${boundaryCondition[2]}`
6054
);
6155
}
6256
});
6357

6458
// Create a new instance of the meshGeneration class
65-
// log.debug("Generating mesh...");
6659
console.log("Generating mesh...");
6760
const meshGenerationData = new meshGeneration({
6861
numElementsX,
@@ -75,7 +68,6 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
7568

7669
// Generate the mesh
7770
const nodesCoordinatesAndNumbering = meshGenerationData.generateMesh();
78-
// log.debug("Mesh generated successfully");
7971
console.log("Mesh generated successfully");
8072

8173
// Extract nodes coordinates and nodal numbering (NOP) from the mesh data
@@ -89,7 +81,6 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
8981
// Initialize variables for matrix assembly
9082
const totalElements = numElementsX * (meshDimension === "2D" ? numElementsY : 1); // Total number of elements
9183
const totalNodes = totalNodesX * (meshDimension === "2D" ? totalNodesY : 1); // Total number of nodes
92-
// log.debug(`Total elements: ${totalElements}, Total nodes: ${totalNodes}`);
9384
console.log(`Total elements: ${totalElements}, Total nodes: ${totalNodes}`);
9485

9586
// Initialize variables for matrix assembly
@@ -121,15 +112,13 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
121112
}
122113

123114
// Initialize the basisFunctions class
124-
// log.debug("Initializing basis functions...");
125115
console.log("Initializing basis functions...");
126116
const basisFunctionsData = new basisFunctions({
127117
meshDimension,
128118
elementOrder,
129119
});
130120

131121
// Initialize the numericalIntegration class
132-
// log.debug("Setting up numerical integration...");
133122
console.log("Setting up numerical integration...");
134123
const numIntegrationData = new numericalIntegration({
135124
meshDimension,
@@ -144,7 +133,6 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
144133
// Determine the number of nodes in the reference element based on the first element in the nop array
145134
const numNodes = nop[0].length;
146135

147-
// log.info(`Beginning matrix assembly for ${totalElements} elements...`);
148136
console.log(`Beginning matrix assembly for ${totalElements} elements...`);
149137

150138
// Matrix assembly
@@ -268,7 +256,6 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
268256
}
269257

270258
// Create an instance of ThermalBoundaryConditions
271-
// log.debug("Applying thermal boundary conditions...");
272259
console.log("Applying thermal boundary conditions...");
273260
const thermalBoundaryConditions = new ThermalBoundaryConditions(
274261
boundaryConditions,
@@ -290,15 +277,12 @@ export function assembleSolidHeatTransferMat(meshConfig, boundaryConditions) {
290277
convectionHeatTranfCoeff,
291278
convectionExtTemp
292279
);
293-
// log.debug("Convection boundary conditions applied");
294280
console.log("Convection boundary conditions applied");
295281

296282
// Impose ConstantTemp boundary conditions
297283
thermalBoundaryConditions.imposeConstantTempBoundaryConditions(residualVector, jacobianMatrix);
298-
// log.debug("Constant temperature boundary conditions applied");
299284
console.log("Constant temperature boundary conditions applied");
300285

301-
// log.info("Solid heat transfer matrix assembly completed");
302286
console.log("Solid heat transfer matrix assembly completed");
303287

304288
return {

src/utilities/loggerScript.js

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/utilities/utilitiesScript.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
// |_| | |_ //
99
// Website: https://feascript.com/ \__| //
1010

11-
import loggers from "./loggerScript.js";
12-
13-
const log = loggers.main;
14-
1511
/**
1612
* Function to handle version information and fetch the latest update date and release from GitHub
1713
*/

0 commit comments

Comments
 (0)