Skip to content

Commit

Permalink
all debug tests fails even ofr replicated idaholab#12033
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Rovinelli committed Dec 18, 2019
1 parent c6259ae commit be35261
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ class BreakMeshByBlockGenerator : public BreakMeshByBlockGeneratorBase
std::set<std::pair<dof_id_type, unsigned int>>>
_new_boundary_sides_map;
};

9 changes: 5 additions & 4 deletions framework/src/meshgenerators/BreakMeshByBlockGenerator.C
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,12 @@ BreakMeshByBlockGenerator::validParams()
BreakMeshByBlockGenerator::BreakMeshByBlockGenerator(const InputParameters & parameters)
: BreakMeshByBlockGeneratorBase(parameters), _input(getMesh("input"))
{
// if (typeid(_input).name() == typeid(DistributedMesh).name())
// mooseError("BreakMeshByBlockGenerator only works with ReplicatedMesh.");
}

std::unique_ptr<MeshBase>
BreakMeshByBlockGenerator::generate()
{
std::unique_ptr<MeshBase> mesh = std::move(_input);

// initialize the node to element map
std::map<dof_id_type, std::vector<dof_id_type>> node_to_elem_map;
for (const auto & elem : mesh->active_element_ptr_range())
Expand Down Expand Up @@ -97,7 +94,9 @@ BreakMeshByBlockGenerator::generate()
current_node->id()) // if current node == node on element
{
// add new node
new_node = Node::build(*current_node, mesh->n_nodes()).release();
dof_id_type new_node_id =
(current_elem->subdomain_id() + 1) * mesh->max_node_id() + current_node->id();
new_node = Node::build(*current_node, new_node_id).release();
new_node->processor_id() = current_node->processor_id();
mesh->add_node(new_node);

Expand Down Expand Up @@ -160,6 +159,8 @@ BreakMeshByBlockGenerator::generate()
} // end nodeptr check

addInterfaceBoundary(*mesh);
// Find neighbors, etc.
mesh->prepare_for_use();
return dynamic_pointer_cast<MeshBase>(mesh);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[./fmg]
type = FileMeshGenerator
file = poly.msh
#parallel_type = replicated
[]

[./breakmesh]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[./fmg]
type = FileMeshGenerator
file = coh3D_3Blocks.e
parallel_type = replicated
[]

[./breakmesh]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[./fmg]
type = FileMeshGenerator
file = poly2.msh
#parallel_type = replicated
[]

[./breakmesh]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[./fmg]
type = FileMeshGenerator
file = coh3D_3Blocks.e
#parallel_type = replicated
[]

[./breakmesh]
Expand Down
28 changes: 13 additions & 15 deletions test/tests/meshgenerators/break_mesh_by_block_generator/tests
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
exodiff = 'break_mesh_3D_auto_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh.'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#11640'
#mesh_mode = 'REPLICATED'
issues = '#11640 #12033'
recover = false
[../]
[./break_mesh_by_blocks_generator_3d_auto_test_distributed]
Expand All @@ -17,9 +16,10 @@
exodiff = 'break_mesh_3D_auto_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh.'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#11640'
#mesh_mode = 'REPLICATED'
issues = '#11640 #12033'
recover = false
prereq = 'break_mesh_by_blocks_generator_3d_auto_test'
min_parallel = 3
[../]
[./break_mesh_by_blocks_generator_3d_split_test]
type = 'Exodiff'
Expand All @@ -28,8 +28,7 @@
exodiff = 'break_mesh_3D_splittrue_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh.'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#11640'
#mesh_mode = 'REPLICATED'
issues = '#11640 #12033'
recover = false
[../]

Expand All @@ -40,9 +39,9 @@
exodiff = 'break_mesh_3D_polycrystal_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh.'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#11640'
#mesh_mode = 'REPLICATED'
issues = '#11640 #12033'
recover = false
min_parallel = 3
[../]

[./break_mesh_by_blocks_generator_2d_auto_test]
Expand All @@ -52,21 +51,20 @@
exodiff = 'break_mesh_2DJunction_auto_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh.'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#11640'
#mesh_mode = 'REPLICATED'
issues = '#11640 #12033'
recover = false
[../]

[./break_mesh_by_blocks_generator_2d_splittrue_test]
type = 'Exodiff'
input = 'break_mesh_2DJunction_splittrue.i'
cli_args = '--mesh-only'
cli_args = '--mesh-only --distributed-mesh'
exodiff = 'break_mesh_2DJunction_splittrue_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh.'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#11640'
#mesh_mode = 'REPLICATED'
issues = '#11640 #12033'
recover = false
min_parallel = 3
[../]

[./break_mesh_by_blocks_generator_2d_polycrystal_test]
Expand All @@ -76,8 +74,8 @@
exodiff = 'break_mesh_2DJunction_polycrystal_in.e'
requirement = 'MOOSE shall be able to create separate blocks in a mesh.'
design = 'meshgenerators/BreakMeshByBlockGenerator.md'
issues = '#11640'
#mesh_mode = 'REPLICATED'
issues = '#11640 #12033'
recover = false
min_parallel = 3
[../]
[]

0 comments on commit be35261

Please sign in to comment.