<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://fluid.colorado.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mkm06</id>
		<title>PHASTA Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://fluid.colorado.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mkm06"/>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php/Special:Contributions/Mkm06"/>
		<updated>2026-05-23T12:13:19Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=531</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=531"/>
				<updated>2015-02-27T17:20:38Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Setting up a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]], which also requires a mesh file (a .sms file).  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
If you are running a problem that is solving scalars in addition to flow, you must pass an additional argument to the pre-processing script.  For example, if the problem is solving the level set and second distance scalar (for a total of seven variables), the command is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O -v 7&lt;br /&gt;
&lt;br /&gt;
More information on NSPre versions and scripts can be found on the [[NSPre]] page.&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
The first thing you should do is connect to a viz node or other computing resource.  Do NOT run PHASTA on portal0!&lt;br /&gt;
&lt;br /&gt;
In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable.  To get your executable, you'll need to compile PHASTA using [[Compiling PHASTA With CMake|CMake]].&lt;br /&gt;
&lt;br /&gt;
Your model, solver.inp, and input.config files should all be in the same directory.  From that directory, you can run PHASTA using MPI:&lt;br /&gt;
  mpirun -np XX path_to_your_executable&lt;br /&gt;
where XX is the number of processors.&lt;br /&gt;
&lt;br /&gt;
To debug PHASTA using [http://www.rougewave.com TotalView], first compile PHASTA with the DEBUG option turned on.  Second, add TotalView to your environment (version as of 4/15/14):&lt;br /&gt;
  soft add +totalview-8.13.0&lt;br /&gt;
&lt;br /&gt;
Then, you can run PHASTA through TotalView:&lt;br /&gt;
  mpirun -tv -np XX path_to_your_executable&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;br /&gt;
&lt;br /&gt;
The main tool for viewing your results is [[ParaView]].  You will need your results (a series of restart files) and a .pht file that you will actually open in ParaView.&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=530</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=530"/>
				<updated>2015-02-27T17:14:23Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Setting up a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]], which also requires a mesh file (a .sms or .smd file).  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
If you are running a problem that is solving scalars in addition to flow, you must pass an additional argument to the pre-processing script.  For example, if the problem is solving the level set and second distance scalar (for a total of seven variables), the command is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O -v 7&lt;br /&gt;
&lt;br /&gt;
More information on NSPre versions and scripts can be found on the [[NSPre]] page.&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
The first thing you should do is connect to a viz node or other computing resource.  Do NOT run PHASTA on portal0!&lt;br /&gt;
&lt;br /&gt;
In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable.  To get your executable, you'll need to compile PHASTA using [[Compiling PHASTA With CMake|CMake]].&lt;br /&gt;
&lt;br /&gt;
Your model, solver.inp, and input.config files should all be in the same directory.  From that directory, you can run PHASTA using MPI:&lt;br /&gt;
  mpirun -np XX path_to_your_executable&lt;br /&gt;
where XX is the number of processors.&lt;br /&gt;
&lt;br /&gt;
To debug PHASTA using [http://www.rougewave.com TotalView], first compile PHASTA with the DEBUG option turned on.  Second, add TotalView to your environment (version as of 4/15/14):&lt;br /&gt;
  soft add +totalview-8.13.0&lt;br /&gt;
&lt;br /&gt;
Then, you can run PHASTA through TotalView:&lt;br /&gt;
  mpirun -tv -np XX path_to_your_executable&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;br /&gt;
&lt;br /&gt;
The main tool for viewing your results is [[ParaView]].  You will need your results (a series of restart files) and a .pht file that you will actually open in ParaView.&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=ParaView&amp;diff=512</id>
		<title>ParaView</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=ParaView&amp;diff=512"/>
				<updated>2015-02-24T21:30:01Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Running */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
ParaView is a parallel, scalable, visualization package from Kitware. See http://paraview.org/&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
&lt;br /&gt;
To launch a single threaded ParaView instance, first connect via [[VNC]], then use vglconnect to connect to one of the compute machines:&lt;br /&gt;
&lt;br /&gt;
  vglconnect -s viz001&lt;br /&gt;
&lt;br /&gt;
Add the desired version of ParaView to your environment (the below example will get the &amp;quot;default&amp;quot; version)&lt;br /&gt;
&lt;br /&gt;
  soft add @paraview&lt;br /&gt;
&lt;br /&gt;
and lunch the GUI:&lt;br /&gt;
&lt;br /&gt;
  vglrun paraview&lt;br /&gt;
&lt;br /&gt;
== Viewing Serial Cases ==&lt;br /&gt;
&lt;br /&gt;
Within the GUI, open the .pht file that corresponds to your case.  The .pht file will appear in the &amp;quot;pipeline browser&amp;quot; within ParaView.  To actually see your model, click the &amp;quot;apply&amp;quot; button on the properties tab.  To visualize a particular flow property, choose that property from the dropdown menu in the &amp;quot;active variable controls&amp;quot; toolbar, and then click the button corresponding to the type of visualization you want (contour, slice, etc.) in the &amp;quot;common&amp;quot; toolbar.  The properties of the visualization element can then be controlled in the &amp;quot;properties&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
For more help with the ParaView GUI, see [http://www.paraview.org/Wiki/The_ParaView_Tutorial ParaView's tutorial].&lt;br /&gt;
&lt;br /&gt;
== Parallel (Client/Server) Mode ==&lt;br /&gt;
&lt;br /&gt;
==CoProcessing==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=511</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=511"/>
				<updated>2015-02-20T17:56:18Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Viewing your results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]], which also requires a mesh file.  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
More information on NSPre versions and scripts can be found on the [[NSPre]] page.&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
The first thing you should do is connect to a viz node or other computing resource.  Do NOT run PHASTA on portal0!&lt;br /&gt;
&lt;br /&gt;
In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable.  To get your executable, you'll need to compile PHASTA using [[Compiling PHASTA With CMake|CMake]].&lt;br /&gt;
&lt;br /&gt;
Your model, solver.inp, and input.config files should all be in the same directory.  From that directory, you can run PHASTA using MPI:&lt;br /&gt;
  mpirun -np XX path_to_your_executable&lt;br /&gt;
where XX is the number of processors.&lt;br /&gt;
&lt;br /&gt;
To debug PHASTA using [http://www.rougewave.com TotalView], first compile PHASTA with the DEBUG option turned on.  Second, add TotalView to your environment (version as of 4/15/14):&lt;br /&gt;
  soft add +totalview-8.13.0&lt;br /&gt;
&lt;br /&gt;
Then, you can run PHASTA through TotalView:&lt;br /&gt;
  mpirun -tv -np XX path_to_your_executable&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;br /&gt;
&lt;br /&gt;
The main tool for viewing your results is [[ParaView]].  You will need your results (a series of restart files) and a .pht file that you will actually open in ParaView.&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=510</id>
		<title>SimModeler</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=510"/>
				<updated>2015-02-20T17:42:26Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Converting old files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
&lt;br /&gt;
SimModeler is a model creation program from Simmetrix.  It takes the mesh and geometric model and creates the input files for PHASTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
To run SimModeler, first connect via VNC, then use vglconnect to connect to one of the compute machines:&lt;br /&gt;
&lt;br /&gt;
 vglconnect -s viz001&lt;br /&gt;
&lt;br /&gt;
Add the desired version of SimModeler to your environment (the below example will get the &amp;quot;default&amp;quot; version):&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodeler&lt;br /&gt;
&lt;br /&gt;
and lunch the GUI:&lt;br /&gt;
&lt;br /&gt;
 vglrun simmodeler&lt;br /&gt;
&lt;br /&gt;
== Converting old files ==&lt;br /&gt;
This is a guide for converting old files (parasolid and .spj) to the new format (.smd).&lt;br /&gt;
&lt;br /&gt;
After connecting to one of the compute machines, add the suite of tools for SimModeler to your environment:&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodsuite&lt;br /&gt;
&lt;br /&gt;
From your case, make a new directory and copy your parasolid (.x_t or .xmt_txt), and .spj file into it. Rename the parasolid file to geom.xmt_txt and the .spj file to geom.spj, if they aren't already named that way. Then from the directory just created (now holds geom.xmt_txt and geom.spj) run: &lt;br /&gt;
&lt;br /&gt;
 /users/matthb2/simmodelerconvert/testConvert &lt;br /&gt;
&lt;br /&gt;
Your directory now contains two new files: model.smd and model.x_t&lt;br /&gt;
&lt;br /&gt;
== Creating new files ==&lt;br /&gt;
&lt;br /&gt;
Loading in geometry is about as intuitive as is possibly can be. Go to File -&amp;gt; Import Geometry, browse to the appropriate model, and select Open. Once open, it is possible to both mesh the model and to create boundary conditions for it. Because BLMesher is presently the primary meshing tool, it is only necessary to use SimModeler to create boundary conditions. Go to Analysis -&amp;gt; Select Solver, and select phasta. After selecting phasta, the Analysis Attributes option under Analysis becomes valid. Clicking it brings up the corresponding window. From this new window, it is possible to apply  boundary conditions and initial conditions by clicking the small button next to the drop down menu [add picture]. Note you must also double click on &amp;quot;problem definition&amp;quot; which will allow you to name the case.  Later post processing expects the name &amp;quot;geom&amp;quot; so always name it so.&lt;br /&gt;
&lt;br /&gt;
== Boundary conditions ==&lt;br /&gt;
&lt;br /&gt;
Commonly boundary conditions include:&lt;br /&gt;
&lt;br /&gt;
*comp3 - Specifies a 3D velocity vector&lt;br /&gt;
*comp1 - Specifies a 3D vector in which the velocity is constrained. Velocity normal to this vector is not directly affected. This is useful for creating slip walls and mimicking free stream regions. &lt;br /&gt;
*temperature - Sets the temperature of the wall. This is only needed for compressible cases. &lt;br /&gt;
*scalar_1 - Sets the scalar_1 / eddy viscosity to apply at a wall. For the Spalart Allmaras models, scalar_1 should be zero at physical walls where a boundary layer develops and 3 to 5 times the molecular viscosity at free stream boundaries (http://turbmodels.larc.nasa.gov/spalart.html)&lt;br /&gt;
*surf ID - Associates a number with one or more faces. This can then be read by Phasta and used to apply more complicated boundary conditions in software. &lt;br /&gt;
*natural pressure - Apply a mean pressure over a surface. The pressure at any particular point is still allowed to vary (someone verify). &lt;br /&gt;
*traction vector - ??. The zero vector is typically applied at outlet. &lt;br /&gt;
*heat flux - Specifies the rate at which heat is injected / removed (not sure which one) into / from the fluid domain. The value is almost always set to zero to create a perfectly insulated boundary. &lt;br /&gt;
*scalar_1 flux - set the flux of scalar_1 / eddy viscosity into / out of the domain (not sure which one). This is typically only used at outlets where high values of eddy viscosity have been convected downstream of turbulent walls. The value is almost always set to zero. &lt;br /&gt;
*turbulence wall - Indicates that a surface is to be included in the calculation of d2wall files (verify) which are then used by the Spalart Allmaras turbulence model to generate more physical turbulent kinetic energy production / dissipation budgets.&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=509</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=509"/>
				<updated>2015-02-18T17:37:32Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Setting up a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]], which also requires a mesh file.  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
More information on NSPre versions and scripts can be found on the [[NSPre]] page.&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
The first thing you should do is connect to a viz node or other computing resource.  Do NOT run PHASTA on portal0!&lt;br /&gt;
&lt;br /&gt;
In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable.  To get your executable, you'll need to compile PHASTA using [[Compiling PHASTA With CMake|CMake]].&lt;br /&gt;
&lt;br /&gt;
Your model, solver.inp, and input.config files should all be in the same directory.  From that directory, you can run PHASTA using MPI:&lt;br /&gt;
  mpirun -np XX path_to_your_executable&lt;br /&gt;
where XX is the number of processors.&lt;br /&gt;
&lt;br /&gt;
To debug PHASTA using [http://www.rougewave.com TotalView], first compile PHASTA with the DEBUG option turned on.  Second, add TotalView to your environment (version as of 4/15/14):&lt;br /&gt;
  soft add +totalview-8.13.0&lt;br /&gt;
&lt;br /&gt;
Then, you can run PHASTA through TotalView:&lt;br /&gt;
  mpirun -tv -np XX path_to_your_executable&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=507</id>
		<title>PhParAdapt/SCOREC</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=PhParAdapt/SCOREC&amp;diff=507"/>
				<updated>2014-10-28T03:36:42Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Download and compile (viz nodes) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;-----------------------------------------------&lt;br /&gt;
== Download and compile (viz nodes) ==&lt;br /&gt;
This sections is inspired from &amp;lt;http://redmine.scorec.rpi.edu/projects/pumi/wiki/Build_Instructions&amp;gt;. Please read it first before continuing, as some information on this wiki page is not repeated.&lt;br /&gt;
The SCOREC tools now build against CMake. Only Parma, the PHASTA utilities and phParAdapt still build against Autotools.&lt;br /&gt;
From a terminal, run the following commands:&lt;br /&gt;
  soft add +cmake&lt;br /&gt;
  soft add +git&lt;br /&gt;
  cd ~&lt;br /&gt;
  mkdir SCOREC.develop&lt;br /&gt;
  cd SCOREC.develop&lt;br /&gt;
  git clone ssh://your_username@jumpgate-phasta.colorado.edu/users/mrasquin/SCOREC.develop/compilation &lt;br /&gt;
&lt;br /&gt;
The git command will download these instructions, along with a checkout and compile script for Parma and phParAdapt. The next commands to compile the whole stack with the GNU compiler on the viz nodes are:&lt;br /&gt;
  soft add +gcc-4.8.1&lt;br /&gt;
  soft add +openmpi-gnu&lt;br /&gt;
  mkdir install-gcc-O2 //all the libraries and executable will go there&lt;br /&gt;
  mkdir build-gcc-O2 // this is where you will run the cmake commands&lt;br /&gt;
  cd build-gcc-O2  // Go to the your build directory to execute the next cmake command&lt;br /&gt;
  cmake ../CMake.SCOREC -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/users/mrasquin/SCOREC.develop/install-gcc-O2 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx &lt;br /&gt;
&lt;br /&gt;
The last cmake command creates the Makefiles. Do not forget to update the path to PREFIX according to your install directory. There are additional parameters and options that you can set up but this should allow you to get started on the viz nodes. If you want to see all the parameters, you can replace cmake by ccmake (note the 2 consecutive &amp;quot;c&amp;quot;) in the command above.&lt;br /&gt;
By default, it generates the Makefile with meshmodel. See the redmine link above about how to compile with parasolid or other geometric model instead of meshmodel.&lt;br /&gt;
The cmake command also downloads the parmetis package inside the build-gcc-O2 directory. If you want to use 64 bit integer in parmetis in order to avoid integer overflow while partitioning a mesh with more than 100M elements par part (typically for the initial partitioning from 1 to n), edit &lt;br /&gt;
&lt;br /&gt;
  ./parmetis-4.0.2/metis/include/metis.h&lt;br /&gt;
&lt;br /&gt;
and set &lt;br /&gt;
&lt;br /&gt;
  #define IDXTYPEWIDTH 64&lt;br /&gt;
&lt;br /&gt;
Now, compile the SCOREC tools (in serial only for now - do not try make -j 8 for instance):&lt;br /&gt;
&lt;br /&gt;
  make 2&amp;gt;&amp;amp;1 | tee log_cmake_make.dat #The output is saved in log_cmake_make.dat&lt;br /&gt;
  make install 2&amp;gt;&amp;amp;1 | tee log_cmake_install.dat #The output is saved in log_cmake_install.dat&lt;br /&gt;
  cd .. #back to SCOREC.develop&lt;br /&gt;
&lt;br /&gt;
Now you should have the pumi tools installed in SCOREC.develop/install-gcc-O2. It is time to download and compile the Parma library. From SCOREC.develop, &lt;br /&gt;
  mkdir Autotools.SCOREC&lt;br /&gt;
  cd Autotools.SCOREC&lt;br /&gt;
  cp ../compilation/parma_install.sh .&lt;br /&gt;
&lt;br /&gt;
Edit and update the script parma_install.sh. In particular, edit PREFIX to the same path used in the cmake command above. Other parameters you need to update are the compilation options (DEBUG), the svn username if you have one, etc. Then:&lt;br /&gt;
  ./parma_install.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_checkout.dat&lt;br /&gt;
  ./parma_install.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_setup.dat&lt;br /&gt;
  ./parma_install.sh intall_all 2&amp;gt;&amp;amp;1 | tee log_autotools_parma_install.dat&lt;br /&gt;
&lt;br /&gt;
For phParAdapt (and PHASTA utilites), the procedure is similar:&lt;br /&gt;
  cp ../compilation/phParAdaptBuild.sh&lt;br /&gt;
  edit path to PREFIX in parma_install.sh + other parameters&lt;br /&gt;
  ./phParAdaptBuild.sh checkout_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_checkout.dat&lt;br /&gt;
  ./phParAdaptBuild.sh setup_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_setup.dat&lt;br /&gt;
  ./phParAdaptBuild.sh install_all 2&amp;gt;&amp;amp;1 | tee log_autotools_phparadapt_install.dat&lt;br /&gt;
&lt;br /&gt;
Your phParAdapt executable should be in ~/SCOREC.develop/install-gcc-O2/bin/phParAdapt&lt;br /&gt;
&lt;br /&gt;
== Convert geom_ver63.sms to FMDB format==&lt;br /&gt;
*This can be done in same directory in which you created geom_ver63.sms. You first need to convert geom_ver63.sms to FMDB format. The executable that will do this is at /users/jema6380/runSimMesh2FMDB.sh&lt;br /&gt;
*Make a link from the output file, geom_FMDB.sms, to geom.sms (ln -s geom_FMDB.sms geom.sms)&lt;br /&gt;
&lt;br /&gt;
==Create geom.spj==&lt;br /&gt;
*If you have not done so already, create geom.spj. This is not done with Simulation Maker as was done previously, but can simply be done with a vim editor. See the file /users/jema6380/Models/Boeing/BetaScale2CaltechTunnel/CT_Open32_B0_D30_U20/9-A0-24jets/geom.spj for some guidance. As a quick example, if your boundary condition is a velocity of 20 i_hat m/s (comp3) on the inlet face (which let's say has a face number of 1651), then you would enter:&lt;br /&gt;
   comp3: 1651 2 20 1 0 0&lt;br /&gt;
where the &amp;quot;2&amp;quot; designates that we are talking about a face, which has 2 dimensions; the &amp;quot;20&amp;quot; is the speed; and the &amp;quot;1 0 0&amp;quot; is the direction.&lt;br /&gt;
*Michel created a script that will make this process faster, which is desirable if you have a large number of faces. If you want to use the script, then first use the executable at /users/jema6380/getFaceList.sh to create a list of faces. From the terminal type:&lt;br /&gt;
   ./getFaceList.sh &amp;quot;input_file&amp;quot;&lt;br /&gt;
where &amp;quot;input_file&amp;quot; is the file that contains the face numbers, which presumably does not already list them consecutively. This might be BLattr.inp, for exmple. &lt;br /&gt;
*Now create a new directory called &amp;quot;FacesModelAttributes&amp;quot; and put all of the boundary conditions in .dat files. See the files in /users/jema6380/Models/Boeing/BetaScale2CaltechTunnel/CT_Open32_B0_D30_U20/Simplified_SPJ_file/FacesModelAttributes/ for guidance. Make sure all the .dat files have a name that begins with &amp;quot;attr_&amp;quot; . &lt;br /&gt;
*copy /users/jema6380/buildSimplifiedAttrFile.sh to the Simplified_SPJ_file directory and do:&lt;br /&gt;
   ./buildSimplifiedAttrFile.sh&lt;br /&gt;
*This should create a file called result.spj, which contains all of the boundary conditions. cd back to your working mesh directory and make a link from result.spj to geom.spj. Also make a link from result.spj to geomNOIC.spj&lt;br /&gt;
&lt;br /&gt;
==Partition geom_ver63.sms==&lt;br /&gt;
*Make sure you have geom.xmt_txt in your working directory.&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=497</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=497"/>
				<updated>2014-04-25T01:55:45Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Serial Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CLSVOF is a coupled level set - volume of fluid method.  The method corrects the level set to make it locally (for each element containing the interface) volume conserving.&lt;br /&gt;
&lt;br /&gt;
== '''Serial Algorithm''' ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''(I)  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
  Also need a tag for nodal completeness&lt;br /&gt;
  These tags get dimensioned (size numel and size numnp) in itrdrv?&lt;br /&gt;
&lt;br /&gt;
'''2.'''(C)  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''(C)  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''(I)  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 2 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.(L)  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.(I)  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''(I)  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
(A) Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again, and the volume recomputed.  When the computed volume fraction is within a tolerance of the actual volume fraction, the new interface has been found, and the nodes can be updates.&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''(I)  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''(A)  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''(A)  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== '''Parallel Algorithm''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=496</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=496"/>
				<updated>2014-04-22T01:39:55Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Running a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]].  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
The first thing you should do is connect to a viz node or other computing resource.  Do NOT run PHASTA on portal0!&lt;br /&gt;
&lt;br /&gt;
In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable.  To get your executable, you'll need to compile PHASTA using [[Compiling PHASTA With CMake|CMake]].&lt;br /&gt;
&lt;br /&gt;
Your model, solver.inp, and input.config files should all be in the same directory.  From that directory, you can run PHASTA using MPI:&lt;br /&gt;
  mpirun -np XX path_to_your_executable&lt;br /&gt;
where XX is the number of processors.&lt;br /&gt;
&lt;br /&gt;
To debug PHASTA using [http://www.rougewave.com TotalView], first compile PHASTA with the DEBUG option turned on.  Second, add TotalView to your environment (version as of 4/15/14):&lt;br /&gt;
  soft add +totalview-8.13.0&lt;br /&gt;
&lt;br /&gt;
Then, you can run PHASTA through TotalView:&lt;br /&gt;
  mpirun -tv -np XX path_to_your_executable&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=495</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=495"/>
				<updated>2014-04-22T01:39:01Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Running a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]].  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
The first thing you should do is connect to a viz node or other computing resource.  Do NOT run PHASTA on portal0!&lt;br /&gt;
&lt;br /&gt;
In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable.  To get your executable, you'll need to compile PHASTA using [[Compiling PHASTA With CMake|CMake]].&lt;br /&gt;
&lt;br /&gt;
Your model, solver.inp, and input.config files should all be in the same directory.  From that directory, you can run PHASTA using MPI:&lt;br /&gt;
  mpirun -np XX path_to_your_executable&lt;br /&gt;
where XX is the number of processors.&lt;br /&gt;
&lt;br /&gt;
To debug PHASTA using [[www.rougewave.com TotalView]], first compile PHASTA with the DEBUG option turned on.  Second, add TotalView to your environment (version as of 4/15/14):&lt;br /&gt;
  soft add +totalview-8.13.0&lt;br /&gt;
&lt;br /&gt;
Then, you can run PHASTA through TotalView:&lt;br /&gt;
  mpirun -tv -np XX path_to_your_executable&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=494</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=494"/>
				<updated>2014-04-22T01:37:05Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Running a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]].  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
The first thing you should do is connect to a viz node or other computing resource.  Do NOT run PHASTA on portal0!&lt;br /&gt;
&lt;br /&gt;
In order to run PHASTA, you'll need to have a properly prepared geometric model, solver.inp and input.config files, and a PHASTA executable.  To get your executable, you'll need to compile PHASTA using [[Compiling PHASTA With CMake|CMake]].&lt;br /&gt;
&lt;br /&gt;
Your model, solver.inp, and input.config files should all be in the same directory.  From that directory, you can run PHASTA using MPI:&lt;br /&gt;
  mpirun -np XX path_to_your_executable&lt;br /&gt;
where XX is the number of processors.&lt;br /&gt;
&lt;br /&gt;
To debug PHASTA using [[www.rougewave.com|TotalView]], first compile PHASTA with the DEBUG option turned on.  Second, add TotalView to your environment (version as of 4/15/14):&lt;br /&gt;
  soft add +totalview-8.13.0&lt;br /&gt;
&lt;br /&gt;
Then, you can run PHASTA through TotalView:&lt;br /&gt;
  mpirun -tv -np XX path_to_your_executable&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=493</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=493"/>
				<updated>2014-04-22T00:52:04Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Setting up a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
After you have set up your model, you will have two files: model.smd and model.x_t.  To run your problem, you will need to have geom.smd and geom.xmt_txt.  You can create these by linking them to your existing files:&lt;br /&gt;
  ln -s model.smd geom.smd&lt;br /&gt;
  ln -s model.x_t geom.xmt_txt&lt;br /&gt;
&lt;br /&gt;
The final step in model preparation is pre-processing using [[NSPre]].  As of 4/15/14, the script to run is&lt;br /&gt;
  /users/chitak/develop/phasta/phNSpre/phNSpre/bin/x86_64_linux-icc/NSpre-Parasolid_Serial-openmpi-O&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=492</id>
		<title>SimModeler</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=492"/>
				<updated>2014-04-22T00:05:42Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Creating new files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
&lt;br /&gt;
SimModeler is a model creation program from Simmetrix.  It takes the mesh and geometric model and creates the input files for PHASTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
To run SimModeler, first connect via VNC, then use vglconnect to connect to one of the compute machines:&lt;br /&gt;
&lt;br /&gt;
 vglconnect -s viz001&lt;br /&gt;
&lt;br /&gt;
Add the desired version of SimModeler to your environment (the below example will get the &amp;quot;default&amp;quot; version):&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodeler&lt;br /&gt;
&lt;br /&gt;
and lunch the GUI:&lt;br /&gt;
&lt;br /&gt;
 vglrun simmodeler&lt;br /&gt;
&lt;br /&gt;
== Converting old files ==&lt;br /&gt;
This is a guide for converting old files (parasolid and .spj) to the new format (.smd).&lt;br /&gt;
&lt;br /&gt;
After connecting to one of the compute machines, add the suite of tools for SimModeler to your environment:&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodsuite&lt;br /&gt;
&lt;br /&gt;
From your case, make a new directory and copy your parasolid (.x_t or .xmt_txt), and .spj file into it. Rename the parasolid file to geom.xmt_txt and the .spj file to geom.spj, if they aren't already named that way. Then from the directory just created (now holds geom.xmt_txt and geom.spj) run: &lt;br /&gt;
&lt;br /&gt;
 ~matthb2/simmodelerconvert/testConvert &lt;br /&gt;
&lt;br /&gt;
Your directory now contains two new files: model.smd and model.x_t&lt;br /&gt;
&lt;br /&gt;
== Creating new files ==&lt;br /&gt;
&lt;br /&gt;
Loading in geometry is about as intuitive as is possibly can be. Go to File -&amp;gt; Import Geometry, browse to the appropriate model, and select Open. Once open, it is possible to both mesh the model and to create boundary conditions for it. Because BLMesher is presently the primary meshing tool, it is only necessary to use SimModeler to create boundary conditions. Go to Analysis -&amp;gt; Select Solver, and select phasta. After selecting phasta, the Analysis Attributes option under Analysis becomes valid. Clicking it brings up the corresponding window. From this new window, it is possible to apply  boundary conditions and initial conditions by clicking the small button next to the drop down menu [add picture].&lt;br /&gt;
&lt;br /&gt;
== Boundary conditions ==&lt;br /&gt;
&lt;br /&gt;
Commonly boundary conditions include:&lt;br /&gt;
&lt;br /&gt;
*comp3 - Specifies a 3D velocity vector&lt;br /&gt;
*comp1 - Specifies a 3D vector in which the velocity is constrained. Velocity normal to this vector is not directly affected. This is useful for creating slip walls and mimicking free stream regions. &lt;br /&gt;
*temperature - Sets the temperature of the wall. This is only needed for compressible cases. &lt;br /&gt;
*scalar_1 - Sets the scalar_1 / eddy viscosity to apply at a wall. For the Spalart Allmaras models, scalar_1 should be zero at physical walls where a boundary layer develops and 3 to 5 times the molecular viscosity at free stream boundaries (http://turbmodels.larc.nasa.gov/spalart.html)&lt;br /&gt;
*surf ID - Associates a number with one or more faces. This can then be read by Phasta and used to apply more complicated boundary conditions in software. &lt;br /&gt;
*natural pressure - Apply a mean pressure over a surface. The pressure at any particular point is still allowed to vary (someone verify). &lt;br /&gt;
*traction vector - ??. The zero vector is typically applied at outlet. &lt;br /&gt;
*heat flux - Specifies the rate at which heat is injected / removed (not sure which one) into / from the fluid domain. The value is almost always set to zero to create a perfectly insulated boundary. &lt;br /&gt;
*scalar_1 flux - set the flux of scalar_1 / eddy viscosity into / out of the domain (not sure which one). This is typically only used at outlets where high values of eddy viscosity have been convected downstream of turbulent walls. The value is almost always set to zero. &lt;br /&gt;
*turbulence wall - Indicates that a surface is to be included in the calculation of d2wall files (verify) which are then used by the Spalart Allmaras turbulence model to generate more physical turbulent kinetic energy production / dissipation budgets.&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=491</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=491"/>
				<updated>2014-04-21T21:09:17Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Setting up a problem */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=490</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=490"/>
				<updated>2014-04-15T06:31:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
As of 4/15/14, the version of SimModeler and the tool suite for it are:&lt;br /&gt;
  simmodeler-3.0-140309&lt;br /&gt;
  simmodsuite-8.0-140406&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=489</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=489"/>
				<updated>2014-04-11T23:08:46Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [[SimModeler]], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=488</id>
		<title>Getting Started with PHASTA</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Getting_Started_with_PHASTA&amp;diff=488"/>
				<updated>2014-04-11T23:08:10Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: Created page with &amp;quot;== '''Introduction''' == CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with UNIX and a connection to an HPC r...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CFD using PHASTA can be intimidating at the beginning.  The very first things you'll need are some familiarity with [[UNIX]] and a connection to an HPC resource like one of our systems or [[Janus Cheat Sheet|Janus]].  Once you've got those two things, this page will take you through the basics of setting up and running a problem.&lt;br /&gt;
&lt;br /&gt;
== '''Setting up a problem''' ==&lt;br /&gt;
The tool used for preparing your model for computation is [SimModeler], and instructions for running it are found on that page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Running a problem''' ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Viewing your results''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=487</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=487"/>
				<updated>2014-04-11T20:52:38Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: CLSVOF is in the process of being implemented within PHASTA.  The single-element algorithms have been developed and tested in Matlab.  The serial algorithm is being developed and tested within PHASTA.  Parallel development will follow.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
CLSVOF is a coupled level set - volume of fluid method.  The method corrects the level set to make it locally (for each element containing the interface) volume conserving.&lt;br /&gt;
&lt;br /&gt;
== '''Serial Algorithm''' ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''(I)  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
  Also need a tag for nodal completeness&lt;br /&gt;
  These tags get dimensioned (size numel and size numnp) in itrdrv?&lt;br /&gt;
&lt;br /&gt;
'''2.'''(C)  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''(C)  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''(I)  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.(L)  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.(L)  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.(L)  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.(L)  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.(L)  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.(I)  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.(I)  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''(I)  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
(A) Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again, and the volume recomputed.  When the computed volume fraction is within a tolerance of the actual volume fraction, the new interface has been found, and the nodes can be updates.&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''(I)  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''(A)  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''(A)  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== '''Parallel Algorithm''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=486</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=486"/>
				<updated>2014-04-11T20:43:10Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== '''Introduction''' ==&lt;br /&gt;
CLSVOF is a coupled level set - volume of fluid method.  The method corrects the level set to make it locally (for each element containing the interface) volume conserving.&lt;br /&gt;
&lt;br /&gt;
== '''Serial Algorithm''' ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''(I)  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
  Also need a tag for nodal completeness&lt;br /&gt;
  These tags get dimensioned (size numel and size numnp) in itrdrv?&lt;br /&gt;
&lt;br /&gt;
'''2.'''(C)  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''(C)  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''(I)  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.(L)  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.(L)  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.(L)  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.(L)  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.(L)  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.(I)  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.(I)  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''(I)  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
(A) Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again, and the volume recomputed.  When the computed volume fraction is within a tolerance of the actual volume fraction, the new interface has been found, and the nodes can be updates.&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''(I)  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''(A)  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''(A)  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== '''Parallel Algorithm''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=485</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=485"/>
				<updated>2014-04-11T20:34:54Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Serial Algorithm''' ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''(I)  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
  Also need a tag for nodal completeness&lt;br /&gt;
  These tags get dimensioned (size numel and size numnp) in itrdrv?&lt;br /&gt;
&lt;br /&gt;
'''2.'''(C)  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''(C)  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''(I)  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.(L)  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.(L)  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.(L)  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.(L)  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.(L)  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.(I)  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.(I)  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''(I)  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
(A) Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again, and the volume recomputed.  When the computed volume fraction is within a tolerance of the actual volume fraction, the new interface has been found, and the nodes can be updates.&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''(I)  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''(A)  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''(A)  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== '''Parallel Algorithm''' ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=458</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=458"/>
				<updated>2013-10-29T18:51:43Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Serial Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''(I)  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
  Also need a tag for nodal completeness&lt;br /&gt;
  These tags get dimensioned (size numel and size numnp) in itrdrv?&lt;br /&gt;
&lt;br /&gt;
'''2.'''(C)  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''(C)  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''(I)  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.(L)  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.(L)  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.(L)  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.(L)  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.(L)  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.(I)  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.(I)  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''(I)  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
(A) Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again, and the volume recomputed.  When the computed volume fraction is within a tolerance of the actual volume fraction, the new interface has been found, and the nodes can be updates.&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''(I)  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''(A)  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''(A)  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=457</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=457"/>
				<updated>2013-10-29T18:41:59Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''(I)  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
  Also need a tag for nodal completeness&lt;br /&gt;
  These tags get dimensioned (size numel and size numnp) in itrdrv?&lt;br /&gt;
&lt;br /&gt;
'''2.'''(C)  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''(C)  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.(L)  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.(L)  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.(L)  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.(L)  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.(L)  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.(I)  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.(I)  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''(I)  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
(A) Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again, and the volume recomputed.  When the computed volume fraction is within a tolerance of the actual volume fraction, the new interface has been found, and the nodes can be updates.&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''(I)  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''(A)  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''(A)  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=455</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=455"/>
				<updated>2013-10-22T18:59:23Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again, and the volume recomputed.  When the computed volume fraction is within a tolerance of the actual volume fraction, the new interface has been found, and the nodes can be updates.&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=454</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=454"/>
				<updated>2013-10-22T18:52:44Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{a}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=453</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=453"/>
				<updated>2013-10-22T18:52:19Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{e}-\mathbf{a}) \cdot ((\mathbf{b}-\mathbf{b}) \times (\mathbf{d}-\mathbf{a}))| } {3}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=452</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=452"/>
				<updated>2013-10-22T18:50:58Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
&lt;br /&gt;
Figure out which side of the interface is a tetrahedron.  F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
When there are two pentahedra, the volume of either one can be found by dividing it into two tetrahedra and a 5-sided pyramid.  The vertices of each tetrahedron are an element vertex, two points where the interface plane intersects element edges, and the midpoint of an element edge not intersected by the interface plane.  The vertices of the pyramid are the four points where the interface plane intersects the element edges and the midpoint of an element edge not intersected by the interface plane.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', '''d''', and '''e''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=451</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=451"/>
				<updated>2013-10-22T18:43:09Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.  2 nodal φ=0, others are different signs&lt;br /&gt;
&lt;br /&gt;
6.  3 nodal φ=0&lt;br /&gt;
&lt;br /&gt;
7.  All φ are different signs&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Cases 3, 5, and 7 above have the interface plane passing through the element. (Cases 1, 2, 4, and 6 are degenerate cases.)  When the element is divided by the interface plane, the resulting volumes are either 1 tetrahedron and 1 pentahedron (interface plane intersects 3 edges) or 2 pentahedra (interface plane intersects 4 edges).&lt;br /&gt;
  Figure out which side of the interface is a tetrahedron&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.  How to know which???&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use the newly established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=450</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=450"/>
				<updated>2013-10-22T18:26:26Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1:&lt;br /&gt;
&lt;br /&gt;
1.  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
2.  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
&lt;br /&gt;
3.  1 node φ=0, other nodes are different signs&lt;br /&gt;
&lt;br /&gt;
4.  2 nodal φ=0, others are the same sign&lt;br /&gt;
&lt;br /&gt;
5.  2 nodal φ=0, others are different signs&lt;br /&gt;
6.  3 nodal φ=0&lt;br /&gt;
7.  All φ are different signs&lt;br /&gt;
Cases 3, 5, and 7 are non-degenerate cases in which the interface plane passes through the element.  The resulting volumes are either 1 tetrahedron and 1 pentahedron, or 2 pentahedra.&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Figure out which side of the interface is a tetrahedron&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.  How to know which???&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
  Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
  After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=449</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=449"/>
				<updated>2013-10-22T18:25:45Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Serial Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
There are 7 possible cases for φ in a cell with 0 &amp;lt; VOF &amp;lt; 1&lt;br /&gt;
1.  All nodal φ are the same sign - use smallest φ and assume interface plane is parallel to opposite face&lt;br /&gt;
2.  1 node φ=0, other nodes are all the same sign - assume interface plane is parallel to opposite face&lt;br /&gt;
3.  1 node φ=0, other nodes are different signs&lt;br /&gt;
4.  2 nodal φ=0, others are the same sign&lt;br /&gt;
5.  2 nodal φ=0, others are different signs&lt;br /&gt;
6.  3 nodal φ=0&lt;br /&gt;
7.  All φ are different signs&lt;br /&gt;
Cases 3, 5, and 7 are non-degenerate cases in which the interface plane passes through the element.  The resulting volumes are either 1 tetrahedron and 1 pentahedron, or 2 pentahedra.&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Figure out which side of the interface is a tetrahedron&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.  How to know which???&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
  Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
  After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=435</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=435"/>
				<updated>2013-08-21T22:35:20Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Serial Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Figure out which side of the interface is a tetrahedron&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.  How to know which???&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
  Shashkov uses a line search algorithm to adjust the interface.  -&amp;gt; Use a recursive bisection.&lt;br /&gt;
  After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=434</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=434"/>
				<updated>2013-08-21T22:29:55Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Serial Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to temporarily store those points (for volume computation)&lt;br /&gt;
  Need to temporarily store the normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Figure out which side of the interface is a tetrahedron&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.  How to know which???&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
  Shashkov uses a line search algorithm to adjust the interface.&lt;br /&gt;
  After each movement of the interface, the LS=0 points on the edges have to be found again (for computing volume)&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=433</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=433"/>
				<updated>2013-08-21T22:00:48Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Serial Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  &amp;lt;math&amp;gt; \bold  n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ) &amp;lt;/math&amp;gt;&lt;br /&gt;
  Need a way to store those points&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Figure out which side of the interface is a tetrahedron&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:  &amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
  Shashkov uses a line search algorithm to adjust the interface.&lt;br /&gt;
  After each movement of the interface, the LS=0 points on the edges have to be found again&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=432</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=432"/>
				<updated>2013-08-21T21:45:43Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Serial Algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
  \bold n = ( \bold p_2 - \bold p_1 ) \times ( \bold p_3 - \bold p_1 ), &lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=431</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=431"/>
				<updated>2013-08-16T20:53:12Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed'''&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=430</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=430"/>
				<updated>2013-08-16T20:44:27Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.'''  If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.a.'''  For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
  for tetrahedra, all element nodes are adjacent&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.b.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.c.1.'''  If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.d.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''3.a.1.e.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.'''  Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.a.'''  Handle element as above (for at least three reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
'''3.a.2.b.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''4.'''  When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=429</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=429"/>
				<updated>2013-08-16T20:31:57Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
  check completeness&lt;br /&gt;
  check reconstruction list&lt;br /&gt;
  check φ of shared nodes, which requires some nodal adjacency information&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
	If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
		For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
&lt;br /&gt;
			(Do we typically have full nodal adjacency(all nodes that share an edge or element with a node)?)&lt;br /&gt;
&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
	Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
		Handle element as above&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=428</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=428"/>
				<updated>2013-08-16T20:29:27Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
'''2.'''  For each element&lt;br /&gt;
&lt;br /&gt;
'''2.a.'''  num_const = 0&lt;br /&gt;
&lt;br /&gt;
'''2.b.'''  loop over nodes&lt;br /&gt;
&lt;br /&gt;
'''2.b.1.'''  If a node has been reconstructed, num_const = num_const+1&lt;br /&gt;
&lt;br /&gt;
'''2.c.'''  If num_const &amp;lt;= 3&lt;br /&gt;
&lt;br /&gt;
'''2.c.1'''  Compute gradient of φ for the element using the three smallest values of reconstructed φ&lt;br /&gt;
  if num_const = 3, then use the reconstructed nodes&lt;br /&gt;
  if num_const &amp;gt; 3, then loop over nodes to find the three smallest&lt;br /&gt;
  re-use PHASTA's gradient calculation method?&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.'''  If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
  if computed gradient dotted with advected gradient is less than pi/4 (or some other suitable value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.2.a.'''  The current element is done for now, and left in the list; move on to the next element&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.'''  Else&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.a.'''  Compute φ at all other nodes &lt;br /&gt;
  gradient gives normal to the planar field&lt;br /&gt;
  φ at a node is φ at another node plus the normal distance from the plane that other node is in to the current node&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.1.'''  If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.b.2.'''  Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.c.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.'''  Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.d.1.'''  If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.e.'''  Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
'''2.c.3.f.'''  N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
'''2.d.'''  Else (element has only 1 or 2 reconstructed nodes), skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
'''3.'''  At the end of a cycle through the list, if N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
	If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
		For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
&lt;br /&gt;
			(Do we typically have full nodal adjacency(all nodes that share an edge or element with a node)?)&lt;br /&gt;
&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
	Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
		Handle element as above&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=417</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=417"/>
				<updated>2013-08-05T18:27:57Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
'''Loop over elements''' (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
'''2.'''  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
'''3.'''  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
'''3.a.'''  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
&lt;br /&gt;
'''3.b.'''  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3.c.'''  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
'''3.d.'''  If any node has already been reconstructed, φ is min (previous reconstruction, current reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
'''3.e.'''  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
'''3.f.'''  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
'''While reconstruction list is not empty, loop over the reconstruction list''' (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
'''1.'''  N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
	If at least 3 nodes are tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
		Compute gradient of φ for the element using the three smallest values of reconstructed φ 	&lt;br /&gt;
&lt;br /&gt;
			If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
&lt;br /&gt;
				Skip the element and move on to next in the list&lt;br /&gt;
&lt;br /&gt;
			Else&lt;br /&gt;
&lt;br /&gt;
				Compute φ at all other nodes &lt;br /&gt;
&lt;br /&gt;
				If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
				Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
				Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
				Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
					If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
				Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
				N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
	Else (element has only 1 or 2 reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
		Skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
If N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
	If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
		For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
&lt;br /&gt;
			(Do we typically have full nodal adjacency(all nodes that share an edge or element with a node)?)&lt;br /&gt;
&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
	Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
		Handle element as above&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=416</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=416"/>
				<updated>2013-08-05T18:24:36Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
Loop over elements (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
1.  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
2.  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
3.  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
3.a.  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
&lt;br /&gt;
3.b.  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.c.  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
  At each node, φ is the distance to the nearest point, unless two points are equidistant.&lt;br /&gt;
  Need a tag for nodal completeness/reconstruction&lt;br /&gt;
&lt;br /&gt;
3.d.  If any node has already been reconstructed, φ is min (other element reconstruction, this element reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
3.e.  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
3.f.  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
  Need reconstruction list&lt;br /&gt;
  Need data structure of each element's faces&lt;br /&gt;
  Need data structure of which two elements are adjacent to each face&lt;br /&gt;
&lt;br /&gt;
While reconstruction list is not empty, loop over the reconstruction list (establish and walk out φ)&lt;br /&gt;
&lt;br /&gt;
	N_fixed  = 0&lt;br /&gt;
&lt;br /&gt;
	If at least 3 nodes are tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
		Compute gradient of φ for the element using the three smallest values of reconstructed φ 	&lt;br /&gt;
&lt;br /&gt;
			If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
&lt;br /&gt;
				Skip the element and move on to next in the list&lt;br /&gt;
&lt;br /&gt;
			Else&lt;br /&gt;
&lt;br /&gt;
				Compute φ at all other nodes &lt;br /&gt;
&lt;br /&gt;
				If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
&lt;br /&gt;
				Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
				Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
				Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
					If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
				Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
				N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
	Else (element has only 1 or 2 reconstructed nodes)&lt;br /&gt;
&lt;br /&gt;
		Skip the element and move on to next in list&lt;br /&gt;
&lt;br /&gt;
If N_fixed ≠ 0, go to start of loop&lt;br /&gt;
&lt;br /&gt;
Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
&lt;br /&gt;
	If reconstructed nodes ≤ 2&lt;br /&gt;
&lt;br /&gt;
		For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
&lt;br /&gt;
			(Do we typically have full nodal adjacency(all nodes that share an edge or element with a node)?)&lt;br /&gt;
&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it &lt;br /&gt;
to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
	Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
&lt;br /&gt;
		Handle element as above&lt;br /&gt;
&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
&lt;br /&gt;
When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=415</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=415"/>
				<updated>2013-08-05T17:47:06Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
Loop over elements (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
1.  Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
2.  Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  Volume fraction is the second scalar&lt;br /&gt;
  &lt;br /&gt;
3.  If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
3.a.  Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
  For tetrahedra, find the points at which the interface intersects the edges&lt;br /&gt;
  Use those three points (defining the plane) to find the interface normal&lt;br /&gt;
&lt;br /&gt;
3.b.  Move interface along normal until computed F = advected F&lt;br /&gt;
  Depending on which side of the interface is a tetrahedron, F is either the volume of the interface tetrahedron or the volume of the element minus the interface tetrahedron.&lt;br /&gt;
  &lt;br /&gt;
For a tetrahedron with vertices '''a''', '''b''', '''c''', and '''d''', the volume is:&lt;br /&gt;
&amp;lt;math&amp;gt;V = \frac { |(\mathbf{a}-\mathbf{d}) \cdot ((\mathbf{b}-\mathbf{d}) \times (\mathbf{c}-\mathbf{d}))| } {6}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3.c.  Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
&lt;br /&gt;
3.d.  If any node has already been reconstructed, φ is min (other element reconstruction, this element reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
3.e.  Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
3.f.  Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
&lt;br /&gt;
While reconstruction list is not empty, loop over the reconstruction list (establish and walk out φ)&lt;br /&gt;
	N_fixed  = 0&lt;br /&gt;
	If at least 3 nodes are tagged as reconstructed&lt;br /&gt;
		Compute gradient of φ for the element using the three smallest values of reconstructed φ 	&lt;br /&gt;
			If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
				Skip the element and move on to next in the list&lt;br /&gt;
			Else&lt;br /&gt;
				Compute φ at all other nodes &lt;br /&gt;
				If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
				Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
				Mark the element as complete &lt;br /&gt;
				Loop over elements adjacent by shared faces&lt;br /&gt;
					If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
				Remove the element from the reconstruction list&lt;br /&gt;
				N_fixed = N_fixed + 1&lt;br /&gt;
	Else (element has only 1 or 2 reconstructed nodes)&lt;br /&gt;
		Skip the element and move on to next in list&lt;br /&gt;
If N_fixed ≠ 0, go to start of loop&lt;br /&gt;
Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
	If reconstructed nodes ≤ 2&lt;br /&gt;
		For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
			(Do we typically have full nodal adjacency(all nodes that share an edge or element with a node)?)&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
	Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
		Handle element as above? Or&lt;br /&gt;
		Keep the nodes with the two smallest values of φ&lt;br /&gt;
		Compute φ for other nodes as φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
		If node is already tagged as reconstructed, φ = min (computed φ, already reconstructed φ)&lt;br /&gt;
		Else&lt;br /&gt;
			φ = computed φ&lt;br /&gt;
			Tag node as reconstructed&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=414</id>
		<title>CLSVOF</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=CLSVOF&amp;diff=414"/>
				<updated>2013-08-05T15:23:46Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: Created page with &amp;quot;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.   == Serial Algorithm == Loop over elements (find the elements ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A coupled level set volume of fluid method is being implemented in the incompressible code for interface tracking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Serial Algorithm ==&lt;br /&gt;
Loop over elements (find the elements containing interface pieces)&lt;br /&gt;
&lt;br /&gt;
1. Tag each element as incomplete&lt;br /&gt;
  Need a tag for elemental completeness&lt;br /&gt;
&lt;br /&gt;
2. Truncate volume fractions so they’re 0 ≤ F ≤ 1&lt;br /&gt;
  &lt;br /&gt;
3. If 0 &amp;lt; F &amp;lt; 1 (element contains interface)&lt;br /&gt;
&lt;br /&gt;
Use advected φ at element nodes to find interface slope for the element&lt;br /&gt;
&lt;br /&gt;
Move interface along normal until computed F = advected F&lt;br /&gt;
&lt;br /&gt;
Use established interface to compute φ at each node and tag those nodes as reconstructed&lt;br /&gt;
&lt;br /&gt;
If any node has already been reconstructed, φ is min (other element reconstruction, this element reconstruction) (ensure that φ is min to interface everywhere)&lt;br /&gt;
&lt;br /&gt;
Mark the element as complete &lt;br /&gt;
&lt;br /&gt;
Loop over elements adjacent by shared faces - If it’s not marked as complete and not an interface element, add it to the reconstruction list&lt;br /&gt;
&lt;br /&gt;
While reconstruction list is not empty, loop over the reconstruction list (establish and walk out φ)&lt;br /&gt;
	N_fixed  = 0&lt;br /&gt;
	If at least 3 nodes are tagged as reconstructed&lt;br /&gt;
		Compute gradient of φ for the element using the three smallest values of reconstructed φ 	&lt;br /&gt;
			If computed gradient is very different from advected gradient (nearest interface is not the one walked out from)&lt;br /&gt;
				Skip the element and move on to next in the list&lt;br /&gt;
			Else&lt;br /&gt;
				Compute φ at all other nodes &lt;br /&gt;
				If a node is tagged as reconstructed, φ = min (current value, new computed value)&lt;br /&gt;
				Else φ = computed value, node is tagged as reconstructed&lt;br /&gt;
				Mark the element as complete &lt;br /&gt;
				Loop over elements adjacent by shared faces&lt;br /&gt;
					If the adjacent element is not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
				Remove the element from the reconstruction list&lt;br /&gt;
				N_fixed = N_fixed + 1&lt;br /&gt;
	Else (element has only 1 or 2 reconstructed nodes)&lt;br /&gt;
		Skip the element and move on to next in list&lt;br /&gt;
If N_fixed ≠ 0, go to start of loop&lt;br /&gt;
Else N_fixed = 0 and list is not empty, loop again through the list (less accurate method)&lt;br /&gt;
	If reconstructed nodes ≤ 2&lt;br /&gt;
		For each node not yet reconstructed, φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
			(Do we typically have full nodal adjacency(all nodes that share an edge or element with a node)?)&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
	Else (at least 3 nodes are tagged as reconstructed)&lt;br /&gt;
		Handle element as above? Or&lt;br /&gt;
		Keep the nodes with the two smallest values of φ&lt;br /&gt;
		Compute φ for other nodes as φ = min (distance to adjacent node + reconstructed φ of that node)&lt;br /&gt;
		If node is already tagged as reconstructed, φ = min (computed φ, already reconstructed φ)&lt;br /&gt;
		Else&lt;br /&gt;
			φ = computed φ&lt;br /&gt;
			Tag node as reconstructed&lt;br /&gt;
		Mark the element as complete &lt;br /&gt;
		Loop over elements adjacent by shared faces&lt;br /&gt;
		If it’s not marked as complete, and not in the reconstruction list, and reconstructed φ of shared nodes is &amp;lt; nε add it to the list (stop adding nodes when &amp;gt; nε from interface)&lt;br /&gt;
		Remove the element from the reconstruction list&lt;br /&gt;
		N_fixed = N_fixed + 1&lt;br /&gt;
When list is empty, for all elements not tagged as reconstructed, φ = nε for all nodes not tagged as reconstructed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Parallel Algorithm ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=254</id>
		<title>SimModeler</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=254"/>
				<updated>2012-08-22T18:26:24Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
&lt;br /&gt;
SimModeler is a model creation program from Simmetrix.  It takes the mesh and geometric model and creates the input files for PHASTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
To run SimModeler, first connect via VNC, then use vglconnect to connect to one of the compute machines:&lt;br /&gt;
&lt;br /&gt;
 vglconnect -s viz001&lt;br /&gt;
&lt;br /&gt;
Add the desired version of SimModeler to your environment (the below example will get the &amp;quot;default&amp;quot; version):&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodeler&lt;br /&gt;
&lt;br /&gt;
and lunch the GUI:&lt;br /&gt;
&lt;br /&gt;
 vglrun simmodeler&lt;br /&gt;
&lt;br /&gt;
== Converting old files ==&lt;br /&gt;
This is a guide for converting old files (parasolid and .spj) to the new format (.smd).&lt;br /&gt;
&lt;br /&gt;
After connecting to one of the compute machines, add the suite of tools for SimModeler to your environment:&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodsuite&lt;br /&gt;
&lt;br /&gt;
From your case, make a new directory and copy your parasolid (.x_t or .xmt_txt), and .spj file into it. Rename the parasolid file to geom.xmt_txt and the .spj file to geom.spj, if they aren't already named that way. Then from the directory just created (now holds geom.xmt_txt and geom.spj) run: &lt;br /&gt;
&lt;br /&gt;
 ~matthb2/simmodelerconvert/testConvert &lt;br /&gt;
&lt;br /&gt;
Your directory now contains two new files: model.smd and model.x_t&lt;br /&gt;
&lt;br /&gt;
== Creating new files ==&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=250</id>
		<title>SimModeler</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=250"/>
				<updated>2012-08-08T19:15:31Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
&lt;br /&gt;
SimModeler is a model creation program from Simmetrix.  It takes the mesh and geometric model and creates the input files for PHASTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
To run SimModeler, first connect via VNC, then use vglconnect to connect to one of the compute machines:&lt;br /&gt;
&lt;br /&gt;
 vglconnect -s viz001&lt;br /&gt;
&lt;br /&gt;
Add the desired version of SimModeler to your environment (the below example will get the &amp;quot;default&amp;quot; version):&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodeler&lt;br /&gt;
&lt;br /&gt;
and lunch the GUI:&lt;br /&gt;
&lt;br /&gt;
 vglrun simmodeler&lt;br /&gt;
&lt;br /&gt;
== Converting old files ==&lt;br /&gt;
This is a guide for converting old files (parasolid and .spj) to the new format (.smd).&lt;br /&gt;
&lt;br /&gt;
After connecting to one of the compute machines, add the suite of tools for SimModeler to your environment:&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodsuite&lt;br /&gt;
&lt;br /&gt;
From your case, make a new directory and copy your parasolid (.x_t or .xmt_txt), and .spj file into it. Rename the parasolid file to geom.xmt_txt and the .spj file to geom.spj, if they aren't already named that way. Then from the directory just created (now holds geom.xmt_txt and geom.spj) run: &lt;br /&gt;
&lt;br /&gt;
 ~matthb2/simmodelerconvert/testConvert &lt;br /&gt;
&lt;br /&gt;
Your directory now contains two new files: model.smd and model.x_t&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=249</id>
		<title>SimModeler</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=249"/>
				<updated>2012-08-08T18:45:45Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Software]]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
SimModeler is a model creation program from Simmetrix.  It takes the mesh and geometric model and creates the input files for PHASTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
To run SimModeler, first connect via VNC, then use vglconnect to connect to one of the compute machines:&lt;br /&gt;
&lt;br /&gt;
 vglconnect -s viz001&lt;br /&gt;
&lt;br /&gt;
Add the desired version of SimModeler to your environment (the below example will get the &amp;quot;default&amp;quot; version):&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodeler&lt;br /&gt;
&lt;br /&gt;
and lunch the GUI:&lt;br /&gt;
&lt;br /&gt;
 vglrun simmodeler&lt;br /&gt;
&lt;br /&gt;
== Converting old files ==&lt;br /&gt;
This is a guide for converting old files (parasolid and .spj) to the new format (.smd).&lt;br /&gt;
&lt;br /&gt;
After connecting to one of the compute machines, add the suite of tools for SimModeler to your environment:&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodsuite&lt;br /&gt;
&lt;br /&gt;
From your case, make a new directory and copy your parasolid (.x_t or .xmt_txt), and .spj file into it. Rename the parasolid file to geom.xmt_txt and the .spj file to geom.spj, if they aren't already named that way. Then from the directory just created (now holds geom.xmt_txt and geom.spj) run: &lt;br /&gt;
&lt;br /&gt;
 ~matthb2/simmodelerconvert/testConvert &lt;br /&gt;
&lt;br /&gt;
Your directory now contains two new files: model.smd and model.x_t&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=248</id>
		<title>SimModeler</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=SimModeler&amp;diff=248"/>
				<updated>2012-08-08T18:16:34Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: Created page with &amp;quot;== Introduction == SimModeler is a model creation program from Simmetrix.  It takes the mesh and geometric model and creates the input files for PHASTA.   == Running == To run Si...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
SimModeler is a model creation program from Simmetrix.  It takes the mesh and geometric model and creates the input files for PHASTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
To run SimModeler, first connect via VNC, then use vglconnect to connect to one of the compute machines:&lt;br /&gt;
&lt;br /&gt;
 vglconnect -s viz001&lt;br /&gt;
&lt;br /&gt;
Add the desired version of SimModeler to your environment (the below example will get the &amp;quot;default&amp;quot; version):&lt;br /&gt;
&lt;br /&gt;
 soft add +simmodeler&lt;br /&gt;
&lt;br /&gt;
and lunch the GUI:&lt;br /&gt;
&lt;br /&gt;
 vglrun simmodeler&lt;br /&gt;
&lt;br /&gt;
== Converting old files ==&lt;br /&gt;
This is a guide for converting old files (parasolid and .spj) to the new format (.smd).&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Debugging&amp;diff=42</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Debugging&amp;diff=42"/>
				<updated>2011-08-24T20:09:44Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
Debugging can be a very difficult skill to learn.  It requires patience, persistence and determination but it can certainly be aided by skills and tips gained from hard earned experience.  &lt;br /&gt;
&lt;br /&gt;
The goal of this wiki is to organize our groups experience with debugging in general and specific tips for debugging our software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''General''' ==&lt;br /&gt;
&lt;br /&gt;
There are broadly three types of bugs that we encounter: 1) wrong results,  2) segmentation fault,  and 3) trapped unexpected behavior.  These are ordered in decreasing difficulty as will be clear shortly.&lt;br /&gt;
&lt;br /&gt;
''Wrong results:''  A lack of convergence or slow divergence of a problems that is expected or known to work with the given inputs  is not uncommon for code development but it is far and away the hardest bug to find.  The most effective strategy here is usually to compare against a working code that does not exhibit this behavior and be sure that all of the &amp;quot;deviations&amp;quot; from the known working code are expected.&lt;br /&gt;
&lt;br /&gt;
''Segmentation fault:''  Here, there is typically a corruption of memory such as an array going out of bounds,  Many of the debuggers mentioned below will stop at the location of the segmentation fault but be aware that this is not necessarily the location of the bug.  In many cases, memory corruption occurred in a non-fatal way at some early stage of the code and the place the code reports the segmentation fault is were the &amp;quot;dead body&amp;quot; is found and you must look at the corrupted array and look backward to see where it was modified which may lead to other arrays that were incorrectly modified etc.  This is especially true with indirect addressing arrays and memory pointers.  You should expect the compiling in debug mode will &amp;quot;move&amp;quot; the problem to a different location and, sadly in some situations, completely hide the problem (e.g., runs through successfully).  This is because when a code is compiled in debug mode, extra &amp;quot;padding&amp;quot; is put into the code to track the variables and you may be corrupting only this padding and not vital code.  '''''[http://fluid.colorado.edu/wiki/index.php/Valgrind Valgrind]''''' (someone provide a wiki tutorial on its use please) can be very effective in finding this type of bug.  This type of fault can also occur when you run out of memory for the machine you are running on.  Please use '''''top''''' while your job is running to check for this type of failure.&lt;br /&gt;
&lt;br /&gt;
''Trapped unexpected behavior:''  Here checks were placed in the code to stop or report some information when execution led to an unexpected result (e.g., a negative volume computation or a residual that is not a number).  In general we like to put these kind of things in our code to make debugging easier but there is always a tradeoff between the time it takes to instrument the code, the effect the checks have on performance, and the benefit to debugging.  One compromise that is often employed is to put these checks inside of a compiler flag so that they are compiled in ONLY when running in debug mode.  '''MAJOR TIP:  When a code crashes ALWAYS recompile it in debug mode and rerun it as you may then get more information about where the bug is (e.g., go from Seg Fault to Trapped unexpected behavior).'''&lt;br /&gt;
&lt;br /&gt;
== '''Choice of Debugger''' ==&lt;br /&gt;
&lt;br /&gt;
The first choice is what tool to debug with.  Your weapons range from graphical debuggers like '''''totalview''''' and '''''idb''''', to command line debuggers like '''''gdb''''', to print statements.  Different bugs/codes are handled best by different tools.&lt;br /&gt;
Launching and effectively getting help and/or running graphical debuggers are covered in separate wikis linked to the names in the list.  Here we only give a general overview of some experience (grow it!!) with each.&lt;br /&gt;
&lt;br /&gt;
''Graphical debuggers'' are best for marching through the code.  They can really help a new user learn the flow of the code and see various arrays being changed.  Any code that you want to have mastery of is worth spending time marching through the code in this way. Graphical debuggers are also effective at determining the location of bugs.&lt;br /&gt;
&lt;br /&gt;
''Command line debuggers''  link to gdb....some comments on when they are effective&lt;br /&gt;
&lt;br /&gt;
''Print  statements''  When you don't have effective access to the two above, inserting print statements can be an effective way of finding a bug.  It is more effective the more you know about your bug (e.g., when you know pretty close to where in the code the problem is and what variable is going bad).  Included in this category is writing out entire fields in a format that our post-processors can read so that you can look at the whole field in something like '''''paraview''''' that may give you a clue as to where the problem of the category &amp;quot;Wrong results&amp;quot; might be occurring.&lt;br /&gt;
&lt;br /&gt;
== '''Debugging Strategies''' ==&lt;br /&gt;
&lt;br /&gt;
''Recursive bisection:''  When you know where the code fails (or is producing wrong results) but don't have much of a clue where and why, this can be a good strategy.  What you need is some measure of correctness of some variable you can watch. Your strategy here is to first define the location in the code where it is believed to be correct and a second location where it is believed to be wrong. Then you bisect the code and check the middle location and determine if it is correct or wrong and then replace either the first or second location based on your answer (replace correct or wrong).  Keep applying this recursively and eventually you have a small section of code to find your bug in (e.g., one line).  This works extremely well for some bugs but it does have a few difficult assumptions that don't always hold true:  1) you know what is correct and wrong,  2) you know how to bisect your code (this can be hard before you actually know the code you are working with pretty well),  3) you are able to track a single variable through a function stack (not always possible) and/or know the code well enough to switch targets (and adjust measure of correctness).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''March (and compare):'' Marching in a debugger is tedious and many think it is boring but if you get your mind in the right place you can learn a lot about the code while you are marching (tell yourself you are not wasting time finding a bug but using the debugger to better learn the code).  As above, this strategy is more effective the better you know how to differentiate a correct result from and incorrect result on each &amp;quot;line&amp;quot; of the code, something that experience improves. This is where &amp;quot;compare&amp;quot; is a powerful tool for beginners (and everyone else).  Your ideal scenario is that you have a version of the code saved that was working when you started your development.  Before you start, make that working source code directory not writable ( chmod u-w * ).  You then make two directories with your inputs and  launch two versions of the debugger in each of these directories, one with the correct executable and one with the broken executable.  You then march through the code looking for differences.  Of course if you meet the requirements of Recursive bisection you can apply it to both codes and combine these strategies but when you don't, marching line by line and comparing results can often be effective (and you will in the process learn the code well AND likely develop the understanding of correctness required to use recursive bisection).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Specific tips for SCOREC/Simmetrix Meshing and MeshAdapt software and associated databases:'' &lt;br /&gt;
Because the mesh database is very rich and complex it can often be non-transparent to debugging.  To address this issues, functions have been created to help users debug.  If your debugging has identified a location and you  have successfully trapped the offending vertex, face, or region (typically you are iterating over one of these when some unexpected result occurs and is trapped), then you can call a function to get lots of information about that entity with&lt;br /&gt;
&lt;br /&gt;
 V_info(ivert)    // gives information about the the vertex  ivert&lt;br /&gt;
 F_info(iface)    // gives information about the the face  iface&lt;br /&gt;
 R_info(iregion)    // gives information about the the region  iregion&lt;br /&gt;
&lt;br /&gt;
These functions can either be compiled into the code and printed from traps that catch the unexpected behavior (and thereby help you understand the geometric location of the problem) or, with many debuggers, they can be called from the current command line to give you more information while stepping through the code.&lt;br /&gt;
&lt;br /&gt;
Once you find the offending geometric location, it is often possible to load the mesh (in cases where the mesher completed but some other program downstream of it fails) in paraview and draw  spheres at the location of the vertices, zoom to the vertices, cut the mesh with'' extract cells by region'' filter centered on the bad location and then see what is wrong (perhaps using a few different normal planes to get a clear view).  Often refining the mesh near this surface will improve element quality and fix the problem.&lt;br /&gt;
&lt;br /&gt;
ADD TO ME&lt;br /&gt;
&lt;br /&gt;
''Specific tips for PHASTA:'' &lt;br /&gt;
ADD TO ME&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=Debugging&amp;diff=41</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=Debugging&amp;diff=41"/>
				<updated>2011-08-24T20:08:50Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Introduction''' ==&lt;br /&gt;
&lt;br /&gt;
Debugging can be a very difficult skill to learn.  It requires patience, persistence and determination but it can certainly be aided by skills and tips gained from hard earned experience.  &lt;br /&gt;
&lt;br /&gt;
The goal of this wiki is to organize our groups experience with debugging in general and specific tips for debugging our software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''General''' ==&lt;br /&gt;
&lt;br /&gt;
There are broadly three types of bugs that we encounter: 1) wrong results,  2) segmentation fault,  and 3) trapped unexpected behavior.  These are ordered in decreasing difficulty as will be clear shortly.&lt;br /&gt;
&lt;br /&gt;
''Wrong results:''  A lack of convergence or slow divergence of a problems that is expected or known to work with the given inputs  is not uncommon for code development but it is far and away the hardest bug to find.  The most effective strategy here is usually to compare against a working code that does not exhibit this behavior and be sure that all of the &amp;quot;deviations&amp;quot; from the known working code are expected.&lt;br /&gt;
&lt;br /&gt;
''Segmentation fault:''  Here, there is typically a corruption of memory such as an array going out of bounds,  Many of the debuggers mentioned below will stop at the location of the segmentation fault but be aware that this is not necessarily the location of the bug.  In many cases, memory corruption occurred in a non-fatal way at some early stage of the code and the place the code reports the segmentation fault is were the &amp;quot;dead body&amp;quot; is found and you must look at the corrupted array and look backward to see where it was modified which may lead to other arrays that were incorrectly modified etc.  This is especially true with indirect addressing arrays and memory pointers.  You should expect the compiling in debug mode will &amp;quot;move&amp;quot; the problem to a different location and, sadly in some situations, completely hide the problem (e.g., runs through successfully).  This is because when a code is compiled in debug mode, extra &amp;quot;padding&amp;quot; is put into the code to track the variables and you may be corrupting only this padding and not vital code.  '''''[http://fluid.colorado.edu/wiki/index.php/Valgrind Valgrind]''''' (someone provide a wiki tutorial on its use please) can be very effective in finding this type of bug.  This type of fault can also occur when you run out of memory for the machine you are running on.  Please use '''''top''''' while your job is running to check for this type of failure.&lt;br /&gt;
&lt;br /&gt;
''Trapped unexpected behavior:''  Here checks were placed in the code to stop or report some information when execution led to an unexpected result (e.g., a negative volume computation or a residual that is not a number).  In general we like to put these kind of things in our code to make debugging easier but their is always a tradeoff between the time it takes to instrument the code, the effect the checks have on performance, and the benefit to debugging.  One compromise that is often employed is to put these checks inside of a compiler flag so that they are compiled in ONLY when running in debug mode.  '''MAJOR TIP:  When a code crashes ALWAYS recompile it in debug mode and rerun it as you may then get more information about where the bug is (e.g., go from Seg Fault to Trapped unexpected behavior).'''&lt;br /&gt;
&lt;br /&gt;
== '''Choice of Debugger''' ==&lt;br /&gt;
&lt;br /&gt;
The first choice is what tool to debug with.  Your weapons range from graphical debuggers like '''''totalview''''' and '''''idb''''', to command line debuggers like '''''gdb''''', to print statements.  Different bugs/codes are handled best by different tools.&lt;br /&gt;
Launching and effectively getting help and/or running graphical debuggers are covered in separate wikis linked to the names in the list.  Here we only give a general overview of some experience (grow it!!) with each.&lt;br /&gt;
&lt;br /&gt;
''Graphical debuggers'' are best for marching through the code.  They can really help a new user learn the flow of the code and see various arrays being changed.  Any code that you want to have mastery of is worth spending time marching through the code in this way. Graphical debuggers are also effective at determining the location of bugs.&lt;br /&gt;
&lt;br /&gt;
''Command line debuggers''  link to gdb....some comments on when they are effective&lt;br /&gt;
&lt;br /&gt;
''Print  statements''  When you don't have effective access to the two above, inserting print statements can be an effective way of finding a bug.  It is more effective the more you know about your bug (e.g., when you know pretty close to where in the code the problem is and what variable is going bad).  Included in this category is writing out entire fields in a format that our post-processors can read so that you can look at the whole field in something like '''''paraview''''' that may give you a clue as to where the problem of the category &amp;quot;Wrong results&amp;quot; might be occurring.&lt;br /&gt;
&lt;br /&gt;
== '''Debugging Strategies''' ==&lt;br /&gt;
&lt;br /&gt;
''Recursive bisection:''  When you know where the code fails (or is producing wrong results) but don't have much of a clue where and why, this can be a good strategy.  What you need is some measure of correctness of some variable you can watch. Your strategy here is to first define the location in the code where it is believed to be correct and a second location where it is believed to be wrong. Then you bisect the code and check the middle location and determine if it is correct or wrong and then replace either the first or second location based on your answer (replace correct or wrong).  Keep applying this recursively and eventually you have a small section of code to find your bug in (e.g., one line).  This works extremely well for some bugs but it does have a few difficult assumptions that don't always hold true:  1) you know what is correct and wrong,  2) you know how to bisect your code (this can be hard before you actually know the code you are working with pretty well),  3) you are able to track a single variable through a function stack (not always possible) and/or know the code well enough to switch targets (and adjust measure of correctness).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''March (and compare):'' Marching in a debugger is tedious and many think it is boring but if you get your mind in the right place you can learn a lot about the code while you are marching (tell yourself you are not wasting time finding a bug but using the debugger to better learn the code).  As above, this strategy is more effective the better you know how to differentiate a correct result from and incorrect result on each &amp;quot;line&amp;quot; of the code, something that experience improves. This is where &amp;quot;compare&amp;quot; is a powerful tool for beginners (and everyone else).  Your ideal scenario is that you have a version of the code saved that was working when you started your development.  Before you start, make that working source code directory not writable ( chmod u-w * ).  You then make two directories with your inputs and  launch two versions of the debugger in each of these directories, one with the correct executable and one with the broken executable.  You then march through the code looking for differences.  Of course if you meet the requirements of Recursive bisection you can apply it to both codes and combine these strategies but when you don't, marching line by line and comparing results can often be effective (and you will in the process learn the code well AND likely develop the understanding of correctness required to use recursive bisection).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Specific tips for SCOREC/Simmetrix Meshing and MeshAdapt software and associated databases:'' &lt;br /&gt;
Because the mesh database is very rich and complex it can often be non-transparent to debugging.  To address this issues, functions have been created to help users debug.  If your debugging has identified a location and you  have successfully trapped the offending vertex, face, or region (typically you are iterating over one of these when some unexpected result occurs and is trapped), then you can call a function to get lots of information about that entity with&lt;br /&gt;
&lt;br /&gt;
 V_info(ivert)    // gives information about the the vertex  ivert&lt;br /&gt;
 F_info(iface)    // gives information about the the face  iface&lt;br /&gt;
 R_info(iregion)    // gives information about the the region  iregion&lt;br /&gt;
&lt;br /&gt;
These functions can either be compiled into the code and printed from traps that catch the unexpected behavior (and thereby help you understand the geometric location of the problem) or, with many debuggers, they can be called from the current command line to give you more information while stepping through the code.&lt;br /&gt;
&lt;br /&gt;
Once you find the offending geometric location, it is often possible to load the mesh (in cases where the mesher completed but some other program downstream of it fails) in paraview and draw  spheres at the location of the vertices, zoom to the vertices, cut the mesh with'' extract cells by region'' filter centered on the bad location and then see what is wrong (perhaps using a few different normal planes to get a clear view).  Often refining the mesh near this surface will improve element quality and fix the problem.&lt;br /&gt;
&lt;br /&gt;
ADD TO ME&lt;br /&gt;
&lt;br /&gt;
''Specific tips for PHASTA:'' &lt;br /&gt;
ADD TO ME&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	<entry>
		<id>https://fluid.colorado.edu/wiki/index.php?title=VNC&amp;diff=40</id>
		<title>VNC</title>
		<link rel="alternate" type="text/html" href="https://fluid.colorado.edu/wiki/index.php?title=VNC&amp;diff=40"/>
				<updated>2011-08-23T03:54:23Z</updated>
		
		<summary type="html">&lt;p&gt;Mkm06: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;VNC is a tool which projects a GUI session over the network. If may be useful if you want to use GUI tools remotely when X forwarding performs poorly. &lt;br /&gt;
&lt;br /&gt;
'''Warning: This is still being tested and should NOT be considered stable (portal0 may be rebooted without warning)'''&lt;br /&gt;
'''Warning: The vnc password is transmitted in clear text over the network and should not be considered secure'''&lt;br /&gt;
&lt;br /&gt;
Portal0 is designated to host VNC sessions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can start a session as follows:&lt;br /&gt;
&lt;br /&gt;
  ssh jumpgate-phasta.colorado.edu&lt;br /&gt;
  ssh portal0&lt;br /&gt;
  source /etc/profile&lt;br /&gt;
  start_vnc.sh&lt;br /&gt;
&lt;br /&gt;
And follow the directions&lt;br /&gt;
 &lt;br /&gt;
(You may want to remember your password and port number so that you can reuse your session)&lt;br /&gt;
&lt;br /&gt;
When you are done, end your session by&lt;br /&gt;
  source /etc/profile&lt;br /&gt;
  stop_vnc.sh&lt;br /&gt;
&lt;br /&gt;
== OpenGL == &lt;br /&gt;
&lt;br /&gt;
Portal0 is equipped with a VirtualGL install which will allow you to use OpenGL programs (which do not use pthreads)&lt;br /&gt;
&lt;br /&gt;
Simply wrap your OpenGL program with the &amp;quot;vglrun&amp;quot; command&lt;br /&gt;
  vlgrun glxgears&lt;br /&gt;
&lt;br /&gt;
If you have access to another VirtualGL server you can connect to it first (Portal0 doesn't have a particularly fast graphics processor)&lt;br /&gt;
  vglconnect server&lt;br /&gt;
  vglrun glxgears&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that VGL uses a number of threads. If you have trouble with vglrun crashing with a message about Thread::Start() make sure you haven't set your stack size too large (remove any ulimit -s or ulimit -n calls from your shell start scripts)&lt;br /&gt;
&lt;br /&gt;
== Clients == &lt;br /&gt;
&lt;br /&gt;
Portal0 uses TurboVNC from the VirtualGL project, available from http://www.virtualgl.org/Downloads/TurboVNC&lt;br /&gt;
&lt;br /&gt;
Other VNC viewers will also work, such as TightVNC and RealVNC&lt;br /&gt;
&lt;br /&gt;
== View Only Mode == &lt;br /&gt;
&lt;br /&gt;
To share your desktop with another user in view only mode set a view only password &lt;br /&gt;
by running&lt;br /&gt;
  vncpasswd&lt;br /&gt;
&lt;br /&gt;
Have the other user connect in the same way you would but have them set their viewer to be in view only mode and use your view only password. Typically this is done as follows:&lt;br /&gt;
  vncviewer -viewonly&lt;br /&gt;
&lt;br /&gt;
== Windows == &lt;br /&gt;
The PuTTY SSH client can handle ssh tunneling on Windows based machines. You can download it here: http://www.chiark.greenend.org.uk/~sgtatham/putty/&lt;br /&gt;
&lt;br /&gt;
When you open putty, enter jumpgate-phasta.colorado.edu as in the Host Name box. Then click the + button next to SSH on the left pane (to expand the SSH tree node). Choose the Tunnels page. The start_vnc.sh script should tell you to run &amp;quot;ssh -L????:portal0:???? jumpgate-phasta.colorado.edu&amp;quot; on your machine. Enter the number between the -L and the first colon in the &amp;quot;Source port&amp;quot; box. Enter the rest in the Destination box (starting with portal0) and '''click the add button'''. Then click &amp;quot;Open&amp;quot; and login as normal. You will then be able to use a vncviewer as instructed by the script. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
The script says:&lt;br /&gt;
ssh -L5905:portal0:5900 jumpgate-phasta.colorado.edu&lt;br /&gt;
enter 5905 in the Source port box&lt;br /&gt;
enter portal0:5900 in the destination box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try using this viewer utility&lt;br /&gt;
http://www.tightvnc.com/download/1.3.10/tightvnc-1.3.10_x86_viewer.zip&lt;br /&gt;
&lt;br /&gt;
== Web Based Viewer ==&lt;br /&gt;
&lt;br /&gt;
If you can't or don't want to install a VNC viewer you can use a Java based one. You will need a JVM and a Java browser plugin. You will also need the port that the start_vnc script assigned you to be free on your local computer&lt;br /&gt;
&lt;br /&gt;
Forward your session through jumpgate as before before, adding a second port, 580n. For example, if the script tells you to &lt;br /&gt;
&lt;br /&gt;
ssh -L5905:portal0:5902 jumpgate-phasta.colorado.edu you should&lt;br /&gt;
  ssh -L5902:portal0:5902 -L5802:portal0:5802 jumpgate-phasta.colorado.edu&lt;br /&gt;
Then point your browser to http://localhost:5802 and log in with the password specified by the script when prompted. (Replace 2 with the value specified by the script)&lt;br /&gt;
&lt;br /&gt;
== Changing the Size (Resolution) of an Existing Session ==&lt;br /&gt;
&lt;br /&gt;
You can usually use the &amp;quot;xrandr&amp;quot; tool to change the resolution of a running vnc session. First you'll need to know your session's display number (this should be the last digit or two of the port number). For example, if your VNC session is running on port 5902, then your screen number should be :2. For this example, we'll use screen 2. &lt;br /&gt;
&lt;br /&gt;
Once you know your screen number, you can see the list of supported modes as follows:&lt;br /&gt;
  xrandr -display :2&lt;br /&gt;
&lt;br /&gt;
Once you pick the one you want (generally the same size or smaller than the native resolution of your client), you can choose it by running a command like&lt;br /&gt;
  xrandr -s 1400x1050 -display :2&lt;br /&gt;
&lt;br /&gt;
(this example will set the resolution to 1400 pixels by 1050 pixels)&lt;br /&gt;
&lt;br /&gt;
You'll probably be disconnected at this point, but when you reconnect your screen size should be changed (hopefully without crashing your running programs). &lt;br /&gt;
&lt;br /&gt;
== Troubleshooting == &lt;br /&gt;
&lt;br /&gt;
If you have used vncserver (It doesn't matter which version) on a SCOREC machine before, you will need to clear your vnc settings for the script to work. You can do this by running rm -rf ~/.vnc&lt;br /&gt;
&lt;br /&gt;
stop_vnc.sh may display some errors; this is normal.&lt;br /&gt;
&lt;br /&gt;
If you have trouble deleting ~/.vnc send an email to Benjamin.A.Matthews@colorado.edu&lt;br /&gt;
&lt;br /&gt;
If any of these commands fail, you may need to source /etc/profile to get the necessary environment variables (this should be fixed soon)&lt;br /&gt;
&lt;br /&gt;
VirtualGL has trouble with some threaded programs. If your OpenGL program exhibits segmentation faults or other issues, this could be the problem. Check back for the solution later. &lt;br /&gt;
&lt;br /&gt;
If the given password is rejected you can run stop_vnc.sh and restart to get a new one. Occasionally the random password generator may generate passwords which VNC doesn't like.&lt;br /&gt;
&lt;br /&gt;
If VirtualGL complains about not being able to get a 24bit FB config either vglconnect to another VirtualGL enabled server or complain to Benjamin.A.Matthews@Colorado.edu&lt;br /&gt;
&lt;br /&gt;
If your VNC connection is very slow, you might want to try changing the compression and encoding options. See your vncviewer's documentation or try this&lt;br /&gt;
  vncviewer -encodings tight -quality 6 -compresslevel 6&lt;br /&gt;
If you have trouble with text distortion try adding &lt;br /&gt;
  -nojpeg&lt;/div&gt;</summary>
		<author><name>Mkm06</name></author>	</entry>

	</feed>