2012/8/23 John Peterson <jwpeter...@gmail.com>:
> On Thu, Aug 23, 2012 at 9:18 AM, Geordie McBain <gdmcb...@freeshell.org>
> wrote:
>> 2012/8/23 John Peterson <jwpeter...@gmail.com>:
>>> On Thu, Aug 23, 2012 at 2:34 AM, Geordie McBain <gdmcb...@freeshell.org>
>>> wrote:
>>>> 2012/8/22 Geordie McBain <gdmcb...@freeshell.org>:
>>>>> 2012/8/22 Subramanya Gautam Sadasiva <ssada...@purdue.edu>:
>>>>>> Hi,
>>>>>> I am new to libmesh, but there seems to have been some sort of
>>>>>> rearrangement of the example numbers. Is there somewhere I can find
>>>>>> which old example numbers correspond to the current examples?
>>>>>
>>>>> Hello. I had hoped that this would be a simple exercise in svn log,
>>>>> but after finding the relevant revision easily enough
>>>>>
>>>>> %<---
>>>>> $ svn log -r 5000
>>>>> ------------------------------------------------------------------------
>>>>> r5000 | knezed01 | 2011-12-05 05:49:39 +0100 (Mon, 05 Dec 2011) | 1 line
>>>>>
>>>>> Reorganized the examples into subdirectories. The comments in each
>>>>> example still need to be updated to reflect the new numbering scheme.
>>>>> ------------------------------------------------------------------------
>>>>> --->%
>>>>>
>>>>> I was quickly reminded that Subversion ("svn diff --summarize -c
>>>>> 5000") only tracks renames as deletes and additions, but not which
>>>>> addition was related to which deletion.
>>>>> However, the second sentence in the log comment means the (42000
>>>>> line!) output of "svn diff -c 5000" can be searched for "Example 0",
>>>>> "Example 1", ... so
>>>>>
>>>>> svn diff -c 5000 | grep -E '(<h1>Example [0-9]|\+\+\+ .*\.C)'
>>>>>
>>>>> gives the attached 72 line output which pretty much pairs up the old &
>>>>> new.
>>>>
>>>> After that I noticed a few cross-references in comments or string
>>>> literals still using the old numerotation, so I tried to find and
>>>> update them all; patch attached.
>>>
>>> Geordie, thanks for taking the time to produce this mapping.
>>>
>>> Subramanya, was there some specific example you were curious about?
>>>
>>> The libmesh examples documentation page
>>> (http://libmesh.sourceforge.net/examples.php) appears to be in good
>>> shape to me...
>>
>> Yes but subpages contain things like "This example is based on example 14"
>>
>> http://libmesh.sourceforge.net/miscellaneous_ex5.php
>>
>> The attached patch (which replaces this morning's, adding a couple of
>> other catches from the example sources, and being against the later
>> r5983) doesn't touch the doc/html/*.php. (I had thought, without
>> looking into it, they might be generated from the example sources
>> somehow.)
>
> Thanks for the patch. I never got the one you sent earlier; I think
> libmesh-users drops all? attachments.
Oh, right, sorry. I think I've seen some here with the .txt suffix,
but I guess the idea is to copy patches to libmesh-devel?
Here it is again, this time (against r5986 and) with the corresponding
changes to doc/html/*.php. (I gather these are kept in step thus
manually with the examples/*/*/*.C?)
Index: doc/html/adaptivity_ex1.php
===================================================================
--- doc/html/adaptivity_ex1.php (revision 5986)
+++ doc/html/adaptivity_ex1.php (working copy)
@@ -113,7 +113,7 @@
</div>
<div class = "comment">
Define the equation systems object and the system we are going
-to solve. See Example 2 for more details.
+to solve. See Introduction Example 2 for more details.
</div>
<div class ="fragment">
@@ -232,7 +232,7 @@
</pre>
</div>
<div class = "comment">
-Objects for error estimation, see Example 10 for more details.
+Error estimation objects, see Adaptivity Example 2 for details
</div>
<div class ="fragment">
@@ -294,7 +294,7 @@
<div class ="fragment">
<pre>
- GnuPlotIO plot(mesh,"Example 0", GnuPlotIO::GRID_ON);
+ GnuPlotIO plot(mesh,"Adaptivity Example 1", GnuPlotIO::GRID_ON);
</pre>
</div>
@@ -646,7 +646,7 @@
</div>
<div class = "comment">
This is a function call that is necessary when using adaptive
-mesh refinement. See Example 10 for more details.
+mesh refinement. See Adaptivity Example 2 for more details.
</div>
<div class ="fragment">
Index: doc/html/adaptivity_ex3.php
===================================================================
--- doc/html/adaptivity_ex3.php (revision 5986)
+++ doc/html/adaptivity_ex3.php (working copy)
@@ -25,15 +25,15 @@
Element 1: [ 0,1]x[ 0,1]
Element 2: [-1,0]x[-1,0]
The mesh is provided in the standard libMesh ASCII format file
-named "lshaped.xda". In addition, an input file named "ex14.in"
+named "lshaped.xda". In addition, an input file named "adaptivity_ex3.in"
is provided which allows the user to set several parameters for
the solution so that the problem can be re-run without a
re-compile. The solution technique employed is to have a
refinement loop with a linear solve inside followed by a
refinement of the grid and projection of the solution to the new grid
In the final loop iteration, there is no additional
-refinement after the solve. In the input file "ex14.in", the variable
-"max_r_steps" controls the number of refinement steps,
+refinement after the solve. In the input file "adaptivity_ex3.in",
+the variable "max_r_steps" controls the number of refinement steps,
"max_r_level" controls the maximum element refinement level, and
"refine_percentage" / "coarsen_percentage" determine the number of
elements which will be refined / coarsened at each step.
Index: doc/html/subdomains_ex1.php
===================================================================
--- doc/html/subdomains_ex1.php (revision 5986)
+++ doc/html/subdomains_ex1.php (working copy)
@@ -641,7 +641,7 @@
<pre>
if(dim == 1)
{
- GnuPlotIO plot(mesh,"Example 4, 1D",GnuPlotIO::GRID_ON);
+ GnuPlotIO plot(mesh,"Subdomains Example 1, 1D",GnuPlotIO::GRID_ON);
plot.write_equation_systems("out_1",equation_systems);
}
else
Index: doc/html/subdomains_ex2.php
===================================================================
--- doc/html/subdomains_ex2.php (revision 5986)
+++ doc/html/subdomains_ex2.php (working copy)
@@ -515,8 +515,8 @@
<pre>
if(dim == 1)
{
- GnuPlotIO plot(mesh,"Example 4, 1D",GnuPlotIO::GRID_ON);
- plot.write_equation_systems("out_1",equation_systems);
+ GnuPlotIO plot(mesh,"Subdomains Example 2, 1D",GnuPlotIO::GRID_ON);
+ plot.write_equation_systems("gnuplot_script",equation_systems);
}
else
{
Index: doc/html/miscellaneous_ex5.php
===================================================================
--- doc/html/miscellaneous_ex5.php (revision 5986)
+++ doc/html/miscellaneous_ex5.php (working copy)
@@ -16,8 +16,8 @@
<br><br>By Lorenzo Botti
-<br><br>This example is based on example 14, but uses an Interior Penalty
-Discontinuous Galerkin formulation.
+<br><br>This example is based on Adaptivity Example 3, but uses an
+Interior Penalty Discontinuous Galerkin formulation.
<br><br></div>
Index: doc/html/vector_fe_ex1.php
===================================================================
--- doc/html/vector_fe_ex1.php (revision 5986)
+++ doc/html/vector_fe_ex1.php (working copy)
@@ -270,12 +270,12 @@
controlled from the command line. For example,
you can invoke conjugate gradient with:
-<br><br>./ex3 -ksp_type cg
+<br><br>./vector_fe_ex1 -ksp_type cg
<br><br>You can also get a nice X-window that monitors the solver
convergence with:
-<br><br>./ex3 -ksp_xmonitor
+<br><br>./vector_fe_ex1 -ksp_xmonitor
<br><br>if you linked against the appropriate X libraries when you
built PETSc.
Index: doc/html/introduction_ex2.php
===================================================================
--- doc/html/introduction_ex2.php (revision 5986)
+++ doc/html/introduction_ex2.php (working copy)
@@ -27,11 +27,11 @@
command line arguments to PETSc. For example, you might
try running this example as:
-<br><br>./ex2 -log_info
+<br><br>./introduction_ex2 -log_info
<br><br>to see what PETSc is doing behind the scenes or
-<br><br>./ex2 -log_summary
+<br><br>./introduction_ex2 -log_summary
<br><br>to get a summary of what PETSc did.
Among other things, libMesh::init() initializes the MPI
Index: doc/html/introduction_ex3.php
===================================================================
--- doc/html/introduction_ex3.php (revision 5986)
+++ doc/html/introduction_ex3.php (working copy)
@@ -274,12 +274,12 @@
controlled from the command line. For example,
you can invoke conjugate gradient with:
-<br><br>./ex3 -ksp_type cg
+<br><br>./introduction_ex3 -ksp_type cg
<br><br>You can also get a nice X-window that monitors the solver
convergence with:
-<br><br>./ex3 -ksp_xmonitor
+<br><br>./introduction_ex3 -ksp_xmonitor
<br><br>if you linked against the appropriate X libraries when you
built PETSc.
@@ -405,7 +405,7 @@
Build a Finite Element object of the specified type. Since the
FEBase::build() member dynamically creates memory we will
store the object as an AutoPtr<FEBase>. This can be thought
-of as a pointer that will clean up after itself. Example 4
+of as a pointer that will clean up after itself. Introduction Example 4
describes some advantages of AutoPtr's in the context of
quadrature rules.
</div>
Index: doc/html/introduction_ex4.php
===================================================================
--- doc/html/introduction_ex4.php (revision 5986)
+++ doc/html/introduction_ex4.php (working copy)
@@ -599,7 +599,7 @@
<pre>
if(dim == 1)
{
- GnuPlotIO plot(mesh,"Example 4, 1D",GnuPlotIO::GRID_ON);
+ GnuPlotIO plot(mesh,"Introduction Example 4,
1D",GnuPlotIO::GRID_ON);
plot.write_equation_systems("out_1",equation_systems);
}
#ifdef LIBMESH_HAVE_EXODUS_API
Index: doc/html/systems_of_equations_ex2.php
===================================================================
--- doc/html/systems_of_equations_ex2.php (revision 5986)
+++ doc/html/systems_of_equations_ex2.php (working copy)
@@ -292,7 +292,7 @@
<div class ="fragment">
<pre>
- PerfLog perf_log("Example 13");
+ PerfLog perf_log("Systems Example 2");
</pre>
</div>
Index: doc/html/systems_of_equations_ex3.php
===================================================================
--- doc/html/systems_of_equations_ex3.php (revision 5986)
+++ doc/html/systems_of_equations_ex3.php (working copy)
@@ -292,7 +292,7 @@
<div class ="fragment">
<pre>
- PerfLog perf_log("Example 13");
+ PerfLog perf_log("Systems Example 3");
</pre>
</div>
Index: examples/introduction/introduction_ex2/introduction_ex2.C
===================================================================
--- examples/introduction/introduction_ex2/introduction_ex2.C (revision 5986)
+++ examples/introduction/introduction_ex2/introduction_ex2.C (working copy)
@@ -30,11 +30,11 @@
// command line arguments to PETSc. For example, you might
// try running this example as:
//
- // ./ex2 -log_info
+ // ./introduction_ex2 -log_info
//
// to see what PETSc is doing behind the scenes or
//
- // ./ex2 -log_summary
+ // ./introduction_ex2 -log_summary
//
// to get a summary of what PETSc did.
// Among other things, libMesh::init() initializes the MPI
Index: examples/introduction/introduction_ex3/introduction_ex3.C
===================================================================
--- examples/introduction/introduction_ex3/introduction_ex3.C (revision 5986)
+++ examples/introduction/introduction_ex3/introduction_ex3.C (working copy)
@@ -137,12 +137,12 @@
// controlled from the command line. For example,
// you can invoke conjugate gradient with:
//
- // ./ex3 -ksp_type cg
+ // ./introduction_ex3 -ksp_type cg
//
// You can also get a nice X-window that monitors the solver
// convergence with:
//
- // ./ex3 -ksp_xmonitor
+ // ./introduction-ex3 -ksp_xmonitor
//
// if you linked against the appropriate X libraries when you
// built PETSc.
@@ -198,7 +198,7 @@
// Build a Finite Element object of the specified type. Since the
// FEBase::build() member dynamically creates memory we will
// store the object as an AutoPtr<FEBase>. This can be thought
- // of as a pointer that will clean up after itself. Example 4
+ // of as a pointer that will clean up after itself. Introduction Example 4
// describes some advantages of AutoPtr's in the context of
// quadrature rules.
AutoPtr<FEBase> fe (FEBase::build(dim, fe_type));
Index: examples/introduction/introduction_ex4/introduction_ex4.C
===================================================================
--- examples/introduction/introduction_ex4/introduction_ex4.C (revision 5986)
+++ examples/introduction/introduction_ex4/introduction_ex4.C (working copy)
@@ -301,7 +301,7 @@
// to a GMV-formatted plot file.
if(dim == 1)
{
- GnuPlotIO plot(mesh,"Example 4, 1D",GnuPlotIO::GRID_ON);
+ GnuPlotIO plot(mesh,"Introduction Example 4, 1D",GnuPlotIO::GRID_ON);
plot.write_equation_systems("gnuplot_script",equation_systems);
}
#ifdef LIBMESH_HAVE_EXODUS_API
Index: examples/miscellaneous/miscellaneous_ex5/miscellaneous_ex5.C
===================================================================
--- examples/miscellaneous/miscellaneous_ex5/miscellaneous_ex5.C
(revision 5986)
+++ examples/miscellaneous/miscellaneous_ex5/miscellaneous_ex5.C
(working copy)
@@ -19,8 +19,8 @@
//
// By Lorenzo Botti
//
- // This example is based on example 14, but uses an Interior Penalty
- // Discontinuous Galerkin formulation.
+ // This example is based on Adaptivity Example 3, but uses an
+ // Interior Penalty Discontinuous Galerkin formulation.
#include <iostream>
Index:
examples/systems_of_equations/systems_of_equations_ex2/systems_of_equations_ex2.C
===================================================================
---
examples/systems_of_equations/systems_of_equations_ex2/systems_of_equations_ex2.C
(revision 5986)
+++
examples/systems_of_equations/systems_of_equations_ex2/systems_of_equations_ex2.C
(working copy)
@@ -143,7 +143,7 @@
equation_systems.print_info();
// Create a performance-logging object for this example
- PerfLog perf_log("Example 13");
+ PerfLog perf_log("Systems Example 2");
// Get a reference to the Stokes system to use later.
TransientLinearImplicitSystem& navier_stokes_system =
Index:
examples/systems_of_equations/systems_of_equations_ex3/systems_of_equations_ex3.C
===================================================================
---
examples/systems_of_equations/systems_of_equations_ex3/systems_of_equations_ex3.C
(revision 5986)
+++
examples/systems_of_equations/systems_of_equations_ex3/systems_of_equations_ex3.C
(working copy)
@@ -136,7 +136,7 @@
equation_systems.print_info();
// Create a performance-logging object for this example
- PerfLog perf_log("Example 13");
+ PerfLog perf_log("Systems Example 3");
// Get a reference to the Stokes system to use later.
TransientLinearImplicitSystem& navier_stokes_system =
Index: examples/subdomains/subdomains_ex1/subdomains_ex1.C
===================================================================
--- examples/subdomains/subdomains_ex1/subdomains_ex1.C (revision 5986)
+++ examples/subdomains/subdomains_ex1/subdomains_ex1.C (working copy)
@@ -329,7 +329,7 @@
// to a GMV-formatted plot file.
if(dim == 1)
{
- GnuPlotIO plot(mesh,"Example 4, 1D",GnuPlotIO::GRID_ON);
+ GnuPlotIO plot(mesh,"Subdomains Example 1, 1D",GnuPlotIO::GRID_ON);
plot.write_equation_systems("gnuplot_script",equation_systems);
}
else
Index: examples/subdomains/subdomains_ex2/subdomains_ex2.C
===================================================================
--- examples/subdomains/subdomains_ex2/subdomains_ex2.C (revision 5986)
+++ examples/subdomains/subdomains_ex2/subdomains_ex2.C (working copy)
@@ -267,7 +267,7 @@
// to a GMV-formatted plot file.
if(dim == 1)
{
- GnuPlotIO plot(mesh,"Example 4, 1D",GnuPlotIO::GRID_ON);
+ GnuPlotIO plot(mesh,"Subdomains Example 2, 1D",GnuPlotIO::GRID_ON);
plot.write_equation_systems("gnuplot_script",equation_systems);
}
else
Index: examples/vector_fe/vector_fe_ex1/vector_fe_ex1.C
===================================================================
--- examples/vector_fe/vector_fe_ex1/vector_fe_ex1.C (revision 5986)
+++ examples/vector_fe/vector_fe_ex1/vector_fe_ex1.C (working copy)
@@ -133,12 +133,12 @@
// controlled from the command line. For example,
// you can invoke conjugate gradient with:
//
- // ./ex3 -ksp_type cg
+ // ./vector_fe_ex1 -ksp_type cg
//
// You can also get a nice X-window that monitors the solver
// convergence with:
//
- // ./ex3 -ksp_xmonitor
+ // ./vector_fe_ex1 -ksp_xmonitor
//
// if you linked against the appropriate X libraries when you
// built PETSc.
Index: examples/adaptivity/adaptivity_ex1/adaptivity_ex1.C
===================================================================
--- examples/adaptivity/adaptivity_ex1/adaptivity_ex1.C (revision 5986)
+++ examples/adaptivity/adaptivity_ex1/adaptivity_ex1.C (working copy)
@@ -80,7 +80,7 @@
MeshTools::Generation::build_line(mesh,n,0.,1.,EDGE3);
// Define the equation systems object and the system we are going
- // to solve. See Example 2 for more details.
+ // to solve. See Introduction Example 2 for more details.
EquationSystems equation_systems(mesh);
LinearImplicitSystem& system = equation_systems.add_system
<LinearImplicitSystem>("1D");
@@ -122,7 +122,7 @@
// going to solve the equation system for that refined mesh.
if(r_step != max_r_steps)
{
- // Objects for error estimation, see Example 10 for more details.
+ // Error estimation objects, see Adaptivity Example 2 for details
ErrorVector error;
KellyErrorEstimator error_estimator;
@@ -145,7 +145,7 @@
// Construct gnuplot plotting object, pass in mesh, title of plot
// and boolean to indicate use of grid in plot. The grid is used to
// show the edges of each element in the mesh.
- GnuPlotIO plot(mesh,"Example 0", GnuPlotIO::GRID_ON);
+ GnuPlotIO plot(mesh,"Adaptivity Example 1", GnuPlotIO::GRID_ON);
// Write out script to be called from within gnuplot:
// Load gnuplot, then type "call 'gnuplot_script'" from gnuplot prompt
@@ -296,7 +296,7 @@
}
// This is a function call that is necessary when using adaptive
- // mesh refinement. See Example 10 for more details.
+ // mesh refinement. See Adaptivity Example 2 for more details.
dof_map.constrain_element_matrix_and_vector (Ke, Fe, dof_indices);
// Add Ke and Fe to the global matrix and right-hand-side.
Index: examples/adaptivity/adaptivity_ex3/adaptivity_ex3.C
===================================================================
--- examples/adaptivity/adaptivity_ex3/adaptivity_ex3.C (revision 5986)
+++ examples/adaptivity/adaptivity_ex3/adaptivity_ex3.C (working copy)
@@ -28,15 +28,15 @@
// Element 1: [ 0,1]x[ 0,1]
// Element 2: [-1,0]x[-1,0]
// The mesh is provided in the standard libMesh ASCII format file
- // named "lshaped.xda". In addition, an input file named "ex14.in"
+ // named "lshaped.xda". In addition, an input file named "adaptivity_ex3.in"
// is provided which allows the user to set several parameters for
// the solution so that the problem can be re-run without a
// re-compile. The solution technique employed is to have a
// refinement loop with a linear solve inside followed by a
// refinement of the grid and projection of the solution to the new grid
// In the final loop iteration, there is no additional
- // refinement after the solve. In the input file "ex14.in", the variable
- // "max_r_steps" controls the number of refinement steps,
+ // refinement after the solve. In the input file "adaptivity_ex3.in",
+ // the variable "max_r_steps" controls the number of refinement steps,
// "max_r_level" controls the maximum element refinement level, and
// "refine_percentage" / "coarsen_percentage" determine the number of
// elements which will be refined / coarsened at each step.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel