Reduced Lagrange Multipliers
 
Loading...
Searching...
No Matches
particle_coupling.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2024 by Luca Heltai
4//
5// This file is part of the reduced_lagrange_multipliers application, based on
6// the deal.II library.
7//
8// The reduced_lagrange_multipliers application is free software; you can use
9// it, redistribute it, and/or modify it under the terms of the Apache-2.0
10// License WITH LLVM-exception as published by the Free Software Foundation;
11// either version 3.0 of the License, or (at your option) any later version. The
12// full text of the license can be found in the file LICENSE.md at the top level
13// of the reduced_lagrange_multipliers distribution.
14//
15// ---------------------------------------------------------------------
16
17#ifndef rdl_particle_coupling_h
18#define rdl_particle_coupling_h
19
22
25
26#include <deal.II/fe/fe_q.h>
28
30
34
35using namespace dealii;
36
37
48template <int dim>
50{
51public:
56
64 unsigned int rtree_extraction_level = 1;
65};
66
67
78template <int dim>
80{
81public:
87
92 void
93 output_particles(const std::string &output_name) const;
94
101 void
105
109 std::vector<std::vector<BoundingBox<dim>>>
111
116 get_particles() const;
117
124 std::map<unsigned int, IndexSet>
125 insert_points(const std::vector<Point<dim>> &points,
126 const std::vector<std::vector<double>> &properties = {});
127
128protected:
136
142
147
152
156 std::vector<std::vector<BoundingBox<dim>>> global_bounding_boxes;
157
162};
163
164#endif
ParameterAcceptor(const std::string &section_name="")
SmartPointer< const Mapping< dim > > mapping
Smart pointer to the mapping associated with the triangulation.
std::vector< std::vector< BoundingBox< dim > > > global_bounding_boxes
void output_particles(const std::string &output_name) const
Outputs the current state of the particles to a file.
std::map< unsigned int, IndexSet > insert_points(const std::vector< Point< dim > > &points, const std::vector< std::vector< double > > &properties={})
std::vector< std::vector< BoundingBox< dim > > > get_global_bounding_boxes() const
const Particles::ParticleHandler< dim > & get_particles() const
MPI_Comm mpi_communicator
Get the MPI communicator associated with the triangulation.
SmartPointer< const parallel::TriangulationBase< dim > > tria_background
Smart pointer to the background triangulation.
Particles::ParticleHandler< dim > particles
Handler for managing particles in the simulation.
const ParticleCouplingParameters< dim > & par
Parameters for particle coupling.
void initialize_particle_handler(const parallel::TriangulationBase< dim > &tria_background, const Mapping< dim > &mapping=StaticMappingQ1< dim >::mapping)
ParticleCoupling(const ParticleCouplingParameters< dim > &par)
Constructor.
Stores parameters related to particle coupling in a simulation.
ParticleCouplingParameters()
Constructor that initializes the parameters.
ObserverPointer< T, P > SmartPointer
static MappingQ< dim, spacedim > mapping