Algorithm for homogenization of non-equidistant 1-D grid
조회 수: 1 (최근 30일)
이전 댓글 표시
I am looking for proper algorithm for so called "delta-homogenization" of 1-D non-equidistant grid.
Definition: The sorted monotonically changing vector x is delta-homogeneous if for specified , the differences ratio
satisfy to the condition:
, for , where
Problem: In a case of non delta-homogeneous vector x, how to find minimum number of additional points , to be vector delta-homogeneous?
The problem is motivaded by proper design of non-equidistant grids, which are able to guarantee numerical stability of PDEs solution.
Example:
> x = (1:4).*(1:4)
1 4 9 16
>d = 1.5;
ratioviolationIdx =
1×2 logical array
0 1
ratios =
1.6667 1.4000
deltalimits =
0.6667 1.5000
So, x is not delta-homogeneous for delta = 1.5. But , the x is delta-homogeneous for delta = 2
>> [~,ratioviolationIdx,ratios,deltalimits] = isdeltahomog([x],2)
ratioviolationIdx =
1×2 logical array
1 1
ratios =
1.6667 1.4000
deltalimits =
0.5000 2.0000
An finaly, when I add several points to the vector x for delta = 1.5, I have delta-homogeneous vector
>> [~,ratioviolationIdx,ratios,deltalimits] = isdeltahomog([x 2.5 6 12],1.5)
ratioviolationIdx =
1×5 logical array
1 1 1 1 1
ratios =
1.0000 1.3333 1.5000 1.0000 1.3333
deltalimits =
0.6667 1.5000
See attached code...
Thanks in advance for any help.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Particle Swarm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!