Files
LaGriT/docs/_site/pages/docs/commands/GRID2GRID.html
2025-12-17 11:00:57 +08:00

224 lines
13 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<html lang="en-gb" dir="ltr">
<head>
<title>GRID2GRID</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="LaGriT : LaGriT is a library providing mesh generation and optimization for a variety of polyhedra and dimensions.">
<link href="https://fonts.googleapis.com/css?family=Do+Hyeon|Fira+Sans" rel="stylesheet">
<link rel="preload" href="https://getuikit.com/fonts/ProximaNova-Reg-webfont.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="preload" href="https://getuikit.com/fonts/ProximaNova-Light-webfont.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="stylesheet" href="/assets/css/uikit_theme.css">
<link rel="icon" type="image/x-icon" href="https://www.lanl.gov/favicon.ico">
<link rel="stylesheet" type="text/css" href="/assets/css/footer.css">
<!-- load stylesheets -->
<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js" defer=""></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/he/1.2.0/he.min.js" defer=""></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.6.2/marked.min.js" defer=""></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js" defer=""></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.0.2/vue-router.min.js" defer=""></script>
<script src="https://getuikit.com/assets/uikit/dist/js/uikit.min.js?1180" defer=""></script>
<script src="https://getuikit.com/assets/uikit/dist/js/uikit-icons.min.js?1180" defer=""></script>
<script src="https://getuikit.com/assets/highlightjs/highlight.min.js" defer=""></script>
<script src="https://getuikit.com/app/main.min.js?1180" defer=""></script>
<script src="https://www.googletagmanager.com/gtag/js?id=UA-42150424-1" async=""></script>
<!-- tipuesearch files -->
<link rel="stylesheet" href="/assets/tipuesearch/css/normalize.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="/assets/tipuesearch/tipuesearch_content.js"></script>
<link rel="stylesheet" href="/assets/tipuesearch/css/tipuesearch.css">
<script src="/assets/tipuesearch/tipuesearch_set.js"></script>
<script src="/assets/tipuesearch/tipuesearch.min.js"></script>
<!-- Finally, load global style to overwrite template, tipuesearch, etc. -->
<!--<link rel="stylesheet" href="/assets/globalstyle.css">-->
</head>
<body>
<div>
<!-- Header -->
<div uk-sticky="media: 960" class="uk-navbar-container tm-navbar-container uk-sticky uk-sticky-fixed" style="position: fixed; top: 0px; width: 100%; color: #212328;">
<div class="uk-container uk-container-expand">
<nav class="uk-navbar">
<div class="uk-navbar-left">
<a href="/" class="uk-navbar-item uk-logo" style="font-family: 'Do Hyeon', sans-serif; color: white;">
<img uk-img src="/assets/img/logo.png" width="50" class="uk-margin-small-right" alt="LANL logo">
LaGriT
</a>
</div>
<div class="uk-navbar-right">
<ul class="uk-navbar-nav uk-visible@m">
<li><a href="/pages/commands">Commands</a></li>
<li><a href="/pages/tutorial/index">Tutorials</a></li>
<li><a href="/pages/release">Release Notes</a></li>
<li><a href="/pages/publications">Publications</a></li>
<li><a href="http://github.com/lanl/LaGriT"><span uk-icon="github"></span></a></li>
<!-- Begin search bar -->
<div class="nav-overlay uk-navbar-right">
<a class="uk-navbar-toggle" uk-search-icon uk-toggle="target: .nav-overlay; animation: uk-animation-fade" href="#"></a>
</div>
<div class="nav-overlay uk-navbar-left uk-flex-1" hidden>
<div class="uk-navbar-item uk-width-expand">
<form class="uk-search uk-search-navbar uk-width-1-1" action="https://lanl.github.io/LaGriT/search/">
<input class="uk-search-input" name="q" type="search" id="tipue_search_input" placeholder="Search..." autofocus>
</form>
</div>
<a class="uk-navbar-toggle" uk-close uk-toggle="target: .nav-overlay; animation: uk-animation-fade" href="#"></a>
</div>
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
'show': 10,
'newWindow' : true,
'showURL' : true,
'showTitleCount' : true,
'descriptiveWords' : 20,
'highlightTerms' : true,
'mode': 'static',
});
});
</script>
<!-- End search bar -->
</ul>
<a uk-navbar-toggle-icon="" href="#offcanvas" uk-toggle="" class="uk-navbar-toggle uk-hidden@m uk-icon uk-navbar-toggle-icon">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="navbar-toggle-icon">
<rect y="9" width="20" height="2"></rect>
<rect y="3" width="20" height="2"></rect>
<rect y="15" width="20" height="2"></rect>
</svg>
</a>
</div>
</nav>
</div>
</div>
<div class="uk-sticky-placeholder" style="height: 80px; margin: 0px;"></div>
<!-- End Header -->
<!-- Main Body text -->
<div class="tm-main uk-section uk-section-default">
<div class="uk-container uk-container-small uk-position-relative">
<h1 id="grid2grid">GRID2GRID</h1>
<hr />
<p>The <strong>grid2grid</strong> command converts a mesh with one element
type to a mesh with another. The conversion type is determined by the
second argument.</p>
<p>NOTE: Use of <strong>grid2grid</strong> to convert a 3D mesh to a tetrahedral mesh will in general result in a non-Delaunay tetrahedral mesh. If the target simulator is one that uses two-point flux approximation and Voronoi control volumes (FEHM, PFLOTRAN, TOUGH2) then using <strong>hextotet</strong> and then <strong>dump/stor</strong> to compute and output geometric coefficients, is not a good idea. If the ultimate goal is a a geometric coefficients file, one should use <strong>connect</strong> to connect vertices into a Delaunay mesh.</p>
<p>Note: Use of <strong>grid2grid</strong> to convert an octree refined hexahedral into to a tetrahedral mesh should not be done. You will get a result, however, no special algorithms are implemented to connect across interfaces where octree resolution changes and hanging nodes occur. One should instead copy the octree vertex set into a tet mesh object and use <strong>connect</strong> to create a tetrahedral mesh.</p>
<h2 id="syntax">SYNTAX</h2>
<pre>
<b>grid2grid</b> / ioption / [ cmo_sink ] / [ cmo_source ]
</pre>
<h2 id="options">OPTIONS</h2>
<p><code class="language-plaintext highlighter-rouge">ioption</code>: is a character string that determines the element type of the
source and sink meshes. There is no default option - this argument
must be specified.</p>
<ul>
<li><strong>quadtotri2</strong>   quad to 2 triangles, no new points.</li>
<li><strong>prismtotet3</strong>   prism to 3 tets, no new points.</li>
<li><strong>quattotri4</strong>   quad to 4 triangles, with one new point.</li>
<li><strong>pyrtotet4</strong>   pyramid to 4 tets, with one new point.</li>
<li><strong>hextotet5</strong>   hex to 5 tets, no new points.</li>
<li><strong>hextotet6</strong>   hex to 6 tets, no new points.</li>
<li><strong>prismtotet14</strong>   prism to 14 tets, four new points (1 + 3 faces).</li>
<li><strong>prismtotet18</strong>   prism to 18 tets, six new points (1 + 5 faces).</li>
<li><strong>hextotet24</strong>   hex to 24 tets, seven new points (1 + 6 faces).</li>
<li><strong>tree_to_fe</strong>   quadtree or octree grid to grid with no parent-type elements to clean amr or octree structures.</li>
</ul>
<p><code class="language-plaintext highlighter-rouge">[ cmo_snk / cmo_src ]</code> are the mesh_object names for the new mesh to create and the source mesh object. <code class="language-plaintext highlighter-rouge">cmo_src</code> is the original grid. <code class="language-plaintext highlighter-rouge">cmo_snk</code> is the name for the new tet or triangle grid. These may be the same grid, if so desired. If both are left blank, the current mesh object will be used. If only one mesh name
is given, it will be used at the sink mesh, and the current mesh object will be used as the source.</p>
<h2 id="examples">EXAMPLES</h2>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>grid2grid / hextotet24 /  cmo_tet / cmo_hex
</code></pre></div></div>
<p>Convert each hex element in cmo_hex to 24 tets and name the new grid cmo_tet.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>grid2grid / quadtotri4 /  new_mesh
</code></pre></div></div>
<p>No source mesh is given, so the current mesh object (which is a quad
mesh) will have every quad converted into 4 triangles, and saved as new_mesh.</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>grid2grid / tree_to_fe / new_mesh /  octree_mesh
</code></pre></div></div>
<p>Parent elements in octree_mesh will be removed, so only the leaf elements remain. The result will be stored in new_mesh.
This is often used to ensure a single valid mesh for other commands or for use outside of LaGriT.
The octree attributes itetpar, itetkid, and itetlev will be updated in the new_mesh.
A description of the octree mesh and attributes are described in the command
<a href="https://lanl.github.io/LaGriT/pages/docs/commands/REFINE.html"><strong><code class="language-plaintext highlighter-rouge">refine</code></strong></a></p>
</div>
</div>
<!-- Begin footer -->
<footer class="footer-distributed">
<div class="footer-right">
<div><img src="/assets/img/lanl_logo_white.png" height="80"></div>
</div>
<div class="footer-left lg-background-color">
<p class="footer-links" style="font-family: 'Fira Sans', sans-serif; color: white;">
<a href="/">Home</a>
·
<a href="/pylagrit/original/index.html">PyLaGriT</a>
·
<a href="https://int.lanl.gov/org/ddste/aldcels/ees/index.shtml">EES-16</a>
·
<a href="/pages/licensing.html">License</a>
·
<a href="https://lagrit.lanl.gov/">Contact</a>
</p>
<p>&copy; 2019 Los Alamos National Laboratory</p>
<p>EES-16 | Computational Earth Science</p>
<p>LA-CC-15-069</p>
</div>
</footer>
<!-- Begin Navigation Bar -->
<div id="offcanvas" uk-offcanvas="mode: push; overlay: true" class="uk-offcanvas">
<div class="uk-offcanvas-bar">
<div class="uk-panel">
<ul class="uk-nav uk-nav-default tm-nav">
<form class="uk-search uk-search-default" action="https://lanl.github.io/LaGriT/search/">
<a href="" uk-search-icon></a>
<input class="uk-search-input" type="search" placeholder="" name="q" id="tipue_search_input_mobile">
</form>
<li class="uk-nav-header">General</li>
<li><a href="/">Home</a></li>
<li><a href="/pages/commands">Commands</a></li>
<li><a href="/pages/release">Release Notes</a></li>
<li><a href="/pages/publications">Publications</a></li>
<li><a href="http://github.com/lanl/LaGriT">GitHub</a></li>
</ul>
</div>
</div>
</div>
<!-- End Navigation Bar -->
</div>
</body>
</html>