Program Listing for File immersed_repartitioner.h

Return to documentation for file (include/immersed_repartitioner.h)

// ---------------------------------------------------------------------
//
// Copyright (C) 2024 by Luca Heltai
//
// This file is part of the reduced_lagrange_multipliers application, based on
// the deal.II library.
//
// The reduced_lagrange_multipliers application is free software; you can use
// it, redistribute it, and/or modify it under the terms of the Apache-2.0
// License WITH LLVM-exception as published by the Free Software Foundation;
// either version 3.0 of the License, or (at your option) any later version. The
// full text of the license can be found in the file LICENSE.md at the top level
// of the reduced_lagrange_multipliers distribution.
//
// ---------------------------------------------------------------------

#ifndef rdl_immersed_repartitioner_h
#define rdl_immersed_repartitioner_h

#include <deal.II/distributed/fully_distributed_tria.h>
#include <deal.II/distributed/repartitioning_policy_tools.h>
#include <deal.II/distributed/tria.h>

#include <deal.II/fe/fe_q.h>
#include <deal.II/fe/mapping_q1.h>

#include <deal.II/lac/la_parallel_vector.h>

using namespace dealii;

template <int dim, int spacedim = dim>
class ImmersedRepartitioner
  : public RepartitioningPolicyTools::Base<dim, spacedim>
{
public:
  ImmersedRepartitioner(const Triangulation<spacedim> &tria_background);

  virtual LinearAlgebra::distributed::Vector<double>
  partition(const Triangulation<dim, spacedim> &tria_immersed) const override;

private:
  const Triangulation<spacedim> &tria_background;

  const MappingQ1<spacedim> mapping;
};

#endif