Skip to content

Conversation

WasimNiyazMunshi
Copy link
Contributor

Mpi solver for heat eqn

Copy link
Member

@bangerth bangerth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WasimNiyazMunshi Here are some comments. I think the rest looks good. If you know step-26 and step-40, it should not be difficult to understand the program.

@marcfehling
Copy link
Member

@WasimNiyazMunshi -- ping

@WasimNiyazMunshi
Copy link
Contributor Author

@marcfehling

@bangerth
Copy link
Member

@WasimNiyazMunshi Can you squash the commits? This way, we don't have one commit that adds the executable and another that removes it again. That'd be a waste of disk space for everyone who clones the repository.

@WasimNiyazMunshi WasimNiyazMunshi force-pushed the MPI_for_Heat_Eqn branch 3 times, most recently from 69c3ce7 to 3259e03 Compare August 18, 2025 17:12
Copy link
Member

@marcfehling marcfehling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. I only have a few comments.

@@ -0,0 +1 @@
DEAL_II_WITH_TRILINOS DEAL_II_WITH_MPI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not match the requirements stated in CMakeLists.txt.

DynamicSparsityPattern dsp(locally_relevant_dofs);
DoFTools::make_sparsity_pattern(dof_handler, dsp, constraints, true);
SparsityTools::distribute_sparsity_pattern(
dsp, dof_handler.locally_owned_dofs(), mpi_communicator,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dsp, dof_handler.locally_owned_dofs(), mpi_communicator,
dsp, locally_owned_dofs, mpi_communicator,

Comment on lines +425 to +432
system_rhs.reinit(locally_owned_dofs, mpi_communicator);
DynamicSparsityPattern dsp(locally_relevant_dofs);
DoFTools::make_sparsity_pattern(dof_handler, dsp, constraints, true);
SparsityTools::distribute_sparsity_pattern(
dsp, dof_handler.locally_owned_dofs(), mpi_communicator,
locally_relevant_dofs);
system_matrix.reinit(locally_owned_dofs, locally_owned_dofs, dsp,
mpi_communicator);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
system_rhs.reinit(locally_owned_dofs, mpi_communicator);
DynamicSparsityPattern dsp(locally_relevant_dofs);
DoFTools::make_sparsity_pattern(dof_handler, dsp, constraints, true);
SparsityTools::distribute_sparsity_pattern(
dsp, dof_handler.locally_owned_dofs(), mpi_communicator,
locally_relevant_dofs);
system_matrix.reinit(locally_owned_dofs, locally_owned_dofs, dsp,
mpi_communicator);

Is there a reason why you need to reinitialize your data structures here?

You already call setup_system at the appropriate places, which does exactly the preparation of data structures, so I don't think you will need to reinit most structures again here.

If needed, I would move the setup_system call after the goto hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants