I recently programmed RK4 and RK45 in C. Its similar to ODE45 for matlab check it out!
Ignore the foundation header if you are using gcc.
http://code.google.com/p/tancospi/downloads/detail?name=RK.zip&can=2&q=#makechanges
Saturday, May 7, 2011
Runge Kutta C codes
Tuesday, February 22, 2011
Gauss Seidel for elliptical differential equations
I re-worked gaussian seidel method for elliptical differential equations and I optimized the code for openmp. Don't use my previous code this one works better and is much quicker.
http://tancospi.googlecode.com/files/E_diffeq.zip
Coming Soon multi-grid analysis which isn't much help when solving elliptical differential equations but the concept can be applied to CFD.
http://tancospi.googlecode.com/files/E_diffeq.zip
Coming Soon multi-grid analysis which isn't much help when solving elliptical differential equations but the concept can be applied to CFD.
Sunday, February 20, 2011
Programming VBA Import point and Spline for CATIA
CATIA like AUTOCAD is limited to circles, splines, and points etc but what makes CATIA most unique is it's VBA functionality. With VBA you can import points and create any geometry you want. There is however a program that already imports points and it does a rather good job of it too, but what this program is lacking is connecting these points.
My script imports the points and connects them all by a spline.
The code can be found here:
http://tancospi.googlecode.com/files/catia_spline_vba.txt
The format is a text file. Copy and paste contents into an empty module.
My script imports the points and connects them all by a spline.
The code can be found here:
http://tancospi.googlecode.com/files/catia_spline_vba.txt
The format is a text file. Copy and paste contents into an empty module.
Wednesday, February 16, 2011
Spline derivation and code
I have compiled a detailed report on how to derive a basic cubic spline along with the MATLAB code to generate it.
http://tancospi.googlecode.com/files/spline_derivation.pdf
http://tancospi.googlecode.com/files/spline_derivation.pdf
Sunday, February 13, 2011
Solving Elliptical Differential Equations
The follow document illustrates the procedure to solve a basic elliptical differential equation using SOR method.
Documentation
http://tancospi.googlecode.com/files/elliptic.pdf
C Program
http://tancospi.googlecode.com/files/elliptic.zip
Documentation
http://tancospi.googlecode.com/files/elliptic.pdf
C Program
http://tancospi.googlecode.com/files/elliptic.zip
Wednesday, January 19, 2011
LU Decomposition Part 2
This method uses a single array to represent an nxn matrix instead of a matrix. This should make the code more robust since C naturally reads arrays across columns. For example:
Code 1:
for j 1 to 10
for i 1 to 10
a[i][j] += 2;
end
end
Code 2:
for j 1 to 10
for i 1 to 10
a[j][i] += 2;
end
end
Code 1 wont be as fast as code 2 but in fortran the opposite is true.
Here's a link to my code.
Tuesday, January 18, 2011
LU Decomposition C Code
The goal of this project is to code the LU Decomposition in C. This simple program finds the L and U factorization of an NxN matrix.
Below are links to the documentation and code
Latex pdf
LU.c
Latex source
Below are links to the documentation and code
Latex pdf
LU.c
Latex source
Friday, January 14, 2011
First Post
The purpose of this blog is to keep track of all the projects I work on in my spare time. The general outline will be the problem whether that is an aerodynamics application, a numerical methods tool, excel macro, powerpoint macro or anything. The second is the documentation of the problem and solution which will be completed in as a PDF using LATEX. The Code will also be provided along with the latex script used to create the documentation.
Subscribe to:
Posts (Atom)