ASPECT
utilities.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2016 - 2020-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  {
34  using namespace dealii;
35 
43  double compute_fluid_fraction (const Tensor<1, 2> normal,
44  const double d);
45  double compute_fluid_fraction (const Tensor<1, 3> normal,
46  const double d);
47 
55  double compute_interface_location (const Tensor<1, 2> normal,
56  const double volume_fraction);
57  double compute_interface_location (const Tensor<1, 3> normal,
58  const double volume_fraction);
59 
73  void xFEM_Heaviside(const unsigned int degree,
74  const Tensor<1, 2> normal,
75  const double d,
76  const std::vector<Point<2>> &points,
77  std::vector<double> &values);
78  void xFEM_Heaviside(const unsigned int degree,
79  const Tensor<1, 3> normal,
80  const double d,
81  const std::vector<Point<3>> &points,
82  std::vector<double> &values);
83 
97  void xFEM_Heaviside_derivative_d(const unsigned int degree,
98  const Tensor<1, 2> normal,
99  const double d,
100  const std::vector<Point<2>> &points,
101  std::vector<double> &values);
102  void xFEM_Heaviside_derivative_d(const unsigned int degree,
103  const Tensor<1, 3> normal,
104  const double d,
105  const std::vector<Point<3>> &points,
106  std::vector<double> &values);
107 
108 
122  template<int dim>
123  double compute_interface_location_newton(const unsigned int degree,
124  const Tensor<1, dim, double> normal,
125  const double volume_fraction,
126  const double vol,
127  const double epsilon,
128  const std::vector<Point<dim>> &points,
129  const std::vector<double> &weights);
130 
143  template<int dim>
144  double compute_fluid_volume(const unsigned int degree,
145  const Tensor<1, dim, double> normal,
146  const double d,
147  const std::vector<Point<dim>> &points,
148  const std::vector<double> &weights);
149 
162  template<int dim>
163  double calculate_volume_flux (const unsigned int compute_direction,
164  const double time_direction_derivative,
165  const Tensor<1, dim, double> interface_normal_in_cell,
166  const double d_at_face_center);
167  }
168  }
169 }
170 
171 #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)
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)
Definition: compat.h:88