You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update README.md to include npm version badge
* Refactor solver imports
* chore: bump version to 0.1.3 and update description in package.json
- Updated version from 0.1.2 to 0.1.3
- Modified description for clarity
- Added contributor Felipe Ferrari to package.json
- Changed homepage URL to https://feascript.com/
- Updated version constant in src/index.js to 0.1.3
* Feature/frontal solver (#33)
* Refactor solver imports
* chore: bump version to 0.1.3 and update description in package.json
- Updated version from 0.1.2 to 0.1.3
- Modified description for clarity
- Added contributor Felipe Ferrari to package.json
- Changed homepage URL to https://feascript.com/
- Updated version constant in src/index.js to 0.1.3
* Enhance README and examples; add frontal solver implementation
- Updated README.md to include new sections on JavaScript API and Visual Editor, improving clarity on usage methods.
- Reorganized content for better navigation and added links to examples and tutorials.
- Modified example scripts to improve console output order for clarity.
- Introduced a new frontal solver script for 2D problems, implementing necessary mathematical functions and logic.
- Created a temporary HTML file to load the frontal solver script for testing purposes.
* Reorganize README structure; move "Ways to Use FEAScript" section for better clarity
* Refactor README and add support section; update usage instructions for Scribbler
* Refactor frontPropagationScript and solidHeatTransferScript to utilize new mesh utility functions; streamline mesh preparation and isoparametric mapping processes
* Add validation for geometry parameters in Mesh2D class; ensure required parameters are provided when not using a parsed mesh
* Update logging messages in mesh generation and utility scripts; change debug logs to error logs for unimplemented element type mapping and clarify function descriptions in documentation comments.
* Rename meshUtils.js to meshUtilsScript.js and update imports in solver scripts
* Refactor FEAScript and solver scripts to utilize prepared mesh data; remove helper function for system size calculation
* Refactor frontPropagationScript and solidHeatTransferScript to improve comment clarity; standardize residualVector and jacobianMatrix descriptions and replace meshData.elementOrder with elementOrder
* Refactor frontalSolverScript and update temporaryFrontalTest to use module imports; rename feaData to FEAData for consistency in frontPropagationScript and solidHeatTransferScript
* Refactor frontalSolverScript to utilize external assembly for heat transfer elements; update temporaryFrontalTest title and description for clarity.
* Update README.md to clarify JavaScript API section title and improve consistency in naming
* Update README.md to remove commented-out Liberapay badge for cleaner presentation
* Refactor FEAScript and related scripts to improve clarity and modularity; add plotting capabilities to temporaryFrontalTest and enhance logging messages.
* Update README.md to improve structure and consistency in the JavaScript API section
* Update README.md for improved clarity and consistency in language and structure
* Update README.md for formatting consistency; remove unused nodesCoordinates in newtonRaphsonScript.js and frontPropagationScript.js
* Add frontal solver integration and enhance solid heat transfer assembly
- Introduced frontal solver method in FEAScriptModel for improved solving capabilities.
- Added runFrontalSolver function to frontalSolverScript.js for result handling.
- Enhanced solidHeatTransferScript.js to support convection boundary conditions.
- Removed temporaryFrontalTest.html as it is no longer needed.
* Refactor LU solver implementation to use sparse matrix for improved performance
* Build new npm package
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+77-78Lines changed: 77 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,87 @@ Thank you for your interest in contributing! FEAScript is in early development,
4
4
5
5
## Contribution Guidelines
6
6
7
-
1.**Respect the existing coding style:** Observe the code near your intended changes and aim to preserve that style in your modifications.
8
-
9
-
2.**Recommended tools:**
7
+
1.**Development Tools:**
10
8
We recommend using [Visual Studio Code](https://code.visualstudio.com/) with the [Prettier plugin](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for automatic code formatting. Additionally, use a **110-character line width** to maintain consistent formatting.
11
9
12
-
3.**Naming conventions:**
10
+
2.**Coding Style:**
11
+
Observe the code near your intended changes and aim to preserve that style in your modifications.
12
+
13
+
3.**Variable Naming:**
13
14
Use [camelCase](https://en.wikipedia.org/wiki/Camel_case) formatting for variable names throughout the code.
14
15
15
-
4.**Testing changes locally:**
16
+
4.**File Naming:**
17
+
All JavaScript source files in FEAScript end with the suffix `Script` before the `.js` extension (e.g., `loggingScript.js`, `meshGenerationScript.js`, `newtonRaphsonScript.js`). This is an explicit, project‑level stylistic choice to:
18
+
19
+
- Visually distinguish internal FEAScript modules from third‑party or external library files.
20
+
- Keep historical and stylistic consistency across the codebase.
21
+
22
+
Exceptions:
23
+
24
+
- Public entry file: `index.js` (standard entry point convention).
25
+
- Core model file: `FEAScript.js` (matches the library name; appending "Script" would be redundant).
26
+
27
+
5.**File Structure:**
28
+
All files in the FEAScript-core codebase should follow this structure:
29
+
30
+
1.**Banner**: All files start with the FEAScript ASCII art banner.
- Instead, start your work in a feature branch based on the `dev` branch.
84
+
85
+
**If you are not a member of the repository (e.g., an external contributor), you must first [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo).** Make your changes in your fork, then submit a Pull Request from your fork's feature branch into the `dev` branch.
86
+
87
+
7.**Local Testing:**
16
88
Before submitting a pull request, test your modifications by running the FEAScript library from a local directory. For example, you can load the library in your HTML file as follows:
17
89
18
90
```javascript
@@ -26,76 +98,3 @@ Thank you for your interest in contributing! FEAScript is in early development,
26
98
```
27
99
28
100
where the server will be available at `http://127.0.0.1:8000/`. Static file server npm packages like [serve](https://github.com/vercel/serve#readme) and [Vite](https://vite.dev/) can also be used.
29
-
30
-
## Branching & Workflow
31
-
32
-
To contribute a new feature or fix:
33
-
34
-
- Do not commit directly to `main` or `dev`.
35
-
- Instead, start your work in a feature branch based on the `dev` branch.
36
-
37
-
**If you are not a member of the repository (e.g., an external contributor), you must first [fork the repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo).** Make your changes in your fork, then submit a Pull Request from your fork's feature branch into the`dev` branch.
38
-
39
-
## File Structure Guidelines
40
-
41
-
All files in the FEAScript-core codebase should follow this structure:
42
-
43
-
1.**Banner**: All files start with the FEAScript ASCII art banner.
All JavaScript source files in FEAScript end with the suffix `Script` before the `.js` extension (e.g., `loggingScript.js`, `meshGenerationScript.js`, `newtonRaphsonScript.js`). This is an explicit, project‑level stylistic choice to:
95
-
96
-
- Visually distinguish internal FEAScript modules from third‑party or external library files.
97
-
- Keep historical and stylistic consistency across the codebase.
98
-
99
-
Exceptions:
100
-
- Public entry file: `index.js` (standard entry point convention).
101
-
- Core model file: `FEAScript.js` (matches the library name; appending "Script" would be redundant).
[FEAScript](https://feascript.com/) is a lightweight finite element simulation library built in JavaScript. It empowers users to create and execute simulations for physics and engineering applications in both browser-based and server-side environments. This is the core library of FEAScript.
> 🚧 **FEAScript is currently under heavy development.** Functionality and interfaces may change rapidly as new features and enhancements are introduced. 🚧
9
+
[FEAScript](https://feascript.com/) is a lightweight finite element simulation library built in JavaScript. It empowers users to create and execute simulations for physics and engineering applications in both browser-based and server-side environments. This is the core library of the FEAScript project.
10
+
11
+
> 🚧 **FEAScript is currently under heavy development.** Its functionality and interfaces may change rapidly as new features and enhancements are introduced.
10
12
11
13
## Contents
12
14
13
-
-[Installation](#installation)
14
-
-[Example Usage](#example-usage)
15
-
-[FEAScript Platform](#feascript-platform)
16
-
-[Contribute](#contribute)
15
+
-[Ways to Use FEAScript](#ways-to-use-feascript)
16
+
-[JavaScript API (FEAScript Core)](#javascript-api-feascript-core)
17
+
-[Use FEAScript in the Browser](#use-feascript-in-the-browser)
18
+
-[Use FEAScript with Node.js](#use-feascript-with-nodejs)
19
+
-[Use FEAScript with Scribbler](#use-feascript-with-scribbler)
FEAScript offers two main approaches to creating simulations:
29
+
30
+
1.**[JavaScript API (FEAScript Core)](#javascript-api-feascript-core)** – For developers comfortable with coding, providing full programmatic control in browsers, Node.js, or interactive notebooks.
31
+
2.**[Visual Editor (FEAScript Platform)](#visual-editor-feascript-platform)** – For users who prefer a no-code approach, offering a block-based visual interface built with [Blockly](https://developers.google.com/blockly).
32
+
33
+
Each approach is explained in detail below.
20
34
21
-
FEAScript is entirely implemented in pure JavaScript and can run in two environments:
35
+
### JavaScript API (FEAScript Core)
22
36
23
-
1.**In the browser** with a simple HTML page, where all simulations are executed locally without any installations or using any cloud services.
24
-
2.**Via Node.js** with plain JavaScript files, for server-side simulations.
37
+
The JavaScript API is the core programmatic interface for FEAScript. Written entirely in pure JavaScript, it runs in three environments:
25
38
26
-
### Option 1: In the Browser
39
+
1.**[In the browser](#use-feascript-in-the-browser)** – Use FEAScript in a simple HTML page, running simulations locally without additional installations or cloud services.
40
+
2.**[With Node.js](#use-feascript-with-nodejs)** – Use FEAScript in server-side JavaScript applications or CLI tools.
41
+
3.**[With Scribbler](#use-feascript-with-scribbler)** – Use FEAScript in the [Scribbler](https://scribbler.live/) interactive JavaScript notebook environment.
42
+
43
+
#### Use FEAScript in the Browser
27
44
28
45
You can use FEAScript in browser environments in two ways:
You can download the latest stable release from [GitHub Releases](https://github.com/FEAScript/FEAScript-core/releases).
45
58
46
-
You can download the latest stable release from [GitHub Releases](https://github.com/FEAScript/FEAScript-core/releases). Explore various browser-based examples and use cases in our [website](https://feascript.com/#tutorials).
👉 Explore browser-based tutorials on our [website](https://feascript.com/#tutorials).
49
66
50
-
Install FEAScript and its peer dependencies from npm:
67
+
#### Use FEAScript with Node.js
68
+
69
+
Install FEAScript and its peer dependencies from npm as follows:
51
70
52
71
```bash
53
72
npm install feascript mathjs plotly.js
@@ -66,11 +85,31 @@ import { FEAScriptModel } from "feascript";
66
85
echo'{"type":"module"}'> package.json
67
86
```
68
87
69
-
When running examples from within this repository, this step is not needed as the root package.json already has the proper configuration. Explore various Node.js examples and use cases [here](https://github.com/FEAScript/FEAScript-core/tree/main/examples).
88
+
When running examples from within this repository, this step isn’t needed as the root package.json already has the proper configuration.
89
+
90
+
👉 Explore Node.js use cases on the [examples directory](https://github.com/FEAScript/FEAScript-core/tree/main/examples).
70
91
71
-
##Example Usage
92
+
#### Use FEAScript with Scribbler
72
93
73
-
This is an indicative example of FEAScript, shown for execution in the browser. Adapt paths, solver types, and boundary conditions as needed for your specific problem:
94
+
FEAScript also works well in interactive JavaScript notebook environments where you can write code, visualize results inline, and share your work with others. [Scribbler](https://scribbler.live/) is one such platform that comes with preloaded scientific libraries, making it an excellent choice for FEAScript simulations.
95
+
96
+
👉 Explore FEAScript notebook examples on the [Scribbler Hub](https://hub.scribbler.live/portfolio/#!nikoscham/FEAScript-Scribbler-examples).
97
+
98
+
### Visual Editor (FEAScript Platform)
99
+
100
+
For users who prefer a visual approach to creating simulations, we offer the [FEAScript Platform](https://platform.feascript.com/) - a browser-based visual editor built on the [Blockly](https://developers.google.com/blockly) library. This no-code interface allows you to:
101
+
102
+
- Build and run finite element simulations directly in your browser by connecting visual blocks together
103
+
- Create complex simulations without writing any JavaScript code
104
+
- Save and load projects in XML format for easy sharing and reuse
105
+
106
+
While FEAScript's JavaScript API offers full programmatic control for advanced customization, the FEAScript Platform provides an accessible entry point for users without coding experience.
107
+
108
+
👉 Explore FEAScript Platform examples on our [website](https://feascript.com/#tutorials).
109
+
110
+
## Quick Example
111
+
112
+
Here is a minimal browser-based example using the JavaScript API. Adapt paths, solver types, and boundary conditions as needed for your specific problem:
74
113
75
114
```html
76
115
<body>
@@ -79,41 +118,51 @@ This is an indicative example of FEAScript, shown for execution in the browser.
**Note:** The code above uses placeholder values that you should replace with appropriate options, e.g.:
107
150
108
-
For users who prefer a visual approach to creating simulations, we offer the [FEAScript platform](https://platform.feascript.com/) - a browser-based visual editor built on the [Blockly](https://developers.google.com/blockly) library. This no-code interface allows you to:
151
+
- "solverType" should be replaced with an actual solver type such as "solidHeatTransferScript" for heat conduction problems
152
+
- "conditionType" should be replaced with an actual boundary condition type such as "constantTemp"
153
+
- "boundaryIndex" should be replaced with a string identifying the boundary
109
154
110
-
- Build and run finite element simulations directly in your browser by connecting visual blocks
111
-
- Create complex simulations without writing any JavaScript code
112
-
- Save and load projects in XML format for easy sharing and reuse
155
+
## Support FEAScript
156
+
157
+
> 💖 **If you find FEAScript useful, please consider supporting its development through a donation:**
158
+
159
+
<ahref="https://liberapay.com/FEAScript/donate">
160
+
<imgalt="Donate using Liberapay"src="https://liberapay.com/assets/widgets/donate.svg">
161
+
</a>
113
162
114
-
While FEAScript's JavaScript API offers full programmatic control for advanced customization, the FEAScript platform provides an accessible entry point for users without coding experience.
163
+
Your support helps ensure the continued development and maintenance of this project.
115
164
116
-
## Contribute
165
+
## Contributing
117
166
118
167
We warmly welcome contributors to help expand and refine FEAScript. Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) file for detailed guidance on how to contribute.
0 commit comments