Commit da4bdf53 authored by Dave Moxey's avatar Dave Moxey
Browse files

Add documentation to MeshConvert

parent 85298932
...@@ -133,7 +133,7 @@ solve the resulting linear system. ...@@ -133,7 +133,7 @@ solve the resulting linear system.
\mc is designed to provide a pipeline approach to mesh generation. To do this, \mc is designed to provide a pipeline approach to mesh generation. To do this,
we break up tasks into three different types. Each task is called a we break up tasks into three different types. Each task is called a
\emph{module} and a chain of modules specifies the pipeline. There are \emph{module} and a chain of modules specifies the pipeline.
% %
\begin{itemize} \begin{itemize}
\item \textbf{Input} modules read meshes in a variety of formats; \item \textbf{Input} modules read meshes in a variety of formats;
...@@ -200,7 +200,8 @@ line argument: ...@@ -200,7 +200,8 @@ line argument:
\subsubsection{Input modules} \subsubsection{Input modules}
Input and output modules use file extension names to determine the correct Input and output modules use file extension names to determine the correct
module to use. The table below indicates support currently implemented. module to use. Not every module is capable of reading high-order information,
where it exists. The table below indicates support currently implemented.
\begin{center} \begin{center}
\begin{tabularx}{\linewidth}{llcX} \begin{tabularx}{\linewidth}{llcX}
...@@ -257,17 +258,28 @@ available within \mc. ...@@ -257,17 +258,28 @@ available within \mc.
\subsubsection{Negative Jacobian detection} \subsubsection{Negative Jacobian detection}
To detect elements with negative Jacobians use the \inltt{jac} module: To detect elements with negative Jacobian determinant, use the \inltt{jac}
module:
%
\begin{lstlisting}[style=BashInputStyle] \begin{lstlisting}[style=BashInputStyle]
MeshConvert -m jac Mesh.xml output.xml MeshConvert -m jac Mesh.xml output.xml
\end{lstlisting} \end{lstlisting}
%
To get a detailed list of elements which have negative Jacobians, one may use
the \inltt{list} option:
%
\begin{lstlisting}[style=BashInputStyle]
MeshConvert -m jac:list Mesh.xml output.xml
\end{lstlisting}
%
and to extract the elements for the purposes of visualisation within the domain, and to extract the elements for the purposes of visualisation within the domain,
use the \inltt{extract} boolean parameter: use the \inltt{extract} boolean parameter:
%
\begin{lstlisting}[style=BashInputStyle] \begin{lstlisting}[style=BashInputStyle]
MeshConvert -m jac:extract Mesh.xml MeshWithNegativeElements.xml MeshConvert -m jac:extract Mesh.xml MeshWithNegativeElements.xml
\end{lstlisting} \end{lstlisting}
\subsubsection{Spherigon Patches} \subsubsection{Spherigon patches}
Where high-order information is not available (e.g. when using meshes from Where high-order information is not available (e.g. when using meshes from
imaging software), various techniques can be used to apply a smoothing to the imaging software), various techniques can be used to apply a smoothing to the
...@@ -362,13 +374,13 @@ MeshConvert -m peralign:surf1=11:surf2=12:dir=y:orient input.dat output.xml ...@@ -362,13 +374,13 @@ MeshConvert -m peralign:surf1=11:surf2=12:dir=y:orient input.dat output.xml
\inltt{peralign} module before the \inltt{spherigon} module. \inltt{peralign} module before the \inltt{spherigon} module.
\end{notebox} \end{notebox}
\subsubsection{Prism splitting} \subsubsection{Boundary layer splitting}
Often it is the case that one can generate a coarse boundary layer grid of a Often it is the case that one can generate a coarse boundary layer grid of a
mesh. \mc has a method for splitting prismatic elements into finer elements mesh. \mc has a method for splitting prismatic and hexahedral elements into
based on the work presented in~\cite{MoHaJoSh14} and~\cite{MoHaPeSh14b}. You finer elements based on the work presented in~\cite{MoHaJoSh14}
must have a prismatic mesh that is $O$-type -- that is, you can modify the and~\cite{MoHaPeSh14b}. You must have a prismatic mesh that is $O$-type -- that
prismatic layer without modifying the rest of the mesh. is, you can modify the boundary layer without modifying the rest of the mesh.
Given $n$ layers, and a ratio $r$ which defines the relative heights of elements Given $n$ layers, and a ratio $r$ which defines the relative heights of elements
in different layers, the method works by defining a geometric progression of in different layers, the method works by defining a geometric progression of
...@@ -376,9 +388,9 @@ points ...@@ -376,9 +388,9 @@ points
\[ \[
x_k = x_{k-1} + ar^k, \quad a = \frac{2(1-r)}{1 - r^{n+1}} x_k = x_{k-1} + ar^k, \quad a = \frac{2(1-r)}{1 - r^{n+1}}
\] \]
in the standard segment $[-1,1]$. These are then projected into the coarse prism in the standard segment $[-1,1]$. These are then projected into the coarse
to construct a sequence of increasingly refined elements, as depicted in elements to construct a sequence of increasingly refined elements, as depicted
figure~\ref{fig:util:mc:split}. in figure~\ref{fig:util:mc:split}.
\begin{figure} \begin{figure}
\begin{center} \begin{center}
...@@ -415,7 +427,9 @@ of 2 and 7 integration points per element use the following command: ...@@ -415,7 +427,9 @@ of 2 and 7 integration points per element use the following command:
\begin{notebox} \begin{notebox}
You can also use an expression in terms of coordinates $(x,y,z)$ for $r$ to You can also use an expression in terms of coordinates $(x,y,z)$ for $r$ to
make the ratio spatially varying; e.g. \inltt{r=x\^2+y\^2}. make the ratio spatially varying; e.g. \inltt{r=sin(x)}. In this case the
function should be sufficiently smooth to prevent the elements
self-intersecting.
\end{notebox} \end{notebox}
\subsubsection{High-order cylinder generation} \subsubsection{High-order cylinder generation}
...@@ -472,6 +486,24 @@ module: ...@@ -472,6 +486,24 @@ module:
MeshConvert -m detect volume.xml volumeWithBoundaryComposite.xml MeshConvert -m detect volume.xml volumeWithBoundaryComposite.xml
\end{lstlisting} \end{lstlisting}
\subsubsection{Scalar function curvature}
This module imposes curvature on a surface given a scalar function
$z=f(x,y)$. For example, if on surface 1 we wish to apply a surface defined by a
Gaussian $z = \exp[-(x^2+y^2)]$ using 7 quadrature points in each direction, we
may issue the command
\begin{lstlisting}[style=BashInputStyle]
MeshConvert -m scalar:surf=1:nq=7:scalar=exp\(x^2+y^2\) mesh.xml deformed.xml
\end{lstlisting}
\begin{notebox}
This module makes no attempt to apply the curvature to the interior of the
domain. Elements must therefore be coarse in order to prevent
self-intersection. If a boundary layer is required, one option is to use this
module in combination with the splitting module described earlier.
\end{notebox}
%%% Local Variables: %%% Local Variables:
%%% mode: latex %%% mode: latex
%%% TeX-master: "../user-guide" %%% TeX-master: "../user-guide"
......
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// //
// File: ProcessExtractSurf.cpp // File: ProcessScalar.cpp
// //
// For more information, please see: http://www.nektar.info/ // For more information, please see: http://www.nektar.info/
// //
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// //
// Description: Extract one or more surfaces from mesh. // Description: Add scalar function curvature to a given surface.
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// //
// Description: Extract one or more surfaces from mesh. // Description: Add scalar function curvature to a given surface.
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment