ASPECT
utilities.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2016 - 2024-2018 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file doc/COPYING. If not see
18  <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef _aspect_volume_of_fluid_utilities_h
22 #define _aspect_volume_of_fluid_utilities_h
23 
24 #include <deal.II/base/point.h>
25 
26 #include <aspect/global.h>
27 
28 namespace aspect
29 {
30  namespace VolumeOfFluid
31  {
32  namespace Utilities
33  {
47  using namespace aspect::Utilities;
48 
56  double compute_fluid_fraction (const Tensor<1, 2> normal,
57  const double d);
58  double compute_fluid_fraction (const Tensor<1, 3> normal,
59  const double d);
60 
68  double compute_interface_location (const Tensor<1, 2> normal,
69  const double volume_fraction);
70  double compute_interface_location (const Tensor<1, 3> normal,
71  const double volume_fraction);
72 
86  void xFEM_Heaviside(const unsigned int degree,
87  const Tensor<1, 2> normal,
88  const double d,
89  const std::vector<Point<2>> &points,
90  std::vector<double> &values);
91  void xFEM_Heaviside(const unsigned int degree,
92  const Tensor<1, 3> normal,
93  const double d,
94  const std::vector<Point<3>> &points,
95  std::vector<double> &values);
96 
110  void xFEM_Heaviside_derivative_d(const unsigned int degree,
111  const Tensor<1, 2> normal,
112  const double d,
113  const std::vector<Point<2>> &points,
114  std::vector<double> &values);
115  void xFEM_Heaviside_derivative_d(const unsigned int degree,
116  const Tensor<1, 3> normal,
117  const double d,
118  const std::vector<Point<3>> &points,
119  std::vector<double> &values);
120 
121 
135  template <int dim>
136  double compute_interface_location_newton(const unsigned int degree,
137  const Tensor<1, dim, double> normal,
138  const double volume_fraction,
139  const double vol,
140  const double epsilon,
141  const std::vector<Point<dim>> &points,
142  const std::vector<double> &weights);
143 
156  template <int dim>
157  double compute_fluid_volume(const unsigned int degree,
158  const Tensor<1, dim, double> normal,
159  const double d,
160  const std::vector<Point<dim>> &points,
161  const std::vector<double> &weights);
162 
175  template <int dim>
176  double calculate_volume_flux (const unsigned int compute_direction,
177  const double time_direction_derivative,
178  const Tensor<1, dim, double> interface_normal_in_cell,
179  const double d_at_face_center);
180  }
181  }
182 }
183 
184 #endif
double compute_fluid_volume(const unsigned int degree, const Tensor< 1, dim, double > normal, const double d, const std::vector< Point< dim >> &points, const std::vector< double > &weights)
void xFEM_Heaviside(const unsigned int degree, const Tensor< 1, 2 > normal, const double d, const std::vector< Point< 2 >> &points, std::vector< double > &values)
double compute_interface_location_newton(const unsigned int degree, const Tensor< 1, dim, double > normal, const double volume_fraction, const double vol, const double epsilon, const std::vector< Point< dim >> &points, const std::vector< double > &weights)
void xFEM_Heaviside_derivative_d(const unsigned int degree, const Tensor< 1, 2 > normal, const double d, const std::vector< Point< 2 >> &points, std::vector< double > &values)
Definition: compat.h:59
double compute_interface_location(const Tensor< 1, 2 > normal, const double volume_fraction)
double calculate_volume_flux(const unsigned int compute_direction, const double time_direction_derivative, const Tensor< 1, dim, double > interface_normal_in_cell, const double d_at_face_center)
double compute_fluid_fraction(const Tensor< 1, 2 > normal, const double d)