Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GMG for matrix-free VANS #1458

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

GMG for matrix-free VANS #1458

wants to merge 12 commits into from

Conversation

peterrum
Copy link
Collaborator

No description provided.

@peterrum peterrum requested review from blaisb and lpsaavedra March 13, 2025 17:42
Comment on lines +40 to +44
// AssertThrow(
// this->stabilization ==
// Parameters::Stabilization::NavierStokesStabilization::pspg_supg,
// ExcMessage(
// "PSPG-SUPG stabilization is the only stabilization method currently
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The variable this->stabilization is not initialized at this stage.

const std::shared_ptr<Function<dim>> forcing_function,
const std::shared_ptr<SimulationControl> &simulation_control,
const std::shared_ptr<FESystem<dim>> fe);
MFNavierStokesPreconditionGMGBase(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The class hierarchy of the multigrid operators: MFNavierStokesPreconditionGMGBase -> MFNavierStokesPreconditionGMG -> MFNavierStokesVANSPreconditionGMG. The derivatives need to implement create_level_operator() and initialize(...).

Comment on lines +2558 to +2583
template <int dim>
void
FluidDynamicsMatrixFree<dim>::create_GMG()
{
gmg_preconditioner = std::make_shared<MFNavierStokesPreconditionGMG<dim>>(
this->simulation_parameters,
this->dof_handler,
this->dof_handler_fe_q_iso_q1);

gmg_preconditioner->reinit(this->mapping,
this->cell_quadrature,
this->forcing_function,
this->simulation_control,
this->fe);
}

template <int dim>
void
FluidDynamicsMatrixFree<dim>::initialize_GMG()
{
dynamic_cast<MFNavierStokesPreconditionGMG<dim> *>(gmg_preconditioner.get())
->initialize(this->simulation_control,
this->flow_control,
this->present_solution,
this->time_derivative_previous_solutions);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are (new) function that can be overridden in the derivated classes (e.g., to create a different type of multgrid type and to pass additional information to the initialization methods).

@peterrum
Copy link
Collaborator Author

At the moment, the void fraction is evaluated at every Newton step which is more that needed. However, we have the same issue with evaluate_time_derivative_previous_solutions(). @lpsaavedra and I am working on fixing latter, which should also resolve the current issue.

@blaisb blaisb added the WIP When a PR is open but not ready for review label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP When a PR is open but not ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants