MoReFEM
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
MoReFEM::Internal::BoundaryConditionNS::Comp23 Struct Referencefinal

The class in charge of managing Comp23 behaviour. More...

#include <Comp23.hpp>

Inheritance diagram for MoReFEM::Internal::BoundaryConditionNS::Comp23:
Collaboration diagram for MoReFEM::Internal::BoundaryConditionNS::Comp23:

Public Types

using const_shared_ptr = std::shared_ptr<const ComponentManager>
 Shared smart pointer.
 

Public Member Functions

 Comp23 ()
 Constructor.
 
bool IsActive (std::size_t i) const
 
Advanced::ComponentNS::index_type Nactive () const
 Returns the number of active components.
 
std::string AsString () const
 Return as a string the components available, separated by a comma (e.g. "x, y").
 
Advanced::ComponentNS::index_type ActiveComponent (Advanced::ComponentNS::index_type i) const
 Return the position of the i -th active component in the bitset (in C numbering).
 

Static Public Member Functions

static const std::string & Name ()
 Return the name of the component.
 
static const std::bitset< 3 > & IsActivated ()
 Bitset which specifies which component is active or not.
 

Private Attributes

std::bitset< 3 > is_activated_
 Which component are activated.
 

Detailed Description

The class in charge of managing Comp23 behaviour.

Attention
Make sure not to define any data attribute in the class! Mother class doesn't get a virtual destructor, and is used polymorphically, so we must make sure not to add any data attribute that would induce memory leaks (it shouldn't be required anyway: the derived classes are designed to be very lightweight and add no additional functionalities...)

Member Function Documentation

◆ Name()

static const std::string & MoReFEM::Internal::BoundaryConditionNS::Comp23::Name ( )
static

Return the name of the component.

This name will for instance what will be expected in the input data file to set the properties of the displacement.

Returns
Name of the component.

◆ IsActivated()

static const std::bitset< 3 > & MoReFEM::Internal::BoundaryConditionNS::Comp23::IsActivated ( )
static

Bitset which specifies which component is active or not.

Warning
Be really careful as bitset constructor from is not exactly intuitive...
Returns
Bitset which specifies which component is active or not.

◆ IsActive()

bool MoReFEM::Internal::BoundaryConditionNS::ComponentManager::IsActive ( std::size_t i) const
inherited

Returns whether the i -th component is active.

Parameters
[in]iIndex of the component: 0 for x, 1 for y, 2 for z.

◆ ActiveComponent()

Advanced::ComponentNS::index_type MoReFEM::Internal::BoundaryConditionNS::ComponentManager::ActiveComponent ( Advanced::ComponentNS::index_type i) const
inherited

Return the position of the i -th active component in the bitset (in C numbering).

For instance, if bitset = 101 (and remember bitsets are read from the right to the left!):

ActiveComponent(0); // yields 0
ActiveComponent(1); // yields 2
ActiveComponent(2); // ERROR!
Advanced::ComponentNS::index_type ActiveComponent(Advanced::ComponentNS::index_type i) const
Return the position of the i -th active component in the bitset (in C numbering).
Parameters
[in]iIndex of the active component to consider; should be in [0, Nactive_component[.
Returns
Which is the i -th active component.

Field Documentation

◆ is_activated_

std::bitset<3> MoReFEM::Internal::BoundaryConditionNS::ComponentManager::is_activated_
privateinherited

Which component are activated.

BEWARE: a bitset is read from the right to the left... So "100" means z component is active, not x one.


The documentation for this struct was generated from the following file: