https://mooseframework.inl.gov
SBMUtils.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "MooseMesh.h"
13 #include "MooseTypes.h"
14 
15 class Function;
16 class FunctionInterface;
17 class InputParameters;
18 namespace libMesh
19 {
20 class Point;
21 }
22 
23 namespace SBMUtils
24 {
25 bool checkWatertightnessFromRawElems(const std::vector<const Elem *> & bd_elements);
26 
28 std::vector<const Function *>
29 buildDistanceFunctions(const std::vector<FunctionName> & function_names,
30  const FunctionInterface & function_provider);
31 
37 distanceVectorFromFunction(const Function * func, const libMesh::Point & pt, Real t);
38 
44 
46 RealVectorValue closestDistanceVector(const std::vector<const Function *> & funcs,
47  const libMesh::Point & pt,
48  Real t);
49 
51 RealVectorValue closestTrueNormalVector(const std::vector<const Function *> & funcs,
52  const libMesh::Point & pt,
53  Real t);
54 }
RealVectorValue distanceVectorFromFunction(const Function *func, const libMesh::Point &pt, Real t)
Compute the distance vector induced by a distance function.
Definition: SBMUtils.C:56
RealVectorValue trueNormalFromFunction(const Function *func, const libMesh::Point &pt, Real t)
Compute the true boundary surface normal using a distance function.
Definition: SBMUtils.C:75
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
RealVectorValue closestDistanceVector(const std::vector< const Function *> &funcs, const libMesh::Point &pt, Real t)
Scan all distance functions and return the closest distance vector.
Definition: SBMUtils.C:95
bool checkWatertightnessFromRawElems(const std::vector< const Elem *> &bd_elements)
Definition: SBMUtils.C:22
RealVectorValue closestTrueNormalVector(const std::vector< const Function *> &funcs, const libMesh::Point &pt, Real t)
Scan all distance functions and return the corresponding normal vector.
Definition: SBMUtils.C:117
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< const Function * > buildDistanceFunctions(const std::vector< FunctionName > &function_names, const FunctionInterface &function_provider)
Build a list of distance functions based on names specified in input.
Definition: SBMUtils.C:33