Skip to content

Instantly share code, notes, and snippets.

View Corwinpro's full-sized avatar

Petr Kungurtsev Corwinpro

View GitHub Profile
@Corwinpro
Corwinpro / gist:8033807
Last active December 31, 2015 19:29
Теплопроводность из заданий методом Кранка-Николсона и неявным
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
/*
Общие вопросы по теплопроводности:
Декремент затухания и сравнить с аналитикой
Построив график в момент времени t=0 и t=1 сравним, во сколько раз он "упал" вниз. Получится около 8-9 раз. В соответствие с аналитическим
@Corwinpro
Corwinpro / gist:8033862
Created December 19, 2013 03:17
Явная схема теплопроводности
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
double t = 0.006;
double h = 0.1;
double a = 0.0;
@Corwinpro
Corwinpro / gist:8034159
Created December 19, 2013 03:53
Проект Теплопроводность
#define _CRT_SECURE_NO_DEPRECATE
#include "stdio.h"
#include "math.h"
#include <iostream>
using namespace std;
double t = 0.0001;
double h = 0.03;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Linq.Expressions;
using System.Diagnostics;
namespace SquareRoot
{
#include <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;
double curtime;
int size;
double eps = 1.0;
double k = 0.001;
double dt = 0.1;
#include <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;
int main()
{
FILE * file_n = fopen("file_n.txt","w");
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <complex> // std::complex, std::abs
#include <cstdlib>
#include <ctime>
using namespace std;
#include <mpi.h>
#include <cmath>
#include "laser_field.h"
#include "g_index.h"
#include "g_gas.h"
#include "conf.h"
#include "Paralleler/paral_parent.h"
#include "g_mesh.h"
#include "g_flow.h"
#include "g_unsteady.h"
@Corwinpro
Corwinpro / refr.cc
Last active December 9, 2015 10:14
Corrected phase refraction model
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <complex> // std::complex, std::abs
#include <cstdlib>
#include <ctime>
#include <string>
#include <sstream>