Portage Namespace Reference

Namespaces

 Meshfree
 

Classes

class  CoreDriver
 CoreDriver - Core driver that remaps fields on a particular Entity_kind (ONWHAT) like CELL or NODE. More...
 
class  CoreDriverBase
 CoreDriverBase - Base class for core driver that is agnostic to the Entity_kind. More...
 
class  DummyInterfaceReconstructor
 
struct  facetedpoly
 
class  Interpolate_1stOrder
 Interpolate_1stOrder does a 1st order interpolation of scalars. More...
 
class  Interpolate_1stOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
 Interpolate_1stOrder specialization for cells. More...
 
class  Interpolate_1stOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, T, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
 Interpolate_1stOrder specialization for nodes. More...
 
class  Interpolate_2ndOrder
 Interpolate_2ndOrder does a 2nd order interpolation of scalars. More...
 
class  Interpolate_2ndOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
 second-order interpolate class specialization for scalar fields on cells More...
 
class  Interpolate_2ndOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType, double, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
 second-order interpolate class specialization for scalar fields on nodes. More...
 
class  Interpolate_3rdOrder
 Interpolate_3rdOrder does a 3rd order interpolation of scalars. More...
 
class  Interpolate_3rdOrder< D, Entity_kind::CELL, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >
 3rd order interpolate class specialization for cells More...
 
class  Interpolate_3rdOrder< D, Entity_kind::NODE, SourceMeshType, TargetMeshType, SourceStateType, TargetStateType >
 3rd order interpolate class specialization for nodes More...
 
struct  Interpolate_NthOrder
 
struct  Interpolate_NthOrder< 1 >
 
struct  Interpolate_NthOrder< 2 >
 
class  IntersectBoxes
 
class  IntersectClipper
 2-D intersection algorithm for arbitrary convex and non-convex polyhedra More...
 
class  IntersectR2D
 algorithm More...
 
class  IntersectR2D< Entity_kind::CELL, SourceMeshType, SourceStateType, TargetMeshType, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper >
 
class  IntersectR2D< Entity_kind::NODE, SourceMeshType, SourceStateType, TargetMeshType, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper >
 
class  IntersectR3D
 
class  IntersectR3D< Entity_kind::CELL, SourceMeshType, SourceStateType, TargetMeshType, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper >
 
class  IntersectR3D< Entity_kind::NODE, SourceMeshType, SourceStateType, TargetMeshType, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper >
 
struct  IntersectRND
 
struct  IntersectRND< 2 >
 
struct  IntersectRND< 3 >
 
class  IntersectSweptFace
 Kernel to compute interpolation weights for swept-face remap. More...
 
class  IntersectSweptFace< 2, Entity_kind::CELL, SourceMesh, SourceState, TargetMesh, InterfaceReconstructor, Matpoly_Splitter, Matpoly_Clipper >
 Specialization for 2D cell-based remap. More...
 
class  IntersectSweptFace< 3, Entity_kind::CELL, SourceMesh, SourceState, TargetMesh, InterfaceReconstructor, Matpoly_Splitter, Matpoly_Clipper >
 Specialization for 3D cell-based remap. More...
 
class  IsotheticBBox
 An isothetic (axis-aligned) N-dimensional bounding box. More...
 
struct  KDTree
 An N-dimensional k-d tree for manipulating polygon data. More...
 
class  Limited_Gradient
 Compute limited gradient of a field or components of a field. More...
 
class  Limited_Gradient< D, Entity_kind::CELL, Mesh, State, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
 
class  Limited_Gradient< D, Entity_kind::NODE, Mesh, State, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys >
 
class  Limited_Quadfit
 Compute limited quadfit of a field or components of a field. More...
 
class  Limited_Quadfit< D, Entity_kind::CELL, MeshType, StateType >
 
class  Limited_Quadfit< D, Entity_kind::NODE, MeshType, StateType >
 
class  MismatchFixer
 
class  MMDriver
 MMDriver provides the API to mapping multi-material data from one mesh to another. More...
 
class  MSM_Driver
 MSM_Driver provides the API to mapping from one mesh to another using particles. More...
 
struct  NumericTolerances_t
 Intersection and other tolerances to handle tiny values. More...
 
class  Part
 
class  PartPair
 Manages source and target sub-meshes for part-by-part remap. It detects boundaries mismatch and provides the necessary fixup for partially filled and empty cells values. More...
 
class  SearchDirectProductBase
 Definition of the SearchDirectProductBase class. More...
 
class  SearchKDTree
 A k-d tree search class that allows us to search for control volumes of entities from one mesh (source) that potentially overlap the control volume of an entity from the second mesh (target) More...
 
class  SearchKDTree< D, Entity_kind::CELL, SourceMeshType, TargetMeshType >
 A k-d tree search class (specialization) that allows us to search for cells from one mesh (source) that potentially overlap a cell from the second mesh (target) More...
 
class  SearchKDTree< D, Entity_kind::NODE, SourceMeshType, TargetMeshType >
 A k-d tree search class (specialization) that allows us to search for nodes from one mesh (source) whose control volumes potentially overlap the control volumes of a node from the second mesh (target) More...
 
class  SearchPointsByCells
 A simple, crude search algorithm that does a linear-time search over a swarm of points. More...
 
class  SearchSimple
 A simple, crude search algorithm that utilizes bounding boxes in 2d. More...
 
class  SearchSimplePoints
 A simple, crude search algorithm that does a quadratic-time search over a swarm of points. More...
 
class  SearchSweptFace
 The search algorithm that is used for the swept face remap. More...
 
class  SearchSweptFace< D, Entity_kind::CELL, SourceMeshType, TargetMeshType >
 Specialization of the search algorithm that is used for the swept face remap of fields associated with cells. More...
 
class  SearchSweptFace< D, Entity_kind::NODE, SourceMeshType, TargetMeshType >
 Specialization of the search algorithm that is used for the swept face remap of fields associatred with nodal control volumes. More...
 
class  UberDriver
 UberDriver provides the API to mapping multi-material data from one mesh to another in a general way. More...
 

Typedefs

using entity_weights_t = std::vector< Wonton::Weights_t >
 
typedef struct Portage::facetedpoly facetedpoly_t
 
template<Entity_kind entity_kind, class SourceMesh , class SourceState , class TargetMesh , template< class, int, class, class > class InterfaceReconstructor = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void>
using IntersectSweptFace2D = IntersectSweptFace< 2, entity_kind, SourceMesh, SourceState, TargetMesh, InterfaceReconstructor, Matpoly_Splitter, Matpoly_Clipper >
 
template<Entity_kind entity_kind, class SourceMesh , class SourceState , class TargetMesh , template< class, int, class, class > class InterfaceReconstructor = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void>
using IntersectSweptFace3D = IntersectSweptFace< 3, entity_kind, SourceMesh, SourceState, TargetMesh, InterfaceReconstructor, Matpoly_Splitter, Matpoly_Clipper >
 
typedef IsotheticBBox< 2 > IsotheticBBox2
 
typedef IsotheticBBox< 3 > IsotheticBBox3
 
template<int D, typename SourceMeshType , typename TargetMeshType >
using SearchDirectProduct = SearchDirectProductBase< int, D, SourceMeshType, TargetMeshType >
 
template<typename T >
using vector = std::vector< T >
 
template<typename T >
using pointer = T *
 
typedef boost::counting_iterator< unsigned int > counting_iterator
 

Enumerations

enum  Limiter_type { NOLIMITER, BARTH_JESPERSEN }
 Limiter type. More...
 
enum  Boundary_Limiter_type { BND_NOLIMITER, BND_ZERO_GRADIENT, BND_BARTH_JESPERSEN }
 Boundary limiter type. More...
 
enum  Partial_fixup_type { CONSTANT, LOCALLY_CONSERVATIVE, SHIFTED_CONSERVATIVE }
 Fixup options for partially filled cells. More...
 
enum  Empty_fixup_type { LEAVE_EMPTY, EXTRAPOLATE, FILL }
 Fixup options for empty cells. More...
 

Functions

template<int D, class SourceMesh , class SourceState , class TargetMesh , class TargetState , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
std::unique_ptr< CoreDriverBase< D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys > > make_core_driver (Entity_kind onwhat, SourceMesh const &source_mesh, SourceState const &source_state, TargetMesh const &target_mesh, TargetState &target_state, Wonton::Executor_type const *executor)
 
template<int D, class Mesh_Wrapper , class State_Wrapper , class InterfaceReconstructor >
void write_to_gmv (Mesh_Wrapper const &mesh, State_Wrapper const &state, std::shared_ptr< InterfaceReconstructor > ir, std::vector< std::string > &fieldnames, std::string filename)
 Method to write out material polygons from an interface reconstruction and any associated material fields. More...
 
std::vector< double > areaAndMomentPolygon (std::vector< Wonton::Point< 2 >> const &poly)
 Return the area and moment of the polygon. More...
 
std::vector< double > intersect_polys_r2d (std::vector< Wonton::Point< 2 >> const &source_poly, std::vector< Wonton::Point< 2 >> const &target_poly, NumericTolerances_t num_tols)
 
std::vector< double > intersect_polys_r3d (const facetedpoly_t &srcpoly, const std::vector< std::array< Point< 3 >, 4 >> &target_tet_coords, NumericTolerances_t num_tols)
 
template<int D>
bool approxEq (const IsotheticBBox< D > &box1, const IsotheticBBox< D > &box2, const double &tol)
 Determine if two IsotheticBBox elements are coincident in space. More...
 
template<int D>
bool interval (const IsotheticBBox< D > &box, const Point< D > &orig, const Vector< D > &magdir, double &a, double &b)
 
template<int D>
std::ostream & operator<< (std::ostream &os, const Portage::IsotheticBBox< D > &box)
 
template<int D>
KDTree< D > * KDTreeCreate (const std::vector< IsotheticBBox< D > > &bbox)
 
template<int D>
void MedianSelect (int, int, double *, int *, int)
 
template<int D>
void LocatePoint (const Point< D > &qp, const KDTree< D > *kdtree, std::vector< int > &pfound)
 
template<int D>
void Intersect (const IsotheticBBox< D > &box, const KDTree< D > *kdtree, std::vector< int > &pfound)
 
template<int D>
void MedianSelect (int k, int n, std::vector< Point< D > > &arr, int *prm, int icut)
 
std::string to_string (Limiter_type limiter_type)
 
std::string to_string (Boundary_Limiter_type boundary_limiter_type)
 
std::string to_string (Partial_fixup_type partial_fixup_type)
 
std::string to_string (Empty_fixup_type empty_fixup_type)
 
counting_iterator make_counting_iterator (unsigned 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)
 

Variables

const double real_max = std::numeric_limits<double>::max()
 
const double real_min = std::numeric_limits<double>::min()
 
constexpr int NUM_LIMITER_TYPE = 2
 
constexpr Limiter_type DEFAULT_LIMITER = Limiter_type::BARTH_JESPERSEN
 
constexpr int NUM_Boundary_Limiter_type = 2
 
constexpr Boundary_Limiter_type DEFAULT_BND_LIMITER = Boundary_Limiter_type::BND_NOLIMITER
 
constexpr int NUM_PARTIAL_FIXUP_TYPE = 3
 
constexpr Partial_fixup_type DEFAULT_PARTIAL_FIXUP_TYPE
 
constexpr int NUM_EMPTY_FIXUP_TYPE = 3
 
constexpr Empty_fixup_type DEFAULT_EMPTY_FIXUP_TYPE = Empty_fixup_type::LEAVE_EMPTY
 
template<int D>
const NumericTolerances_t DEFAULT_NUMERIC_TOLERANCES
 

Typedef Documentation

◆ counting_iterator

typedef boost::counting_iterator<unsigned int> Portage::counting_iterator

◆ entity_weights_t

using Portage::entity_weights_t = typedef std::vector<Wonton::Weights_t>

◆ facetedpoly_t

◆ IntersectSweptFace2D

template<Entity_kind entity_kind, class SourceMesh , class SourceState , class TargetMesh , template< class, int, class, class > class InterfaceReconstructor = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void>
using Portage::IntersectSweptFace2D = typedef IntersectSweptFace<2, entity_kind, SourceMesh, SourceState, TargetMesh, InterfaceReconstructor, Matpoly_Splitter, Matpoly_Clipper>

◆ IntersectSweptFace3D

template<Entity_kind entity_kind, class SourceMesh , class SourceState , class TargetMesh , template< class, int, class, class > class InterfaceReconstructor = DummyInterfaceReconstructor, class Matpoly_Splitter = void, class Matpoly_Clipper = void>
using Portage::IntersectSweptFace3D = typedef IntersectSweptFace<3, entity_kind, SourceMesh, SourceState, TargetMesh, InterfaceReconstructor, Matpoly_Splitter, Matpoly_Clipper>

◆ IsotheticBBox2

◆ IsotheticBBox3

◆ pointer

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

◆ SearchDirectProduct

template<int D, typename SourceMeshType , typename TargetMeshType >
using Portage::SearchDirectProduct = typedef SearchDirectProductBase<int, D, SourceMeshType, TargetMeshType>

◆ vector

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

Enumeration Type Documentation

◆ Boundary_Limiter_type

Boundary limiter type.

Enumerator
BND_NOLIMITER 
BND_ZERO_GRADIENT 
BND_BARTH_JESPERSEN 

◆ Empty_fixup_type

Fixup options for empty cells.

Enumerator
LEAVE_EMPTY 
EXTRAPOLATE 
FILL 

◆ Limiter_type

Limiter type.

Enumerator
NOLIMITER 
BARTH_JESPERSEN 

◆ Partial_fixup_type

Fixup options for partially filled cells.

Enumerator
CONSTANT 
LOCALLY_CONSERVATIVE 
SHIFTED_CONSERVATIVE 

Function Documentation

◆ approxEq()

template<int D>
bool Portage::approxEq ( const IsotheticBBox< D > &  box1,
const IsotheticBBox< D > &  box2,
const double &  tol 
)

Determine if two IsotheticBBox elements are coincident in space.

approxEq() returns true if the corner points defining box1 and box2 are within tol of each other. The comparison is made using the approxEq() function for the Point class.

◆ areaAndMomentPolygon()

std::vector<double> Portage::areaAndMomentPolygon ( std::vector< Wonton::Point< 2 >> const &  poly)
inline

Return the area and moment of the polygon.

Parameters
[in]polyA vector of a pair of (x,y) coordinates of the nodes making up the polygon.
Returns
std::vector<double>–area, mx, my

◆ for_each()

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

◆ Intersect()

template<int D>
void Portage::Intersect ( const IsotheticBBox< D > &  box,
const KDTree< D > *  kdtree,
std::vector< int > &  pfound 
)

◆ intersect_polys_r2d()

std::vector<double> Portage::intersect_polys_r2d ( std::vector< Wonton::Point< 2 >> const &  source_poly,
std::vector< Wonton::Point< 2 >> const &  target_poly,
NumericTolerances_t  num_tols 
)
inline

◆ intersect_polys_r3d()

std::vector<double> Portage::intersect_polys_r3d ( const facetedpoly_t srcpoly,
const std::vector< std::array< Point< 3 >, 4 >> &  target_tet_coords,
NumericTolerances_t  num_tols 
)
inline

◆ interval()

template<int D>
bool Portage::interval ( const IsotheticBBox< D > &  box,
const Point< D > &  orig,
const Vector< D > &  magdir,
double &  a,
double &  b 
)

◆ KDTreeCreate()

template<int D>
KDTree< D > * Portage::KDTreeCreate ( const std::vector< IsotheticBBox< D > > &  bbox)

◆ LocatePoint()

template<int D>
void Portage::LocatePoint ( const Point< D > &  qp,
const KDTree< D > *  kdtree,
std::vector< int > &  pfound 
)

◆ make_core_driver()

template<int D, class SourceMesh , class SourceState , class TargetMesh , class TargetState , template< class, int, class, class > class InterfaceReconstructorType, class Matpoly_Splitter , class Matpoly_Clipper , class CoordSys >
std::unique_ptr<CoreDriverBase<D, SourceMesh, SourceState, TargetMesh, TargetState, InterfaceReconstructorType, Matpoly_Splitter, Matpoly_Clipper, CoordSys> > Portage::make_core_driver ( Entity_kind  onwhat,
SourceMesh const &  source_mesh,
SourceState const &  source_state,
TargetMesh const &  target_mesh,
TargetState &  target_state,
Wonton::Executor_type const *  executor 
)

◆ make_counting_iterator()

counting_iterator Portage::make_counting_iterator ( unsigned int const  i)
inline

◆ MedianSelect() [1/2]

template<int D>
void Portage::MedianSelect ( int  ,
int  ,
double *  ,
int *  ,
int   
)

◆ MedianSelect() [2/2]

template<int D>
void Portage::MedianSelect ( int  k,
int  n,
std::vector< Point< D > > &  arr,
int *  prm,
int  icut 
)

◆ operator<<()

template<int D>
std::ostream& Portage::operator<< ( std::ostream &  os,
const Portage::IsotheticBBox< D > &  box 
)
inline

◆ to_string() [1/4]

std::string Portage::to_string ( Limiter_type  limiter_type)
inline

◆ to_string() [2/4]

std::string Portage::to_string ( Boundary_Limiter_type  boundary_limiter_type)
inline

◆ to_string() [3/4]

std::string Portage::to_string ( Partial_fixup_type  partial_fixup_type)
inline

◆ to_string() [4/4]

std::string Portage::to_string ( Empty_fixup_type  empty_fixup_type)
inline

◆ transform() [1/2]

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

◆ transform() [2/2]

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

◆ write_to_gmv()

template<int D, class Mesh_Wrapper , class State_Wrapper , class InterfaceReconstructor >
void Portage::write_to_gmv ( Mesh_Wrapper const &  mesh,
State_Wrapper const &  state,
std::shared_ptr< InterfaceReconstructor >  ir,
std::vector< std::string > &  fieldnames,
std::string  filename 
)

Method to write out material polygons from an interface reconstruction and any associated material fields.

Template Parameters
DDimension of problem
Mesh_WrapperA Mesh class
State_WrapperA State Manager class
InterfaceReconstructorAn Interface Reconstruction class
Parameters
meshA mesh object (for mesh topology/geometry queries)
stateA state object (for field and material queries)
irAn interface reconstructor to create material polygons from volume fractions (and optionally material centroids) List of fields to write out Name of file to write to

Variable Documentation

◆ DEFAULT_BND_LIMITER

constexpr Boundary_Limiter_type Portage::DEFAULT_BND_LIMITER = Boundary_Limiter_type::BND_NOLIMITER

◆ DEFAULT_EMPTY_FIXUP_TYPE

constexpr Empty_fixup_type Portage::DEFAULT_EMPTY_FIXUP_TYPE = Empty_fixup_type::LEAVE_EMPTY

◆ DEFAULT_LIMITER

constexpr Limiter_type Portage::DEFAULT_LIMITER = Limiter_type::BARTH_JESPERSEN

◆ DEFAULT_NUMERIC_TOLERANCES

template<int D>
const NumericTolerances_t Portage::DEFAULT_NUMERIC_TOLERANCES
Initial value:
= {
false,
-1.0e-14,
5
}
double const epsilon
Numerical tolerance.
Definition: weight.h:34

◆ DEFAULT_PARTIAL_FIXUP_TYPE

constexpr Partial_fixup_type Portage::DEFAULT_PARTIAL_FIXUP_TYPE

◆ NUM_Boundary_Limiter_type

constexpr int Portage::NUM_Boundary_Limiter_type = 2

◆ NUM_EMPTY_FIXUP_TYPE

constexpr int Portage::NUM_EMPTY_FIXUP_TYPE = 3

◆ NUM_LIMITER_TYPE

constexpr int Portage::NUM_LIMITER_TYPE = 2

◆ NUM_PARTIAL_FIXUP_TYPE

constexpr int Portage::NUM_PARTIAL_FIXUP_TYPE = 3

◆ real_max

const double Portage::real_max = std::numeric_limits<double>::max()

◆ real_min

const double Portage::real_min = std::numeric_limits<double>::min()