Skip to content

Commit

Permalink
The new Mesh constuctors take communicator& first
Browse files Browse the repository at this point in the history
  • Loading branch information
roystgnr committed Apr 10, 2013
1 parent fd41d47 commit 593141c
Show file tree
Hide file tree
Showing 49 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion examples/adaptivity/adaptivity_ex1/adaptivity_ex1.C
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main(int argc, char** argv)

// Create a mesh, with dimension to be overridden later, on the
// default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

GetPot command_line (argc, argv);

Expand Down
2 changes: 1 addition & 1 deletion examples/adaptivity/adaptivity_ex2/adaptivity_ex2.C
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ int main (int argc, char** argv)
// Create a new mesh on the default MPI communicator.
// We still need some work on automatic parallel restarts with
// ParallelMesh
SerialMesh mesh(0,init.communicator());
SerialMesh mesh(init.communicator());

// Create an equation systems object.
EquationSystems equation_systems (mesh);
Expand Down
2 changes: 1 addition & 1 deletion examples/adaptivity/adaptivity_ex3/adaptivity_ex3.C
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int main(int argc, char** argv)

// Create a mesh, with dimension to be overridden later, on the
// default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Read in the mesh
if (dim == 1)
Expand Down
2 changes: 1 addition & 1 deletion examples/adaptivity/adaptivity_ex4/adaptivity_ex4.C
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int main(int argc, char** argv)

// Create a mesh, with dimension to be overridden later, on the
// default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Output file for plotting the error
std::string output_file = "";
Expand Down
2 changes: 1 addition & 1 deletion examples/adaptivity/adaptivity_ex5/adaptivity_ex5.C
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ int main (int argc, char** argv)
// Create a new mesh on the default MPI communicator.
// ParallelMesh doesn't yet understand periodic BCs, plus
// we still need some work on automatic parallel restarts
SerialMesh mesh(0,init.communicator());
SerialMesh mesh(init.communicator());

// Create an equation systems object.
EquationSystems equation_systems (mesh);
Expand Down
2 changes: 1 addition & 1 deletion examples/adjoints/adjoints_ex1/adjoints_ex1.C
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// And an object to refine it
AutoPtr<MeshRefinement> mesh_refinement =
Expand Down
2 changes: 1 addition & 1 deletion examples/adjoints/adjoints_ex2/adjoints_ex2.C
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// And an object to refine it
AutoPtr<MeshRefinement> mesh_refinement =
Expand Down
2 changes: 1 addition & 1 deletion examples/adjoints/adjoints_ex3/adjoints_ex3.C
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ int main (int argc, char** argv)

// Create a mesh with the given dimension, distributed
// across the default MPI communicator.
Mesh mesh(param.dimension, init.communicator());
Mesh mesh(init.communicator(), param.dimension);

// And an object to refine it
AutoPtr<MeshRefinement> mesh_refinement =
Expand Down
2 changes: 1 addition & 1 deletion examples/adjoints/adjoints_ex4/adjoints_ex4.C
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// And an object to refine it
AutoPtr<MeshRefinement> mesh_refinement =
Expand Down
2 changes: 1 addition & 1 deletion examples/adjoints/adjoints_ex5/adjoints_ex5.C
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ int main (int argc, char** argv)

// Create a mesh with the given dimension, distributed
// across the default MPI communicator.
Mesh mesh(param.dimension, init.communicator());
Mesh mesh(init.communicator(), param.dimension);

// And an object to refine it
AutoPtr<MeshRefinement> mesh_refinement(new MeshRefinement(mesh));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, on the
// default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the internal mesh generator to create a uniform
// 2D grid on a square.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, on the
// default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the internal mesh generator to create a uniform
// 2D grid on a square.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden by the file, on
// the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

mesh.read(mesh_name_exodus.str());

Expand Down
2 changes: 1 addition & 1 deletion examples/fem_system/fem_system_ex1/fem_system_ex1.C
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// And an object to refine it
MeshRefinement mesh_refinement(mesh);
Expand Down
2 changes: 1 addition & 1 deletion examples/fem_system/fem_system_ex2/fem_system_ex2.C
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int main(int argc, char** argv)
libmesh_example_assert(dim <= LIBMESH_DIM, "3D support");

// Create a mesh distributed across the default MPI communicator.
Mesh mesh(dim,init.communicator());
Mesh mesh(init.communicator(), dim);

EquationSystems systems(mesh);

Expand Down
2 changes: 1 addition & 1 deletion examples/introduction/introduction_ex1/introduction_ex1.C
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, on the
// default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Read the input mesh.
mesh.read (argv[3]);
Expand Down
2 changes: 1 addition & 1 deletion examples/introduction/introduction_ex2/introduction_ex2.C
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the MeshTools::Generation mesh generator to create a uniform
// 2D grid on the unit square. By default a mesh of QUAD4
Expand Down
2 changes: 1 addition & 1 deletion examples/introduction/introduction_ex3/introduction_ex3.C
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the MeshTools::Generation mesh generator to create a uniform
// 2D grid on the square [-1,1]^2. We instruct the mesh generator
Expand Down
2 changes: 1 addition & 1 deletion examples/introduction/introduction_ex4/introduction_ex4.C
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the MeshTools::Generation mesh generator to create a uniform
// grid on the square [-1,1]^D. We instruct the mesh generator
Expand Down
2 changes: 1 addition & 1 deletion examples/introduction/introduction_ex5/introduction_ex5.C
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int main (int argc, char** argv)

// The following is identical to example 4, and therefore
// not commented. Differences are mentioned when present.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// We will use a linear approximation space in this example,
// hence 8-noded hexahedral elements are sufficient. This
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int main (int argc, char** argv)
// InfElemBuilder still requires some updates to be ParallelMesh
// compatible

SerialMesh mesh(0, init.communicator());
SerialMesh mesh(init.communicator());

// Use the internal mesh generator to create elements
// on the square [-1,1]^3, of type Hex8.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Create a corresponding MeshData
// and activate it. For more information on this object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden by the file,
// distributed across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

mesh.read ("lshaped.xda");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Create an equation systems object.
EquationSystems equation_systems (mesh);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

if (dim == 1)
MeshTools::Generation::build_line(mesh,1,-1.,0.);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void triangulate_domain(const Parallel::Communicator& comm)
typedef TriangleInterface::ArbitraryHole ArbitraryHole;

// Libmesh mesh that will eventually be created.
Mesh mesh(2, comm);
Mesh mesh(comm, 2);

// The points which make up the L-shape:
mesh.add_point(Point( 0. , 0.));
Expand Down
2 changes: 1 addition & 1 deletion examples/miscellaneous/miscellaneous_ex7/biharmonic.C
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using namespace libMesh;
void Biharmonic::Create(Biharmonic** b, const Parallel::Communicator &comm)
{
// ParallelMesh doesn't yet understand periodic BCs
SerialMesh* mesh = new SerialMesh(0,comm);
SerialMesh* mesh = new SerialMesh(comm);
Biharmonic *biharmonic = new Biharmonic(mesh);
*b = biharmonic;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int main(int argc, char** argv)

// Demonstration case 2
{
Mesh mesh_a(0,init.communicator()), mesh_b(0,init.communicator());
Mesh mesh_a(init.communicator()), mesh_b(init.communicator());

mesh_a.read("struct.ucd.gz"); mesh_b.read("unstruct.ucd.gz");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int main (int argc, char** argv)
online_mode = command_line.next(online_mode);

// Build a mesh on the default MPI communicator.
Mesh mesh (dim, init.communicator());
Mesh mesh (init.communicator(), dim);
MeshTools::Generation::build_square (mesh,
n_elem, n_elem,
0., 1.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ int main (int argc, char** argv)
online_mode = command_line.next(online_mode);

// Build a mesh on the default MPI communicator.
Mesh mesh (dim, init.communicator());
Mesh mesh (init.communicator(), dim);
MeshTools::Generation::build_square (mesh,
n_elem, n_elem,
0., 1.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int main (int argc, char** argv)
online_mode = command_line.next(online_mode);

// Build a mesh on the default MPI communicator.
Mesh mesh (dim, init.communicator());
Mesh mesh (init.communicator(), dim);
MeshTools::Generation::build_square (mesh,
n_elem, n_elem,
0., 1.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int main (int argc, char** argv)

// Create a mesh (just a simple square) on the default MPI
// communicator
Mesh mesh (dim, init.communicator());
Mesh mesh (init.communicator(), dim);
MeshTools::Generation::build_square (mesh,
n_elem, n_elem,
-1., 1.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int main(int argc, char** argv) {
}


Mesh mesh (dim, init.communicator());
Mesh mesh (init.communicator(), dim);
MeshTools::Generation::build_cube (mesh,
n_elem_x,
n_elem_y,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden by build_cube, on
// the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

MeshTools::Generation::build_cube (mesh,
n_elem_xy, n_elem_xy, n_elem_z,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int main (int argc, char** argv)
online_mode = command_line.next(online_mode);

// Create a mesh on the default MPI communicator.
Mesh mesh(dim,init.communicator());
Mesh mesh(init.communicator(), dim);
mesh.read("horn.msh");

// Create an equation systems object.
Expand Down
2 changes: 1 addition & 1 deletion examples/solution_transfer/solution_transfer_ex1/main.C
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int main(int argc, char* argv[])

#ifdef LIBMESH_HAVE_DTK

Mesh from_mesh(0,init.communicator());
Mesh from_mesh(init.communicator());
MeshTools::Generation::build_cube(from_mesh, 4, 4, 4, 0, 1, 0, 1, 0, 1, HEX8);
from_mesh.print_info();
EquationSystems from_es(from_mesh);
Expand Down
2 changes: 1 addition & 1 deletion examples/subdomains/subdomains_ex1/subdomains_ex1.C
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, on the
// default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the MeshTools::Generation mesh generator to create a uniform
// grid on the square [-1,1]^D. We instruct the mesh generator
Expand Down
2 changes: 1 addition & 1 deletion examples/subdomains/subdomains_ex2/subdomains_ex2.C
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ int main (int argc, char** argv)

// Create a mesh with user-defined dimension on the default MPI
// communicator.
Mesh mesh (dim, init.communicator());
Mesh mesh (init.communicator(), dim);

// Read number of elements from command line
int ps = 15;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the MeshTools::Generation mesh generator to create a uniform
// 2D grid on the square [-1,1]^2. We instruct the mesh generator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the MeshTools::Generation mesh generator to create a uniform
// 2D grid on the square [-1,1]^2. We instruct the mesh generator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int main (int argc, char** argv)

// Create a mesh, with dimension to be overridden later, distributed
// across the default MPI communicator.
Mesh mesh(0,init.communicator());
Mesh mesh(init.communicator());

// Use the MeshTools::Generation mesh generator to create a uniform
// 2D grid on the square [-1,1]^2. We instruct the mesh generator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main (int argc, char** argv)
libmesh_example_assert(dim <= LIBMESH_DIM, "2D support");

// Create a 2D mesh distributed across the default MPI communicator.
Mesh mesh(dim, init.communicator());
Mesh mesh(init.communicator(), dim);
MeshTools::Generation::build_square (mesh,
50, 10,
0., 1.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int main (int argc, char** argv)
libmesh_example_assert(dim <= LIBMESH_DIM, "2D support");

// Create a 2D mesh distributed across the default MPI communicator.
Mesh mesh(dim, init.communicator());
Mesh mesh(init.communicator(), dim);
MeshTools::Generation::build_square (mesh,
50, 10,
0., 1.,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int main (int argc, char** argv)
libmesh_example_assert(dim == LIBMESH_DIM, "3D support");

// Create a 3D mesh distributed across the default MPI communicator.
Mesh mesh(dim, init.communicator());
Mesh mesh(init.communicator(), dim);
MeshTools::Generation::build_cube (mesh,
40,
8,
Expand Down
Loading

0 comments on commit 593141c

Please sign in to comment.