Skip to content

Instantly share code, notes, and snippets.

View Corwinpro's full-sized avatar

Petr Kungurtsev Corwinpro

View GitHub Profile
@Corwinpro
Corwinpro / Task9
Created November 1, 2013 04:17
Victim-predator
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include "conio.h"
#include <iostream>
int a = 10;
int b = 2;
int c = 2;
int d = 10;
@Corwinpro
Corwinpro / Task8
Last active December 27, 2015 11:49
Euler + Runge
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include "conio.h"
#include <iostream>
double step = 0.1;
double function(double t, double x)
{
@Corwinpro
Corwinpro / Task9
Created November 5, 2013 16:11
Runge4
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include "conio.h"
#include <iostream>
int a = 10;
int b = 2;
int c = 2;
int d = 10;
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
int a = 998;
int b = 1998;
int c = -999;
int d = -1999;
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <math.h>
#include <time.h>
#include <fftw3.h>
#define M_PI 3.1415926535897932384626433832795
double alph = 0.4;
@Corwinpro
Corwinpro / gist:7626869
Created November 24, 2013 12:42
Теплопроводность явная схема
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
double lambda = 1.0; //Коэффициент теплопроводности
double t = 0.006;
double h = 0.1;
@Corwinpro
Corwinpro / gist:7626890
Created November 24, 2013 12:45
Теплопроводность неявная + Кранк-николсон
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
/*
Общие вопросы по теплопроводности:
Устойчивость для явной схемы и показать развал
Декремент затухания и сравнить с аналитикой
@Corwinpro
Corwinpro / gist:7801727
Created December 5, 2013 08:00
Project_FINAL
#define _CRT_SECURE_NO_DEPRECATE
#include <stdio.h>
#include <conio.h>
#include <iostream>
#include <math.h>
#include <time.h>
#include <fftw3.h>
#define M_PI 3.1415926535897932384626433832795
double alph = 0.45;
@Corwinpro
Corwinpro / gist:7990486
Created December 16, 2013 17:08
Хопф (крутой)
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
double t = 0.001;
double h = 0.1;
@Corwinpro
Corwinpro / gist:8023743
Last active December 31, 2015 17:59
Hopf
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
double t = 0.0001;
double h = 0.1;