MoReFEM
|
A NodeBearer is created whenever some dofs are located on a given geometric Interface. More...
#include <NodeBearer.hpp>
Public Types | |
using | shared_ptr = std::shared_ptr<NodeBearer> |
Shared smart pointer. | |
using | vector_shared_ptr = std::vector<shared_ptr> |
Vector of shared smart pointers. | |
using | const_shared_ptr = std::shared_ptr<const NodeBearer> |
using | vector_const_shared_ptr = std::vector<const_shared_ptr> |
Public Member Functions | |
::MoReFEM::NodeBearerNS::program_wise_index_type | GetProgramWiseIndex () const noexcept |
Get index. | |
Node::vector_shared_ptr | GetNodeList (const Unknown &unknown, const std::string &shape_function_label) const |
Returns the list of Node matching the given unknown and shape_function_label. | |
void | SetProcessor (std::size_t processor) |
void | SetGhost (const NumberingSubset &numbering_subset, std::size_t processor) |
Specify the NodeBearer is a ghost on processor. | |
std::size_t | GetProcessor () const noexcept |
Get the processor to which the node bearer belongs to. | |
InterfaceNS::Nature | GetNature () const noexcept |
Returns the nature of the node. | |
std::size_t | Ndof () const |
Returns the number of dofs born by the node. | |
std::size_t | Ndof (const NumberingSubset &numbering_subset) const |
bool | IsUnknown (const Unknown &unknown) const |
const Interface & | GetInterface () const noexcept |
Returns the interface on which the node is located. | |
void | SetProgramWiseIndex (NodeBearerNS::program_wise_index_type index) |
std::size_t | Nnode (const Unknown &unknown, const std::string &shape_function_label) const |
bool | IsEmpty () const noexcept |
Whether there are nodes in the node bearer. | |
const Node::vector_shared_ptr & | GetNodeList () const noexcept |
Return the list of nodes. | |
Node::vector_shared_ptr | GetNodeList (const NumberingSubset &numbering_subset) const noexcept |
Return the list of nodes that match the given NumberingSubset. | |
bool | IsGhost (const Wrappers::Mpi &mpi) const noexcept |
Whether the NodeBearer is a ghost or not. | |
bool | IsInNumberingSubset (const NumberingSubset &numbering_subset) const |
Returns whether the NodeBearer is in the numbering_subset. | |
const std::set< std::size_t > & | GetGhostProcessorList (const NumberingSubset &numbering_subset) const noexcept |
Returns the list of processors that store the NodeBearer as a ghost. | |
std::set< std::size_t > | ComputeGhostProcessorList () const |
Compute the list of all processors that track current NodeBearer. | |
bool | IsGhosted (const NumberingSubset &numbering_subset) const noexcept |
Whether there are other processors that ghost the NodeBearer. | |
Special members. | |
NodeBearer (const Interface::shared_ptr &interface) | |
Constructor. | |
~NodeBearer ()=default | |
Destructor. | |
NodeBearer (const NodeBearer &rhs)=delete | |
The copy constructor. | |
NodeBearer (NodeBearer &&rhs)=delete | |
The move constructor. | |
NodeBearer & | operator= (const NodeBearer &rhs)=delete |
The (copy) operator=. | |
NodeBearer & | operator= (NodeBearer &&rhs)=delete |
The (move) operator=. | |
Private Types | |
using | ghost_processor_list_per_numbering_subset_type |
Convenient alias. | |
Private Member Functions | |
const ghost_processor_list_per_numbering_subset_type & | GetGhostProcessorListPerNumberingSubset () const noexcept |
Processors that include as ghost the current NodeBearer for each NumberingSubset. | |
ghost_processor_list_per_numbering_subset_type & | GetNonCstGhostProcessorListPerNumberingSubset () noexcept |
Processors that include as ghost the current NodeBearer for each NumberingSubset. | |
Node::shared_ptr | AddNode (const ExtendedUnknown &extended_unknown, std::size_t Ndof) |
Add a new node. | |
Private Attributes | |
::MoReFEM::NodeBearerNS::program_wise_index_type | program_wise_index_ |
An internal index that is useful during partitioning steps. | |
std::size_t | processor_ = NumericNS::UninitializedIndex<std::size_t>() |
Processor that holds the node. | |
ghost_processor_list_per_numbering_subset_type | ghost_processor_list_per_numbering_subset_ |
Processors that include as ghost the current NodeBearer for each NumberingSubset. | |
Node::vector_shared_ptr | node_list_ |
List of nodes. | |
Interface::shared_ptr | interface_ |
Interface that bears the node. | |
Friends | |
class | Internal::FEltSpaceNS::MatrixPattern |
Friendship to give access to internal class. | |
class | Internal::FEltSpaceNS::MatchInterfaceNodeBearer |
Friendship to give access to internal class. | |
class | GodOfDof |
Friendship to GodOfDof. | |
A NodeBearer is created whenever some dofs are located on a given geometric Interface.
So for instance if in a mesh there are triangles P1:
Of course, the same is true for Face or Volume interfaces.
There is only one NodeBearer for a given interface; there is further classification within NodeBearer objects (Dofs are grouped per Node).
using MoReFEM::NodeBearer::const_shared_ptr = std::shared_ptr<const NodeBearer> |
Shared smart pointer to a const value. This is used for instance when a Node creates such a pointer from a weak_ptr.
using MoReFEM::NodeBearer::vector_const_shared_ptr = std::vector<const_shared_ptr> |
Vector of shared smart pointers to a const value. This is used for instance when a Node creates such a pointer from a weak_ptr.
Convenient alias.
|
explicit |
Constructor.
[in] | interface | Interface onto which the node is built. |
[internal]
index is given as a std::size_t as in practice it will be the size of the list that will be passed to this constructor:
|
delete |
The copy constructor.
[in] | rhs | The object from which the construction occurs. |
|
delete |
The move constructor.
[in] | rhs | The object from which the construction occurs. |
|
delete |
The (copy) operator=.
[in] | rhs | The object from which the affectation occurs. |
|
delete |
The (move) operator=.
[in] | rhs | The object from which the affectation occurs. |
Node::vector_shared_ptr MoReFEM::NodeBearer::GetNodeList | ( | const Unknown & | unknown, |
const std::string & | shape_function_label ) const |
Returns the list of Node matching the given unknown and shape_function_label.
[internal]
This method is expected to be used only in init phase, hence the brutal return by value of a vector. No restriction upon NumberingSubset in purpose; that's the reason ExtendedUnknown is not used. A same Node might be defined upon several NumberingSubset.
[in] | unknown | Unknown for which the list of Node is sought. |
[in] | shape_function_label | Shape function label for which the list of Node is sought. |
This method is only called in the initialization phase, and it should remain that way: it involves allocating and fillind a std::vector on the fly.
void MoReFEM::NodeBearer::SetProcessor | ( | std::size_t | processor | ) |
Set the processor to which the node bearer belongs to.
[in] | processor | Processor that handles the current object. |
void MoReFEM::NodeBearer::SetGhost | ( | const NumberingSubset & | numbering_subset, |
std::size_t | processor ) |
Specify the NodeBearer is a ghost on processor.
[in] | processor | The processor on which NodeBearer exists as a ghost. |
[in] | numbering_subset | NumberingSubset for which current rank is following NodeBearer (there might be several) |
std::size_t MoReFEM::NodeBearer::Ndof | ( | const NumberingSubset & | numbering_subset | ) | const |
Returns the number of dofs born by the node inside the numbering_subset.
[in] | numbering_subset | NumberingSubset used as filter. |
bool MoReFEM::NodeBearer::IsUnknown | ( | const Unknown & | unknown | ) | const |
Whether an unknown is present or not.
[in] | unknown | Unknown under test. |
void MoReFEM::NodeBearer::SetProgramWiseIndex | ( | NodeBearerNS::program_wise_index_type | index | ) |
Set the index.
[in] | index | Index of the NodeBearer, computed outside the class. |
std::size_t MoReFEM::NodeBearer::Nnode | ( | const Unknown & | unknown, |
const std::string & | shape_function_label ) const |
Number of Nodes for a couple Unknown/Shape function label.
[in] | unknown | Unknown used as filter. |
[in] | shape_function_label | String representing the shape function used as filter. |
|
noexcept |
Return the list of nodes that match the given NumberingSubset.
[in] | numbering_subset | Only consider Node that are in this NumberingSubset. |
|
noexcept |
Whether the NodeBearer is a ghost or not.
This is actually a simple test upon the processor: if processor is same as rank it is not a ghost.
[in] | mpi | Mpi object which knows the rank of the processor, the total number of processors, etc... |
bool MoReFEM::NodeBearer::IsInNumberingSubset | ( | const NumberingSubset & | numbering_subset | ) | const |
Returns whether the NodeBearer is in the numbering_subset.
[in] | numbering_subset | NumberingSubset used as filter. |
|
noexcept |
Returns the list of processors that store the NodeBearer as a ghost.
[in] | numbering_subset | NumberingSubset for which we want the list of processors that follow current node bearer. |
std::set< std::size_t > MoReFEM::NodeBearer::ComputeGhostProcessorList | ( | ) | const |
Compute the list of all processors that track current NodeBearer.
|
noexcept |
Whether there are other processors that ghost the NodeBearer.
[in] | numbering_subset | NumberingSubset for which we want the information. |
|
private |
Add a new node.
[internal]
It is assumed here the node does not exist yet; such liabilities are handled by the class in charge of actually calling such methods (MatchInterfaceNodeBearer).
[in] | extended_unknown | Couple Unknown / Numbering subset for which the node is/are created. |
[in] | Ndof | Number of dofs to create on the node. |
|
private |
An internal index that is useful during partitioning steps.
|
private |
Processor that holds the node.
Once data have been reduced to processor wise, this data might still be useful: ghost nodes keep existing!