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

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

?? ex12.c

?? 一個用來實現(xiàn)偏微分方程中網(wǎng)格的計算庫
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* $Id: ex12.C 2968 2008-08-10 20:38:50Z benkirk $ *//* 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 12 - The <code>MeshData</code> class</h1> // // The previous examples covered the certainly involved // aspects of simulating multiple equation systems, and prior  // to this even using adaptive refinement.  I.e.: cool stuff. // // This example now reduces brain effort significantly, // and presents some supplements concerning data I/O, // especially how to handle the <code> MeshData </code> object. // The <code> MeshData </code> class may be used for handling input // data for a simulation, like actual material properties,  // (not indicators, like in the <code> BoundaryInfo </code> class), // or mode shapes that serve as input for acoustic radiation // simulations.  The use of the <code> MeshData </code> during simulation // is straightforward:  the  // <ul> // <li> //  <code>Number MeshData::operator()(const Node*, int)</code>, //   get the i-th floating-point value associated with the node // </li> // <li> // <code> bool MeshData::has_data(const Node*)</code>, //   verify whether a certain node has data associated // </li> // <li> // <code>std::vector<Number>& MeshData::get_data (const Node* node)</code> //   to get read-access to the data associated with this node (better //   make sure first that this node <i>has</i> data, see <code> has_data() ) // </li> // <li> // iterator for nodal data <code>MeshData::const_node_data_iterator</code> //   to directly iterate over the set of nodes that hold data,  //   instead of asking through <code>has_data()</code> each time again. // </li> // </ul> // (and corresponding methods for <code> const Elem*</code>) provide access to // the floating-point data associated with nodes/elements. // This example does <i>not</i> show how to use these aforementioned // methods, this is straightforward.  Simply check if the current  // <code>Elem*</code> has a node with data. If so, add this contribution to the  // RHS, or whatever. Or ask the <code> MeshData </code> for each <code>Elem*</code> for its  // material properties... // // Here, only the actual file I/O necessary to handle such  // nodal/element data is presented.  Lean back, relax...// C++ include files that we need.#include <math.h>// Functions to initialize the library// and provide some further features (e.g. // our own pi)#include "libmesh.h"// Basic include files needed for the mesh and // <code> MeshData </code> functionality.#include "mesh.h"#include "mesh_tools.h"#include "mesh_data.h"#include "unv_io.h"#include "gmv_io.h"// The definition of a geometric vertex associated with a Mesh#include "node.h"// Function prototype for creating artificial nodal data// that can be inserted into a <code>MeshData</code> object.void create_artificial_data (const Mesh& mesh,                             std::map<const Node*, std::vector<Number> >& art_data);// The main program.int main (int argc, char** argv){  // Initialize the library.  LibMeshInit init (argc, argv);  if (libMesh::n_processors() > 1)    {      if (libMesh::processor_id() == 0)        {          std::cerr << "ERROR: Skipping example 12. " << std::endl;          std::cerr << "MeshData objects currently only work in serial." << std::endl;        }      return 0;    }  // Check for proper usage. The program is designed to be run  //  as follows:  // <pre>  //  $ ./ex12 -d 3 in_mesh.unv  // </pre>  // where in_mesh.unv should be a Universal file.  if (argc < 4)    {      if (libMesh::processor_id() == 0)        std::cerr << "Usage: " << argv[0] << " -d <dim> in_mesh.unv"                  << std::endl;            libmesh_error();    }  // Get the dimensionality of the mesh from argv[2]  const unsigned int dim = std::atoi(argv[2]);    // The filename of the mesh  const std::string mesh_file = argv[3];  // The following example makes currently sense  // only with a Universal file  if (mesh_file.rfind(".unv") >= mesh_file.size())    {      if (libMesh::processor_id() == 0)        std::cerr << "ERROR:  This example works only properly with a Universal mesh file!"                << std::endl;            libmesh_error();    }  // Some notes on <code>MeshData</code>:  // <ul>  //  <li>  // The <code>MeshData</code> is <i>not</i> a mesh!  Consult the <code>Mesh</code>,  //   <code>MeshBase</code>, and <code>BoundaryMesh</code> classes for details on  //   handling meshes!  // </li>  //  <li>  // The <code>MeshData</code> is an object handling arbitrary floating-point   //   data associated with mesh entities (nodes, elements), currently  //   most features only available for nodal data.  However,  //   extending to element-data (does <i>anybody</i> need this?)  //   is straightforward.  // </li>  // <li>  // Currently std::vector<Number> is the data (associated  //   with nodes/elements) that can be handled by <code>MeshData</code>,  // </li>  // <li>  // In order to provide <i>full</i> functionality, the <code>MeshData</code>  //   <i>has</i> to be activated prior to reading in a mesh.  However,  //   there is a so-called compatibility mode available when you   //   (intentionally) forgot to "turn on" the <code>MeshData</code>.  // </li>  // <li>  // It is possible to provide user-defined nodal data that  //   may subsequently be used or written to file.  // </li>  // <li>  // Translate the nodal-/element-associated data to formats  //   suitable for visual inspection, e.g. GMV files.  // </li>  // <li>  // Two I/O file formats are currently supported: the Universal   //   file format with dataset 2414, and an extension of   //   the libMesh-own xda/xdr format, named xtr, xta.  //   Some details on this:  // </li>  // <li>  //    The xtr/xta format is simply an extension of the  //     xdr/xda format to read/write also nodal/element-associated  //     floating-point data.  The xtr interface of the <code>MeshData</code>  //     creates stand-alone files that may be binary or ASCII.  //     You cannot append files created by the <code>MeshData</code> I/O methods  //     to a mesh file (xdr/xda).  //     The xtr files may be seen as a "backdrop", especially when  //     binary files are preferred.  Note that unv files are <i>always</i>  //     ASCII and may become pretty big!  //</li>  // <li>  //    The unv format is an extremely versatile text-based file format  //     for arbitrary data.  Its functionality is <i>large</i>, and <code>libMesh</code>  //     supports only a small share: namely the I/O for nodes, elements and  //     arbitrary node-/element-associated data, stored in the   //     so-called datasets "2411", "2412", and "2414", respectively.  //     Here, only the last dataset is covered.  The two first datasets are  //     implemented in the Universal support for I/O of meshes.  A single  //     unv file may hold <i>multiple</i> datasets of type "2414".  To  //     distinguish data, each dataset has a header.  The <code>libMesh</code> pendant  //     to this header is the <code>MeshDataUnvHeader</code> class.  When you  //     read/write unv files using the <code>MeshData</code>, you <i>always</i>  //     automatically also read/write such headers.  // </li>  // </ul>  // Enough babble for now.  Examples.   {    // Create a mesh with the requested dimension.    // Below we require a 3-dim mesh, therefore assert    // it.    libmesh_assert (dim == 3);    Mesh mesh(dim);    MeshData mesh_data(mesh);      // Activate the <code>MeshData</code> of the mesh, so that    // we can remember the node and element ids used    // in the file.  When we do not activate the <code>MeshData</code>,    // then there is no chance to import node- or element-    // associated data.    mesh_data.activate();    // Now we can safely read the input mesh.  Note that    // this should be an .xda/.xdr or .unv file only, otherwise    // we cannot load/save associated data.    mesh.read (mesh_file, &mesh_data);        // Print information about the mesh and the data    // to the screen.  Obviously, there is no data    // (apart from node & element ids) in it, yet.    std::cout << std::endl               << "Finished reading the mesh.  MeshData is active but empty:" << std::endl              << "---------------------------------------------------------" << std::endl;        mesh.print_info();    mesh_data.print_info();      // Create some artificial node-associated data and store    // it in the mesh's <code>MeshData</code>.  Use a <code>std::map</code> for this.     // Let the function <code>create_artificial_data()</code> do the work.    {      std::map<const Node*, std::vector<Number> > artificial_data;            create_artificial_data (mesh, artificial_data);            // Before we let the map go out of scope, insert it into      // the <code>MeshData</code>.  Note that by default the element-associated      // data containers are closed, so that the <code>MeshData</code> is      // ready for use.      mesh_data.insert_node_data(artificial_data);      // Let <code>artificial_data()</code> go out of scope    }        // Print information about the data to the screen.    std::cout << std::endl               << "After inserting artificial data into the MeshData:" << std::endl              << "--------------------------------------------------" << std::endl;        mesh_data.print_info();    // Write the artificial data into a universal    // file.  Use a default header for this.    std::string first_out_data="data_first_out_with_default_header.unv";    std::cout << "Writing MeshData to: " << first_out_data << std::endl;    mesh_data.write(first_out_data);    // Alternatively, create your own header.    std::cout << std::endl               << "Attach our own MeshDataUnvHeader to the MeshData:" << std::endl

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产色综合久久久蜜香臀| 日韩三级高清在线| 免费xxxx性欧美18vr| 亚洲国产成人私人影院tom| 欧美日韩大陆一区二区| 成人激情视频网站| 久久99精品久久只有精品| 伊人色综合久久天天| 久久久久久久久久久久久夜| 精品污污网站免费看| 成人午夜精品在线| 精品综合久久久久久8888| 亚洲国产精品久久久男人的天堂| 中文无字幕一区二区三区| 欧美一区二区三区免费在线看| 一本大道久久a久久精二百| 国产传媒日韩欧美成人| 久久精品理论片| 天堂蜜桃一区二区三区| 亚洲激情综合网| 亚洲图片激情小说| 国产精品国产自产拍高清av| 国产亚洲女人久久久久毛片| 精品欧美一区二区三区精品久久 | 91精品一区二区三区在线观看| 丁香天五香天堂综合| 另类小说综合欧美亚洲| 日韩精品一二区| 天天免费综合色| 亚洲一区二区三区四区在线| 一区二区三区自拍| 亚洲图片你懂的| 亚洲丝袜精品丝袜在线| 亚洲三级理论片| 一区二区三区在线视频免费| 国产精品黄色在线观看| 国产精品高潮久久久久无| 国产精品美女久久久久av爽李琼| 欧美激情在线看| 中文一区一区三区高中清不卡| 亚洲国产精品99久久久久久久久| 久久蜜桃一区二区| 国产性做久久久久久| 欧美韩国日本一区| 国产精品福利一区| 亚洲女人****多毛耸耸8| 一区二区在线观看视频在线观看| 亚洲乱码国产乱码精品精的特点| 亚洲免费av观看| 亚洲国产一区二区视频| 亚洲成a人在线观看| 日韩综合小视频| 激情偷乱视频一区二区三区| 国产精品一区二区黑丝| www.亚洲在线| 在线视频你懂得一区二区三区| 色综合久久66| 6080日韩午夜伦伦午夜伦| 日韩免费福利电影在线观看| 久久男人中文字幕资源站| 日本一区二区成人在线| 亚洲黄网站在线观看| 偷窥国产亚洲免费视频| 韩国毛片一区二区三区| 99久久精品99国产精品| 欧美性xxxxxxxx| 精品日韩一区二区| 中文字幕一区二区视频| 亚洲国产成人porn| 久久99国产精品免费| 成人精品免费看| 欧美日韩一区二区三区视频| 精品蜜桃在线看| 最新国产精品久久精品| 亚洲综合另类小说| 激情六月婷婷久久| 91麻豆自制传媒国产之光| 欧美剧在线免费观看网站 | 91免费国产在线| 欧美精品1区2区| 久久久国产午夜精品| 亚洲精品一二三| 精品一二三四在线| 色菇凉天天综合网| 久久这里只有精品6| 樱桃国产成人精品视频| 国产呦萝稀缺另类资源| 欧洲激情一区二区| 久久久久久久免费视频了| 亚洲国产精品尤物yw在线观看| 国产福利一区二区三区视频| 欧美丝袜丝nylons| 国产精品日日摸夜夜摸av| 日韩有码一区二区三区| 成人的网站免费观看| 日韩欧美一区二区免费| 亚洲人成人一区二区在线观看| 久久国产剧场电影| 欧美性猛交xxxxxxxx| 国产精品沙发午睡系列990531| 免费观看30秒视频久久| 色乱码一区二区三区88| 国产夜色精品一区二区av| 日韩黄色免费网站| 91蝌蚪国产九色| 欧美国产乱子伦| 国产一区在线不卡| 4438成人网| 亚洲一区中文日韩| av亚洲产国偷v产偷v自拍| 欧美精品一区二| 日本不卡中文字幕| 欧美在线免费视屏| 亚洲天堂a在线| 成人福利视频在线看| 久久婷婷综合激情| 久久精品免费观看| 日韩一区二区电影在线| 亚洲成人av在线电影| 欧美亚洲一区二区在线| 亚洲视频免费看| 97超碰欧美中文字幕| 欧美国产成人在线| 国产乱码字幕精品高清av | 免费高清视频精品| 在线播放日韩导航| 亚洲一本大道在线| 欧美在线三级电影| 亚洲一区欧美一区| 欧美日韩久久一区| 亚洲国产视频直播| 欧美日韩一级片网站| 亚洲国产视频网站| 欧美日韩一区二区三区在线| 亚洲国产成人av网| 欧美久久久影院| 日本欧美在线观看| 欧美一区二区三区思思人| 日韩av电影天堂| 日韩视频免费直播| 激情综合一区二区三区| 久久夜色精品一区| 国产美女精品人人做人人爽| 久久久久久麻豆| 成人动漫中文字幕| 亚洲日穴在线视频| 欧美自拍偷拍一区| 日韩在线a电影| 精品剧情v国产在线观看在线| 国产一区二区三区香蕉| 国产欧美视频一区二区三区| gogogo免费视频观看亚洲一| 综合久久久久综合| 欧美日韩一区二区三区在线| 爽爽淫人综合网网站| 精品国产伦一区二区三区观看方式 | 成人免费在线视频观看| 在线观看视频一区| 日韩精品亚洲专区| 久久这里只精品最新地址| youjizz久久| 午夜精品成人在线| 欧美精品一区二区三区蜜臀| 成人精品亚洲人成在线| 亚洲精品国产高清久久伦理二区| 欧美日韩国产美女| 久草精品在线观看| 成人欧美一区二区三区小说 | 中文字幕国产精品一区二区| 91网页版在线| 日本免费在线视频不卡一不卡二 | 久久久综合九色合综国产精品| 成人一区二区三区中文字幕| 一二三区精品视频| 日韩欧美在线1卡| 99久久精品国产精品久久| 午夜亚洲福利老司机| 久久久久久久免费视频了| 91行情网站电视在线观看高清版| 日本亚洲最大的色成网站www| 欧美韩国日本不卡| 欧美日韩国产美女| 成人黄色小视频在线观看| 五月婷婷激情综合网| 国产欧美精品国产国产专区| 欧美日韩大陆在线| 成人免费的视频| 蜜桃一区二区三区在线观看| 最新日韩在线视频| 久久综合给合久久狠狠狠97色69| 一本高清dvd不卡在线观看| 美女视频网站黄色亚洲| 一区二区三区在线免费视频| 久久精品在线观看| 欧美精品一二三四| 91亚洲男人天堂| 国产成人精品免费一区二区| 日韩二区三区在线观看| 亚洲欧美日韩久久| 久久精品人人做人人爽97|