Medusa  1.1
Coordinate Free Mehless Method implementation
mm::FindClosest Class Reference

#include <FindClosest_fwd.hpp>

Detailed Description

Class representing the engine for finding supports consisting of closest nodes.

Usage example:

// Find the closest interior node for all nodes.
FindClosest f(1); f.searchAmong(domain.interior()).forceSelf(false);
domain.findSupport(f); // domain is some DomainDiscretization
Examples
test/end2end/poisson_explicit.cpp.

Definition at line 23 of file FindClosest_fwd.hpp.

+ Collaboration diagram for mm::FindClosest:

Public Member Functions

 FindClosest (int support_size)
 Constructs an engine for finding support with given support size. More...
 
FindClosest & forNodes (indexes_t for_which)
 Find support only for these nodes. More...
 
FindClosest & searchAmong (indexes_t search_among)
 Search only among given nodes. More...
 
FindClosest & forceSelf (bool b=true)
 Put each node as the first of its support, even if it is not included in searchAmong(). More...
 
FindClosest & numClosest (int num)
 Find num closest nodes. This methods overrides the value set in the constructor. More...
 
template<typename domain_t >
void operator() (domain_t &domain) const
 Find support for nodes in domain. More...
 

Private Attributes

int support_size
 Support size. More...
 
Range< int > for_which_
 Find support only for these nodes. More...
 
Range< int > search_among_
 Search only among these nodes. More...
 
bool force_self_
 Force each node as the first element of its support. More...
 

Constructor & Destructor Documentation

◆ FindClosest()

mm::FindClosest::FindClosest ( int  support_size)
inline

Constructs an engine for finding support with given support size.

Definition at line 32 of file FindClosest_fwd.hpp.

Member Function Documentation

◆ forceSelf()

FindClosest& mm::FindClosest::forceSelf ( bool  b = true)
inline

Put each node as the first of its support, even if it is not included in searchAmong().

Definition at line 46 of file FindClosest_fwd.hpp.

◆ forNodes()

FindClosest& mm::FindClosest::forNodes ( indexes_t  for_which)
inline

Find support only for these nodes.

If not given, finds support for all non-zero type domain nodes, as defined by domain.all().

Definition at line 38 of file FindClosest_fwd.hpp.

◆ numClosest()

FindClosest& mm::FindClosest::numClosest ( int  num)
inline

Find num closest nodes. This methods overrides the value set in the constructor.

Definition at line 48 of file FindClosest_fwd.hpp.

◆ operator()()

template<typename domain_t >
template void mm::FindClosest::operator() ( domain_t &  domain) const

Find support for nodes in domain.

Definition at line 21 of file FindClosest.hpp.

◆ searchAmong()

FindClosest& mm::FindClosest::searchAmong ( indexes_t  search_among)
inline

Search only among given nodes.

If not given, searches among all nodes, including zero-type nodes.

Definition at line 43 of file FindClosest_fwd.hpp.

Member Data Documentation

◆ for_which_

Range<int> mm::FindClosest::for_which_
private

Find support only for these nodes.

Definition at line 26 of file FindClosest_fwd.hpp.

◆ force_self_

bool mm::FindClosest::force_self_
private

Force each node as the first element of its support.

Definition at line 28 of file FindClosest_fwd.hpp.

◆ search_among_

Range<int> mm::FindClosest::search_among_
private

Search only among these nodes.

Definition at line 27 of file FindClosest_fwd.hpp.

◆ support_size

int mm::FindClosest::support_size
private

Support size.

Definition at line 25 of file FindClosest_fwd.hpp.


The documentation for this class was generated from the following files:
mm::FindClosest::FindClosest
FindClosest(int support_size)
Constructs an engine for finding support with given support size.
Definition: FindClosest_fwd.hpp:32