下面讨论如何使用 Discontinuous Galerkin 求解恒定对流问题. 1.简介 恒定状态对流方程 \[\begin{equation} a\cdot \nabla \mathbf{u} = f \end{equation}\] 出现在多种问题中,如海洋模型中求解连续方程计算垂向速度,明渠恒定流动问题等. 2.数值离散 首先需要将方程写为离散格式,以一维问题为例 \[\begin{eqnarray} \begin{aligned} & \frac{\partial u}{\parti…
[本文链接] http://www.cnblogs.com/hellogiser/p/efficient-method-to-solve-gcd-problem.html [题目] 求两个正整数的最大公约数Greatest Common Divisor (GCD).如果两个正整数都很大,有什么简单的算法吗?例如,给定两个数1 100 100 210 001, 120 200 021,求出其最大公约数. [解法] [1. 辗转相除法] 辗转相除法:f(x,y) = f(y , x % y)(x>y…
FESTUNG - 3. 采用 HDG 方法求解对流问题[1] 1. 控制方程 线性对流问题控制方程为 \[\begin{array}{ll} \partial_t c + \nabla \cdot f = h, & \mathrm{in} \; J \times \Omega \\ c(x, 0) = c_0(x), & \mathrm{on} \; {0} \times \Omega \\ c(x, t) = c_D, & \mathrm{on} \; J \times \pa…
Hermite WENO 单元重构 本文主要介绍采用 Hermite WENO 重构方法作为斜率限制器应用于二维或高维单元中. 1.简介[1] ENO格式最早由 Harten 等[2]提出,ENO格式避免在高梯度地区进行插值,其重构过程通过多个不同位置模板,并且选取其中最光滑模板上的解进行重构,由此保证在重构过程中具有较高的精度.然而这种方法会导致收敛问题并且在连续区域降低精度,随后Liu等[3]提出了 weighted ENO 格式.WENO 格式采用不同的权重系数组合各个模板,而非只采用一个…
TVB斜率限制器 本文参考源程序来自Fluidity. 简介 TVB斜率限制器最早由Cockburn和Shu(1989)提出,主要特点是提出了修正minmod函数 \[\tilde{m}(a_1, a_2, \cdots, a_n) = \left\{ \begin{array}{ll} a_1 & \text{if} \, \left| a_1 \right| \le Mh^2, \cr m\left(a_1, a_2, \cdots, a_n\right) & \text{otherw…
张宁 A Linear Least Square Initialization Method for 3D Pose Graph Optimization Problem "链接:https://pan.baidu.com/s/1oj_HgQtiiKExACscYuFhJQ 提取码:7xrg" 三维位姿图优化问题的线性最小二乘初始化方法 S. M. Nasiri, H. Moradi, Senior Member, IEEE, R. Hosseini Abstract Pose Gra…
p47.(实习题-李荣华)用线性元求下列边值问题的数值解 tic; % this method is transform from Galerkin method %also call it as finit method %is used for solving two point BVP which is the first and second term. % %MATLAB 7.0 clear; clc; N=; h=/N; X=:h:; f=inline('(0.5*pi^2)*sin…
tic; % this method is transform from Galerkin method %also call it as finit method %is used for solving two point BVP which is the first and second term. %this code was writen by HU.D.dong in February 11th 2017 %MATLAB 7.0 clear; clc; N=50; h=1/N; X=…
Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may return any answer array that satisfies this condition. Example 1: Input: [3,1,2,4] Output: [2,4,3,1] T…
Problem Description: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given…