12#ifndef CD_LeastSquares_H
13#define CD_LeastSquares_H
18#include <IntVectSet.H>
25#include <CD_NamespaceHeader.H>
423 template <
typename T>
458 template <
typename T>
471#include <CD_NamespaceFooter.H>
473#include <CD_LeastSquaresImplem.H>
Declaration of cell positions.
Various functions for getting Vofs near cut-cells.
Static class containing useful routines for (weighted) least squares polynomial reconstruction.
Definition CD_LeastSquares.H:31
static std::map< IntVect, std::pair< VoFStencil, VoFStencil > > computeDualLevelStencils(const IntVectSet &a_derivs, const IntVectSet &a_knownTerms, const Vector< VolIndex > &a_fineVofs, const Vector< VolIndex > &a_coarVofs, const Vector< RealVect > &a_fineDisplacements, const Vector< RealVect > &a_coarDisplacements, const int a_p, const int a_order)
Compute a least squares interpolation to a specified order. This version separates the stencils into ...
Definition CD_LeastSquaresImplem.H:48
static Vector< RealVect > getDisplacements(const CellLocation a_from, const CellLocation a_to, const VolIndex &a_fromVof, const Vector< VolIndex > &a_toVofs, const EBISBox &a_ebisbox, const Real &a_dx)
Get displacement vectors from a cell position to another cell position for a list of Vofs,...
Definition CD_LeastSquares.cpp:278
static RealVect displacement(const CellLocation a_from, const CellLocation a_to, const VolIndex &a_fromVof, const VolIndex &a_toVof, const EBISBox &a_ebisbox, const Real &a_dx)
Computes the distance between two Vofs that are defined on the same grid level.
Definition CD_LeastSquares.cpp:232
static int getTaylorExpansionSize(const int a_order)
Get the size of a Taylor expansion for a given order.
Definition CD_LeastSquares.cpp:416
static VoFStencil computeInterpolationStencil(const Vector< VolIndex > &a_allVofs, const Vector< RealVect > &a_displacements, const int a_pow, const int a_order)
Compute an interpolation stencil to specified order by solving a least squares system.
Definition CD_LeastSquares.cpp:425
static VoFStencil computeGradSten(const Vector< VolIndex > &a_allVofs, const Vector< RealVect > &a_displacements, const int a_p, const int a_order, const IntVectSet a_knownTerms)
Get a least squares gradient stencil solution for computing the gradient at a point....
Definition CD_LeastSquares.cpp:317
static VoFStencil getGradSten(const VolIndex &a_vof, const CellLocation a_gradLocation, const CellLocation a_cellLocation, const EBISBox &a_ebisbox, const Real a_dx, const int a_radius, const int a_p, const int a_order, const IntVectSet a_knownTerms=IntVectSet())
Compute a least squares gradient stencil in a cell.
Definition CD_LeastSquares.cpp:57
static Real sumAllWeights(const VoFStencil &a_stencil)
Compute the sum of all weights in a stencil.
Definition CD_LeastSquares.cpp:404
static Real sumWeights(const VoFStencil &a_stencil, const int a_variable)
Return the sum of weights in the stencil, for a specific variable.
Definition CD_LeastSquares.cpp:388
static VoFStencil getInterpolationStencil(const CellLocation a_cellPos, const CellLocation a_otherCellsPos, const Connectivity a_connectivity, const VolIndex &a_startVof, const EBISBox &a_ebisbox, const Real a_dx, const int a_p, const int a_radius, const int a_order, const bool a_addStartingVof)
Get an interpolation stencil to a point in a cell with a specified order and radius.
Definition CD_LeastSquares.cpp:19
static VoFStencil projectGradSten(const VoFStencil &a_stencil, const RealVect &a_projection)
Assuming that a_stencil is a gradient stencil, project it along a direction.
Definition CD_LeastSquares.cpp:370
~LeastSquares()=delete
Static class, no destruction here.
static std::map< IntVect, VoFStencil > computeSingleLevelStencils(const IntVectSet &a_derivs, const IntVectSet &a_knownTerms, const Vector< VolIndex > &a_allVofs, const Vector< RealVect > &a_displacements, const int a_p, const int a_order)
Compute a least squares interpolation to a specified order.
Definition CD_LeastSquares.cpp:463
LeastSquares()=delete
Static class, no construction here.
static VoFStencil getBndryGradSten(const VolIndex &a_vof, const Neighborhood a_neighborhood, const CellLocation a_cellPositions, const EBISBox &a_ebisbox, const Real a_dx, const int a_radius, const int a_p, const int a_order, const bool a_addStartingVof)
Compute a least squares gradient stencil on the EB centroid with specified order.
Definition CD_LeastSquares.cpp:153
static Vector< Real > makeDiagWeights(const Vector< RealVect > &a_displacements, const int a_pow)
Create a list of weights. This routine returns a list of diagonal weights for a least squares system....
Definition CD_LeastSquaresImplem.H:22
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:37
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:25
Neighborhood
Neighborhood type.
Definition CD_VofUtils.H:55
Connectivity
Class for specifying connectivity of Vofs.
Definition CD_VofUtils.H:42
Cell
Enum for distinguishing between cell locations.
Definition CD_Location.H:30
Face
Enum for distinguishing between face locations.
Definition CD_Location.H:40