All Projects → ThomasThelen → Finite-Difference-Method

ThomasThelen / Finite-Difference-Method

Licence: MIT license
A Finite Difference Method Engine in C++

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to Finite-Difference-Method

numerics
library of numerical methods using Armadillo
Stars: ✭ 17 (+13.33%)
Mutual labels:  partial-differential-equations, finite-difference, numerical-methods, numerical-integration
NM
Numerical Methods (NM) for BE Electrical II Year / II Part, Email: [email protected]
Stars: ✭ 13 (-13.33%)
Mutual labels:  partial-differential-equations, numerical-methods, numerical-integration
Cpp-Examples
Numerical C++ examples.
Stars: ✭ 38 (+153.33%)
Mutual labels:  numerical-methods, numerical-computation
NumDiff
Modern Fortran Numerical Differentiation Library
Stars: ✭ 48 (+220%)
Mutual labels:  numerical-methods, finite-differences
CFD
Basic Computational Fluid Dynamics (CFD) schemes implemented in FORTRAN using Finite-Volume and Finite-Difference Methods. Sample simulations and figures are provided.
Stars: ✭ 89 (+493.33%)
Mutual labels:  finite-difference, heat-transfer
pydens
PyDEns is a framework for solving Ordinary and Partial Differential Equations (ODEs & PDEs) using neural networks
Stars: ✭ 201 (+1240%)
Mutual labels:  partial-differential-equations, numerical-methods
DECAGT
Discretizations of Exterior Calculus for Analysis, Geometry and Topology
Stars: ✭ 14 (-6.67%)
Mutual labels:  partial-differential-equations, numerical-methods
Tf Quant Finance
High-performance TensorFlow library for quantitative finance.
Stars: ✭ 2,925 (+19400%)
Mutual labels:  numerical-methods, numerical-integration
cmna-pkg
Computational Methods for Numerical Analysis
Stars: ✭ 13 (-13.33%)
Mutual labels:  partial-differential-equations, heat-equation
QuantPDE
A high-performance, open-source, header-only C++(>=11) library for pricing derivatives.
Stars: ✭ 42 (+180%)
Mutual labels:  partial-differential-equations, numerical-methods
FinEtools.jl
Finite Element tools in Julia
Stars: ✭ 126 (+740%)
Mutual labels:  partial-differential-equations, numerical-methods
hiperc
High Performance Computing Strategies for Boundary Value Problems
Stars: ✭ 36 (+140%)
Mutual labels:  finite-difference, diffusion-equation
tr29124 test
C++ special math functions
Stars: ✭ 16 (+6.67%)
Mutual labels:  numerical-methods
MongeAmpere
Solve large instance of semi-discrete optimal transport problems and other Monge-Ampere equations
Stars: ✭ 18 (+20%)
Mutual labels:  numerical-methods
ufl
UFL - Unified Form Language
Stars: ✭ 51 (+240%)
Mutual labels:  partial-differential-equations
GridapGeosciences.jl
Gridap drivers for geoscience applications
Stars: ✭ 28 (+86.67%)
Mutual labels:  numerical-methods
PSyclone
Domain-specific compiler for Finite Difference/Volume/Element Earth-system models in Fortran
Stars: ✭ 67 (+346.67%)
Mutual labels:  finite-difference
scilab
Open source, cross-platform numerical computational package and a high-level, numerically oriented programming language.
Stars: ✭ 52 (+246.67%)
Mutual labels:  numerical-computation
qmc
A Quasi-Monte-Carlo Integrator Library with CUDA Support
Stars: ✭ 17 (+13.33%)
Mutual labels:  numerical
mole
Mimetic Operators Library Enhanced
Stars: ✭ 15 (+0%)
Mutual labels:  numerical-methods

alt text

The project has reached a stable, usable state and is being actively developed. license CodeFactor

FDM

FDM is a C++ source library that exposes an engine for running the method of Finite Elements across one dimension. This is mostly a personal exploration of The Finite Difference Method, CUDA, and Python Bindings.

Using

To use the engine, git clone the repository and include the required headers in your source file. Examples are given in the examples directory.

Building

To build, run cmake .. and cmake --build . from the build/ directory.

Source

The project has a few directories to separate various parts of the project, detailed below

  • build/: Contains the build output
  • examples: Examples of how the library can be used
  • src: The source code for the engine

Overview

The Mesh struct manages information about the object being simulated over. There's an associated Mesh class for each dimension. For example, one dimensional simulations should use 1DMesh.

Mesh

The Engine class parses information from associated mesh and is responsible for encapsulating the routines for the Finite Difference Method.

Engine

Creating Simulations

A successful simulation will have both a Mesh and an Engine class instantiated.

The mesh must have the following defined,

mesh.spatial_length = 10;
mesh.spatial_step_size = 1;
mesh.thermal_conductivity = 0.01;
mesh.DirchletBoundaryEquation = BC;
mesh.InitialDistribution = InitialRodDistribution;

The boundary condition must be a function with the signature

double BoundaryCondition(double x, int time)

For example,

double BoundaryCondition(double x, int time)
{
	return 15*x+t/2;
}

The initial distribution method provides an interface to defining the temperature along the object and must have a signature of

double TempDistribution(double position)

For example, a function that defines the temperature as a constant 50 between the boundary points...

double TempDistribution(double position) {
	return 10;
}

To run, call StartSimulation on the engine object and pass it the mesh object.

Engine engine;
engine.StartSimulation(int time_length, int time_step, Mesh1D& mesh);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].