Skip to content

Commit 613426e

Browse files
committed
Fix ExactSolution w/ coarse DistMesh + fine mesh
This isn't a good fix, because it precludes users carefully setting up ghosting manually between meshes... but since we're already serializing the solution here, we might as well serialize the mesh too. This fixes --enable-distmesh runs of miscellaneous_ex10 on 3+ processors.
1 parent 937dfb0 commit 613426e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/error_estimation/exact_solution.C

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "libmesh/function_base.h"
2525
#include "libmesh/mesh_base.h"
2626
#include "libmesh/mesh_function.h"
27+
#include "libmesh/mesh_serializer.h"
2728
#include "libmesh/numeric_vector.h"
2829
#include "libmesh/parallel.h"
2930
#include "libmesh/quadrature.h"
@@ -475,9 +476,14 @@ void ExactSolution::_compute_error(std::string_view sys_name,
475476
const unsigned int var_component =
476477
computed_system.variable_scalar_number(var, 0);
477478

478-
// Prepare a global solution and a MeshFunction of the coarse system if we need one
479+
// Prepare a global solution, a serialized mesh, and a MeshFunction
480+
// of the coarse system, if we need them for fine-system integration
479481
std::unique_ptr<MeshFunction> coarse_values;
480-
std::unique_ptr<NumericVector<Number>> comparison_soln = NumericVector<Number>::build(_equation_systems.comm());
482+
std::unique_ptr<NumericVector<Number>> comparison_soln =
483+
NumericVector<Number>::build(_equation_systems.comm());
484+
MeshSerializer
485+
serial(const_cast<MeshBase&>(_equation_systems.get_mesh()),
486+
_equation_systems_fine);
481487
if (_equation_systems_fine)
482488
{
483489
const System & comparison_system

0 commit comments

Comments
 (0)