Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
abc0990cba committed Jun 30, 2022
1 parent d3f77f4 commit 886a8a1
Show file tree
Hide file tree
Showing 5 changed files with 290 additions and 288 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use strict";
// Import addon wothout bindings package
// Import addon without 'bindings' package
// let addon = require("./build/Release/napi-addon-fdtd.node");
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
Expand Down
33 changes: 0 additions & 33 deletions dist/test-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ var test1D = function () {
data = index_1.default.getData1D(condition, reload, materialVector, materialVector.length, eps, mu, sigma, srcPosition);
}
console.log(data);
// fs.writeFileSync(
// path.resolve(__dirname, "tmp.txt"),
// JSON.stringify(data.dataHy),
// // @ts-ignore
// function (err) {
// if (err) {
// return console.log(err);
// }
// console.log("The file was saved!");
// }
// ); // Orfs.writeFileSync('/tmp/test-sync', 'Hey there!');
};
var test2D = function () {
var condition = [1, 10];
Expand All @@ -46,33 +35,11 @@ var test2D = function () {
data = index_1.default.getData2D(condition, reload, materialMatrix, matrixSize, eps, mu, sigma, returnDataNumber, srcPosition);
}
console.log(data);
// fs.writeFileSync(
// path.resolve(__dirname, "tmp.txt"),
// JSON.stringify(data.dataY),
// // @ts-ignore
// function (err) {
// if (err) {
// return console.log(err);
// }
// console.log("The file was saved!");
// }
// ); // Orfs.writeFileSync('/tmp/test-sync', 'Hey there!');
};
function testMemoryUsage() {
// const arr = [1, 2, 3, 4, 5, 6, 9, 7, 8, 9, 10];
// const arr = Array(1e7).fill(1e3);
// arr.reverse();
var used = process.memoryUsage().heapUsed / 1024 / 1024;
console.log("The script uses approximately ".concat(Math.round(used * 100) / 100, " MB"));
}
// test1D();
test2D();
// testMemoryUsage();
// void printArray(std::array<double> &arr)
// {
// for(double& e : arr)
// {
// std::cout << e << " ";
// }
// std::cout << std::endl;
// }
1 change: 0 additions & 1 deletion dist/tmp.txt

This file was deleted.

2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Import addon wothout bindings package
// Import addon without 'bindings' package
// let addon = require("./build/Release/napi-addon-fdtd.node");

import bindings from 'bindings';
Expand Down
Loading

0 comments on commit 886a8a1

Please sign in to comment.