Num. #1: Recalls on Numerical Methods for Linear Systems and Ordinary differential equations (ODEs) - CORRECTION

Size: px
Start display at page:

Download "Num. #1: Recalls on Numerical Methods for Linear Systems and Ordinary differential equations (ODEs) - CORRECTION"

Transcription

1 Num. #1: Recalls on Numerical Methods for Linear Systems and Ordinary differential equations (ODEs) - CORRECTION The programs are written with the SCILAB software. 1 Resolution of a linear system & Computation of the eigenvalues of a matrix For the exercise, the following functions are needed : LU decomposition : //Data n=20; A=2*eye(n,n)-diag(ones(n-1,1),1)-diag(ones(n-1,1),-1); U=A; L=eye(A); //LU decomposition with loops for k=1:n-1 p=u(k,k); if p==0 then disp( la matrice n admet pas de decomposition LU ); abort; for i=k+1:n L(i,k)=U(i,k)/p; for j=k+1:n, U(i,j)=U(i,j)-U(i,k)*U(k,j)/p; U(i,k)=0; // LU decomposition - Vectorial form for k=1:n-1 p=u(k,k); if p==0 then disp( la matrice n admet pas de decomposition LU ); abort; L(k+1:n,k)=U(k+1:n,k)/p; w=(k+1:n) ; U(w,w)=U(w,w)-U(w,k)*U(k,w)/p; U(w,k)=zeros(w); Gradient descent method with optimal step : // Data n=3; T. Goudon, M. Ribot 1/7 Analysis and Numerical Simulations for PDEs

2 A=[2,-1,0;-1,2,-1;0,-1,2]; b=[1;0;1]; x=zeros(n,1); epsilon=0.0001; erreur=1; iter=0; // Gradient descent method while erreur>epsilon, iter=iter+1; xold=x; d=a*x-b; rho=(d *d)/(d *A*d); x=x-rho*d; erreur=norm(x-xold); Conjugate gradient method : //Data n=3; A=[2,-1,0;-1,2,-1;0,-1,2]; b=[2;3;6]; //b=[1;0;1]; // Conjugate gradient method epsilon=0.0001; test=1;it=0; x=zeros(n,1); d=a*x-b; r=d; while (test>epsilon) it=it+1; rho=(r *d)/(d *A*d); x=x-rho*d; r2=r; r=a*x-b; test=norm(r)/norm(b); d=r+norm(r)^2*d/norm(r2)^2; Power method : // Data n=10; T. Goudon, M. Ribot 2/7 Analysis and Numerical Simulations for PDEs

3 A=2*diag(ones(1,n))-diag(ones(1,n-1),1)-diag(ones(1,n-1),-1); niter=200; x=zeros(n,1);x(1)=1; // Power method for i=1:niter, q=x/norm(x); x=a*q; vp(i)=x(1)/q(1); Inverse power method : // Data n=10; A=2*diag(ones(1,n))-diag(ones(1,n-1),1)-diag(ones(1,n-1),-1); niter=200; x=zeros(n,1);x(1)=1; // Inverse power method for i=1:niter, q=x/norm(x); x=a\q; vp(i)=1/(x(1)/q(1)); 2 Resolution of ordinary differential equations (ODEs) For the exercise, the following functions are needed Forward/Explicit Euler method : // T is the final time, dt the time step // uinit is the initial value, f is the function of the ODE function [u]=euler(t,dt,uinit,f) u(1)=uinit; u(i+1)=u(i)+dt*f(u(i)); T. Goudon, M. Ribot 3/7 Analysis and Numerical Simulations for PDEs

4 // Plot a graphic plot(time,u); Midpoint (or Runge-Kutta 2) method : function[u]=rk2(t,dt,uinit,f) u(1)=uinit; v=u(i)+dt*f(u(i))/2; u(i+1)=u(i)+dt*f(v); // Plot a graphic plot(time,u, r ); Forward/Explicit Euler method for a system : // T is the final time, dt the time step // uinit is the initial value, f is the function of the ODE // The output u is a matrix // Column n corresponds to a vector at a discrete time t^n function[u]=eulersystem(t,dt,uinit,f) u(:,1)=uinit; u(:,i+1)=u(:,i)+dt*f(u(:,i)); Midpoint (or Runge-Kutta 2) method for a system : T. Goudon, M. Ribot 4/7 Analysis and Numerical Simulations for PDEs

5 function[u]=rk2system(t,dt,uinit,f) u(:,1)=uinit; v=u(:,i)+dt*f(u(:,i))/2; u(:,i+1)=u(:,i)+dt*f(v); Exercise 1. Implement the resolution of the following equation : t u = 1 u 2 with u(0) = 0 (1) using the four methods presented above and a time step t = 0.1 until time T = 1. T=1; dt=0.1; f=inline( 1-x^2 ); uinit=0; Euler(T,dt,uinit,f) RK2(T,dt,uinit,f) 2. Remark that the exact solution of equation (1) can be computed exactly and is equal to : u(t) = t anh(t) = e2t 1 e 2t + 1. Enhance the convergence property of the methods by letting t go to 0. Compare the order of the four methods by plotting a graph in a log-log scale, which represents the evolution of L 2 error with respect to the time step t. clear; uinit=0; f=inline( 1-x^2 ); // Different time steps T=1; T. Goudon, M. Ribot 5/7 Analysis and Numerical Simulations for PDEs

6 TimeStep=[0.1, 0.05, 0.01, 0.005, 0.001, , ]; for k=1:length(timestep), dt=timestep(k); // Exact solution uexact=(exp(2*time)-ones(size(time)))./(exp(2*time)+ones(size(time))); // Approximated solutions ueuler=euler(t,dt,uinit,f); urk2=rk2(t,dt,uinit,f); // errors between exact and approximated solutions ErrorEuler(k)=sqrt(dt)*norm(uexact-uEuler); ErrorRK2(k)=sqrt(dt)*norm(uexact-uRK2); // Clear the figure clf; // Graph of the errors loglog(timestep,erroreuler) hold on; loglog(timestep,errorrk2, g ) // Leg for the graph leg( Euler, RK2 ); 3. Implement the resolution of the following system of equations, called the Lorenz system using the two first methods presented above. The parameters will be : (x 0, y 0, z 0 ) = (1,1,1), T = 30 and t = t x = 10(y x) t y = x(28 z) y t z = x y 8 3 z (2) clear; T=30; dt=0.001; for a system xinit=1;yinit=1;zinit=1; uinit=[xinit;yinit;zinit]; // Function for a system f=inline( [10*(u(2)-u(1));u(1)*(28-u(3))-u(2);u(1)*u(2)-8*u(3)/3], u ); u=eulersystem(t,dt,uinit,f); // RK2System(T,dt,uinit,f); // Plot a graphic T. Goudon, M. Ribot 6/7 Analysis and Numerical Simulations for PDEs

7 clf; plot3(u(1,:),u(2,:),u(3,:)) T. Goudon, M. Ribot 7/7 Analysis and Numerical Simulations for PDEs

Num. #2: Hyperbolic PDE equation : transport equation - Correction

Num. #2: Hyperbolic PDE equation : transport equation - Correction Num. #2: Hyperbolic PDE equation : transport equation - Correction The programs are written with the MATLAB software. For the exercise, the following functions are needed Upwind method : % T is the final

More information

ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab

ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab ChE 400: Applied Chemical Engineering Calculations Tutorial 6: Numerical Solution of ODE Using Excel and Matlab Tutorial 6: Numerical Solution of ODE Gerardine G. Botte This handout contains information

More information

Chemical Engineering 541

Chemical Engineering 541 Chemical Engineering 541 Computer Aided Design Methods Direct Solution of Linear Systems 1 Outline 2 Gauss Elimination Pivoting Scaling Cost LU Decomposition Thomas Algorithm (Iterative Improvement) Overview

More information

CE890 / ENE801 Lecture 1 Introduction to MATLAB

CE890 / ENE801 Lecture 1 Introduction to MATLAB CE890 / ENE801 Lecture 1 Introduction to MATLAB CE890: Course Objectives Become familiar with a powerful tool for computations and visualization (MATLAB) Promote problem-solving skills using computers

More information

Discontinuous Galerkin Sparse Grid method for Maxwell s equations

Discontinuous Galerkin Sparse Grid method for Maxwell s equations Discontinuous Galerkin Sparse Grid method for Maxwell s equations Student: Tianyang Wang Mentor: Dr. Lin Mu, Dr. David L.Green, Dr. Ed D Azevedo, Dr. Kwai Wong Motivation u We consider the Maxwell s equations,

More information

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits Solving ODEs General Stuff ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits need workhorse solvers to deal

More information

Homework Set 5 (Sections )

Homework Set 5 (Sections ) Homework Set 5 (Sections.4-.6) 1. Consider the initial value problem (IVP): = 8xx yy, yy(1) = 3 a. Do 10 steps of Euler s Method, using a step size of 0.1. Write the details in the table below. Work to

More information

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg

Simulation in Computer Graphics. Particles. Matthias Teschner. Computer Science Department University of Freiburg Simulation in Computer Graphics Particles Matthias Teschner Computer Science Department University of Freiburg Outline introduction particle motion finite differences system of first order ODEs second

More information

Module1: Numerical Solution of Ordinary Differential Equations. Lecture 6. Higher order Runge Kutta Methods

Module1: Numerical Solution of Ordinary Differential Equations. Lecture 6. Higher order Runge Kutta Methods Module1: Numerical Solution of Ordinary Differential Equations Lecture 6 Higher order Runge Kutta Methods Keywords: higher order methods, functional evaluations, accuracy Higher order Runge Kutta Methods

More information

Data-Driven Modeling. Scientific Computation J. NATHAN KUTZ OXPORD. Methods for Complex Systems & Big Data

Data-Driven Modeling. Scientific Computation J. NATHAN KUTZ OXPORD. Methods for Complex Systems & Big Data Data-Driven Modeling & Scientific Computation Methods for Complex Systems & Big Data J. NATHAN KUTZ Department ofapplied Mathematics University of Washington OXPORD UNIVERSITY PRESS Contents Prolegomenon

More information

Finite difference methods

Finite difference methods Finite difference methods Siltanen/Railo/Kaarnioja Spring 8 Applications of matrix computations Applications of matrix computations Finite difference methods Spring 8 / Introduction Finite difference methods

More information

Jason Yalim. Here we perform a few tasks to ensure a clean working environment for our script.

Jason Yalim. Here we perform a few tasks to ensure a clean working environment for our script. Table of Contents Initialization... 1 Part One -- Computation... 1 Part Two -- Plotting... 5 Part Three -- Plotting Incorrectly... 7 Part Four -- Showing Output Adjacent to Code... 8 Part Five -- Creating

More information

CS205b/CME306. Lecture 9

CS205b/CME306. Lecture 9 CS205b/CME306 Lecture 9 1 Convection Supplementary Reading: Osher and Fedkiw, Sections 3.3 and 3.5; Leveque, Sections 6.7, 8.3, 10.2, 10.4. For a reference on Newton polynomial interpolation via divided

More information

Contents. I Basics 1. Copyright by SIAM. Unauthorized reproduction of this article is prohibited.

Contents. I Basics 1. Copyright by SIAM. Unauthorized reproduction of this article is prohibited. page v Preface xiii I Basics 1 1 Optimization Models 3 1.1 Introduction... 3 1.2 Optimization: An Informal Introduction... 4 1.3 Linear Equations... 7 1.4 Linear Optimization... 10 Exercises... 12 1.5

More information

Mathematics for chemical engineers

Mathematics for chemical engineers Mathematics for chemical engineers Drahoslava Janovská Department of mathematics Winter semester 2013-2014 Numerical solution of ordinary differential equations Initial value problem Outline 1 Introduction

More information

2.29 Numerical Marine Hydrodynamics Spring 2007

2.29 Numerical Marine Hydrodynamics Spring 2007 Numerical Marine Hydrodynamics Spring 2007 Course Staff: Instructor: Prof. Henrik Schmidt OCW Web Site: http://ocw.mit.edu/ocwweb/mechanical- Engineering/2-29Spring-2003/CourseHome/index.htm Units: (3-0-9)

More information

1/8/08 5:28 PM \\eng\files\numerical Methods\simulatio...\mtl_ode_sim_RK2ndconv.m 1 of 5

1/8/08 5:28 PM \\eng\files\numerical Methods\simulatio...\mtl_ode_sim_RK2ndconv.m 1 of 5 1/8/08 5:28 PM \\eng\files\numerical Methods\simulatio...\mtl_ode_sim_RK2ndconv.m 1 of 5 clc clf clear all ********************************************************************** INPUTS Click the run button

More information

INTRODUCTION TO LINEAR AND NONLINEAR PROGRAMMING

INTRODUCTION TO LINEAR AND NONLINEAR PROGRAMMING INTRODUCTION TO LINEAR AND NONLINEAR PROGRAMMING DAVID G. LUENBERGER Stanford University TT ADDISON-WESLEY PUBLISHING COMPANY Reading, Massachusetts Menlo Park, California London Don Mills, Ontario CONTENTS

More information

over The idea is to construct an algorithm to solve the IVP ODE (8.1)

over The idea is to construct an algorithm to solve the IVP ODE (8.1) Runge- Ku(a Methods Review of Heun s Method (Deriva:on from Integra:on) The idea is to construct an algorithm to solve the IVP ODE (8.1) over To obtain the solution point we can use the fundamental theorem

More information

Solving systems of nonlinear equations with arbitrary precision

Solving systems of nonlinear equations with arbitrary precision Solving systems of nonlinear equations with arbitrary precision CES Seminar January 2017 Presented by Supervisor Gregor Heiming Dr. Ralf Hannemann-Tamás Systemverfahrenstechnik AVT, RWTH Aachen University

More information

Mass-Spring Systems. Last Time?

Mass-Spring Systems. Last Time? Mass-Spring Systems Last Time? Implicit Surfaces & Marching Cubes/Tetras Collision Detection & Conservative Bounding Regions Spatial Acceleration Data Structures Octree, k-d tree, BSF tree 1 Today Particle

More information

37 Self-Assessment. 38 Two-stage Runge-Kutta Methods. Chapter 10 Runge Kutta Methods

37 Self-Assessment. 38 Two-stage Runge-Kutta Methods. Chapter 10 Runge Kutta Methods Chapter 10 Runge Kutta Methods In the previous lectures, we have concentrated on multi-step methods. However, another powerful set of methods are known as multi-stage methods. Perhaps the best known of

More information

CS 6210 Fall 2016 Bei Wang. Review Lecture What have we learnt in Scientific Computing?

CS 6210 Fall 2016 Bei Wang. Review Lecture What have we learnt in Scientific Computing? CS 6210 Fall 2016 Bei Wang Review Lecture What have we learnt in Scientific Computing? Let s recall the scientific computing pipeline observed phenomenon mathematical model discretization solution algorithm

More information

MATH2071: LAB 2: Explicit ODE methods

MATH2071: LAB 2: Explicit ODE methods MATH2071: LAB 2: Explicit ODE methods 1 Introduction Introduction Exercise 1 Euler s method review Exercise 2 The Euler Halfstep (RK2) Method Exercise 3 Runge-Kutta Methods Exercise 4 The Midpoint Method

More information

Introduction to Optimization Problems and Methods

Introduction to Optimization Problems and Methods Introduction to Optimization Problems and Methods wjch@umich.edu December 10, 2009 Outline 1 Linear Optimization Problem Simplex Method 2 3 Cutting Plane Method 4 Discrete Dynamic Programming Problem Simplex

More information

The Jello Cube Assignment 1, CSCI 520. Jernej Barbic, USC

The Jello Cube Assignment 1, CSCI 520. Jernej Barbic, USC The Jello Cube Assignment 1, CSCI 520 Jernej Barbic, USC 1 The jello cube Undeformed cube Deformed cube The jello cube is elastic, Can be bent, stretched, squeezed,, Without external forces, it eventually

More information

Workpackage 5 - Ordinary Differential Equations

Workpackage 5 - Ordinary Differential Equations Mathematics for I Workpackage 5 - Ordinary Differential Equations Introduction During this laboratory you will be introduced to some of Matlab s facilities for solving ordinary differential equations (ode).

More information

Application 7.6A The Runge-Kutta Method for 2-Dimensional Systems

Application 7.6A The Runge-Kutta Method for 2-Dimensional Systems Application 7.6A The Runge-Kutta Method for -Dimensional Systems Figure 7.6. in the text lists TI-85 and BASIC versions of the program RKDIM that implements the Runge-Kutta iteration k (,, ) = f tn xn

More information

Ordinary Differential Equations

Ordinary Differential Equations Next: Partial Differential Equations Up: Numerical Analysis for Chemical Previous: Numerical Differentiation and Integration Subsections Runge-Kutta Methods Euler's Method Improvement of Euler's Method

More information

Thursday 1/8 1 * syllabus, Introduction * preview reading assgt., chapter 1 (modeling) * HW review chapters 1, 2, & 3

Thursday 1/8 1 * syllabus, Introduction * preview reading assgt., chapter 1 (modeling) * HW review chapters 1, 2, & 3 Topics and Syllabus Class # Text Reading I. NUMERICAL ANALYSIS CHAPRA AND CANALE A. INTRODUCTION AND MATLAB REVIEW :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::Week

More information

Approximate Solutions to Differential Equations Slope Fields (graphical) and Euler s Method (numeric) by Dave Slomer

Approximate Solutions to Differential Equations Slope Fields (graphical) and Euler s Method (numeric) by Dave Slomer Approximate Solutions to Differential Equations Slope Fields (graphical) and Euler s Method (numeric) by Dave Slomer Leonhard Euler was a great Swiss mathematician. The base of the natural logarithm function,

More information

Performance Evaluation of Multiple and Mixed Precision Iterative Refinement Method and its Application to High-Order Implicit Runge-Kutta Method

Performance Evaluation of Multiple and Mixed Precision Iterative Refinement Method and its Application to High-Order Implicit Runge-Kutta Method Performance Evaluation of Multiple and Mixed Precision Iterative Refinement Method and its Application to High-Order Implicit Runge-Kutta Method Tomonori Kouya Shizuoa Institute of Science and Technology,

More information

Lecture 1: Introduction to Scilab

Lecture 1: Introduction to Scilab Lecture 1: Introduction to Scilab Ahmed Kebaier kebaier@math.univ-paris13.fr HEC, Paris Outline 1 First Steps with Scilab 2 Outline 1 First Steps with Scilab 2 After launching Scilab, you can test the

More information

Physics Tutorial 2: Numerical Integration Methods

Physics Tutorial 2: Numerical Integration Methods Physics Tutorial 2: Numerical Integration Methods Summary The concept of numerically solving differential equations is explained, and applied to real time gaming simulation. Some objects are moved in a

More information

GPUs and Einstein s Equations

GPUs and Einstein s Equations GPUs and Einstein s Equations Tim Dewey Advisor: Dr. Manuel Tiglio AMSC Scientific Computing University of Maryland May 5, 2011 Outline 1 Project Summary 2 Evolving Einstein s Equations 3 Implementation

More information

Parallel Implementations of Gaussian Elimination

Parallel Implementations of Gaussian Elimination s of Western Michigan University vasilije.perovic@wmich.edu January 27, 2012 CS 6260: in Parallel Linear systems of equations General form of a linear system of equations is given by a 11 x 1 + + a 1n

More information

Probabilistic Graphical Models

Probabilistic Graphical Models School of Computer Science Probabilistic Graphical Models Theory of Variational Inference: Inner and Outer Approximation Eric Xing Lecture 14, February 29, 2016 Reading: W & J Book Chapters Eric Xing @

More information

The jello cube. Undeformed cube. Deformed cube

The jello cube. Undeformed cube. Deformed cube The Jello Cube Assignment 1, CSCI 520 Jernej Barbic, USC Undeformed cube The jello cube Deformed cube The jello cube is elastic, Can be bent, stretched, squeezed,, Without external forces, it eventually

More information

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations)

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) MATLAB sessions: Laboratory 3 1 MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) In this session we look at basic numerical methods to help us understand

More information

Building More Efficient Time Parallel Solvers with Applications to Multiscale Modeling and Gyrokinetics

Building More Efficient Time Parallel Solvers with Applications to Multiscale Modeling and Gyrokinetics Building More Efficient Time Parallel Solvers with Applications to Multiscale Modeling and Gyrokinetics January 2015 Carl D Lederman AFTC/PA clearance No. 15008, 16 January 2014 1 The Differential Equation

More information

Math 225 Scientific Computing II Outline of Lectures

Math 225 Scientific Computing II Outline of Lectures Math 225 Scientific Computing II Outline of Lectures Spring Semester 2003 I. Interpolating polynomials Lagrange formulation of interpolating polynomial Uniqueness of interpolating polynomial of degree

More information

Variational Methods II

Variational Methods II Mathematical Foundations of Computer Graphics and Vision Variational Methods II Luca Ballan Institute of Visual Computing Last Lecture If we have a topological vector space with an inner product and functionals

More information

Documentation. David Grellscheid

Documentation. David Grellscheid Documentation David Grellscheid 2015-04-22 Documentation is communication Need to consider all levels, they have different audiences: Code annotations: formatting, comments Structure-level documentation

More information

Solving Systems of Equations Using Matrices With the TI-83 or TI-84

Solving Systems of Equations Using Matrices With the TI-83 or TI-84 Solving Systems of Equations Using Matrices With the TI-83 or TI-84 Dimensions of a matrix: The dimensions of a matrix are the number of rows by the number of columns in the matrix. rows x columns *rows

More information

David G. Luenberger Yinyu Ye. Linear and Nonlinear. Programming. Fourth Edition. ö Springer

David G. Luenberger Yinyu Ye. Linear and Nonlinear. Programming. Fourth Edition. ö Springer David G. Luenberger Yinyu Ye Linear and Nonlinear Programming Fourth Edition ö Springer Contents 1 Introduction 1 1.1 Optimization 1 1.2 Types of Problems 2 1.3 Size of Problems 5 1.4 Iterative Algorithms

More information

4 Visualization and. Approximation

4 Visualization and. Approximation 4 Visualization and Approximation b A slope field for the differential equation y tan(x + y) tan(x) tan(y). It is not always possible to write down an explicit formula for the solution to a differential

More information

over The idea is to construct an algorithm to solve the IVP ODE (9.1)

over The idea is to construct an algorithm to solve the IVP ODE (9.1) Runge- Ku(a Methods Review of Heun s Method (Deriva:on from Integra:on) The idea is to construct an algorithm to solve the IVP ODE (9.1) over To obtain the solution point we can use the fundamental theorem

More information

LAB #8 Numerical Methods

LAB #8 Numerical Methods LAB #8 Numerical Methods Goal: The purpose of this lab is to explain how computers numerically approximate solutions to differential equations. Required tools: Matlab routine dfield ; numerical routines

More information

MBI REU Matlab Tutorial

MBI REU Matlab Tutorial MBI REU Matlab Tutorial Lecturer: Reginald L. McGee II, Ph.D. June 8, 2017 MATLAB MATrix LABoratory MATLAB is a tool for numerical computation and visualization which allows Real & Complex Arithmetics

More information

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science

Computational Methods CMSC/AMSC/MAPL 460. Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Computational Methods CMSC/AMSC/MAPL 460 Vectors, Matrices, Linear Systems, LU Decomposition, Ramani Duraiswami, Dept. of Computer Science Zero elements of first column below 1 st row multiplying 1 st

More information

Replacing Neural Networks with Black-Box ODE Solvers

Replacing Neural Networks with Black-Box ODE Solvers Replacing Neural Networks with Black-Box ODE Solvers Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, David Duvenaud University of Toronto, Vector Institute Resnets are Euler integrators Middle layers

More information

Advanced Programming in Engineering Saurabh Srivastava, Thomas Weinhart Martin Robinson, and Stefan Luding MSM, CTW, UTwente, NL

Advanced Programming in Engineering Saurabh Srivastava, Thomas Weinhart Martin Robinson, and Stefan Luding MSM, CTW, UTwente, NL Advanced Programming in Engineering 2011-19115850 Saurabh Srivastava, Thomas Weinhart Martin Robinson, and Stefan Luding MSM, CTW, UTwente, NL Contents Why is this class important for me? What will I learn

More information

Euler s Methods (a family of Runge- Ku9a methods)

Euler s Methods (a family of Runge- Ku9a methods) Euler s Methods (a family of Runge- Ku9a methods) ODE IVP An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable: The equation is coupled with an

More information

Modelling and Simulation for Engineers

Modelling and Simulation for Engineers Unit T7: Modelling and Simulation for Engineers Unit code: F/503/7343 QCF level: 6 Credit value: 15 Aim This unit gives learners the opportunity to develop their understanding of Ordinary Differential

More information

Contents Computing with Formulas

Contents Computing with Formulas Contents 1 Computing with Formulas... 1 1.1 The First Programming Encounter: a Formula... 1 1.1.1 Using a Program as a Calculator... 2 1.1.2 About Programs and Programming... 2 1.1.3 Tools for Writing

More information

Exercises for a Numerical Methods Course

Exercises for a Numerical Methods Course Exercises for a Numerical Methods Course Brian Heinold Department of Mathematics and Computer Science Mount St. Mary s University November 18, 2017 1 / 73 About the class Mix of Math and CS students, mostly

More information

(Part - 1) P. Sam Johnson. April 14, Numerical Solution of. Ordinary Differential Equations. (Part - 1) Sam Johnson. NIT Karnataka.

(Part - 1) P. Sam Johnson. April 14, Numerical Solution of. Ordinary Differential Equations. (Part - 1) Sam Johnson. NIT Karnataka. P. April 14, 2015 1/51 Overview We discuss the following important methods of solving ordinary differential equations of first / second order. Picard s method of successive approximations (Method of successive

More information

Numerical Methods for Solving the Vorticity-Stream function Equations ME535 Final Project Frank Bremer June 5, 2008

Numerical Methods for Solving the Vorticity-Stream function Equations ME535 Final Project Frank Bremer June 5, 2008 Numerical Methods for Solving the Vorticity-Stream function Equations ME535 Final Project Frank Bremer June 5, 2008 Abstract A commonly used atmospheric model involves the vorticity and stream functions.

More information

THE IMPLICIT CLOSEST POINT METHOD FOR THE NUMERICAL SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS ON SURFACES

THE IMPLICIT CLOSEST POINT METHOD FOR THE NUMERICAL SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS ON SURFACES THE IMPLICIT CLOSEST POINT METHOD FOR THE NUMERICAL SOLUTION OF PARTIAL DIFFERENTIAL EQUATIONS ON SURFACES COLIN B. MACDONALD AND STEVEN J. RUUTH Abstract. Many applications in the natural and applied

More information

ODE IVP. An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable:

ODE IVP. An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable: Euler s Methods ODE IVP An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable: The equation is coupled with an initial value/condition (i.e., value

More information

Communications in Applied Mathematics and Computational Science

Communications in Applied Mathematics and Computational Science Communications in Applied Mathematics and Computational Science A HYBRID PARAREAL SPECTRAL DEFERRED CORRECTIONS METHOD MICHAEL L. MINION vol. 5 no. 2 2010 mathematical sciences publishers COMM. APP. MATH.

More information

Final Report. Discontinuous Galerkin Compressible Euler Equation Solver. May 14, Andrey Andreyev. Adviser: Dr. James Baeder

Final Report. Discontinuous Galerkin Compressible Euler Equation Solver. May 14, Andrey Andreyev. Adviser: Dr. James Baeder Final Report Discontinuous Galerkin Compressible Euler Equation Solver May 14, 2013 Andrey Andreyev Adviser: Dr. James Baeder Abstract: In this work a Discontinuous Galerkin Method is developed for compressible

More information

Chemical Reaction Engineering - Part 4 - Integration Richard K. Herz,

Chemical Reaction Engineering - Part 4 - Integration Richard K. Herz, Chemical Reaction Engineering - Part 4 - Integration Richard K. Herz, rherz@ucsd.edu, www.reactorlab.net Integrating the component balance for a batch reactor For a single reaction in a batch reactor,

More information

Data Visualization. Fall 2017

Data Visualization. Fall 2017 Data Visualization Fall 2017 Vector Fields Vector field v: D R n D is typically 2D planar surface or 2D surface embedded in 3D n = 2 fields tangent to 2D surface n = 3 volumetric fields When visualizing

More information

SECOND SEMESTER BCA : Syllabus Copy

SECOND SEMESTER BCA : Syllabus Copy BCA203T: DATA STRUCTURES SECOND SEMESTER BCA : Syllabus Copy Unit-I Introduction and Overview: Definition, Elementary data organization, Data Structures, data structures operations, Abstract data types,

More information

MPI OpenMP algorithms for the parallel space time solution of Time Dependent PDEs

MPI OpenMP algorithms for the parallel space time solution of Time Dependent PDEs MPI OpenMP algorithms for the parallel space time solution of Time Dependent PDEs Ronald D. Haynes 1 and Benjamin W. Ong 2 1 Introduction Modern high performance computers offer hundreds of thousands of

More information

All routines were built with VS2010 compiler, OpenMP 2.0 and TBB 3.0 libraries were used to implement parallel versions of programs.

All routines were built with VS2010 compiler, OpenMP 2.0 and TBB 3.0 libraries were used to implement parallel versions of programs. technologies for multi-core numeric computation In order to compare ConcRT, OpenMP and TBB technologies, we implemented a few algorithms from different areas of numeric computation and compared their performance

More information

Image Deconvolution.

Image Deconvolution. Image Deconvolution. Mathematics of Imaging. HW3 Jihwan Kim Abstract This homework is to implement image deconvolution methods, especially focused on a ExpectationMaximization(EM) algorithm. Most of this

More information

Model parametrization strategies for Newton-based acoustic full waveform

Model parametrization strategies for Newton-based acoustic full waveform Model parametrization strategies for Newton-based acoustic full waveform inversion Amsalu Y. Anagaw, University of Alberta, Edmonton, Canada, aanagaw@ualberta.ca Summary This paper studies the effects

More information

C3 Numerical methods

C3 Numerical methods Verulam School C3 Numerical methods 138 min 108 marks 1. (a) The diagram shows the curve y =. The region R, shaded in the diagram, is bounded by the curve and by the lines x = 1, x = 5 and y = 0. The region

More information

Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018

Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018 Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018 Welman, 1993 Inverse Kinematics and Geometric Constraints for Articulated Figure Manipulation, Chris

More information

Mid-Year Report. Discontinuous Galerkin Euler Equation Solver. Friday, December 14, Andrey Andreyev. Advisor: Dr.

Mid-Year Report. Discontinuous Galerkin Euler Equation Solver. Friday, December 14, Andrey Andreyev. Advisor: Dr. Mid-Year Report Discontinuous Galerkin Euler Equation Solver Friday, December 14, 2012 Andrey Andreyev Advisor: Dr. James Baeder Abstract: The focus of this effort is to produce a two dimensional inviscid,

More information

Solving for dynamic user equilibrium

Solving for dynamic user equilibrium Solving for dynamic user equilibrium CE 392D Overall DTA problem 1. Calculate route travel times 2. Find shortest paths 3. Adjust route choices toward equilibrium We can envision each of these steps as

More information

Convolution Neural Nets meet

Convolution Neural Nets meet Convolution Neural Nets meet PDE s Eldad Haber Lars Ruthotto SIAM CS&E 2017 Convolution Neural Networks (CNN) Meet PDE s Optimization Multiscale Example Future work CNN - A quick overview Neural Networks

More information

Math 1B03/1ZC3 - Tutorial 3. Jan. 24th/28th, 2014

Math 1B03/1ZC3 - Tutorial 3. Jan. 24th/28th, 2014 Math 1B03/1ZC3 - Tutorial 3 Jan. 24th/28th, 2014 Tutorial Info: Website: http://ms.mcmaster.ca/ dedieula. Math Help Centre: Wednesdays 2:30-5:30pm. Email: dedieula@math.mcmaster.ca. Elementary Matrices

More information

Addition/Subtraction flops. ... k k + 1, n (n k)(n k) (n k)(n + 1 k) n 1 n, n (1)(1) (1)(2)

Addition/Subtraction flops. ... k k + 1, n (n k)(n k) (n k)(n + 1 k) n 1 n, n (1)(1) (1)(2) 1 CHAPTER 10 101 The flop counts for LU decomposition can be determined in a similar fashion as was done for Gauss elimination The major difference is that the elimination is only implemented for the left-hand

More information

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB

MAT 275 Laboratory 2 Matrix Computations and Programming in MATLAB MATLAB sessions: Laboratory MAT 75 Laboratory Matrix Computations and Programming in MATLAB In this laboratory session we will learn how to. Create and manipulate matrices and vectors.. Write simple programs

More information

Iterative Methods for Solving Linear Problems

Iterative Methods for Solving Linear Problems Iterative Methods for Solving Linear Problems When problems become too large (too many data points, too many model parameters), SVD and related approaches become impractical. Iterative Methods for Solving

More information

6. Fast Fourier Transform

6. Fast Fourier Transform x[] X[] x[] x[] x[6] X[] X[] X[3] x[] x[5] x[3] x[7] 3 X[] X[5] X[6] X[7] A Historical Perspective The Cooley and Tukey Fast Fourier Transform (FFT) algorithm is a turning point to the computation of DFT

More information

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations)

MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) MAT 275 Laboratory 3 Numerical Solutions by Euler and Improved Euler Methods (scalar equations) In this session we look at basic numerical methods to help us understand the fundamentals of numerical approximations.

More information

Double Pendulum. Freddie Witherden. February 10, 2009

Double Pendulum. Freddie Witherden. February 10, 2009 Double Pendulum Freddie Witherden February 10, 2009 Abstract We report on the numerical modelling of a double pendulum using C++. The system was found to be very sensitive to both the initial starting

More information

MPI OpenMP algorithms for the parallel space time solution of Time Dependent PDEs

MPI OpenMP algorithms for the parallel space time solution of Time Dependent PDEs MPI OpenMP algorithms for the parallel space time solution of Time Dependent PDEs Ronald D. Haynes 1 and Benjamin Ong 2 1 Introduction Modern high performance computers offer hundreds of thousands of processors

More information

Skåne University Hospital Lund, Lund, Sweden 2 Deparment of Numerical Analysis, Centre for Mathematical Sciences, Lund University, Lund, Sweden

Skåne University Hospital Lund, Lund, Sweden 2 Deparment of Numerical Analysis, Centre for Mathematical Sciences, Lund University, Lund, Sweden Volume Tracking: A New Method for Visualization of Intracardiac Blood Flow from Three-Dimensional, Time-Resolved, Three-Component Magnetic Resonance Velocity Mapping Appendix: Theory and Numerical Implementation

More information

Advanced Techniques for Mobile Robotics Graph-based SLAM using Least Squares. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz

Advanced Techniques for Mobile Robotics Graph-based SLAM using Least Squares. Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz Advanced Techniques for Mobile Robotics Graph-based SLAM using Least Squares Wolfram Burgard, Cyrill Stachniss, Kai Arras, Maren Bennewitz SLAM Constraints connect the poses of the robot while it is moving

More information

Semester Final Report

Semester Final Report CSUMS SemesterFinalReport InLaTex AnnKimball 5/20/2009 ThisreportisageneralsummaryoftheaccumulationofknowledgethatIhavegatheredthroughoutthis semester. I was able to get a birds eye view of many different

More information

(Sparse) Linear Solvers

(Sparse) Linear Solvers (Sparse) Linear Solvers Ax = B Why? Many geometry processing applications boil down to: solve one or more linear systems Parameterization Editing Reconstruction Fairing Morphing 1 Don t you just invert

More information

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane. Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 16 Lecture 16 May 3, 2018 Numerical solution of systems

More information

Introduction to Matlab

Introduction to Matlab Introduction to Matlab Stefan Güttel September 22, 2017 Contents 1 Introduction 2 2 Matrices and Arrays 2 3 Expressions 3 4 Basic Linear Algebra commands 4 5 Graphics 5 6 Programming Scripts 6 7 Functions

More information

Study and implementation of computational methods for Differential Equations in heterogeneous systems. Asimina Vouronikoy - Eleni Zisiou

Study and implementation of computational methods for Differential Equations in heterogeneous systems. Asimina Vouronikoy - Eleni Zisiou Study and implementation of computational methods for Differential Equations in heterogeneous systems Asimina Vouronikoy - Eleni Zisiou Outline Introduction Review of related work Cyclic Reduction Algorithm

More information

QP-Collide: A New Approach to Collision Treatment

QP-Collide: A New Approach to Collision Treatment QP-Collide: A New Approach to Collision Treatment Laks Raghupathi François Faure Co-encadre par Marie-Paule CANI EVASION/GRAVIR INRIA Rhône-Alpes, Grenoble Teaser Video Classical Physical Simulation Advance

More information

Goals for This Lecture:

Goals for This Lecture: Goals for This Lecture: Understand why Euler s method sometimes gives inaccurate answers Develop some more accurate ODE integration methods Develop general purpose ODE codes Compare these methods on the

More information

Sparse Matrices. This means that for increasing problem size the matrices become sparse and sparser. O. Rheinbach, TU Bergakademie Freiberg

Sparse Matrices. This means that for increasing problem size the matrices become sparse and sparser. O. Rheinbach, TU Bergakademie Freiberg Sparse Matrices Many matrices in computing only contain a very small percentage of nonzeros. Such matrices are called sparse ( dünn besetzt ). Often, an upper bound on the number of nonzeros in a row can

More information

Linear Equation Systems Iterative Methods

Linear Equation Systems Iterative Methods Linear Equation Systems Iterative Methods Content Iterative Methods Jacobi Iterative Method Gauss Seidel Iterative Method Iterative Methods Iterative methods are those that produce a sequence of successive

More information

Exploring unstructured Poisson solvers for FDS

Exploring unstructured Poisson solvers for FDS Exploring unstructured Poisson solvers for FDS Dr. Susanne Kilian hhpberlin - Ingenieure für Brandschutz 10245 Berlin - Germany Agenda 1 Discretization of Poisson- Löser 2 Solvers for 3 Numerical Tests

More information

Uppsala University Department of Information technology. Hands-on 1: Ill-conditioning = x 2

Uppsala University Department of Information technology. Hands-on 1: Ill-conditioning = x 2 Uppsala University Department of Information technology Hands-on : Ill-conditioning Exercise (Ill-conditioned linear systems) Definition A system of linear equations is said to be ill-conditioned when

More information

Contents. Hilary Term. Summary of Numerical Analysis for this term. Sources of error in numerical calculation. Solving Problems

Contents. Hilary Term. Summary of Numerical Analysis for this term. Sources of error in numerical calculation. Solving Problems Contents Hilary Term 1 Root Finding 4 11 Bracketing and Bisection 5 111 Finding the root numerically 5 112 Pseudo BRACKET code 7 113 Drawbacks 8 114 Tips for success with Bracketing & Bisection 9 115 Virtues

More information

Homework Set #2-3, Math 475B

Homework Set #2-3, Math 475B Homework Set #2-3, Math 475B Part I: Matlab In the last semester you learned a number of essential features of MATLAB. 1. In this instance, you will learn to make 3D plots and contour plots of z = f(x,

More information

(Sparse) Linear Solvers

(Sparse) Linear Solvers (Sparse) Linear Solvers Ax = B Why? Many geometry processing applications boil down to: solve one or more linear systems Parameterization Editing Reconstruction Fairing Morphing 2 Don t you just invert

More information

1.7.1 Laplacian Smoothing

1.7.1 Laplacian Smoothing 1.7.1 Laplacian Smoothing 320491: Advanced Graphics - Chapter 1 434 Theory Minimize energy functional total curvature estimate by polynomial-fitting non-linear (very slow!) 320491: Advanced Graphics -

More information

MATLAB Premier. Asst. Prof. Dr. Melik DÖLEN. Middle East Technical University Department of Mechanical Engineering 10/30/04 ME 304 1

MATLAB Premier. Asst. Prof. Dr. Melik DÖLEN. Middle East Technical University Department of Mechanical Engineering 10/30/04 ME 304 1 MATLAB Premier Asst. Prof. Dr. Melik DÖLEN Middle East Technical University Department of Mechanical Engineering 0/0/04 ME 04 Outline! Introduction! Basic Features of MATLAB! Prompt Level and Basic Aritmetic

More information