Deprecated: Constant E_STRICT is deprecated in /home/polpe/public_html/system/core/Exceptions.php on line 75

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 101

Backtrace:

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 127

Backtrace:

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$hooks is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$config is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$log is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$utf8 is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$uri is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$exceptions is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$router is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$output is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$security is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$input is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$lang is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$load is deprecated

Filename: core/Controller.php

Line Number: 78

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$parser is deprecated

Filename: core/Loader.php

Line Number: 1290

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 1290

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$MyModel is deprecated

Filename: core/Loader.php

Line Number: 353

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 15
Function: __construct

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 289

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 314

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 315

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: drivers/Session_files_driver.php

Line Number: 94

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 108

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Session cannot be started after headers have already been sent

Filename: Session/Session.php

Line Number: 141

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$session is deprecated

Filename: core/Loader.php

Line Number: 1290

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$benchmark is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$hooks is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$config is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$log is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$utf8 is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$uri is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$exceptions is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$router is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$output is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$security is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$input is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$lang is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$load is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$parser is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$MyModel is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$session is deprecated

Filename: core/Loader.php

Line Number: 925

Backtrace:

File: /home/polpe/public_html/application/controllers/Main.php
Line: 18
Function: view

File: /home/polpe/public_html/index.php
Line: 315
Function: require_once

Polcz Péter honlapja

Tartalomjegyzék

A Laplace egyenlet megoldása az egységnégyzeten belül

Teljes Matlab script kiegészítő függvényekkel.

File:   pde_Laplace_2D_v2_gyaktipusu.m
Author: Peter Polcz (ppolcz@gmail.com)
Created on 2016.12.07. Wednesday, 15:58:30 [inherited]
Created on 2017. November 30.

Négyzetes peremfeltételek mellett

Az $\Omega$ tartomány létrhozása. A polygon tömb a tartomány sarkait tartalmazza: első oszlop $x$, második oszlop $y$ koordináták. A harmadik oszlop pedig az abból a sarokpontból a következő sarokpontban induló él konstants peremfeltételét tartalmazza, vagyis a (0,1) pontból az (1,1) pontba futó élen a függvény értéke 1 kell legyen, az (1,1) pontból az (1,0) pontba futó élen a függvény 0 kell legyen, stb.

$$ u(0,y) = u(1,y) = u(x,0) = 0, ~ u(x,1) = 1 $$

polygon = [
     0  0  0
     0  1  1
     1  1  0
     1  0  0
     ];

pdeGeom = geomDataFromPolygon(polygon(:,1:2));

PDE modell. Létrehozunk egy PDE modellt, ahol egyetlen függő változó van, az $u(x,y)$

numberOfPDE = 1;
pdem = createpde(numberOfPDE);
geometryFromEdges(pdem,pdeGeom);

Megjelenítés

figure('Position', [668 596 1012 377]); subplot(121)
pdegplot(pdem, 'edgeLabels', 'on'); axis equal
title('$\Omega$ tartomany, amelyen megoldom az egyenletet', 'Interpreter', 'latex');
plabel 'x' '$x$ tengely', plabel 'y' '$y$ tengely'

Az $i$-edig élen az $u(x,y)$ értéke polygon(i,3) kell legyen.

for i = 1:size(polygon,1);
    applyBoundaryCondition(pdem,'Edge', i, 'u', polygon(i,3));
end

Az $\Omega$ tartomány felosztása, háromszögelés. A háromszögelés finomságát, sűrűségét a generateMesh Hmax tulajdonságával tudjuk szabályozni. A Hmax gyakorlatilag a háromszögek átmérőjének nagyságát szabályozza (megközelítőleg ekkorák lesznek a háromszögek.)

Durva háromszögelés

subplot(122); axis equal
title('$\Omega$ tartomany haromszogelve', 'Interpreter', 'latex');

msh = generateMesh(pdem,'Hmax',0.5);
pdemesh(pdem);
plabel 'x' '$x$ tengely', plabel 'y' '$y$ tengely'

Finom háromszögelés

msh = generateMesh(pdem,'Hmax',0.02);
pdemesh(pdem);
plabel 'x' '$x$ tengely', plabel 'y' '$y$ tengely'

Megoldjuk az egyenletet

[u] = assempde(pdem,1,0,0);

Vizualizáció

[p,~,t] = meshToPet(msh);

figure('Position', [668 220 674 753]), hold on
trisurf(t(1:3,:)',p(1,:)',p(2,:)',u),
shading interp; light, axis square, view([ 233 , 34 ])
plabel 'x' '$x$ tengely', plabel 'y' '$y$ tengely'

edge = polygon(repmat(1:size(polygon,1),[2,1]), :);
edge = [edge(:,1:2) , circshift(edge(:,3),1)];
edge = [edge ; edge(1,:)];
plot3(edge(:,1), edge(:,2), edge(:,3),'r', 'LineWidth', 3)
view([ 34 , 40 ])

Szinuszos kezdetifeltétel

Az $\Omega$ tartomány létrhozása. Marad a régi, csak a konstant peremfeltételek változtak (igazából lényegtelen milyen értékek szerepelnek ott, felül fogom írni őket).

polygon = [
     0  0  0
     0  1  NaN
     1  1  0
     1  0  0
     ];

pdeGeom = geomDataFromPolygon(polygon(:,1:2));

PDE modell. Létrehozunk egy PDE modellt, ahol egyetlen függő változó van, az $u(x,y,t)$. Itt sincs semmi változás.

numberOfPDE = 1;
pdem = createpde(numberOfPDE);
geometryFromEdges(pdem,pdeGeom);

Az $i$-edig élen az $u(x,y)$ értéke polygon(i,3) kell legyen.

for i = 1:size(polygon,1);
    applyBoundaryCondition(pdem,'Edge', i, 'u', polygon(i,3));
end

További nem-konstants függvények, melyek Dirichlet feltételként fogok megfogalmazni adott peremeken.

$$ u(0,y) = u(1,y) = u(x,0) = 0, ~~~ \boxed{u(x,1) = \sin(\pi x)} $$

bcfun2 = @(x,y) sin(pi*x);
bcfun2if = @(region,state) bcfun2(region.x, region.y);

Nem-konstans Dirichlet feltételek

  1. $u(x,y) = f(x,y)$ típusú feltétel esetén az u-t kell megadni:
  2. $h(x,y)u(x,y) = r(x,y)$ típusú feltétel esetén a h és az r-t kell megadni:
  3. $n\cdot(c\times \nabla u(x,y)) + q(x,y) u(x,y) = g(x,y)$ típusú feltételek esetén csak a q és g függvényeket lehet megadni c-t nem, amit viszont alapértelmezetten nullának vesz. Így igazi Newmann peremfeltételt nem lehet megfogalmazni.

Lásd még: applyBoundaryCondition, Specify Nonconstant Boundary Conditions

applyBoundaryCondition(pdem,'Edge', 2, 'r', bcfun2if, 'h', 1);

Háromszögelés és megoldjuk az egyenletet

msh = generateMesh(pdem,'Hmax',0.04);
[u] = assempde(pdem,1,0,0);

Vizualizáció

[p,~,t] = meshToPet(msh);

figure('Position', [668 220 674 753]), hold on
trisurf(t(1:3,:)',p(1,:)',p(2,:)',u),
shading interp; light, axis square, view([ 233 , 34 ])
plabel 'x' '$x$ tengely', plabel 'y' '$y$ tengely'

edge = polygon(repmat(1:size(polygon,1),[2,1]), :);
edge = [edge(:,1:2) , circshift(edge(:,3),1)];
edge = [edge ; edge(1,:)];
plot3(edge(:,1), edge(:,2), edge(:,3),'r', 'LineWidth', 3)

x = linspace(0,1,50);
plot3(x,x*0+1,bcfun2(x,x),'r', 'LineWidth', 3);
view([ 34 , 40 ])