亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? examples.tex

?? finite element library for mathematic majored research
?? TEX
字號:
\chapter{Examples}\label{sec:examples}\index{examples}The following examples illustrate basic usage of the form language forthe definition of a collection of standard multilinear forms. Weassume that \texttt{dx} has been declared as an integral over theinterior of $\Omega$ and that both \texttt{i} and \texttt{j} havebeen declared as a free \texttt{Index}.The examples presented below can all be found in the subdirectory\texttt{src/demo} of the \ffc{} source tree together with numerousother examples.%------------------------------------------------------------------------------\section{The mass matrix}\index{mass matrix}As a first example, consider the bilinear form corresponding to amass matrix,\begin{equation}  a(v, u) = \int_{\Omega} v \, u \dx,\end{equation}which can be implemented in \ffc{} as follows:\begin{code}element = FiniteElement("Lagrange", "triangle", 1)v = TestFunction(element)u = TrialFunction(element)    a = v*u*dx\end{code}This example is implemented in the file \texttt{Mass.form} in thecollection of demonstration forms included with the \ffc{} sourcedistribution.%------------------------------------------------------------------------------\section{Poisson's equation}\index{Poisson's equation}The bilinear and linear forms form for Poisson's equation,\begin{eqnarray}  a(v, u) &=& \int_{\Omega} \nabla v \cdot \nabla u \dx, \\  L(v)    &=& \int_{\Omega} v \, f \dx,\end{eqnarray}can be implemented as follows:\begin{code}element = FiniteElement("Lagrange", "triangle", 1)v = TestFunction(element)u = TrialFunction(element)f = Function(element)  a = dot(grad(v), grad(u))*dxL = v*f*dx\end{code}Alternatively, index notation can be used to express the scalarproduct:\begin{code}a = D(v, i)*D(u, i)*dx\end{code}This example is implemented in the file \texttt{Poisson.form} in thecollection of demonstration forms included with the \ffc{} sourcedistribution.%------------------------------------------------------------------------------\section{Vector-valued Poisson}\index{vector-valued Poisson}The bilinear and linear forms for a system of (independent) Poissonequations,\begin{eqnarray}  a(v, u) &=& \int_{\Omega} \nabla v : \nabla u \dx, \\  L(v)    &=& \int_{\Omega} v \cdot f \dx,\end{eqnarray}with $v$, $u$ and $f$ vector-valued can be implemented as follows:\begin{code}element = VectorElement("Lagrange", "triangle", 1)  v = TestFunction(element)u = TrialFunction(element)f = Function(element) a = dot(grad(v), grad(u))*dxL = dot(v, f)*dx\end{code}Alternatively, index notation may be used:\begin{code}a = D(v[i], j)*D(u[i], j)*dxL = v[i]*f[i]*dx\end{code}This example is implemented in the file \texttt{PoissonSystem.form} inthe collection of demonstration forms included with the \ffc{} sourcedistribution.%------------------------------------------------------------------------------\section{The strain-strain term of linear elasticity}\index{elasticity}\index{linear elasticity}\index{strain}The strain-strain term of linear elasticity,\begin{equation}  a(v, u) = \int_{\Omega} \epsilon(v) : \epsilon(u) \dx,\end{equation}where\begin{equation}  \epsilon(v) = \frac{1}{2}(\nabla v + (\nabla v)^{\top})\end{equation}can be implemented as follows:\begin{code}element = VectorElement("Lagrange", "tetrahedron", 1)  v = TestFunction(element)u = TrialFunction(element)  def epsilon(v):    return 0.5*(grad(v) + transp(grad(v)))a = dot(epsilon(v), epsilon(u))*dx\end{code}Alternatively, index notation can be used to define the form:\begin{code}a = 0.25*(D(v[i], j) + D(v[j], i))* \         (D(u[i], j) + D(u[j], i))*dx\end{code}This example is implemented in the file \texttt{Elasticity.form} inthe collection of demonstration forms included with the \ffc{} sourcedistribution.%------------------------------------------------------------------------------\section{The nonlinear term of Navier--Stokes}\index{Navier-Stokes}\index{fixed-point iteration}The bilinear form for fixed-point iteration on the nonlinear term ofthe incompressible Navier--Stokes equations,\begin{equation}  a(v, u) = \int_{\Omega} v \cdot ((w \cdot \nabla) u) \dx,\end{equation}with $w$ the frozen velocity from a previous iteration, can beconveniently implemented using index notation as follows:\begin{code}element = FiniteElement("Vector Lagrange", "tetrahedron", 1)  v = TestFunction(element)u = TrialFunction(element)w = Function(element)a = v[i]*w[j]*D(u[i], j)*dx\end{code}This example is implemented in the file \texttt{NavierStokes.form} inthe collection of demonstration forms included with the \ffc{} sourcedistribution.%------------------------------------------------------------------------------\section{The heat equation}\index{heat equation}\index{time-stepping}\index{backward Euler}Discretizing the heat equation,\begin{equation}  \dot{u} - \nabla \cdot (c \nabla u) = f,\end{equation}in time using the $\mathrm{dG}(0)$ method (backward Euler), weobtain the following variational problem for the discrete solution $u_h= u_h(x, t)$: Find $u_h^n = u_h(\cdot, t_n)$ with$u_h^{n-1} = u_h(\cdot, t_{n-1})$ given such that\begin{equation}  \frac{1}{k_n} \int_{\Omega} v \, (u_h^n - u_h^{n-1}) \dx +  \int_{\Omega} c \, \nabla v \cdot \nabla u_h^n \dx =  \int_{\Omega} v \, f^n \dx\end{equation}for all test functions $v$, where $k = t_n - t_{n-1}$ denotes the timestep . In the example below, we implement this variational problemwith piecewise linear test and trial functions, but other choices arepossible (just choose another finite element).Rewriting the variational problem in the standard form $a(v, u_h) =L(v)$ for all $v$, we obtain the following pair of bilinear and linearforms:\begin{eqnarray}  a(v, u_h^n) &=& \int_{\Omega} v \, u_h^n \dx +  k_n \int_{\Omega} c \, \nabla v \cdot \nabla u_h^n \dx, \\  L(v) &=& \int_{\Omega} v \, u_h^{n-1} \dx + k_n \int_{\Omega} v \, f^n \dx,\end{eqnarray}which can be implemented as follows:\begin{code}element = FiniteElement("Lagrange", "triangle", 1)v  = TestFunction(element) # Test functionu1 = TrialFunction(element) # Value at t_nu0 = Function(element)      # Value at t_n-1c  = Function(element)      # Heat conductivityf  = Function(element)      # Heat sourcek  = Constant()             # Time stepa = v*u1*dx + k*c*dot(grad(v), grad(u1))*dxL = v*u0*dx + k*v*f*dx\end{code}%------------------------------------------------------------------------------\section{Mixed formulation of Stokes}\index{Stokes' equations}\index{mixed formulation}\index{Taylor-Hood element}To solve Stokes' equations,\begin{eqnarray}  - \Delta u + \nabla p &=& f, \\  \nabla \cdot u &=& 0,\end{eqnarray}we write the variational problem in standard form$a(v, u) = L(v)$ for all $v$ to obtain the following pair of bilinearand linear forms:\begin{eqnarray}  a((v, q), (u, p)) &=& \int_{\Omega} \nabla v : \nabla u - (\nabla \cdot v) \, p +  q \, (\nabla \cdot u) \dx, \\  L((v, q)) &=& \int_{\Omega} v \cdot f \dx.\end{eqnarray}Using a mixed formulation with Taylor-Hood elements, this can beimplemented as follows:\begin{code}P2 = FiniteElement("Vector Lagrange", "triangle", 2)P1 = FiniteElement("Lagrange", "triangle", 1)TH = P2 + P1(v, q) = TestFunctions(TH)(u, p) = TrialFunctions(TH) f = Function(P2) a = (dot(grad(v), grad(u)) - div(v)*P + q*div(u))*dxL = dot(v, f)*dx\end{code}This example is implemented in the file \texttt{Heat.form} in thecollection of demonstration forms included with the \ffc{} sourcedistribution.%------------------------------------------------------------------------------\section{Mixed formulation of Poisson}\index{mixed Poisson}\index{BDM elements}\index{Brezzi--Douglas--Marini elements}We next consider the following formulation of Poisson's equation as apair of first order equations for $\sigma \in H(\mathrm{div})$and $u \in L_2$:\begin{eqnarray}    \sigma + \nabla u &= 0, \\    \nabla \cdot \sigma &= f.\end{eqnarray}We multiply the two equations by a pair of test functions $\tau$ and$w$ and integrate by parts to obtain the following variationalproblem: Find $(\sigma, u) \in V = H(\mathrm{div}) \times L_2$ such that\begin{equation}  a((\tau, w), (\sigma, u)) = L((\tau, w)) \quad \forall \, (\tau, w) \in V,\end{equation}where\begin{eqnarray}  a((\tau, w), (\sigma, u)) &=& \int_{\Omega} \tau \cdot \sigma - \nabla \cdot \tau \, u + w \nabla \cdot \sigma \dx, \\  L((\tau, w)) &=& \int_{\Omega} w \cdot f \dx.\end{eqnarray}We may implement the corresponding forms in the \ffc{} form languageusing first order BDM $H(\mathrm{div})$-conformingelements for $\sigma$ and piecewise constant $L_2$-conforming elementsfor $u$ as follows:\begin{code}BDM1 = FiniteElement("Brezzi-Douglas-Marini", "triangle", 1)DG0  = FiniteElement("Discontinuous Lagrange", "triangle", 0)element = BDM1 + DG0(tau, w) = TestFunctions(element)(sigma, u) = TrialFunctions(element)f = Function(DG0)a = (dot(tau, sigma) - div(tau)*u + w*div(sigma))*dxL = w*f*dx\end{code}This example is implemented in the file \texttt{MixedPoisson.form} inthe collection of demonstration forms included with the \ffc{} sourcedistribution.%------------------------------------------------------------------------------\section{Poisson's equation with DG elements}\index{Discontinuous Galerkin}We consider again Poisson's equation, but now in an (interior penalty)discontinuous Galerkin formulation: Find $u \in V = L_2$ such that\begin{displaymath}  a(v, u) = L(v) \quad \forall v \in V,\end{displaymath}where\begin{equation}  \begin{split}    a(v, u) &= \int_{\Omega} \nabla v \cdot \nabla u \dx \\    &+ \sum_S \int_S     - \langle \nabla v \rangle \cdot \llbracket u \rrbracket_n    - \llbracket v \rrbracket_n \cdot \langle \nabla u \rangle    + (\alpha/h) \llbracket v \rrbracket_n \cdot \llbracket u \rrbracket_n \dS \\    &+ \int_{\partial\Omega}    - \nabla v \cdot \llbracket u \rrbracket_n - \llbracket v \rrbracket_n \cdot \nabla u    + (\gamma/h) v u \ds \\    L(v) &= \int_{\Omega} v f \dx + \int_{\partial\Omega} v g \ds.  \end{split}\end{equation}The corresponding finite element variational problem for discontinuousfirst order elements may be implemented as follows:\begin{code}DG1 = FiniteElement("Discontinuous Lagrange", "triangle", 1)v = TestFunction(DG1)u = TrialFunction(DG1)f = Function(DG1)g = Function(DG1)n = FacetNormal("triangle")h = MeshSize("triangle")a = dot(grad(v), grad(u))*dx \  - dot(avg(grad(v)), jump(u, n))*dS \  - dot(jump(v, n), avg(grad(u)))*dS \  + alpha/h('+')*dot(jump(v, n), jump(u, n))*dS \  - dot(grad(v), jump(u, n))*ds \  - dot(jump(v, n),\ grad(u))*ds \  + gamma/h*v*u*dsL = v*f*dx + v*g*ds\end{code}This example is implemented in the file \texttt{PoissonDG.form} in thecollection of demonstration forms included with the \ffc{} sourcedistribution.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产凹凸成av人网站| 成人动漫在线一区| 国产一区二区三区免费播放| 成人国产电影网| 欧美无人高清视频在线观看| 欧美大片国产精品| 国产欧美va欧美不卡在线| 亚洲图片自拍偷拍| 国产一区二区在线免费观看| 精品国产1区二区| 国产精品毛片大码女人| 天天综合日日夜夜精品| 岛国精品在线观看| 制服丝袜亚洲色图| 国产精品久久久久久亚洲伦| 日本在线播放一区二区三区| 成人国产精品免费观看动漫| 7777精品伊人久久久大香线蕉| 国产视频911| 丝袜亚洲另类欧美| 91在线视频观看| 精品国产乱子伦一区| 悠悠色在线精品| 国产精品一区二区在线观看不卡 | 欧美刺激脚交jootjob| 亚洲欧美怡红院| 国产主播一区二区| 欧美精品色综合| 亚洲老司机在线| 粉嫩av一区二区三区| 欧美电影一区二区| 亚洲精品自拍动漫在线| 粉嫩嫩av羞羞动漫久久久| 日韩欧美亚洲国产精品字幕久久久| 亚洲精品欧美激情| 成人激情视频网站| 日韩一区二区三区av| 综合久久久久久久| 国内精品国产三级国产a久久| 欧美日本在线播放| 亚洲免费成人av| 不卡一区在线观看| 国产亚洲精久久久久久| 免费成人在线影院| 欧美精品在线观看播放| 亚洲在线免费播放| 色呦呦一区二区三区| 国产精品国产三级国产三级人妇| 国产一区欧美日韩| 欧美mv日韩mv国产网站app| 午夜精品福利一区二区三区蜜桃| 91福利国产精品| 亚洲欧美国产77777| 成人免费高清视频| 欧美高清一级片在线观看| 黄色日韩网站视频| 欧美成人a∨高清免费观看| 午夜精品123| 欧美色中文字幕| 一区二区三区精品在线观看| 99久久99久久精品免费观看| 国产精品视频一二三| 国产成人精品免费| 亚洲一区二三区| 日本韩国欧美国产| 亚洲欧美二区三区| 色88888久久久久久影院野外| 自拍偷拍欧美激情| 91女人视频在线观看| 中文字幕一区二区视频| av在线不卡免费看| 亚洲色图在线看| 欧美这里有精品| 午夜激情久久久| 日韩情涩欧美日韩视频| 久久精品国产久精国产| 精品日韩在线一区| 国产成人在线观看| 自拍偷拍国产精品| 欧美视频完全免费看| 日韩不卡免费视频| 精品久久国产老人久久综合| 国产精品一二三区| 国产精品人人做人人爽人人添| 99久久精品情趣| 亚洲综合在线视频| 8x8x8国产精品| 国产一区二区三区精品欧美日韩一区二区三区 | 国产精品福利一区| 91福利资源站| 蜜乳av一区二区| 久久久久9999亚洲精品| 成人午夜激情在线| 亚洲少妇中出一区| 7777女厕盗摄久久久| 久久99精品久久久久| 久久久天堂av| 一本色道久久综合精品竹菊| 欧美国产在线观看| 欧美精品一区二区高清在线观看 | 欧美tk丨vk视频| 国产精品久久久久婷婷二区次| 久久精品亚洲麻豆av一区二区 | 亚洲成在线观看| 制服丝袜中文字幕一区| 激情欧美一区二区三区在线观看| 精品久久人人做人人爰| www.亚洲色图| 日本在线不卡视频一二三区| 国产嫩草影院久久久久| 欧美自拍偷拍午夜视频| 男人的天堂久久精品| 中文字幕巨乱亚洲| 欧美高清dvd| 丰满白嫩尤物一区二区| 偷拍自拍另类欧美| 国产精品免费视频观看| 欧美日韩色一区| 国产a精品视频| 日韩av在线免费观看不卡| 国产欧美中文在线| 欧美精品 日韩| 99久久精品免费| 久久狠狠亚洲综合| 亚洲蜜臀av乱码久久精品蜜桃| 日韩欧美黄色影院| 色婷婷国产精品| 国产很黄免费观看久久| 五月天久久比比资源色| 国产精品久99| 日韩欧美第一区| 91国产精品成人| 国产激情视频一区二区三区欧美| 婷婷夜色潮精品综合在线| 国产精品视频yy9299一区| 日韩欧美亚洲国产另类| 欧美午夜寂寞影院| 成人黄色免费短视频| 另类小说综合欧美亚洲| 亚洲一区二区欧美| 国产精品久久久久久久第一福利| 日韩欧美国产一二三区| 欧日韩精品视频| www.欧美.com| 国产盗摄一区二区| 久久成人免费日本黄色| 亚洲国产你懂的| 亚洲欧美欧美一区二区三区| 欧美韩国日本一区| 精品国产免费视频| 91精品国产综合久久国产大片| 91丝袜国产在线播放| 国产不卡视频一区| 国产一区在线不卡| 久久99精品国产麻豆不卡| 日本视频一区二区三区| 性久久久久久久久久久久| 最新欧美精品一区二区三区| 国产人妖乱国产精品人妖| 欧美成人高清电影在线| 日韩视频在线观看一区二区| 9191久久久久久久久久久| 欧美性色黄大片| 欧美亚洲精品一区| 色综合久久中文字幕| av在线播放成人| 99精品视频在线免费观看| 成人性生交大片免费看视频在线| 国产在线精品一区二区| 久久99精品国产麻豆不卡| 老司机精品视频导航| 美女网站在线免费欧美精品| 日韩高清中文字幕一区| 日韩精彩视频在线观看| 日韩精品一区第一页| 日韩av电影免费观看高清完整版在线观看 | 日本中文一区二区三区| 午夜精品久久久久久久| 性做久久久久久久免费看| 舔着乳尖日韩一区| 视频一区视频二区在线观看| 午夜电影久久久| 日韩电影在线观看电影| 色婷婷综合久久久久中文一区二区| 粉嫩一区二区三区在线看| 成人开心网精品视频| 92国产精品观看| 91福利在线免费观看| 欧美日韩一区二区三区在线| 欧美体内she精视频| 91精品国产麻豆国产自产在线| 日韩欧美一二三四区| 久久午夜免费电影| 国产人成一区二区三区影院| 国产精品热久久久久夜色精品三区| 亚洲欧洲精品一区二区精品久久久 | 蜜桃av一区二区三区电影| 国产真实乱偷精品视频免| 国产·精品毛片| 一本久久精品一区二区|