Wonton Namespace Reference

Factorize a number N into D equal (or nearly equal) factors. More...

Namespaces

 CoordinateSystem
 

Classes

class  Adaptive_Refinement_Mesh
 A simple mesh that mimics a cell-by-cell AMR mesh. More...
 
class  Adaptive_Refinement_Mesh_Wrapper
 A thin wrapper that implements Portage-relevant methods for Adaptive_Refinement_Mesh. More...
 
class  AuxMeshTopology
 
struct  CartesianCoordinates
 Cartesian Coordinates. More...
 
struct  Cylindrical3DCoordinates
 
struct  CylindricalAxisymmetricCoordinates
 
struct  CylindricalPolarCoordinates
 
struct  CylindricalRadialCoordinates
 
class  Direct_Product_Mesh
 A basic, axis-aligned, logically-rectangular mesh. More...
 
class  Direct_Product_Mesh_Wrapper
 A wrapper that implements the prescribed interface for direct product meshes in Portage using the Direct_Product_Mesh (direct_product_mesh.h) More...
 
struct  Executor_type
 
class  Flat_Mesh_Wrapper
 Flat_Mesh_Wrapper implements mesh methods. More...
 
class  Flat_State_Wrapper
 A state manager wrapper that allows redistribution of data across nodes. More...
 
class  flecsi_mesh_t
 Implements a mesh wrapper for Wonton mesh queries. More...
 
class  flecsi_state_t
 Provides access to data stored in Flecsi_State. More...
 
class  Jali_Mesh_Wrapper
 Jali_Mesh_Wrapper implements mesh methods for Jali. More...
 
class  Jali_State_Wrapper
 Provides access to data stored in Jali_State. More...
 
class  Point
 Represents a point in an N-dimensional space. More...
 
class  Polytope
 
struct  SerialExecutor_type
 
class  Simple_Mesh
 A very light-weight, serial, 2D/3D Cartesian mesh. More...
 
class  Simple_Mesh_Wrapper
 A thin wrapper that implements mesh methods for Simple_Mesh. More...
 
class  Simple_State
 A very light-weight state manager for a Simple_Mesh. More...
 
class  Simple_State_Wrapper
 A thin wrapper that implements state methods for Simple_State needed by Wonton. More...
 
struct  Spherical3DCoordinates
 
struct  SphericalRadialCoordinates
 
class  StateManager
 
class  StateVectorBase
 
class  StateVectorMulti
 
class  StateVectorMultiRaw
 
class  StateVectorUni
 
class  StateVectorUniRaw
 
class  Vector
 Represents a vector in N-dimensional space. More...
 
struct  Weights_t
 

Typedefs

template<int D>
using BoundingBox = std::array< std::array< double, 2 >, D >
 Bounding Box type. More...
 
using DefaultCoordSys = CartesianCoordinates
 
typedef Point< 3 > Point3
 Alias for creating a Point in 3d. More...
 
typedef Point< 2 > Point2
 Alias for creating a Point in 2d. More...
 
typedef Point< 1 > Point1
 Alias for creating a Point in 1d. More...
 
typedef Vector< 3 > Vector3
 Alias for creating a 3D vector. More...
 
typedef Vector< 2 > Vector2
 Alias for creating a 3D vector. More...
 
typedef int64_t GID_t
 
template<typename T >
using vector = std::vector< T >
 
template<typename T >
using pointer = T *
 
typedef boost::counting_iterator< int > counting_iterator
 

Enumerations

enum  Entity_kind {
  ALL_KIND = -3, ANY_KIND = -2, UNKNOWN_KIND = -1, NODE = 0,
  EDGE, FACE, CELL, SIDE,
  WEDGE, CORNER, FACET, BOUNDARY_FACE,
  PARTICLE
}
 The type of mesh entity. More...
 
enum  Entity_type {
  TYPE_UNKNOWN = -1, DELETED = 0, PARALLEL_OWNED = 1, PARALLEL_GHOST = 2,
  BOUNDARY_GHOST = 3, ALL = 4
}
 The parallel type of a given entity. More...
 
enum  Element_type {
  UNKNOWN_TOPOLOGY = 0, TRI, QUAD, POLYGON,
  TET, PRISM, PYRAMID, HEX,
  POLYHEDRON
}
 Element (cell topology) type. More...
 
enum  Field_type { Field_type::UNKNOWN_TYPE_FIELD = -1, Field_type::MESH_FIELD, Field_type::MULTIMATERIAL_FIELD }
 Field type - whether it is mesh field or multi-material field. More...
 
enum  Data_layout { Data_layout::CELL_CENTRIC, Data_layout::MATERIAL_CENTRIC }
 

Functions

double calc_side_volume (std::array< Point< 1 >, 2 > const &sxyz)
 Compute volume of 1D side. More...
 
double calc_side_volume (std::array< Point< 2 >, 3 > const &sxyz)
 Compute volume of 2D side. More...
 
double calc_side_volume (std::array< Point< 3 >, 4 > const &sxyz)
 Compute volume of 3D side. More...
 
template<typename BasicMesh >
void build_sides_1D (AuxMeshTopology< BasicMesh > &mesh)
 
template<typename BasicMesh >
void build_sides_2D (AuxMeshTopology< BasicMesh > &mesh)
 
template<typename BasicMesh >
void build_sides_3D (AuxMeshTopology< BasicMesh > &mesh)
 
template<size_t D, class MeshWrapper >
void cell_radius (MeshWrapper &wrapper, int const cellid, double *radius)
 
template<size_t D, class MeshWrapper >
void node_radius (MeshWrapper &wrapper, int const nodeid, double *radius)
 
template<int D>
Point< D > toWontonPoint (const JaliGeometry::Point &jp)
 helper function: convert Jali point to Wonton point More...
 
template<int D, typename CoordSys = CartesianCoordinates>
Vector< D > ls_gradient (std::vector< Point< D >> const &coords, std::vector< double > const &vals)
 Compute least squares gradient from set of values. More...
 
template<int D>
Vector< D *(D+3)/2 > ls_quadfit (std::vector< Point< D >> const &coords, std::vector< double > const &vals, bool const boundary_element)
 Compute least squares quadfit from set of values. More...
 
template<int D>
constexpr int moment_to_index (int const order, std::array< int, D > const exponents)
 
template<>
constexpr int moment_to_index< 3 > (int const order, std::array< int, 3 > const exponents)
 
template<>
constexpr int moment_to_index< 2 > (int const order, std::array< int, 2 > const exponents)
 
template<>
constexpr int moment_to_index< 1 > (int const order, std::array< int, 1 > const exponents)
 
template<int D>
constexpr int count_moments (int const order)
 
template<>
constexpr int count_moments< 3 > (int const order)
 
template<>
constexpr int count_moments< 2 > (int const order)
 
template<>
constexpr int count_moments< 1 > (int const order)
 
template<int D>
std::pair< int, std::array< int, D > > index_to_moment (int const index)
 
template<>
std::pair< int, std::array< int, 3 > > index_to_moment< 3 > (int const index)
 
template<>
std::pair< int, std::array< int, 2 > > index_to_moment< 2 > (int const index)
 
template<>
std::pair< int, std::array< int, 1 > > index_to_moment< 1 > (int const index)
 
template<int D>
std::ostream & operator<< (std::ostream &os, const Point< D > &p)
 
template<int D>
WONTON_INLINE Point< D > operator+ (const Point< D > &p, const Vector< D > &v)
 
template<int D>
WONTON_INLINE Point< D > operator+ (const Point< D > &p1, const Point< D > &p2)
 
template<int D>
WONTON_INLINE Vector< D > operator- (const Point< D > &p1, const Point< D > &p2)
 
template<int D>
WONTON_INLINE Point< D > operator* (const Point< D > &p, double s)
 
template<int D>
WONTON_INLINE Point< D > operator* (double s, const Point< D > &p)
 
template<int D>
WONTON_INLINE Point< D > operator/ (const Point< D > &p, double s)
 
template<int D>
WONTON_INLINE bool operator== (const Point< D > &p1, const Point< D > &p2)
 
template<int D>
WONTON_INLINE bool approxEq (const Point< D > &p1, const Point< D > &p2, double tol=1.0e-8)
 
template<int D>
WONTON_INLINE bool operator< (const Point< D > &p1, const Point< D > &p2)
 
WONTON_INLINE Point2 ToCylindrical (const Point3 &p)
 
WONTON_INLINE Point3 createP3 (double x, double y, double z)
 
WONTON_INLINE Point2 createP2 (double x, double y)
 
WONTON_INLINE Point1 createP1 (double x)
 
template<int D>
std::vector< std::array< std::array< int64_t, D >, 2 > > structured_partitioner (int N, std::array< int64_t, D > ncells, int d=D, int seed=0)
 Partition a D-dimensional structured grid along d axes into N subdomains. More...
 
int svd (std::vector< std::vector< double > > &a, std::vector< double > &w, std::vector< std::vector< double > > &v)
 
void svd_solve (const std::vector< std::vector< double > > &u, const std::vector< double > &w, const std::vector< std::vector< double > > &v, std::vector< double > &b, std::vector< double > &x)
 
template<int D>
WONTON_INLINE double dot (const Vector< D > &a, const Vector< D > &b)
 Dot product of two vectors, \(\vec{a} \cdot \vec{b}\). More...
 
template<int D>
WONTON_INLINE Vector< D > operator+ (const Vector< D > &a, const Vector< D > &b)
 Add two vectors. More...
 
template<int D>
WONTON_INLINE Vector< D > operator- (const Vector< D > &a, const Vector< D > &b)
 Subtract two vectors. More...
 
template<int D>
WONTON_INLINE Vector< D > operator* (const Vector< D > &a, const double &s)
 Multiply a vector by a scalar, \( s \vec{a}\). More...
 
template<int D>
WONTON_INLINE Vector< D > operator* (const double &s, const Vector< D > &a)
 Multiply a vector by a scalar, \( s \vec{a}\). More...
 
template<int D>
WONTON_INLINE Vector< D > operator/ (const Vector< D > &a, const double &s)
 Divide a vector by a scalar, \( \frac{1}{s} \vec{a}\). More...
 
template<int D>
std::ostream & operator<< (std::ostream &os, const Vector< D > &v)
 Pretty printing of a Vector to an output stream. More...
 
template<int D>
std::istream & operator>> (std::istream &is, Vector< D > &v)
 Read in a Vector from an input stream. More...
 
WONTON_INLINE double cross (const Vector< 2 > &a, const Vector< 2 > &b)
 Cross product operator for two 2d vectors, \(\vec{a} \times \vec{b}\). More...
 
WONTON_INLINE Vector< 3 > cross (const Vector< 3 > &a, const Vector< 3 > &b)
 Cross product operator for two 3d vectors, \(\vec{a} \times \vec{b}\). More...
 
template<int D>
WONTON_INLINE double MaxComponent (const Vector< D > &v, int &icomp)
 Obtain the value and index of the maximum component of a Vector. More...
 
std::string to_string (Entity_kind entkind)
 
std::string to_string (Entity_type enttype)
 
std::string to_string (Element_type elemtype)
 
std::string to_string (Field_type field_type)
 
std::string to_string (Data_layout layout)
 
counting_iterator make_counting_iterator (int const i)
 
template<typename InputIterator , typename OutputIterator , typename UnaryFunction >
OutputIterator transform (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op)
 
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunction >
OutputIterator transform (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction op)
 
template<typename InputIterator , typename UnaryFunction >
void for_each (InputIterator first, InputIterator last, UnaryFunction f)
 
double pow2 (double x)
 
template<typename T , template< typename, std::size_t > class A>
Point< 3 > make_point (const A< T, 3 > &a)
 A utility function to convert a type to a wonton point. More...
 
template<typename T , template< typename, std::size_t > class A>
Point< 2 > make_point (const A< T, 2 > &a)
 
template<typename T >
Point< 1 > make_1d_point (T &&a)
 
template<typename T >
Point< 2 > make_2d_point (T &&a)
 
template<typename T >
Point< 3 > make_3d_point (T &&a)
 

Variables

const int LO = 0
 
const int HI = 1
 
const int X = 0
 
const int Y = 1
 
const int Z = 2
 
constexpr int NUM_ENTITY_KIND = 13
 
constexpr int NUM_ENTITY_TYPE = 6
 
constexpr int NUM_ELEMENT_TYPE = 9
 
constexpr int NUM_FIELD_TYPE = 3
 
constexpr int NUM_DATA_LAYOUT = 2
 

Detailed Description

Factorize a number N into D equal (or nearly equal) factors.

Parameters
NNumber to be factorized
DNumber of factors requested
randseedOptional seed for randomization (for reproducibility)
Returns
vector of factors

The routine is written generally as a bin packing algorithm, but it is meant to be used for a regular partitioning of a structured mesh/grid. Typically N is the number of processors, and D is the number of dimensions along which the mesh is to be partitioned. If N can only be decomposed into fewer than D prime factors, some of the factors will be 1. The algorithm is like simulated annealing (swap random numbers between random min and max sets, allow objective function to rise if stalled)

For the designed usage (parallel partitioning), t is inconceivable that we will generate factors greater than what is accommodated by an int. If it is, we have to make the 'products' vector and the return vector int64_t

This file contains convenience functions to help extract moments from the moments list by converting between a moment specification and a moments list index.

A moment specification consists of two parts: an order and the exponents of the basis axes. Consider some 2D Cartesian examples, so that the basis axes are x and y. The sum of the exponents is required to be equal to the order. So if, for example, you are asking for the moment integral{x y^2 dx dy} then the moment specification would be order = 3 and exponents = {1, 2}. If you wanted to enumerate all 2nd-order moments, then the options would be: order = 2, exponents = {0, 2} order = 2, exponents = {1, 1} order = 2, exponents = {2, 0}

A more complex example could be 3D cylindrical coordinates. Because this is in cylindrical coordinates, the basis axes are rho, phi, and z. The second-order moments would be: order = 2, exponents = {0, 0, 2} order = 2, exponents = {0, 2, 0} order = 2, exponents = {2, 0, 0} order = 2, exponents = {0, 1, 1} order = 2, exponents = {1, 0, 1} order = 2, exponents = {1, 1, 0} However, because the volume element dV is equal to drho rho dphi dz, then the moment with exponents {0,1,1} is be computed as integral{phi z dV} = integral{rho phi z drho dphi dz} rather than as integral{phi z drho dphi dz}.

Moments are stored in one-dimensional lists, with a specified ordering. The moments list index is the index for a given moment used in such a list of moments. To give an example, using the notation from the 2D Cartesian example above, the ordering is: index order exponents integral in Cartesian coordinates 0 0 {0, 0} integral{ dx dy}) 1 1 {1, 0} integral{x dx dy}) 2 1 {0, 1} integral{ y dx dy}) 3 2 {2, 0} integral{x^2 dx dy}) 4 2 {1, 1} integral{x y dx dy}) 5 2 {0, 2} integral{ y^2 dx dy}) 6 3 {3, 0} integral{x^3 dx dy}) 7 3 {2, 1} integral{x^2 y dx dy}) 8 3 {1, 2} integral{x y^2 dx dy}) 9 3 {0, 3} integral{ y^3 dx dy}) And so on, depending on how many moments are available in the list. Other dimensionalities have analogous orderings (see the implementations below for precise details).

Typedef Documentation

◆ BoundingBox

template<int D>
using Wonton::BoundingBox = typedef std::array<std::array<double,2>,D>

Bounding Box type.

Represents the bounding box of a cell by listing the lower and upper corners of the box.

◆ counting_iterator

typedef boost::counting_iterator<int> Wonton::counting_iterator

◆ DefaultCoordSys

◆ GID_t

typedef int64_t Wonton::GID_t

◆ Point1

typedef Point<1> Wonton::Point1

Alias for creating a Point in 1d.

◆ Point2

typedef Point<2> Wonton::Point2

Alias for creating a Point in 2d.

◆ Point3

typedef Point<3> Wonton::Point3

Alias for creating a Point in 3d.

◆ pointer

template<typename T >
using Wonton::pointer = typedef T*

◆ vector

template<typename T >
using Wonton::vector = typedef std::vector<T>

◆ Vector2

typedef Vector<2> Wonton::Vector2

Alias for creating a 3D vector.

◆ Vector3

typedef Vector<3> Wonton::Vector3

Alias for creating a 3D vector.

Enumeration Type Documentation

◆ Data_layout

enum Wonton::Data_layout
strong

Layout of 2D input data to state - CELL_CENTRIC means the first index is the cell and the second is the material; MATERIAL_CENTRIC means the first index is the material and the second is the cell

Enumerator
CELL_CENTRIC 
MATERIAL_CENTRIC 

◆ Element_type

Element (cell topology) type.

Enumerator
UNKNOWN_TOPOLOGY 
TRI 
QUAD 
POLYGON 
TET 
PRISM 
PYRAMID 
HEX 
POLYHEDRON 

◆ Entity_kind

The type of mesh entity.

Global ID type

Enumerator
ALL_KIND 

All possible types

ANY_KIND 

Any of the possible types

UNKNOWN_KIND 

Usually indicates an error

NODE 
EDGE 
FACE 
CELL 
SIDE 
WEDGE 
CORNER 
FACET 
BOUNDARY_FACE 
PARTICLE 

◆ Entity_type

The parallel type of a given entity.

Enumerator
TYPE_UNKNOWN 
DELETED 
PARALLEL_OWNED 

Owned by this processor

PARALLEL_GHOST 

Owned by another processor

BOUNDARY_GHOST 

Ghost/Virtual entity on boundary

ALL 

PARALLEL_OWNED + PARALLEL_GHOST + BOUNDARY_GHOST

◆ Field_type

enum Wonton::Field_type
strong

Field type - whether it is mesh field or multi-material field.

Enumerator
UNKNOWN_TYPE_FIELD 
MESH_FIELD 
MULTIMATERIAL_FIELD 

Function Documentation

◆ approxEq()

template<int D>
WONTON_INLINE bool Wonton::approxEq ( const Point< D > &  p1,
const Point< D > &  p2,
double  tol = 1.0e-8 
)

◆ build_sides_1D()

template<typename BasicMesh >
void Wonton::build_sides_1D ( AuxMeshTopology< BasicMesh > &  mesh)

◆ build_sides_2D()

template<typename BasicMesh >
void Wonton::build_sides_2D ( AuxMeshTopology< BasicMesh > &  mesh)

◆ build_sides_3D()

template<typename BasicMesh >
void Wonton::build_sides_3D ( AuxMeshTopology< BasicMesh > &  mesh)

◆ calc_side_volume() [1/3]

double Wonton::calc_side_volume ( std::array< Point< 1 >, 2 > const &  sxyz)
inline

Compute volume of 1D side.

◆ calc_side_volume() [2/3]

double Wonton::calc_side_volume ( std::array< Point< 2 >, 3 > const &  sxyz)
inline

Compute volume of 2D side.

◆ calc_side_volume() [3/3]

double Wonton::calc_side_volume ( std::array< Point< 3 >, 4 > const &  sxyz)
inline

Compute volume of 3D side.

◆ cell_radius()

template<size_t D, class MeshWrapper >
void Wonton::cell_radius ( MeshWrapper &  wrapper,
int const  cellid,
double *  radius 
)

Get radius of minimum-enclosing-sphere of a cell centered at the centroid For computing smoothing lengths when converting cell data from meshes to swarms

◆ count_moments()

template<int D>
constexpr int Wonton::count_moments ( int const  order)

Count the number of moments up to specified order

Parameters
[in]orderThe order up to which to count the moments (inclusive)

◆ count_moments< 1 >()

template<>
constexpr int Wonton::count_moments< 1 > ( int const  order)

◆ count_moments< 2 >()

template<>
constexpr int Wonton::count_moments< 2 > ( int const  order)

◆ count_moments< 3 >()

template<>
constexpr int Wonton::count_moments< 3 > ( int const  order)

◆ createP1()

WONTON_INLINE Point1 Wonton::createP1 ( double  x)

◆ createP2()

WONTON_INLINE Point2 Wonton::createP2 ( double  x,
double  y 
)

◆ createP3()

WONTON_INLINE Point3 Wonton::createP3 ( double  x,
double  y,
double  z 
)

◆ cross() [1/2]

WONTON_INLINE double Wonton::cross ( const Vector< 2 > &  a,
const Vector< 2 > &  b 
)

Cross product operator for two 2d vectors, \(\vec{a} \times \vec{b}\).

◆ cross() [2/2]

WONTON_INLINE Vector<3> Wonton::cross ( const Vector< 3 > &  a,
const Vector< 3 > &  b 
)

Cross product operator for two 3d vectors, \(\vec{a} \times \vec{b}\).

◆ dot()

template<int D>
WONTON_INLINE double Wonton::dot ( const Vector< D > &  a,
const Vector< D > &  b 
)

Dot product of two vectors, \(\vec{a} \cdot \vec{b}\).

◆ for_each()

template<typename InputIterator , typename UnaryFunction >
void Wonton::for_each ( InputIterator  first,
InputIterator  last,
UnaryFunction  f 
)
inline

◆ index_to_moment()

template<int D>
std::pair<int,std::array<int,D> > Wonton::index_to_moment ( int const  index)
inline

Convert from index to moment specification

Parameters
[in]indexIndex in moment list

◆ index_to_moment< 1 >()

template<>
std::pair<int,std::array<int,1> > Wonton::index_to_moment< 1 > ( int const  index)
inline

◆ index_to_moment< 2 >()

template<>
std::pair<int,std::array<int,2> > Wonton::index_to_moment< 2 > ( int const  index)
inline

◆ index_to_moment< 3 >()

template<>
std::pair<int,std::array<int,3> > Wonton::index_to_moment< 3 > ( int const  index)
inline

◆ ls_gradient()

template<int D, typename CoordSys = CartesianCoordinates>
Vector<D> Wonton::ls_gradient ( std::vector< Point< D >> const &  coords,
std::vector< double > const &  vals 
)

Compute least squares gradient from set of values.

Parameters
[in]coordsVector of coordinates at which values are given
[in]valsVector of values at said coordinates

Compute a least squares gradient from a set of values. The first point is assumed to be the point where the gradient must be computed and the first value is assumed to the value at this reference point

This operator does not know anything about a mesh.

◆ ls_quadfit()

template<int D>
Vector<D*(D+3)/2> Wonton::ls_quadfit ( std::vector< Point< D >> const &  coords,
std::vector< double > const &  vals,
bool const  boundary_element 
)

Compute least squares quadfit from set of values.

Parameters
[in]coordsVector of coordinates at which values are given
[in]valsVector of values at said coordinates

Compute a least squares quadfit from a set of values. The first point is assumed to be the point where the quadfit must be computed and the first value is assumed to the value at this reference point

This operator does not know anything about a mesh.

◆ make_1d_point()

template<typename T >
Point<1> Wonton::make_1d_point ( T &&  a)

◆ make_2d_point()

template<typename T >
Point<2> Wonton::make_2d_point ( T &&  a)

◆ make_3d_point()

template<typename T >
Point<3> Wonton::make_3d_point ( T &&  a)

◆ make_counting_iterator()

counting_iterator Wonton::make_counting_iterator ( int const  i)
inline

◆ make_point() [1/2]

template<typename T , template< typename, std::size_t > class A>
Point<3> Wonton::make_point ( const A< T, 3 > &  a)

A utility function to convert a type to a wonton point.

◆ make_point() [2/2]

template<typename T , template< typename, std::size_t > class A>
Point<2> Wonton::make_point ( const A< T, 2 > &  a)

◆ MaxComponent()

template<int D>
WONTON_INLINE double Wonton::MaxComponent ( const Vector< D > &  v,
int &  icomp 
)

Obtain the value and index of the maximum component of a Vector.

Parameters
[in]vThe input Vector.
[in,out]icompThe index of the maximum component of v.
Returns
The maximum component of v.

◆ moment_to_index()

template<int D>
constexpr int Wonton::moment_to_index ( int const  order,
std::array< int, D > const  exponents 
)

Convert from moment specification to index

Parameters
[in]orderOrder of the moment
[in]exponentsPowers for the coordinate axes

◆ moment_to_index< 1 >()

template<>
constexpr int Wonton::moment_to_index< 1 > ( int const  order,
std::array< int, 1 > const  exponents 
)

◆ moment_to_index< 2 >()

template<>
constexpr int Wonton::moment_to_index< 2 > ( int const  order,
std::array< int, 2 > const  exponents 
)

◆ moment_to_index< 3 >()

template<>
constexpr int Wonton::moment_to_index< 3 > ( int const  order,
std::array< int, 3 > const  exponents 
)

◆ node_radius()

template<size_t D, class MeshWrapper >
void Wonton::node_radius ( MeshWrapper &  wrapper,
int const  nodeid,
double *  radius 
)

Get radius of minimum-enclosing-sphere of all nodes connected by a cell For computing smoothing lengths when converting node data from meshes to swarms

◆ operator*() [1/4]

template<int D>
WONTON_INLINE Point<D> Wonton::operator* ( const Point< D > &  p,
double  s 
)

◆ operator*() [2/4]

template<int D>
WONTON_INLINE Point<D> Wonton::operator* ( double  s,
const Point< D > &  p 
)

◆ operator*() [3/4]

template<int D>
WONTON_INLINE Vector<D> Wonton::operator* ( const Vector< D > &  a,
const double &  s 
)

Multiply a vector by a scalar, \( s \vec{a}\).

◆ operator*() [4/4]

template<int D>
WONTON_INLINE Vector<D> Wonton::operator* ( const double &  s,
const Vector< D > &  a 
)

Multiply a vector by a scalar, \( s \vec{a}\).

◆ operator+() [1/3]

template<int D>
WONTON_INLINE Point<D> Wonton::operator+ ( const Point< D > &  p,
const Vector< D > &  v 
)

◆ operator+() [2/3]

template<int D>
WONTON_INLINE Point<D> Wonton::operator+ ( const Point< D > &  p1,
const Point< D > &  p2 
)

◆ operator+() [3/3]

template<int D>
WONTON_INLINE Vector<D> Wonton::operator+ ( const Vector< D > &  a,
const Vector< D > &  b 
)

Add two vectors.

◆ operator-() [1/2]

template<int D>
WONTON_INLINE Vector<D> Wonton::operator- ( const Point< D > &  p1,
const Point< D > &  p2 
)

◆ operator-() [2/2]

template<int D>
WONTON_INLINE Vector<D> Wonton::operator- ( const Vector< D > &  a,
const Vector< D > &  b 
)

Subtract two vectors.

◆ operator/() [1/2]

template<int D>
WONTON_INLINE Point<D> Wonton::operator/ ( const Point< D > &  p,
double  s 
)

◆ operator/() [2/2]

template<int D>
WONTON_INLINE Vector<D> Wonton::operator/ ( const Vector< D > &  a,
const double &  s 
)

Divide a vector by a scalar, \( \frac{1}{s} \vec{a}\).

◆ operator<()

template<int D>
WONTON_INLINE bool Wonton::operator< ( const Point< D > &  p1,
const Point< D > &  p2 
)

◆ operator<<() [1/2]

template<int D>
std::ostream& Wonton::operator<< ( std::ostream &  os,
const Point< D > &  p 
)

◆ operator<<() [2/2]

template<int D>
std::ostream& Wonton::operator<< ( std::ostream &  os,
const Vector< D > &  v 
)
inline

Pretty printing of a Vector to an output stream.

◆ operator==()

template<int D>
WONTON_INLINE bool Wonton::operator== ( const Point< D > &  p1,
const Point< D > &  p2 
)

◆ operator>>()

template<int D>
std::istream& Wonton::operator>> ( std::istream &  is,
Vector< D > &  v 
)
inline

Read in a Vector from an input stream.

◆ pow2()

double Wonton::pow2 ( double  x)
inline

◆ structured_partitioner()

template<int D>
std::vector<std::array<std::array<int64_t,D>,2> > Wonton::structured_partitioner ( int  N,
std::array< int64_t, D >  ncells,
int  d = D,
int  seed = 0 
)

Partition a D-dimensional structured grid along d axes into N subdomains.

Template Parameters
DMesh/Grid dimensionality
Parameters
NNumber of partitions
ncellsNumber of cells in each axis direction
dNumber of directions in which to partition (d <= D)
seedSeed for randomization used in equifactor

◆ svd()

int Wonton::svd ( std::vector< std::vector< double > > &  a,
std::vector< double > &  w,
std::vector< std::vector< double > > &  v 
)

◆ svd_solve()

void Wonton::svd_solve ( const std::vector< std::vector< double > > &  u,
const std::vector< double > &  w,
const std::vector< std::vector< double > > &  v,
std::vector< double > &  b,
std::vector< double > &  x 
)

◆ to_string() [1/5]

std::string Wonton::to_string ( Entity_kind  entkind)
inline

◆ to_string() [2/5]

std::string Wonton::to_string ( Entity_type  enttype)
inline

◆ to_string() [3/5]

std::string Wonton::to_string ( Element_type  elemtype)
inline

◆ to_string() [4/5]

std::string Wonton::to_string ( Field_type  field_type)
inline

◆ to_string() [5/5]

std::string Wonton::to_string ( Data_layout  layout)
inline

◆ ToCylindrical()

WONTON_INLINE Point2 Wonton::ToCylindrical ( const Point3 p)

◆ toWontonPoint()

template<int D>
Point<D> Wonton::toWontonPoint ( const JaliGeometry::Point &  jp)

helper function: convert Jali point to Wonton point

◆ transform() [1/2]

template<typename InputIterator , typename OutputIterator , typename UnaryFunction >
OutputIterator Wonton::transform ( InputIterator  first,
InputIterator  last,
OutputIterator  result,
UnaryFunction  op 
)
inline

◆ transform() [2/2]

template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunction >
OutputIterator Wonton::transform ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
OutputIterator  result,
BinaryFunction  op 
)
inline

Variable Documentation

◆ HI

const int Wonton::HI = 1

◆ LO

const int Wonton::LO = 0

◆ NUM_DATA_LAYOUT

constexpr int Wonton::NUM_DATA_LAYOUT = 2

◆ NUM_ELEMENT_TYPE

constexpr int Wonton::NUM_ELEMENT_TYPE = 9

◆ NUM_ENTITY_KIND

constexpr int Wonton::NUM_ENTITY_KIND = 13

◆ NUM_ENTITY_TYPE

constexpr int Wonton::NUM_ENTITY_TYPE = 6

◆ NUM_FIELD_TYPE

constexpr int Wonton::NUM_FIELD_TYPE = 3

◆ X

const int Wonton::X = 0

◆ Y

const int Wonton::Y = 1

◆ Z

const int Wonton::Z = 2