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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ex3.c

?? 一個(gè)用來實(shí)現(xiàn)偏微分方程中網(wǎng)格的計(jì)算庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: ex3.C 2837 2008-05-08 17:23:37Z roystgnr $ *//* The Next Great Finite Element Library. *//* Copyright (C) 2003  Benjamin S. Kirk *//* This library is free software; you can redistribute it and/or *//* modify it under the terms of the GNU Lesser General Public *//* License as published by the Free Software Foundation; either *//* version 2.1 of the License, or (at your option) any later version. *//* This library is distributed in the hope that it will be useful, *//* but WITHOUT ANY WARRANTY; without even the implied warranty of *//* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU *//* Lesser General Public License for more details. *//* You should have received a copy of the GNU Lesser General Public *//* License along with this library; if not, write to the Free Software *//* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */ // <h1>Example 3 - Solving a Poisson Problem</h1> // // This is the third example program.  It builds on // the second example program by showing how to solve a simple // Poisson system.  This example also introduces the notion // of customized matrix assembly functions, working with an // exact solution, and using element iterators. // We will not comment on things that // were already explained in the second example.// C++ include files that we need#include <iostream>#include <algorithm>#include <math.h>// Basic include files needed for the mesh functionality.#include "libmesh.h"#include "mesh.h"#include "mesh_generation.h"#include "gmv_io.h"#include "linear_implicit_system.h"#include "equation_systems.h"// Define the Finite Element object.#include "fe.h"// Define Gauss quadrature rules.#include "quadrature_gauss.h"// Define useful datatypes for finite element// matrix and vector components.#include "sparse_matrix.h"#include "numeric_vector.h"#include "dense_matrix.h"#include "dense_vector.h"#include "elem.h"// Define the DofMap, which handles degree of freedom// indexing.#include "dof_map.h"// Function prototype.  This is the function that will assemble// the linear system for our Poisson problem.  Note that the// function will take the  EquationSystems object and the// name of the system we are assembling as input.  From the//  EquationSystems object we have access to the  Mesh and// other objects we might need.void assemble_poisson(EquationSystems& es,                      const std::string& system_name);// Function prototype for the exact solution.Real exact_solution (const Real x,                     const Real y,                     const Real z = 0.);int main (int argc, char** argv){  // Initialize libraries, like in example 2.  LibMeshInit init (argc, argv);  // Brief message to the user regarding the program name  // and command line arguments.  std::cout << "Running " << argv[0];    for (int i=1; i<argc; i++)    std::cout << " " << argv[i];    std::cout << std::endl << std::endl;    // Create a 2D mesh.  Mesh mesh (2);      // Use the MeshTools::Generation mesh generator to create a uniform  // grid on the square [-1,1]^2.  We instruct the mesh generator  // to build a mesh of 15x15 QUAD9 elements.  Building QUAD9  // elements instead of the default QUAD4's we used in example 2  // allow us to use higher-order approximation.  MeshTools::Generation::build_square (mesh,                                        15, 15,                                       -1., 1.,                                       -1., 1.,                                       QUAD9);  // Print information about the mesh to the screen.  // Note that 5x5 QUAD9 elements actually has 11x11 nodes,  // so this mesh is significantly larger than the one in example 2.  mesh.print_info();    // Create an equation systems object.  EquationSystems equation_systems (mesh);    // Declare the Poisson system and its variables.  // The Poisson system is another example of a steady system.  equation_systems.add_system<LinearImplicitSystem> ("Poisson");  // Adds the variable "u" to "Poisson".  "u"  // will be approximated using second-order approximation.  equation_systems.get_system("Poisson").add_variable("u", SECOND);  // Give the system a pointer to the matrix assembly  // function.  This will be called when needed by the  // library.  equation_systems.get_system("Poisson").attach_assemble_function (assemble_poisson);    // Initialize the data structures for the equation system.  equation_systems.init();    // Prints information about the system to the screen.  equation_systems.print_info();  // Solve the system "Poisson".  Note that calling this  // member will assemble the linear system and invoke  // the default Petsc solver, however the solver can be  // controlled from the command line.  For example,  // you can invoke conjugate gradient with:  //  // ./ex3 -ksp_type cg  //  // and you can get a nice X-window that monitors the solver  // convergence with:  //  // ./ex3 -ksp_xmonitor  //  // if you linked against the appropriate X libraries when you  // built PETSc.  equation_systems.get_system("Poisson").solve();  // After solving the system write the solution  // to a GMV-formatted plot file.  GMVIO (mesh).write_equation_systems ("out.gmv", equation_systems);  // All done.    return 0;}// We now define the matrix assembly function for the// Poisson system.  We need to first compute element// matrices and right-hand sides, and then take into// account the boundary conditions, which will be handled// via a penalty method.void assemble_poisson(EquationSystems& es,                      const std::string& system_name){    // It is a good idea to make sure we are assembling  // the proper system.  libmesh_assert (system_name == "Poisson");    // Get a constant reference to the mesh object.  const MeshBase& mesh = es.get_mesh();  // The dimension that we are running  const unsigned int dim = mesh.mesh_dimension();  // Get a reference to the LinearImplicitSystem we are solving  LinearImplicitSystem& system = es.get_system<LinearImplicitSystem> ("Poisson");  // A reference to the  DofMap object for this system.  The  DofMap  // object handles the index translation from node and element numbers  // to degree of freedom numbers.  We will talk more about the  DofMap  // in future examples.  const DofMap& dof_map = system.get_dof_map();    // Get a constant reference to the Finite Element type  // for the first (and only) variable in the system.  FEType fe_type = dof_map.variable_type(0);    // Build a Finite Element object of the specified type.  Since the  // FEBase::build() member dynamically creates memory we will  // store the object as an AutoPtr<FEBase>.  This can be thought  // of as a pointer that will clean up after itself.  Example 4  // describes some advantages of  AutoPtr's in the context of  // quadrature rules.  AutoPtr<FEBase> fe (FEBase::build(dim, fe_type));    // A 5th order Gauss quadrature rule for numerical integration.  QGauss qrule (dim, FIFTH);    // Tell the finite element object to use our quadrature rule.  fe->attach_quadrature_rule (&qrule);    // Declare a special finite element object for  // boundary integration.  AutoPtr<FEBase> fe_face (FEBase::build(dim, fe_type));    // Boundary integration requires one quadraure rule,  // with dimensionality one less than the dimensionality  // of the element.  QGauss qface(dim-1, FIFTH);    // Tell the finite element object to use our  // quadrature rule.  fe_face->attach_quadrature_rule (&qface);  // Here we define some references to cell-specific data that  // will be used to assemble the linear system.  //  // The element Jacobian * quadrature weight at each integration point.     const std::vector<Real>& JxW = fe->get_JxW();  // The physical XY locations of the quadrature points on the element.  // These might be useful for evaluating spatially varying material

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情综合色综合久久| 国产欧美日韩在线视频| 亚洲午夜精品17c| 99综合影院在线| 中文字幕日韩一区| 91极品美女在线| 亚洲国产日韩av| 91精品在线免费| 激情成人午夜视频| 国产精品视频一区二区三区不卡| 成人免费观看视频| 亚洲丝袜制服诱惑| 欧美日韩国产一二三| 午夜精品久久久久久久久久| 日韩一级精品视频在线观看| 国模无码大尺度一区二区三区 | 日韩午夜精品电影| 国产一区二区三区免费| 国产精品国产三级国产专播品爱网| 91免费看视频| 午夜电影一区二区| 久久久99精品久久| 欧美性生交片4| 亚洲成人av福利| 精品av久久707| 97精品国产97久久久久久久久久久久| 亚洲一区免费观看| 精品久久人人做人人爰| 成人爱爱电影网址| 无码av中文一区二区三区桃花岛| 久久亚区不卡日本| 色香蕉久久蜜桃| 精品一区二区三区不卡 | 欧美一区二区三区喷汁尤物| 国产成人av电影在线观看| 亚洲精品视频在线观看网站| 日韩欧美123| 色综合一区二区三区| 六月丁香综合在线视频| 最新欧美精品一区二区三区| 欧美一卡二卡三卡| 91丝袜高跟美女视频| 久久精品国产成人一区二区三区| 亚洲日本乱码在线观看| 欧美va亚洲va香蕉在线 | 在线观看精品一区| 国产成人在线色| 婷婷一区二区三区| 亚洲乱码日产精品bd| 久久久久国产精品厨房| 91精品国产综合久久福利软件| 国产99久久久国产精品 | 黄色小说综合网站| 夜夜精品视频一区二区| 国产欧美精品一区二区色综合 | 一区二区三区在线影院| 国产精品天美传媒| 精品福利在线导航| 日韩亚洲欧美中文三级| 欧美性色aⅴ视频一区日韩精品| 成人免费va视频| 狠狠网亚洲精品| 青草国产精品久久久久久| 亚洲一区视频在线观看视频| 国产精品护士白丝一区av| 国产丝袜欧美中文另类| 日韩精品一区二区三区蜜臀| 在线播放91灌醉迷j高跟美女| 色婷婷久久久综合中文字幕| www.性欧美| 成人午夜av电影| 国产成人精品亚洲777人妖| 精品一区二区日韩| 久久av资源站| 久久精品99国产精品| 蜜臀久久99精品久久久久宅男| 亚洲一区自拍偷拍| 一区二区三区四区高清精品免费观看| 国产精品久久久久久久第一福利 | 欧美日韩国产天堂| 欧美日本不卡视频| 制服丝袜国产精品| 欧美一二三区精品| 日韩欧美综合在线| 日韩免费福利电影在线观看| 日韩无一区二区| 日韩免费电影网站| 欧美精品一区二区在线观看| 日韩精品在线网站| 精品免费日韩av| 久久精品日韩一区二区三区| 国产清纯白嫩初高生在线观看91| 国产日韩精品一区二区浪潮av| 欧美国产在线观看| 青青国产91久久久久久| 五月天中文字幕一区二区| 亚洲成a人v欧美综合天堂下载| 五月天久久比比资源色| 麻豆精品视频在线观看视频| 国产在线精品一区二区夜色| 丁香婷婷深情五月亚洲| 色综合一区二区| 欧美福利视频导航| 久久久精品国产99久久精品芒果 | 欧美老女人第四色| 精品国产青草久久久久福利| 欧美国产精品中文字幕| 亚洲欧美经典视频| 日本中文字幕一区二区视频 | 国产福利电影一区二区三区| www.综合网.com| 欧美日韩一级片网站| 精品国产91久久久久久久妲己| 中文字幕av不卡| 亚洲bdsm女犯bdsm网站| 国产精品一区在线观看你懂的| 97se亚洲国产综合自在线观| 欧美年轻男男videosbes| 亚洲精品在线一区二区| 一区二区在线观看免费视频播放| 热久久一区二区| 99精品国产99久久久久久白柏| 91精品国产色综合久久久蜜香臀| 国产欧美精品一区aⅴ影院| 亚洲午夜久久久久中文字幕久| 国产精品一级黄| 欧美日韩一二三| 日本一区二区三区四区 | 欧美色精品在线视频| 久久亚洲精品国产精品紫薇| 亚洲女同女同女同女同女同69| 麻豆精品在线观看| 欧美影片第一页| 久久精品综合网| 肉肉av福利一精品导航| av在线播放成人| 精品第一国产综合精品aⅴ| 一级特黄大欧美久久久| 国产成人亚洲精品狼色在线| 555www色欧美视频| 亚洲精品少妇30p| 高清beeg欧美| 精品免费日韩av| 午夜国产精品影院在线观看| kk眼镜猥琐国模调教系列一区二区| 日韩一级大片在线观看| 亚洲1区2区3区视频| 一本色道亚洲精品aⅴ| 国产日韩av一区二区| 麻豆精品在线播放| 91精品国产91久久久久久一区二区| 国产精品免费视频观看| 国产呦萝稀缺另类资源| 日韩亚洲欧美一区二区三区| 午夜视频在线观看一区| 在线观看日韩av先锋影音电影院| 国产欧美一区二区精品忘忧草| 老司机免费视频一区二区| 欧美剧情片在线观看| 一区二区三区在线视频播放| 99久久精品国产一区| 中文字幕精品—区二区四季| 国产一区二区三区av电影| 精品国产亚洲一区二区三区在线观看| 首页国产欧美久久| 欧美精品九九99久久| 午夜激情久久久| 7777精品伊人久久久大香线蕉超级流畅| 一区二区三区欧美| 欧亚一区二区三区| 亚洲激情在线播放| 在线精品国精品国产尤物884a| 一区二区国产盗摄色噜噜| 日本国产一区二区| 亚洲午夜影视影院在线观看| 欧美在线一区二区| 午夜av区久久| 日韩精品一区二区三区在线| 麻豆91精品视频| 精品国产乱码久久久久久久久 | 欧美一级欧美三级| 久久99国内精品| 久久日韩粉嫩一区二区三区| 国产盗摄精品一区二区三区在线 | 欧美日本国产一区| 日本欧美肥老太交大片| 精品国产麻豆免费人成网站| 国产九九视频一区二区三区| 日本一区二区三级电影在线观看 | 国产精品欧美极品| 在线观看日韩一区| 日本sm残虐另类| 久久天堂av综合合色蜜桃网| 国产白丝精品91爽爽久久| 国产精品电影院| 欧美这里有精品| 极品少妇xxxx精品少妇| 国产精品黄色在线观看| 欧美性大战xxxxx久久久| 看电视剧不卡顿的网站|