3#include <deal.II/base/array_view.h>
4#include <deal.II/base/vectorization.h>
6#include <deal.II/dofs/dof_handler.h>
8#include <deal.II/grid/tria.h>
10#include <deal.II/matrix_free/evaluation_flags.h>
11#include <deal.II/matrix_free/fe_point_evaluation.h>
12#include <deal.II/matrix_free/matrix_free.h>
14#include <deal.II/non_matching/mapping_info.h>
15#include <deal.II/non_matching/mesh_classifier.h>
33 BETTER_ENUM(CutPhaseType,
char, not_cut, one_phase_cut, two_phase_cut)
46 get_cut_type(
const dealii::DoFHandler<dim> &dof_handler);
51 template <
int dim,
typename number>
53 dealii::NonMatching::MappingInfo<dim, dim, dealii::VectorizedArray<number>>;
55 template <
int dim,
typename number>
91 get_face_type(
const std::pair<unsigned int, unsigned int> &adjacent_cell_categories);
109 set_fe_index(
const dealii::DoFHandler<dim> &dof_handler,
110 const dealii::NonMatching::MeshClassifier<dim> &mesh_classifier,
111 const bool set_future);
147 template <
int dim,
typename number,
typename VectorType>
150 MappingInfoVectorType<dim, number> mapping_info_cells,
151 MappingInfoType<dim, number> &mapping_info_surface,
152 const dealii::DoFHandler<dim> &level_set_dof_handler,
153 const VectorType &level_set,
154 const dealii::MatrixFree<dim, number, dealii::VectorizedArray<number>> &matrix_free,
156 const bool is_two_phase,
157 const bool is_dg =
false,
158 MappingInfoVectorType<dim, number> mapping_info_faces = {});
190 template <
int dim,
typename number,
typename VectorType>
193 MappingInfoType<dim, number> &mapping_info_surface,
194 const dealii::DoFHandler<dim> &level_set_dof_handler,
195 const VectorType &level_set,
196 const dealii::MatrixFree<dim, number, dealii::VectorizedArray<number>> &matrix_free,
197 const int fe_degree);
221 template <
int dim,
typename number,
int n_components = 1>
224 dealii::FEPointEvaluation<n_components, dim, dim, dealii::VectorizedArray<number>> &point_eval,
226 const dealii::EvaluationFlags::EvaluationFlags evaluation_flags,
227 const unsigned int cell_batch,
228 const unsigned int cell_lane,
229 const unsigned int n_dofs_per_cell)
231 static constexpr unsigned int n_lanes = dealii::VectorizedArray<number>::size();
233 point_eval.reinit(cell_batch * n_lanes + cell_lane);
234 point_eval.evaluate(dealii::StridedArrayView<const number, n_lanes>(
235 &cell_eval.begin_dof_values()[0][cell_lane], n_dofs_per_cell),
268 const typename dealii::Triangulation<dim>::active_cell_iterator &cell,
269 const unsigned int face_index,
270 const dealii::NonMatching::LocationToLevelSet &inactive_location =
271 dealii::NonMatching::LocationToLevelSet::inside)
273 if (cell->at_boundary(face_index))
276 const dealii::NonMatching::LocationToLevelSet cell_location =
277 mesh_classifier.location_to_level_set(cell);
278 const dealii::NonMatching::LocationToLevelSet neighbor_location =
279 mesh_classifier.location_to_level_set(cell->neighbor(face_index));
281 if (cell_location == dealii::NonMatching::LocationToLevelSet::intersected and
282 neighbor_location != inactive_location)
285 if (neighbor_location == dealii::NonMatching::LocationToLevelSet::intersected and
286 cell_location != inactive_location)
325 const dealii::NonMatching::MeshClassifier<dim> &mesh_classifier_old,
326 const typename dealii::Triangulation<dim>::active_cell_iterator &cell,
327 const unsigned int face_index,
328 const dealii::NonMatching::LocationToLevelSet &inactive_location =
329 dealii::NonMatching::LocationToLevelSet::inside)
331 if (cell->at_boundary(face_index))
334 const dealii::NonMatching::LocationToLevelSet cell_location =
335 mesh_classifier.location_to_level_set(cell);
336 const dealii::NonMatching::LocationToLevelSet neighbor_location =
337 mesh_classifier.location_to_level_set(cell->neighbor(face_index));
339 const dealii::NonMatching::LocationToLevelSet cell_location_old =
340 mesh_classifier_old.location_to_level_set(cell);
341 const dealii::NonMatching::LocationToLevelSet neighbor_location_old =
342 mesh_classifier_old.location_to_level_set(cell->neighbor(face_index));
344 if (cell_location == dealii::NonMatching::LocationToLevelSet::intersected and
345 neighbor_location == dealii::NonMatching::LocationToLevelSet::intersected and
346 cell_location_old == inactive_location and neighbor_location_old == inactive_location)
bool face_has_ghost_penalty(const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const typename dealii::Triangulation< dim >::active_cell_iterator &cell, const unsigned int face_index, const dealii::NonMatching::LocationToLevelSet &inactive_location=dealii::NonMatching::LocationToLevelSet::inside)
This function checks whether the currently considered face requires the application of ghost-penalty ...
Definition util.hpp:267
FaceType
Enumeration for the face type.
Definition util.hpp:72
@ mixed_face_gas_intersected
Definition util.hpp:78
@ mixed_face_liquid_intersected
Definition util.hpp:76
@ mixed_face_intersected_gas
Definition util.hpp:79
@ intersected_face
Definition util.hpp:75
@ mixed_face_intersected_liquid
Definition util.hpp:77
@ inside_face_liquid
Definition util.hpp:73
@ inside_face_gas
Definition util.hpp:74
CutPhaseType get_cut_type(const dealii::DoFHandler< dim > &dof_handler)
Enum that names a type of CutFEM in use.
Definition util.cpp:19
CellCategory
Definition of the cell category numbering (active FE index).
Definition util.hpp:62
@ liquid
Definition util.hpp:63
@ intersected
Definition util.hpp:64
@ gas
Definition util.hpp:65
std::vector< std::shared_ptr< MappingInfoType< dim, number > > > MappingInfoVectorType
Definition util.hpp:56
void compute_immersed_surface_quadrature(MappingInfoType< dim, number > &mapping_info_surface, const dealii::DoFHandler< dim > &level_set_dof_handler, const VectorType &level_set, const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &matrix_free, const int fe_degree)
This function generates the immersed quadrature rules in the case that the domain is described by a d...
Definition util.cpp:261
dealii::NonMatching::MappingInfo< dim, dim, dealii::VectorizedArray< number > > MappingInfoType
Definition util.hpp:53
void set_fe_index(const dealii::DoFHandler< dim > &dof_handler, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const bool set_future)
This function is setting the FE index for every cell.
Definition util.cpp:94
bool is_new_intersected_face(const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier, const dealii::NonMatching::MeshClassifier< dim > &mesh_classifier_old, const typename dealii::Triangulation< dim >::active_cell_iterator &cell, const unsigned int face_index, const dealii::NonMatching::LocationToLevelSet &inactive_location=dealii::NonMatching::LocationToLevelSet::inside)
This function checks whether the considered face is a newly created intersected face.
Definition util.hpp:324
void evaluate_intersected_domain(dealii::FEPointEvaluation< n_components, dim, dim, dealii::VectorizedArray< number > > &point_eval, const FECellIntegrator< dim, n_components, number > &cell_eval, const dealii::EvaluationFlags::EvaluationFlags evaluation_flags, const unsigned int cell_batch, const unsigned int cell_lane, const unsigned int n_dofs_per_cell)
Evaluates solution values in the intersected domain for a specific SIMD lane within a cell batch.
Definition util.hpp:223
FaceType get_face_type(const std::pair< unsigned int, unsigned int > &adjacent_cell_categories)
This function categorizes the FaceType of the current face range.
Definition util.cpp:38
void compute_intersected_quadrature(MappingInfoVectorType< dim, number > mapping_info_cells, MappingInfoType< dim, number > &mapping_info_surface, const dealii::DoFHandler< dim > &level_set_dof_handler, const VectorType &level_set, const dealii::MatrixFree< dim, number, dealii::VectorizedArray< number > > &matrix_free, const int fe_degree, const bool is_two_phase, const bool is_dg=false, MappingInfoVectorType< dim, number > mapping_info_faces={})
This function generates the immersed quadrature rules in the case that the domain is described by a d...
Definition util.cpp:126
BETTER_ENUM(MaterialTemplate, char, none, stainless_steel, Ti64, Ti64Benchmark) BETTER_ENUM(SolidLiquidPropertiesTransitionType
dealii::FEEvaluation< dim, -1, 0, n_components, number, VectorizedArrayType > FECellIntegrator
Definition fe_integrator.hpp:14