Skip to content

Instantly share code, notes, and snippets.

View Corwinpro's full-sized avatar

Petr Kungurtsev Corwinpro

View GitHub Profile
//Plot refreshing data on screen
set xrange [0:10]
set yrange [0.8e25:3.2e25]
unset autoscale
do for [i=1:4000] { plot sprintf('field_%d0.txt',i) u ($0/100):1 w lp pt 6; pause 0.05; set title sprintf('Time: %.1e',i*1.e-11)}
//Make video file
=====loop.plt=====
j = i*5 //need to make 1,2,3...-like png files
#ifndef LASER_FIELD_H
#define LASER_FIELD_H
#include "mytype.h"
#include "reader.h"
#include <cmath>
#include <complex> // std::complex, std::abs
class Laser
@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>
#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"
#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 <iostream>
#include <cmath>
#include <stdio.h>
using namespace std;
int main()
{
FILE * file_n = fopen("file_n.txt","w");
#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;
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
{
@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;
@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;