The source file introduction_ex2.C with comments:

Introduction Example 2 - Defining a Simple System



This is the second example program. It demonstrates how to create an equation system for a simple scalar system. This example will also introduce some of the issues involved with using PETSc in your application.

This is the first example program that indirectly uses the PETSc library. By default equation data is stored in PETSc vectors, which may span multiple processors. Before PETSc is used it must be initialized via libMesh::init(). Note that by passing argc and argv to PETSc you may specify command line arguments to PETSc. For example, you might try running this example as:

./introduction_ex2 -log_info

to see what PETSc is doing behind the scenes or

./introduction_ex2 -log_summary

to get a summary of what PETSc did. Among other things, libMesh::init() initializes the MPI communications library and PETSc numeric library on your system if you haven't already done so.

C++ include files that we need
        #include <iostream>
Basic include file needed for the mesh functionality.
        #include "libmesh/libmesh.h"
        #include "libmesh/mesh.h"
Include file that defines various mesh generation utilities
        #include "libmesh/mesh_generation.h"
Include file that defines (possibly multiple) systems of equations.
        #include "libmesh/equation_systems.h"
Include files that define a simple steady system
        #include "libmesh/linear_implicit_system.h"
        #include "libmesh/transient_system.h"
        #include "libmesh/explicit_system.h"
        
Bring in everything from the libMesh namespace
        using namespace libMesh;
        
        
        
        int main (int argc, char** argv)
        {
          LibMeshInit init (argc, argv);
        
Skip this 2D example if libMesh was compiled as 1D-only.
          libmesh_example_assert(2 <= LIBMESH_DIM, "2D support");
        
A brief message to the user to inform her of the exact name of the program being run, and its command line.
          std::cout << "Running " << argv[0];
          for (int i=1; i<argc; i++)
            std::cout << " " << argv[i];
          std::cout << std::endl << std::endl;
        
Create a mesh, with dimension to be overridden later, distributed across the default MPI communicator.
          Mesh mesh(init.comm());
        
Use the MeshTools::Generation mesh generator to create a uniform 2D grid on the unit square. By default a mesh of QUAD4 elements will be created. We instruct the mesh generator to build a mesh of 5x5 elements.
          MeshTools::Generation::build_square (mesh, 5, 5);
        
Create an equation systems object. This object can contain multiple systems of different flavors for solving loosely coupled physics. Each system can contain multiple variables of different approximation orders. Here we will simply create a single system with one variable. Later on, other flavors of systems will be introduced. For the moment, we use the general system. The EquationSystems object needs a reference to the mesh object, so the order of construction here is important.
          EquationSystems equation_systems (mesh);
        
Add a flag "test" that is visible for all systems. This helps in inter-system communication.
          equation_systems.parameters.set<bool> ("test") = true;
        
Set a simulation-specific parameter visible for all systems. This helps in inter-system-communication.
          equation_systems.parameters.set<Real> ("dummy") = 42.;
        
Set another simulation-specific parameter
          equation_systems.parameters.set<Real> ("nobody") = 0.;
        
Now we declare the system and its variables. We begin by adding a "TransientLinearImplicitSystem" to the EquationSystems object, and we give it the name "Simple System".
          equation_systems.add_system<TransientLinearImplicitSystem> ("Simple System");
        
Adds the variable "u" to "Simple System". "u" will be approximated using first-order approximation.
          equation_systems.get_system("Simple System").add_variable("u", FIRST);
        
Next we'll by add an "ExplicitSystem" to the EquationSystems object, and we give it the name "Complex System".
          equation_systems.add_system<ExplicitSystem> ("Complex System");
        
Give "Complex System" three variables -- each with a different approximation order. Variables "c" and "T" will use first-order Lagrange approximation, while variable "dv" will use a second-order discontinuous approximation space.
          equation_systems.get_system("Complex System").add_variable("c", FIRST);
          equation_systems.get_system("Complex System").add_variable("T", FIRST);
          equation_systems.get_system("Complex System").add_variable("dv", SECOND, MONOMIAL);
        
Initialize the data structures for the equation system.
          equation_systems.init();
        
Print information about the mesh to the screen.
          mesh.print_info();
Prints information about the system to the screen.
          equation_systems.print_info();
        
Write the equation system if the user specified an output file name. Note that there are two possible formats to write to. Specifying libMeshEnums::WRITE will create a formatted ASCII file. Optionally, you can specify libMeshEnums::ENCODE and get an XDR-encoded binary file.

We will write the data, clear the object, and read the file we just wrote. This is simply to demonstrate capability. Note that you might use this in an application to periodically dump the state of your simulation. You can then restart from this data later.
          if (argc > 1)
            if (argv[1][0] != '-')
              {
                std::cout << "<<< Writing system to file " << argv[1]
                          << std::endl;
        
Write the system.
                equation_systems.write (argv[1], libMeshEnums::WRITE);
        
Clear the equation systems data structure.
                equation_systems.clear ();
        
                std::cout << ">>> Reading system from file " << argv[1]
                          << std::endl << std::endl;
        
Read the file we just wrote. This better work!
                equation_systems.read (argv[1], libMeshEnums::READ);
        
Print the information again.
                equation_systems.print_info();
              }
        
All done. libMesh objects are destroyed here. Because the LibMeshInit object was created first, its destruction occurs last, and it's destructor finalizes any external libraries and checks for leaked memory.
          return 0;
        }



The source file introduction_ex2.C without comments:

 
  
  #include <iostream>
  #include "libmesh/libmesh.h"
  #include "libmesh/mesh.h"
  #include "libmesh/mesh_generation.h"
  #include "libmesh/equation_systems.h"
  #include "libmesh/linear_implicit_system.h"
  #include "libmesh/transient_system.h"
  #include "libmesh/explicit_system.h"
  
  using namespace libMesh;
  
  
  
  int main (int argc, char** argv)
  {
    LibMeshInit init (argc, argv);
  
    libmesh_example_assert(2 <= LIBMESH_DIM, "2D support");
  
    std::cout << "Running " << argv[0];
    for (int i=1; i<argc; i++)
      std::cout << " " << argv[i];
    std::cout << std::endl << std::endl;
  
    Mesh mesh(init.comm());
  
    MeshTools::Generation::build_square (mesh, 5, 5);
  
    EquationSystems equation_systems (mesh);
  
    equation_systems.parameters.set<bool> ("test") = true;
  
    equation_systems.parameters.set<Real> ("dummy") = 42.;
  
    equation_systems.parameters.set<Real> ("nobody") = 0.;
  
    equation_systems.add_system<TransientLinearImplicitSystem> ("Simple System");
  
    equation_systems.get_system("Simple System").add_variable("u", FIRST);
  
    equation_systems.add_system<ExplicitSystem> ("Complex System");
  
    equation_systems.get_system("Complex System").add_variable("c", FIRST);
    equation_systems.get_system("Complex System").add_variable("T", FIRST);
    equation_systems.get_system("Complex System").add_variable("dv", SECOND, MONOMIAL);
  
    equation_systems.init();
  
    mesh.print_info();
    equation_systems.print_info();
  
    if (argc > 1)
      if (argv[1][0] != '-')
        {
          std::cout << "<<< Writing system to file " << argv[1]
                    << std::endl;
  
          equation_systems.write (argv[1], libMeshEnums::WRITE);
  
          equation_systems.clear ();
  
          std::cout << ">>> Reading system from file " << argv[1]
                    << std::endl << std::endl;
  
          equation_systems.read (argv[1], libMeshEnums::READ);
  
          equation_systems.print_info();
        }
  
    return 0;
  }



The console output of the program:

make[4]: Entering directory `/net/spark/workspace/roystgnr/libmesh/git/devel/examples/introduction/introduction_ex2'
***************************************************************
* Running Example introduction_ex2:
*  mpirun -np 4 example-devel  -pc_type bjacobi -sub_pc_type ilu -sub_pc_factor_levels 4 -sub_pc_factor_zeropivot 0 -ksp_right_pc
***************************************************************
 
Running /net/spark/workspace/roystgnr/libmesh/git/devel/examples/introduction/introduction_ex2/.libs/lt-example-devel -pc_type bjacobi -sub_pc_type ilu -sub_pc_factor_levels 4 -sub_pc_factor_zeropivot 0 -ksp_right_pc

 Mesh Information:
  mesh_dimension()=2
  spatial_dimension()=3
  n_nodes()=36
    n_local_nodes()=14
  n_elem()=25
    n_local_elem()=7
    n_active_elem()=25
  n_subdomains()=1
  n_partitions()=4
  n_processors()=4
  n_threads()=1
  processor_id()=0

 EquationSystems
  n_systems()=2
   System #1, "Complex System"
    Type "Explicit"
    Variables={ "c" "T" } "dv" 
    Finite Element Types="LAGRANGE", "JACOBI_20_00" "MONOMIAL", "JACOBI_20_00" 
    Infinite Element Mapping="CARTESIAN" "CARTESIAN" 
    Approximation Orders="FIRST", "THIRD" "SECOND", "THIRD" 
    n_dofs()=222
    n_local_dofs()=70
    n_constrained_dofs()=0
    n_local_constrained_dofs()=0
    n_vectors()=1
    n_matrices()=0
    DofMap Sparsity
      Average  On-Processor Bandwidth <= 0
      Average Off-Processor Bandwidth <= 0
      Maximum  On-Processor Bandwidth <= 0
      Maximum Off-Processor Bandwidth <= 0
    DofMap Constraints
      Number of DoF Constraints = 0
      Number of Node Constraints = 0
   System #0, "Simple System"
    Type "TransientLinearImplicit"
    Variables="u" 
    Finite Element Types="LAGRANGE", "JACOBI_20_00" 
    Infinite Element Mapping="CARTESIAN" 
    Approximation Orders="FIRST", "THIRD" 
    n_dofs()=36
    n_local_dofs()=14
    n_constrained_dofs()=0
    n_local_constrained_dofs()=0
    n_vectors()=3
    n_matrices()=1
    DofMap Sparsity
      Average  On-Processor Bandwidth <= 6.22222
      Average Off-Processor Bandwidth <= 1.88889
      Maximum  On-Processor Bandwidth <= 11
      Maximum Off-Processor Bandwidth <= 6
    DofMap Constraints
      Number of DoF Constraints = 0
      Number of Node Constraints = 0


 -------------------------------------------------------------------------------------------------------------------
| Processor id:   0                                                                                                 |
| Num Processors: 4                                                                                                 |
| Time:           Fri Apr 19 11:44:20 2013                                                                          |
| OS:             Linux                                                                                             |
| HostName:       spark.ices.utexas.edu                                                                             |
| OS Release:     2.6.32-279.22.1.el6.x86_64                                                                        |
| OS Version:     #1 SMP Tue Feb 5 14:33:39 CST 2013                                                                |
| Machine:        x86_64                                                                                            |
| Username:       roystgnr                                                                                          |
| Configuration:  ../configure  '--enable-everything'                                                               |
|  'METHODS=devel'                                                                                                  |
|  '--prefix=/h2/roystgnr/libmesh-test'                                                                             |
|  'CXX=distcc /usr/bin/g++'                                                                                        |
|  'CC=distcc /usr/bin/gcc'                                                                                         |
|  'FC=distcc /usr/bin/gfortran'                                                                                    |
|  'F77=distcc /usr/bin/gfortran'                                                                                   |
|  'PETSC_DIR=/opt/apps/ossw/libraries/petsc/petsc-3.3-p2'                                                          |
|  'PETSC_ARCH=gcc-system-mkl-gf-10.3.12.361-mpich2-1.4.1p1-cxx-opt'                                                |
|  'SLEPC_DIR=/opt/apps/ossw/libraries/slepc/slepc-3.3-p2-petsc-3.3-p2-cxx-opt'                                     |
|  'TRILINOS_DIR=/opt/apps/ossw/libraries/trilinos/trilinos-10.12.2/sl6/gcc-system/mpich2-1.4.1p1/mkl-gf-10.3.12.361'|
|  'VTK_DIR=/opt/apps/ossw/libraries/vtk/vtk-5.10.0/sl6/gcc-system'                                                 |
|  'HDF5_DIR=/opt/apps/ossw/libraries/hdf5/hdf5-1.8.9/sl6/gcc-system'                                               |
 -------------------------------------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------------------------------
| libMesh Performance: Alive time=0.122411, Active time=0.006819                                             |
 ------------------------------------------------------------------------------------------------------------
| Event                          nCalls    Total Time  Avg Time    Total Time  Avg Time    % of Active Time  |
|                                          w/o Sub     w/o Sub     With Sub    With Sub    w/o S    With S   |
|------------------------------------------------------------------------------------------------------------|
|                                                                                                            |
|                                                                                                            |
| DofMap                                                                                                     |
|   add_neighbors_to_send_list() 2         0.0001      0.000056    0.0003      0.000161    1.64     4.74     |
|   build_sparsity()             1         0.0001      0.000128    0.0004      0.000391    1.88     5.73     |
|   create_dof_constraints()     2         0.0001      0.000027    0.0001      0.000027    0.81     0.81     |
|   distribute_dofs()            2         0.0003      0.000127    0.0015      0.000763    3.72     22.39    |
|   dof_indices()                37        0.0002      0.000006    0.0002      0.000006    3.36     3.36     |
|   prepare_send_list()          2         0.0000      0.000005    0.0000      0.000005    0.13     0.13     |
|   reinit()                     2         0.0002      0.000116    0.0002      0.000116    3.42     3.42     |
|                                                                                                            |
| Mesh                                                                                                       |
|   find_neighbors()             1         0.0002      0.000158    0.0003      0.000258    2.32     3.78     |
|   renumber_nodes_and_elem()    2         0.0000      0.000011    0.0000      0.000011    0.34     0.34     |
|                                                                                                            |
| MeshCommunication                                                                                          |
|   compute_hilbert_indices()    2         0.0002      0.000097    0.0002      0.000097    2.86     2.86     |
|   find_global_indices()        2         0.0001      0.000048    0.0011      0.000530    1.41     15.54    |
|   parallel_sort()              2         0.0003      0.000155    0.0005      0.000248    4.55     7.29     |
|                                                                                                            |
| MeshTools::Generation                                                                                      |
|   build_cube()                 1         0.0001      0.000106    0.0001      0.000106    1.55     1.55     |
|                                                                                                            |
| MetisPartitioner                                                                                           |
|   partition()                  1         0.0006      0.000639    0.0011      0.001094    9.37     16.04    |
|                                                                                                            |
| Parallel                                                                                                   |
|   allgather()                  12        0.0005      0.000041    0.0005      0.000043    7.30     7.60     |
|   max(bool)                    1         0.0000      0.000004    0.0000      0.000004    0.06     0.06     |
|   max(scalar)                  117       0.0005      0.000004    0.0005      0.000004    7.14     7.14     |
|   max(vector)                  27        0.0002      0.000006    0.0005      0.000018    2.33     7.22     |
|   min(bool)                    133       0.0005      0.000004    0.0005      0.000004    7.49     7.49     |
|   min(scalar)                  108       0.0014      0.000013    0.0014      0.000013    20.68    20.68    |
|   min(vector)                  27        0.0002      0.000008    0.0005      0.000020    2.98     7.95     |
|   probe()                      48        0.0003      0.000007    0.0003      0.000007    4.69     4.69     |
|   receive()                    48        0.0001      0.000002    0.0004      0.000009    1.50     6.31     |
|   send()                       48        0.0001      0.000001    0.0001      0.000001    0.78     0.78     |
|   send_receive()               52        0.0002      0.000003    0.0007      0.000014    2.27     10.41    |
|   sum()                        24        0.0002      0.000010    0.0003      0.000011    3.48     3.96     |
|                                                                                                            |
| Parallel::Request                                                                                          |
|   wait()                       48        0.0001      0.000001    0.0001      0.000001    0.82     0.82     |
|                                                                                                            |
| Partitioner                                                                                                |
|   set_node_processor_ids()     1         0.0001      0.000065    0.0004      0.000370    0.95     5.43     |
|   set_parent_processor_ids()   1         0.0000      0.000012    0.0000      0.000012    0.18     0.18     |
 ------------------------------------------------------------------------------------------------------------
| Totals:                        754       0.0068                                          100.00            |
 ------------------------------------------------------------------------------------------------------------

 
***************************************************************
* Done Running Example introduction_ex2:
*  mpirun -np 4 example-devel  -pc_type bjacobi -sub_pc_type ilu -sub_pc_factor_levels 4 -sub_pc_factor_zeropivot 0 -ksp_right_pc
***************************************************************
 
***************************************************************
* Running Example introduction_ex2:
*  mpirun -np 4 example-devel eqn_sys.dat -pc_type bjacobi -sub_pc_type ilu -sub_pc_factor_levels 4 -sub_pc_factor_zeropivot 0 -ksp_right_pc
***************************************************************
 
Running /net/spark/workspace/roystgnr/libmesh/git/devel/examples/introduction/introduction_ex2/.libs/lt-example-devel eqn_sys.dat -pc_type bjacobi -sub_pc_type ilu -sub_pc_factor_levels 4 -sub_pc_factor_zeropivot 0 -ksp_right_pc

 Mesh Information:
  mesh_dimension()=2
  spatial_dimension()=3
  n_nodes()=36
    n_local_nodes()=14
  n_elem()=25
    n_local_elem()=7
    n_active_elem()=25
  n_subdomains()=1
  n_partitions()=4
  n_processors()=4
  n_threads()=1
  processor_id()=0

 EquationSystems
  n_systems()=2
   System #1, "Complex System"
    Type "Explicit"
    Variables={ "c" "T" } "dv" 
    Finite Element Types="LAGRANGE", "JACOBI_20_00" "MONOMIAL", "JACOBI_20_00" 
    Infinite Element Mapping="CARTESIAN" "CARTESIAN" 
    Approximation Orders="FIRST", "THIRD" "SECOND", "THIRD" 
    n_dofs()=222
    n_local_dofs()=70
    n_constrained_dofs()=0
    n_local_constrained_dofs()=0
    n_vectors()=1
    n_matrices()=0
    DofMap Sparsity
      Average  On-Processor Bandwidth <= 0
      Average Off-Processor Bandwidth <= 0
      Maximum  On-Processor Bandwidth <= 0
      Maximum Off-Processor Bandwidth <= 0
    DofMap Constraints
      Number of DoF Constraints = 0
      Number of Node Constraints = 0
   System #0, "Simple System"
    Type "TransientLinearImplicit"
    Variables="u" 
    Finite Element Types="LAGRANGE", "JACOBI_20_00" 
    Infinite Element Mapping="CARTESIAN" 
    Approximation Orders="FIRST", "THIRD" 
    n_dofs()=36
    n_local_dofs()=14
    n_constrained_dofs()=0
    n_local_constrained_dofs()=0
    n_vectors()=3
    n_matrices()=1
    DofMap Sparsity
      Average  On-Processor Bandwidth <= 6.22222
      Average Off-Processor Bandwidth <= 1.88889
      Maximum  On-Processor Bandwidth <= 11
      Maximum Off-Processor Bandwidth <= 6
    DofMap Constraints
      Number of DoF Constraints = 0
      Number of Node Constraints = 0

<<< Writing system to file eqn_sys.dat
>>> Reading system from file eqn_sys.dat

 EquationSystems
  n_systems()=2
   System #0, "Complex System"
    Type "Explicit"
    Variables={ "c" "T" } "dv" 
    Finite Element Types="LAGRANGE", "JACOBI_20_00" "MONOMIAL", "JACOBI_20_00" 
    Infinite Element Mapping="CARTESIAN" "CARTESIAN" 
    Approximation Orders="FIRST", "THIRD" "SECOND", "THIRD" 
    n_dofs()=222
    n_local_dofs()=70
    n_constrained_dofs()=0
    n_local_constrained_dofs()=0
    n_vectors()=1
    n_matrices()=0
    DofMap Sparsity
      Average  On-Processor Bandwidth <= 0
      Average Off-Processor Bandwidth <= 0
      Maximum  On-Processor Bandwidth <= 0
      Maximum Off-Processor Bandwidth <= 0
    DofMap Constraints
      Number of DoF Constraints = 0
      Number of Node Constraints = 0
   System #1, "Simple System"
    Type "TransientLinearImplicit"
    Variables="u" 
    Finite Element Types="LAGRANGE", "JACOBI_20_00" 
    Infinite Element Mapping="CARTESIAN" 
    Approximation Orders="FIRST", "THIRD" 
    n_dofs()=36
    n_local_dofs()=14
    n_constrained_dofs()=0
    n_local_constrained_dofs()=0
    n_vectors()=3
    n_matrices()=1
    DofMap Sparsity
      Average  On-Processor Bandwidth <= 6.22222
      Average Off-Processor Bandwidth <= 1.88889
      Maximum  On-Processor Bandwidth <= 11
      Maximum Off-Processor Bandwidth <= 6
    DofMap Constraints
      Number of DoF Constraints = 0
      Number of Node Constraints = 0


 -------------------------------------------------------------------------------------------------------------------
| Processor id:   0                                                                                                 |
| Num Processors: 4                                                                                                 |
| Time:           Fri Apr 19 11:44:20 2013                                                                          |
| OS:             Linux                                                                                             |
| HostName:       spark.ices.utexas.edu                                                                             |
| OS Release:     2.6.32-279.22.1.el6.x86_64                                                                        |
| OS Version:     #1 SMP Tue Feb 5 14:33:39 CST 2013                                                                |
| Machine:        x86_64                                                                                            |
| Username:       roystgnr                                                                                          |
| Configuration:  ../configure  '--enable-everything'                                                               |
|  'METHODS=devel'                                                                                                  |
|  '--prefix=/h2/roystgnr/libmesh-test'                                                                             |
|  'CXX=distcc /usr/bin/g++'                                                                                        |
|  'CC=distcc /usr/bin/gcc'                                                                                         |
|  'FC=distcc /usr/bin/gfortran'                                                                                    |
|  'F77=distcc /usr/bin/gfortran'                                                                                   |
|  'PETSC_DIR=/opt/apps/ossw/libraries/petsc/petsc-3.3-p2'                                                          |
|  'PETSC_ARCH=gcc-system-mkl-gf-10.3.12.361-mpich2-1.4.1p1-cxx-opt'                                                |
|  'SLEPC_DIR=/opt/apps/ossw/libraries/slepc/slepc-3.3-p2-petsc-3.3-p2-cxx-opt'                                     |
|  'TRILINOS_DIR=/opt/apps/ossw/libraries/trilinos/trilinos-10.12.2/sl6/gcc-system/mpich2-1.4.1p1/mkl-gf-10.3.12.361'|
|  'VTK_DIR=/opt/apps/ossw/libraries/vtk/vtk-5.10.0/sl6/gcc-system'                                                 |
|  'HDF5_DIR=/opt/apps/ossw/libraries/hdf5/hdf5-1.8.9/sl6/gcc-system'                                               |
 -------------------------------------------------------------------------------------------------------------------
 ------------------------------------------------------------------------------------------------------------
| libMesh Performance: Alive time=0.033919, Active time=0.016452                                             |
 ------------------------------------------------------------------------------------------------------------
| Event                          nCalls    Total Time  Avg Time    Total Time  Avg Time    % of Active Time  |
|                                          w/o Sub     w/o Sub     With Sub    With Sub    w/o S    With S   |
|------------------------------------------------------------------------------------------------------------|
|                                                                                                            |
|                                                                                                            |
| DofMap                                                                                                     |
|   add_neighbors_to_send_list() 4         0.0004      0.000090    0.0011      0.000271    2.18     6.60     |
|   build_sparsity()             2         0.0002      0.000103    0.0007      0.000334    1.25     4.06     |
|   create_dof_constraints()     4         0.0001      0.000025    0.0001      0.000025    0.60     0.60     |
|   distribute_dofs()            4         0.0008      0.000194    0.0028      0.000691    4.72     16.81    |
|   dof_indices()                74        0.0008      0.000011    0.0008      0.000011    4.84     4.84     |
|   prepare_send_list()          4         0.0000      0.000005    0.0000      0.000005    0.12     0.12     |
|   reinit()                     4         0.0007      0.000178    0.0007      0.000178    4.33     4.33     |
|                                                                                                            |
| EquationSystems                                                                                            |
|   read()                       1         0.0018      0.001843    0.0065      0.006523    11.20    39.65    |
|   update()                     1         0.0001      0.000127    0.0001      0.000127    0.77     0.77     |
|   write()                      1         0.0014      0.001369    0.0019      0.001903    8.32     11.57    |
|                                                                                                            |
| Mesh                                                                                                       |
|   find_neighbors()             1         0.0002      0.000193    0.0003      0.000268    1.17     1.63     |
|   renumber_nodes_and_elem()    2         0.0000      0.000014    0.0000      0.000014    0.17     0.17     |
|                                                                                                            |
| MeshCommunication                                                                                          |
|   assign_global_indices()      2         0.0017      0.000838    0.0024      0.001197    10.19    14.55    |
|   compute_hilbert_indices()    2         0.0003      0.000144    0.0003      0.000144    1.75     1.75     |
|   find_global_indices()        2         0.0001      0.000059    0.0011      0.000532    0.72     6.47     |
|   parallel_sort()              2         0.0003      0.000160    0.0004      0.000198    1.95     2.41     |
|                                                                                                            |
| MeshTools::Generation                                                                                      |
|   build_cube()                 1         0.0001      0.000114    0.0001      0.000114    0.69     0.69     |
|                                                                                                            |
| MetisPartitioner                                                                                           |
|   partition()                  1         0.0008      0.000811    0.0013      0.001269    4.93     7.71     |
|                                                                                                            |
| Parallel                                                                                                   |
|   allgather()                  28        0.0002      0.000008    0.0003      0.000010    1.37     1.70     |
|   broadcast()                  70        0.0002      0.000002    0.0002      0.000002    1.05     0.95     |
|   max(bool)                    2         0.0000      0.000003    0.0000      0.000003    0.04     0.04     |
|   max(scalar)                  235       0.0011      0.000005    0.0011      0.000005    6.57     6.57     |
|   max(vector)                  53        0.0004      0.000007    0.0010      0.000018    2.13     5.80     |
|   min(bool)                    267       0.0010      0.000004    0.0010      0.000004    6.27     6.27     |
|   min(scalar)                  218       0.0012      0.000005    0.0012      0.000005    7.20     7.20     |
|   min(vector)                  53        0.0004      0.000008    0.0010      0.000019    2.56     6.23     |
|   probe()                      198       0.0004      0.000002    0.0004      0.000002    2.64     2.64     |
|   receive()                    154       0.0004      0.000003    0.0008      0.000005    2.70     4.77     |
|   send()                       130       0.0002      0.000002    0.0002      0.000002    1.29     1.29     |
|   send_receive()               114       0.0005      0.000004    0.0013      0.000012    2.81     8.10     |
|   sum()                        60        0.0003      0.000005    0.0006      0.000010    1.96     3.73     |
|                                                                                                            |
| Parallel::Request                                                                                          |
|   wait()                       130       0.0001      0.000001    0.0001      0.000001    0.86     0.86     |
|                                                                                                            |
| Partitioner                                                                                                |
|   set_node_processor_ids()     1         0.0001      0.000086    0.0002      0.000217    0.52     1.32     |
|   set_parent_processor_ids()   1         0.0000      0.000019    0.0000      0.000019    0.12     0.12     |
 ------------------------------------------------------------------------------------------------------------
| Totals:                        1826      0.0165                                          100.00            |
 ------------------------------------------------------------------------------------------------------------

 
***************************************************************
* Done Running Example introduction_ex2:
*  mpirun -np 4 example-devel eqn_sys.dat -pc_type bjacobi -sub_pc_type ilu -sub_pc_factor_levels 4 -sub_pc_factor_zeropivot 0 -ksp_right_pc
***************************************************************
make[4]: Leaving directory `/net/spark/workspace/roystgnr/libmesh/git/devel/examples/introduction/introduction_ex2'

Site Created By: libMesh Developers
Last modified: November 13 2013 20:54:14 UTC

Hosted By:
SourceForge.net Logo