Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
bitpit::DiscreteStencil< weight_t, value_t > Class Template Reference

Metafunction for generating a discretization stencil. More...

#include <stencil.hpp>

Inheritance diagram for bitpit::DiscreteStencil< weight_t, value_t >:
Inheritance graph
[legend]
Collaboration diagram for bitpit::DiscreteStencil< weight_t, value_t >:
Collaboration graph
[legend]

Classes

struct  item_type
 

Public Types

using value_type = value_t
 
using weight_manager_type = DiscreteStencilWeightManager<weight_t, value_t>
 
using weight_type = weight_t
 

Public Member Functions

 DiscreteStencil (const weight_t &zero=weight_t())
 
 DiscreteStencil (std::size_t nItems, const weight_t &zero=weight_t())
 
 DiscreteStencil (std::size_t size, const long *pattern, const weight_t &zero=weight_t())
 
 DiscreteStencil (std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero=weight_t())
 
void addComplementToZero (long id)
 
void appendItem (long id, const weight_t &weight)
 
void appendItem (long id, weight_t &&weight)
 
weight_t & at (long id)
 
const weight_t & at (long id) const
 
void clear (bool release=false)
 
void display (std::ostream &out, double factor=1.) const
 
size_t getBinarySize () const
 
weight_t & getConstant ()
 
const weight_t & getConstant () const
 
long & getPattern (std::size_t pos)
 
const long & getPattern (std::size_t pos) const
 
weight_t & getWeight (std::size_t pos)
 
const weight_t & getWeight (std::size_t pos) const
 
void initialize (const DiscreteStencil< weight_t, value_t > &other)
 
void initialize (std::size_t nItems, const weight_t &zero=weight_t())
 
void initialize (std::size_t size, const long *pattern, const weight_t &zero=weight_t())
 
void initialize (std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero=weight_t())
 
DiscreteStencil< weight_t, value_t > & operator*= (double factor)
 
DiscreteStencil< weight_t, value_t > & operator+= (const DiscreteStencil< weight_t, value_t > &other)
 
DiscreteStencil< weight_t, value_t > & operator-= (const DiscreteStencil< weight_t, value_t > &other)
 
DiscreteStencil< weight_t, value_t > & operator/= (double factor)
 
weight_t & operator[] (long id)
 
void optimize (double tolerance=1.e-12)
 
long * patternData ()
 
const long * patternData () const
 
template<typename Mapper >
void renumber (const Mapper &mapper)
 
void renumber (const std::unordered_map< long, long > &map)
 
void reserve (std::size_t nItems)
 
void resize (std::size_t nItems)
 
void setConstant (const weight_t &constant)
 
void setConstant (weight_t &&constant)
 
void setItem (std::size_t pos, long id, const weight_t &weight)
 
void setItem (std::size_t pos, long id, weight_t &&weight)
 
void setPattern (std::size_t pos, long id)
 
void setWeight (std::size_t pos, const weight_t &weight)
 
void setWeight (std::size_t pos, weight_t &&weight)
 
std::size_t size () const
 
void sum (const DiscreteStencil< weight_t, value_t > &other, double factor)
 
void sumConstant (const weight_t &constant, double factor=1.)
 
void sumItem (long id, const weight_t &weight, double factor=1.)
 
void sumWeight (std::size_t pos, const weight_t &weight, double factor=1.)
 
weight_t * weightData ()
 
const weight_t * weightData () const
 
void zero ()
 
void zeroConstant ()
 
void zeroWeight (std::size_t pos)
 

Static Public Member Functions

static const weight_manager_typegetWeightManager ()
 

Public Attributes

long NULL_ID = - std::numeric_limits<long>::max()
 

Protected Member Functions

virtual void appendWeight (const weight_t &weight)
 
virtual void appendWeight (weight_t &&weight)
 
virtual void clearWeights (bool release)
 

Protected Attributes

weight_t m_constant
 
std::vector< long > m_pattern
 
std::vector< weight_t > m_weights
 
weight_t m_zero
 

Static Protected Attributes

static const weight_manager_type m_weightManager = typename DiscreteStencil<weight_t>::weight_manager_type()
 

Friends

template<typename W , typename V >
OBinaryStreamoperator<<) (OBinaryStream &buffer, const DiscreteStencil< W, V > &stencil)
 
template<typename W , typename V >
IBinaryStreamoperator>>) (IBinaryStream &buffer, DiscreteStencil< W, V > &stencil)
 

Detailed Description

template<typename weight_t, typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
class bitpit::DiscreteStencil< weight_t, value_t >

Metafunction for generating a discretization stencil.

Template Parameters
weight_tis the type of the weights stored in the stencil

Definition at line 59 of file stencil.hpp.

Member Typedef Documentation

◆ value_type

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
using bitpit::DiscreteStencil< weight_t, value_t >::value_type = value_t

Definition at line 72 of file stencil.hpp.

◆ weight_manager_type

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
using bitpit::DiscreteStencil< weight_t, value_t >::weight_manager_type = DiscreteStencilWeightManager<weight_t, value_t>

Definition at line 70 of file stencil.hpp.

◆ weight_type

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
using bitpit::DiscreteStencil< weight_t, value_t >::weight_type = weight_t

Definition at line 69 of file stencil.hpp.

Constructor & Destructor Documentation

◆ DiscreteStencil() [1/4]

template<typename weight_t , typename value_t >
bitpit::DiscreteStencil< weight_t, value_t >::DiscreteStencil ( const weight_t & zero = weight_t())

Constructor

Parameters
zerois the value to be used as zero

Definition at line 108 of file stencil.tpp.

◆ DiscreteStencil() [2/4]

template<typename weight_t , typename value_t >
bitpit::DiscreteStencil< weight_t, value_t >::DiscreteStencil ( std::size_t size,
const weight_t & zero = weight_t() )

Constructor

Parameters
sizeis the stencil size, expressed in number of elements
zerois the value to be used as zero

Definition at line 120 of file stencil.tpp.

◆ DiscreteStencil() [3/4]

template<typename weight_t , typename value_t >
bitpit::DiscreteStencil< weight_t, value_t >::DiscreteStencil ( std::size_t size,
const long * pattern,
const weight_t & zero = weight_t() )

Constructor

Parameters
sizeis the stencil size, expressed in number of elements
patternis the patterns of the stencil
zerois the value to be used as zero

Definition at line 135 of file stencil.tpp.

◆ DiscreteStencil() [4/4]

template<typename weight_t , typename value_t >
bitpit::DiscreteStencil< weight_t, value_t >::DiscreteStencil ( std::size_t size,
const long * pattern,
const weight_t * weights,
const weight_t & zero = weight_t() )

Constructor

Parameters
sizeis the stencil size, expressed in number of elements
patternis the patterns of the stencil
weightsare the weights of the stencil
zerois the value to be used as zero

Definition at line 151 of file stencil.tpp.

Member Function Documentation

◆ addComplementToZero()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::addComplementToZero ( long id)

Add a new item that complements the stencil to zero.

Parameters
idis the index associated to the new item

Definition at line 684 of file stencil.tpp.

◆ appendItem() [1/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::appendItem ( long id,
const weight_t & weight )

Append an item the stencil.

The item will be appended to the stencil also if the stencil already contains an item with the same id.

Parameters
idis the index that will be set
weightis the weight that will be set

Definition at line 506 of file stencil.tpp.

◆ appendItem() [2/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::appendItem ( long id,
weight_t && weight )

Append an item the stencil.

The item will be appended to the stencil also if the stencil already contains an item with the same id.

Parameters
idis the index that will be set
weightis the weight that will be set

Definition at line 522 of file stencil.tpp.

◆ appendWeight() [1/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::appendWeight ( const weight_t & weight)
protectedvirtual

Append a weight to the stencil.

Parameters
weightis the weight that will be appended

Reimplemented in bitpit::MPDiscreteStencil< weight_t, value_t >.

Definition at line 771 of file stencil.tpp.

◆ appendWeight() [2/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::appendWeight ( weight_t && weight)
protectedvirtual

Append a weight to the stencil.

Parameters
weightis the weight that will be appended

Definition at line 760 of file stencil.tpp.

◆ at() [1/2]

template<typename weight_t , typename value_t >
weight_t & bitpit::DiscreteStencil< weight_t, value_t >::at ( long id)

Get a reference to a weight associated with an item with the specified index.

If there are no items with the specified index, an exception will be thrown. If there are multiple items associated with the specified id, the first one will be returned.

Parameters
idis the index associated to the item
Returns
A reference to the weight associated with the item with the specified index.

Definition at line 843 of file stencil.tpp.

◆ at() [2/2]

template<typename weight_t , typename value_t >
const weight_t & bitpit::DiscreteStencil< weight_t, value_t >::at ( long id) const

Get a constant reference to a weight associated with an item with the specified index.

If there are no items with the specified index, an exception will be thrown. If there are multiple items associated with the specified id, the first one will be returned.

Parameters
idis the index associated to the item
Returns
A constant reference to the weight associated with the item with the specified index.

Definition at line 860 of file stencil.tpp.

◆ clear()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::clear ( bool release = false)

Clears the items of the stencil.

Removes all items from the stencil (which are destroyed), leaving it with a size of 0.

Parameters
releaseif it's true the memory hold by the stencil will be released, otherwise the stencil will be cleared but its memory will not be relased

Definition at line 604 of file stencil.tpp.

◆ clearWeights()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::clearWeights ( bool release)
protectedvirtual

Clears the weights of the stencil.

Removes all weights from the stencil (which are destroyed), leaving the weight container with a size of 0.

Parameters
releaseif it's true the memory hold by the weight container will be released, otherwise the weight container will be cleared but its memory will not be relased

Reimplemented in bitpit::MPDiscreteStencil< weight_t, value_t >.

Definition at line 787 of file stencil.tpp.

◆ display()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::display ( std::ostream & out,
double factor = 1. ) const

Display the stencil.

Parameters
outis the stream that will be used for the output
factoris an optional factor the weights will be muliplied for

Definition at line 802 of file stencil.tpp.

◆ getBinarySize()

template<typename weight_t , typename value_t >
size_t bitpit::DiscreteStencil< weight_t, value_t >::getBinarySize ( ) const

Returns the buffer size (in bytes) required to store the stencil.

Returns
The buffer size (in bytes) required to store the stencil.

Definition at line 824 of file stencil.tpp.

◆ getConstant() [1/2]

template<typename weight_t , typename value_t >
weight_t & bitpit::DiscreteStencil< weight_t, value_t >::getConstant ( )

Get a reference to the constant associated to the stencil.

Returns
A reference to the constant associated to the stencil.

Definition at line 545 of file stencil.tpp.

◆ getConstant() [2/2]

template<typename weight_t , typename value_t >
const weight_t & bitpit::DiscreteStencil< weight_t, value_t >::getConstant ( ) const

Get a constant reference to the constant associated to the stencil.

Returns
A constant reference to the constant associated to the stencil.

Definition at line 534 of file stencil.tpp.

◆ getPattern() [1/2]

template<typename weight_t , typename value_t >
long & bitpit::DiscreteStencil< weight_t, value_t >::getPattern ( std::size_t pos)

Get a reference to the specified element of the pattern.

Parameters
posis the position of the pattern element
Returns
A reference to the specified element of the pattern.

Definition at line 298 of file stencil.tpp.

◆ getPattern() [2/2]

template<typename weight_t , typename value_t >
const long & bitpit::DiscreteStencil< weight_t, value_t >::getPattern ( std::size_t pos) const

Get a constant reference to the specified element of the pattern.

Parameters
posis the position of the pattern element
Returns
A constant reference to the specified element of the pattern.

Definition at line 310 of file stencil.tpp.

◆ getWeight() [1/2]

template<typename weight_t , typename value_t >
weight_t & bitpit::DiscreteStencil< weight_t, value_t >::getWeight ( std::size_t pos)

Get a reference to the specified weight of the stencil.

Parameters
posis the position of the weight
Returns
A reference to the specified weight of the stencil.

Definition at line 357 of file stencil.tpp.

◆ getWeight() [2/2]

template<typename weight_t , typename value_t >
const weight_t & bitpit::DiscreteStencil< weight_t, value_t >::getWeight ( std::size_t pos) const

Get a constant reference to the specified weight of the stencil.

Parameters
posis the position of the weight
Returns
A constant reference to the specified weight of the stencil.

Definition at line 369 of file stencil.tpp.

◆ getWeightManager()

template<typename weight_t , typename value_t >
const DiscreteStencil< weight_t, value_t >::weight_manager_type & bitpit::DiscreteStencil< weight_t, value_t >::getWeightManager ( )
static

Get a constant reference to the weight manager.

Returns
A constant reference to the weight manager.

Definition at line 42 of file stencil.tpp.

◆ initialize() [1/4]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::initialize ( const DiscreteStencil< weight_t, value_t > & other)

Initialize the stencil.

Parameters
otheris another stencil of the same time, whose items will be used to initialize this stencil

Definition at line 248 of file stencil.tpp.

◆ initialize() [2/4]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::initialize ( std::size_t size,
const weight_t & zero = weight_t() )

Initialize the stencil.

Parameters
sizeis the stencil size, expressed in number of elements
zerois the value to be used as zero

Definition at line 165 of file stencil.tpp.

◆ initialize() [3/4]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::initialize ( std::size_t size,
const long * pattern,
const weight_t & zero = weight_t() )

Initialize the stencil.

Parameters
sizeis the stencil size, expressed in number of elements
patternis the patterns of the stencil
zerois the value to be used as zero

Definition at line 190 of file stencil.tpp.

◆ initialize() [4/4]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::initialize ( std::size_t size,
const long * pattern,
const weight_t * weights,
const weight_t & zero = weight_t() )

Initialize the stencil.

Parameters
sizeis the stencil size, expressed in number of elements
patternis the patterns of the stencil
weightsare the weights of the stencil
zerois the value to be used as zero

Definition at line 219 of file stencil.tpp.

◆ operator*=()

template<typename weight_t , typename value_t >
DiscreteStencil< weight_t, value_t > & bitpit::DiscreteStencil< weight_t, value_t >::operator*= ( double factor)

The binary multiplication assignment operator.

Parameters
factoris the factor of the multiplication
Returns
A reference to the stencil

Definition at line 901 of file stencil.tpp.

◆ operator+=()

template<typename weight_t , typename value_t >
DiscreteStencil< weight_t, value_t > & bitpit::DiscreteStencil< weight_t, value_t >::operator+= ( const DiscreteStencil< weight_t, value_t > & other)

The binary sum assignment operator.

Parameters
otheris the stencil that will be summed
Returns
A reference to the stencil

Definition at line 935 of file stencil.tpp.

◆ operator-=()

template<typename weight_t , typename value_t >
DiscreteStencil< weight_t, value_t > & bitpit::DiscreteStencil< weight_t, value_t >::operator-= ( const DiscreteStencil< weight_t, value_t > & other)

The binary subtraction assignment operator.

Parameters
otheris the stencil that will be subtracted
Returns
A reference to the stencil

Definition at line 949 of file stencil.tpp.

◆ operator/=()

template<typename weight_t , typename value_t >
DiscreteStencil< weight_t, value_t > & bitpit::DiscreteStencil< weight_t, value_t >::operator/= ( double factor)

The binary division assignment operator.

Parameters
factoris the factor of the division
Returns
A reference to the stencil

Definition at line 918 of file stencil.tpp.

◆ operator[]()

template<typename weight_t , typename value_t >
weight_t & bitpit::DiscreteStencil< weight_t, value_t >::operator[] ( long id)

Get a reference to a weight associated with an item with the specified index.

If there are no items with the specified id, a new empty item will be added to the stencil and its reference will be returned. If there are multiple items associated with the specified id, the first one will be returned.

Parameters
idis the index associated to the item
Returns
A reference to the weight associated with the item with the specified index.

Definition at line 882 of file stencil.tpp.

◆ optimize()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::optimize ( double tolerance = 1.e-12)

Optimize the stencil.

The negligible elements will be removed from the stencil.

Definition at line 639 of file stencil.tpp.

◆ patternData() [1/2]

template<typename weight_t , typename value_t >
long * bitpit::DiscreteStencil< weight_t, value_t >::patternData ( )

Get a pointer to the underlying array serving as pattern storage.

Returns
A pointer to the underlying array serving as pattern storage.

Definition at line 321 of file stencil.tpp.

◆ patternData() [2/2]

template<typename weight_t , typename value_t >
const long * bitpit::DiscreteStencil< weight_t, value_t >::patternData ( ) const

Get a constant pointer to the underlying array serving as pattern storage.

Returns
A constant pointer to the underlying array serving as pattern storage.

Definition at line 333 of file stencil.tpp.

◆ renumber() [1/2]

template<typename weight_t , typename value_t >
template<typename Mapper >
void bitpit::DiscreteStencil< weight_t, value_t >::renumber ( const Mapper & map)

Renumber the indexes of the stencil according to the specified map.

Parameters
mapis the functor that will perform the mapping, the functor should have an operator() that take as an argument the original id and return the renumbered id.

Definition at line 671 of file stencil.tpp.

◆ renumber() [2/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::renumber ( const std::unordered_map< long, long > & map)

Renumber the indexes of the stencil according to the specified map.

Parameters
mapis the renumbering map

Definition at line 658 of file stencil.tpp.

◆ reserve()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::reserve ( std::size_t capacity)

Requests a change in capacity.

Requests that the stencil capacity be at least the specified value.

Parameters
capacityis the minimum number of items that the stencil should be able to contain

Definition at line 285 of file stencil.tpp.

◆ resize()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::resize ( std::size_t size)

Resizes the container so that it contains the specified number of items.

Parameters
sizeis the new stencil size, expressed in number of elements

Definition at line 270 of file stencil.tpp.

◆ setConstant() [1/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::setConstant ( const weight_t & constant)

Set the value of the constant associated to the stencil.

Parameters
constantis the constant that will be set

Definition at line 556 of file stencil.tpp.

◆ setConstant() [2/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::setConstant ( weight_t && constant)

Set the value of the constant associated to the stencil.

Parameters
constantis the constant that will be set

Definition at line 567 of file stencil.tpp.

◆ setItem() [1/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::setItem ( std::size_t pos,
long id,
const weight_t & weight )

Set the specified item of the stencil.

Parameters
posis the position of the weight
idis the index that will be set
weightis the weight that will be set

Definition at line 452 of file stencil.tpp.

◆ setItem() [2/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::setItem ( std::size_t pos,
long id,
weight_t && weight )

Set the specified item of the stencil.

Parameters
posis the position of the weight
idis the index that will be set
weightis the weight that will be set

Definition at line 466 of file stencil.tpp.

◆ setPattern()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::setPattern ( std::size_t pos,
long id )

Set the index of the specified element of the pattern.

Parameters
posis the position of the pattern element
idis the index that will be set

Definition at line 345 of file stencil.tpp.

◆ setWeight() [1/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::setWeight ( std::size_t pos,
const weight_t & weight )

Set the value of the specified weight of the stencil.

Parameters
posis the position of the weight
weightis the value that will be set

Definition at line 403 of file stencil.tpp.

◆ setWeight() [2/2]

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::setWeight ( std::size_t pos,
weight_t && weight )

Set the value of the specified weight of the stencil.

Parameters
posis the position of the weight
weightis the value that will be set

Definition at line 415 of file stencil.tpp.

◆ size()

template<typename weight_t , typename value_t >
std::size_t bitpit::DiscreteStencil< weight_t, value_t >::size ( ) const

Get the total size of the stencil, expressed in number of items.

Returns
The total size of the stencil, expressed in number of items.

Definition at line 259 of file stencil.tpp.

◆ sum()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::sum ( const DiscreteStencil< weight_t, value_t > & other,
double factor )

Sum the specified stencil.

Parameters
otheris the stencil that will be summed
factoris the factor by which the other stencil will be multiplied

Definition at line 623 of file stencil.tpp.

◆ sumConstant()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::sumConstant ( const weight_t & constant,
double factor = 1. )

Sum the specified constant to the constant associated to the stencil.

Parameters
constantis the constant that will be summed
factoris the factor by which the constant will be multiplied

Definition at line 579 of file stencil.tpp.

◆ sumItem()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::sumItem ( long id,
const weight_t & weight,
double factor = 1. )

Sum the given weight to the item of the stencil with the specified index.

If an item with the same id already exists, the given weight will be summed to the weight of the existing item. Otherwise, a new item will be appended.

Parameters
idis the index of the item
weightis the weight that will be summed
factoris the factor by which the weight will be multiplied

Definition at line 483 of file stencil.tpp.

◆ sumWeight()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::sumWeight ( std::size_t pos,
const weight_t & weight,
double factor = 1. )

Sum the given weight to the one at the specified position of the stencil.

Parameters
posis the position of the weight
weightis the value that will be summed
factoris the factor by which the weight will be multiplied

Definition at line 428 of file stencil.tpp.

◆ weightData() [1/2]

template<typename weight_t , typename value_t >
weight_t * bitpit::DiscreteStencil< weight_t, value_t >::weightData ( )

Get a pointer to the underlying array serving as weight storage.

Returns
A pointer to the underlying array serving as weight storage.

Definition at line 380 of file stencil.tpp.

◆ weightData() [2/2]

template<typename weight_t , typename value_t >
const weight_t * bitpit::DiscreteStencil< weight_t, value_t >::weightData ( ) const

Get a constant pointer to the underlying array serving as weight storage.

Returns
A constant pointer to the underlying array serving as weight storage.

Definition at line 391 of file stencil.tpp.

◆ zero()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::zero ( )

Set weights and constant to zero.

Definition at line 703 of file stencil.tpp.

◆ zeroConstant()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::zeroConstant ( )

Zero the constant associated to the stencil.

Definition at line 588 of file stencil.tpp.

◆ zeroWeight()

template<typename weight_t , typename value_t >
void bitpit::DiscreteStencil< weight_t, value_t >::zeroWeight ( std::size_t pos)

Zeros the weight at the specified position of the stencil.

Parameters
posis the position of the weight

Definition at line 439 of file stencil.tpp.

Member Data Documentation

◆ m_constant

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
weight_t bitpit::DiscreteStencil< weight_t, value_t >::m_constant
protected

Definition at line 160 of file stencil.hpp.

◆ m_pattern

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
std::vector<long> bitpit::DiscreteStencil< weight_t, value_t >::m_pattern
protected

Definition at line 158 of file stencil.hpp.

◆ m_weightManager

template<typename weight_t , typename value_t >
const DiscreteStencil< weight_t, value_t >::weight_manager_type bitpit::DiscreteStencil< weight_t, value_t >::m_weightManager = typename DiscreteStencil<weight_t>::weight_manager_type()
staticprotected

The weight manager.

Definition at line 155 of file stencil.hpp.

◆ m_weights

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
std::vector<weight_t> bitpit::DiscreteStencil< weight_t, value_t >::m_weights
protected

Definition at line 159 of file stencil.hpp.

◆ m_zero

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
weight_t bitpit::DiscreteStencil< weight_t, value_t >::m_zero
protected

Definition at line 157 of file stencil.hpp.

◆ NULL_ID

template<typename weight_t , typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
long bitpit::DiscreteStencil< weight_t, value_t >::NULL_ID = - std::numeric_limits<long>::max()

Definition at line 67 of file stencil.hpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---