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

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

?? ex4.c

?? 一個用來實現偏微分方程中網格的計算庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: ex4.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 4 - Solving a 1D, 2D or 3D Poisson Problem in Parallel</h1> // // This is the fourth example program.  It builds on // the third example program by showing how to formulate // the code in a dimension-independent way.  Very minor // changes to the example will allow the problem to be // solved in one, two or three dimensions. // // This example will also introduce the PerfLog class // as a way to monitor your code's performance.  We will // use it to instrument the matrix assembly code and look // for bottlenecks where we should focus optimization efforts. // // This example also shows how to extend example 3 to run in // parallel.  Notice how litte has changed!  The significant // differences are marked with "PARALLEL CHANGE".// C++ include files that we need#include <iostream>#include <algorithm>#include <math.h>// Basic include file needed for the mesh functionality.#include "libmesh.h"#include "mesh.h"#include "mesh_generation.h"#include "gmv_io.h"#include "gnuplot_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 the DofMap, which handles degree of freedom// indexing.#include "dof_map.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"// Define the PerfLog, a performance logging utility.// It is useful for timing events in a code and giving// you an idea where bottlenecks lie.#include "perf_log.h"// The definition of a geometric element#include "elem.h"#include "string_to_enum.h"#include "getpot.h"// Function prototype.  This is the function that will assemble// the linear system for our Poisson problem.  Note that the// function will take the \p EquationSystems object and the// name of the system we are assembling as input.  From the// \p EquationSystems object we have acess to the \p Mesh and// other objects we might need.void assemble_poisson(EquationSystems& es,                      const std::string& system_name);// Exact solution function prototype.Real exact_solution (const Real x,                     const Real y = 0.,                     const Real z = 0.);// Begin the main program.int main (int argc, char** argv){  // Initialize libMesh and any dependent libaries, like in example 2.  LibMeshInit init (argc, argv);  // Declare a performance log for the main program  // PerfLog perf_main("Main Program");    // Create a GetPot object to parse the command line  GetPot command_line (argc, argv);    // Check for proper calling arguments.  if (argc < 3)    {      if (libMesh::processor_id() == 0)        std::cerr << "Usage:\n"                  <<"\t " << argv[0] << " -d 2(3)" << " -n 15"                  << std::endl;      // This handy function will print the file name, line number,      // and then abort.  Currrently the library does not use C++      // exception handling.      libmesh_error();    }    // Brief message to the user regarding the program name  // and command line arguments.  else     {      std::cout << "Running " << argv[0];            for (int i=1; i<argc; i++)        std::cout << " " << argv[i];            std::cout << std::endl << std::endl;    }    // Read problem dimension from command line.  Use int  // instead of unsigned since the GetPot overload is ambiguous  // otherwise.  int dim = 2;  if ( command_line.search(1, "-d") )    dim = command_line.next(dim);    // Read number of elements from command line  int ps = 15;  if ( command_line.search(1, "-n") )    ps = command_line.next(ps);    // Read FE order from command line  std::string order = "SECOND";   if ( command_line.search(2, "-Order", "-o") )    order = command_line.next(order);  // Read FE Family from command line  std::string family = "LAGRANGE";   if ( command_line.search(2, "-FEFamily", "-f") )    family = command_line.next(family);    // Cannot use dicontinuous basis.  if ((family == "MONOMIAL") || (family == "XYZ"))    {      std::cout << "ex4 currently requires a C^0 (or higher) FE basis." << std::endl;      libmesh_error();    }      // Create a mesh with user-defined dimension.  Mesh mesh (dim);    // Use the MeshTools::Generation mesh generator to create a uniform  // grid on the square [-1,1]^D.  We instruct the mesh generator  // to build a mesh of 8x8 \p Quad9 elements in 2D, or \p Hex27  // elements in 3D.  Building these higher-order elements allows  // us to use higher-order approximation, as in example 3.  if ((family == "LAGRANGE") && (order == "FIRST"))    {      // No reason to use high-order geometric elements if we are      // solving with low-order finite elements.      MeshTools::Generation::build_cube (mesh,                                         ps, ps, ps,                                         -1., 1.,                                         -1., 1.,                                         -1., 1.,                                         (dim==1)    ? EDGE2 :                                          ((dim == 2) ? QUAD4 : HEX8));    }    else    {      MeshTools::Generation::build_cube (mesh,                                         ps, ps, ps,                                         -1., 1.,                                         -1., 1.,                                         -1., 1.,                                         (dim==1)    ? EDGE3 :                                          ((dim == 2) ? QUAD9 : HEX27));    }    // Print information about the mesh to the screen.  mesh.print_info();      // Create an equation systems object.  EquationSystems equation_systems (mesh);    // Declare the system and its variables.  // Create a system named "Poisson"  LinearImplicitSystem& system =    equation_systems.add_system<LinearImplicitSystem> ("Poisson");    // Add the variable "u" to "Poisson".  "u"  // will be approximated using second-order approximation.  system.add_variable("u",                      Utility::string_to_enum<Order>   (order),                      Utility::string_to_enum<FEFamily>(family));  // Give the system a pointer to the matrix assembly  // function.  system.attach_assemble_function (assemble_poisson);    // Initialize the data structures for the equation system.  equation_systems.init();  // Print information about the system to the screen.  equation_systems.print_info();  mesh.print_info();  // Solve the system "Poisson", just like example 2.  equation_systems.get_system("Poisson").solve();  // After solving the system write the solution  // to a GMV-formatted plot file.  if(dim == 1)  {            GnuPlotIO plot(mesh,"Example 4, 1D",GnuPlotIO::GRID_ON);    plot.write_equation_systems("out_1",equation_systems);  }  else  {    GMVIO (mesh).write_equation_systems ((dim == 3) ?       "out_3.gmv" : "out_2.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");  // Declare a performance log.  Give it a descriptive  // string to identify what part of the code we are  // logging, since there may be many PerfLogs in an  // application.  PerfLog perf_log ("Matrix Assembly");      // 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 \p DofMap object for this system.  The \p DofMap  // object handles the index translation from node and element numbers  // to degree of freedom numbers.  We will talk more about the \p DofMap

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品一区二区三区网站观看| 亚洲国产日产av| 欧美一级日韩免费不卡| 欧美性做爰猛烈叫床潮| 91小视频免费观看| jvid福利写真一区二区三区| 不卡免费追剧大全电视剧网站| 国产乱理伦片在线观看夜一区| 国产精品一级在线| 国产成人久久精品77777最新版本| 国产麻豆成人精品| av成人免费在线观看| 91小视频免费观看| 欧美日韩电影在线| 91精品国产日韩91久久久久久| 日韩午夜三级在线| 久久久综合网站| 国产精品美女久久久久久久网站| 国产精品久久二区二区| 亚洲美女电影在线| 日本中文在线一区| 国产精品自拍网站| 色综合久久66| 日韩精品一区二区三区四区| 欧美激情中文不卡| 亚洲一区二区在线观看视频 | 欧美va亚洲va| 国产日本欧洲亚洲| 亚洲精品成人悠悠色影视| 首页国产欧美久久| 国产一区 二区| 色婷婷精品久久二区二区蜜臀av| 欧美精品日韩精品| 国产日韩欧美不卡在线| 亚洲综合色噜噜狠狠| 激情深爱一区二区| 精品欧美黑人一区二区三区| 久久久久久久性| 一二三四区精品视频| 麻豆精品一区二区| 91在线观看免费视频| 日韩欧美黄色影院| 亚洲欧美日韩中文字幕一区二区三区| 天堂精品中文字幕在线| 国产sm精品调教视频网站| 欧美在线播放高清精品| 久久久久成人黄色影片| 午夜伊人狠狠久久| 不卡一二三区首页| 精品久久免费看| 亚洲电影在线播放| av电影一区二区| 国产精品乱码久久久久久| 亚洲高清中文字幕| 91无套直看片红桃| 久久精品一区蜜桃臀影院| 日韩av电影天堂| 色诱视频网站一区| 中文字幕乱码日本亚洲一区二区| 亚洲成年人影院| 91理论电影在线观看| 国产精品视频观看| 国产麻豆一精品一av一免费| 欧美一区午夜精品| 午夜精彩视频在线观看不卡| 色视频一区二区| 国产女主播视频一区二区| 蜜桃视频一区二区三区在线观看| 在线亚洲一区二区| 亚洲天堂福利av| 91视频在线观看| 国产精品福利影院| 不卡av免费在线观看| 欧美激情资源网| 粉嫩蜜臀av国产精品网站| 久久精品夜色噜噜亚洲a∨| 欧美亚洲日本国产| 一区二区三区蜜桃| 欧美私模裸体表演在线观看| 亚洲综合在线观看视频| 在线这里只有精品| 一区二区三区精品久久久| 欧美性猛交xxxxxxxx| 亚洲.国产.中文慕字在线| 欧美日韩大陆一区二区| 日本一不卡视频| 日韩免费在线观看| 国内不卡的二区三区中文字幕| 日韩精品一区二区三区四区视频 | 极品尤物av久久免费看| 337p粉嫩大胆噜噜噜噜噜91av| 久久国产精品99久久久久久老狼| 日韩精品一区二区在线观看| 国产精品一区二区视频| 中文字幕av一区 二区| 成人在线综合网| 亚洲三级电影网站| 欧美精品在线一区二区三区| 久久99热这里只有精品| 久久久九九九九| 一本大道综合伊人精品热热| 亚洲成人第一页| 久久综合一区二区| av电影在线观看不卡| 爽爽淫人综合网网站| 欧美精品一区二区三区视频| 99国产精品国产精品毛片| 一级日本不卡的影视| 精品国产伦理网| 在线中文字幕一区二区| 激情综合色综合久久| 亚洲丝袜精品丝袜在线| 日韩欧美一区二区不卡| av在线免费不卡| 日韩va欧美va亚洲va久久| 国产精品久久网站| 在线成人免费观看| 成人av在线网| 理论电影国产精品| 一卡二卡三卡日韩欧美| 国产亚洲欧美一级| 欧美浪妇xxxx高跟鞋交| 成人高清视频在线观看| 捆绑调教美女网站视频一区| 亚洲婷婷在线视频| 精品日产卡一卡二卡麻豆| 在线精品国精品国产尤物884a| 蜜臀a∨国产成人精品| 亚洲激情网站免费观看| 久久久99久久精品欧美| 7777精品伊人久久久大香线蕉经典版下载| 国产一区二区看久久| 日韩av网站在线观看| 亚洲在线免费播放| 国产精品久久国产精麻豆99网站| 精品免费一区二区三区| 欧美日韩国产影片| 在线精品观看国产| 99re6这里只有精品视频在线观看| 国内一区二区视频| 看电视剧不卡顿的网站| 亚洲成av人片在线| 亚洲综合图片区| 一区二区三区四区蜜桃| 国产精品久久久久aaaa樱花| 久久久www成人免费毛片麻豆| 日韩免费电影网站| 日韩精品在线看片z| 91精品国产黑色紧身裤美女| 欧美精品丝袜中出| 欧美日韩精品一区二区天天拍小说 | 国产毛片一区二区| 国产一区免费电影| 激情五月播播久久久精品| 男女视频一区二区| 日本系列欧美系列| 久久国产精品无码网站| 久久 天天综合| 国产麻豆精品视频| 高清在线成人网| 成人激情黄色小说| 91蜜桃免费观看视频| 欧美专区亚洲专区| 欧美一级免费观看| 久久婷婷成人综合色| 国产调教视频一区| 中文字幕一区在线观看| 日韩理论片在线| 亚洲一区在线观看免费 | 国产一区二区按摩在线观看| 国产一区二区三区四| 福利91精品一区二区三区| 成人在线视频一区| 91成人在线免费观看| 欧美久久一二区| 久久亚洲综合色| 国产精品久久久久久久久动漫| 亚洲欧美一区二区三区极速播放| 一区二区三区四区激情| 日韩成人免费电影| 国产suv精品一区二区6| 色婷婷久久99综合精品jk白丝| 欧美另类变人与禽xxxxx| 久久色视频免费观看| 综合亚洲深深色噜噜狠狠网站| 亚洲国产日日夜夜| 国产成人亚洲综合a∨婷婷图片| 91美女片黄在线| 日韩欧美国产系列| 一区二区中文字幕在线| 奇米一区二区三区| 91网站在线播放| 日韩欧美美女一区二区三区| 国产精品人人做人人爽人人添 | 欧美一区二区在线播放| 中文字幕第一页久久| 天天操天天色综合| av中文字幕一区| 欧美成人女星排名| 夜夜嗨av一区二区三区|