b2api
B2000++ API Reference Manual, VERSION 4.6
 
Loading...
Searching...
No Matches
b2000::Domain Class Referenceabstract

#include "b2domain.H"

Inheritance diagram for b2000::Domain:
Collaboration diagram for b2000::Domain:

Classes

struct  AdjacentElement
 
class  ElementIterator
 
class  NodeIterator
 

Initialization

virtual void set_model (Model &model)=0
 
virtual void set_case (Case &case_)=0
 
virtual void set_subcase_id (const int subcase_id_)=0
 

General information

virtual size_t get_number_of_dof () const =0
 
virtual size_t get_number_of_elements () const =0
 
virtual size_t get_number_of_elements_and_subelements () const =0
 
virtual size_t get_number_of_nodes () const =0
 
virtual const std::vector< Element::VariableInfoget_value_info () const =0
 
virtual b2linalg::SparseMatrixConnectivityType get_dof_connectivity_type () const =0
 
virtual bool have_temperature () const =0
 

Nodes and elements

virtual node_iterator get_node_iterator ()=0
 
template<typename T >
const T * get_node_local_referential (const Node &node) const
 
virtual const double * get_node_local_referential_double (const Node &node) const =0
 
virtual const b2000::csda< double > * get_node_local_referential_csda (const Node &node) const =0
 
virtual Nodeget_node (const std::string &node_name)
 
virtual void get_slave_node (std::vector< std::pair< const Node *, const Node * > > &slave_node)=0
 
virtual element_iterator get_element_iterator ()=0
 
virtual Elementget_element (const std::string &element_name)
 

Adjacent and neighbouring elements

virtual void get_adjacent_elements (const Node *node, std::vector< AdjacentElement > &adjacent_elements)
 
virtual void get_adjacent_elements (std::pair< int, const Node *const * > node_list, std::vector< AdjacentElement > &adjacent_elements)=0
 
virtual void get_elements_of_same_type_near (const Element *e, double dist, std::vector< Element * > &element_list)=0
 

Restart

To implement re-start of an FE analysis, in addition to the solution vector, the state of the FE domain must be saved in the preceding analysis and re-loaded upon re-start.

The state of an FE domain comprises the states of all path-dependent Element and ElementProperty instances.

To allow the saving of and re-starting from different states, the states are distinguished by their ID.

virtual void save_state (const std::string &state_id)=0
 
virtual void load_state (const std::string &state_id)=0
 
virtual void save_field (const std::string &name_id, const b2linalg::Vector< double, b2linalg::Vdense_constref > &dof)=0
 
virtual void save_field (const std::string &name_id, const b2linalg::Vector< b2000::csda< double >, b2linalg::Vdense_constref > &dof)=0
 
virtual void save_field (const std::string &name_id, const b2linalg::Vector< std::complex< double >, b2linalg::Vdense_constref > &dof)=0
 

Multiscale analysis

Functions used in multiscale analysis where a (local) domain overlaps with a parent (global) domain.

virtual Elementget_parent_element_and_nodes_mapping (Domain &parent_domain, const Element &element, b2linalg::Matrix< double > &parent_nodes_internal_coor)
 
virtual Elementget_parent_element_mapping (Domain &parent_domain, const Node &node, b2linalg::Vector< double > &parent_internal_coor)
 
std::vector< std::reference_wrapper< Element > > & GetElementContainer ()
 Return private member domain_element_container_ holding all elements of this domain.
 
void FillElementContainer ()
 Fill domain_element_container_ with all elements of this domain.
 

Additional Inherited Members

- Public Member Functions inherited from b2000::Object
virtual const std::string & get_object_name () const
 
virtual ~Object ()
 
- Static Public Attributes inherited from b2000::Object
static ObjectType type
 

Detailed Description

Interface for C++ representations of a domain that is discretized by Finite Elements.

The Domain instance is created and owned by the Model instance. The number of functions of the Domain interface is quite large, but many of the functions are specific to certain kinds of analyses like adaptive refinement or contact analysis. The minimum functionality that a Domain class must provide in order to work in conjunction with a Solver instance is:

  • A forward iterator on the Node instances to compute and initialize the global degree-of-freedom numbering.
  • A forward iterator on the Element instances to assemble the first and/or the second variation.
  • A function to get the linear dependencies between the degrees-of-freedom.

Member Function Documentation

◆ FillElementContainer()

void b2000::Domain::FillElementContainer ( )
inline

Fill domain_element_container_ with all elements of this domain.

Note
Elements are stored using std::cref (std::reference_wrapper)

◆ get_adjacent_elements() [1/2]

virtual void b2000::Domain::get_adjacent_elements ( const Node node,
std::vector< AdjacentElement > &  adjacent_elements 
)
inlinevirtual

Get the list of elements that are adjacent to a node.

Parameters
nodeA pointer to a Node instance (input).
adjacent_elementsA vector of containing information on adjacent elements. Each entry corresponds to one Element.

◆ get_adjacent_elements() [2/2]

virtual void b2000::Domain::get_adjacent_elements ( std::pair< int, const Node *const * >  node_list,
std::vector< AdjacentElement > &  adjacent_elements 
)
pure virtual

Get the list of elements that are adjacent to all the Node instances given as argument.

Parameters
node_listA pair (first, second) with first being the number of nodes and second a pointer to an array of Node pointers (input).
adjacent_elementsA vector of containing information on adjacent elements. Each entry corresponds to one Element.

The AdjacentElement::internal_node_id_list contains the node-internal ID's of the nodes given in node_list that

Implemented in b2000::b2dbv3::Domain.

◆ get_dof_connectivity_type()

virtual b2linalg::SparseMatrixConnectivityType b2000::Domain::get_dof_connectivity_type ( ) const
pure virtual
Returns
The type of connectivity of FE elements present in the domain (1D, 2D, 3D, etc.). This function is called by the Solver instance (for the sparse matrix solver). Depending on this value, the Solver decides what graph partitioning algorithm to use for the symbolic factorization.

Implemented in b2000::b2dbv3::Domain.

◆ get_element()

b2000::Element * b2000::Domain::get_element ( const std::string &  element_name)
virtual
Returns
A pointer to the Element instance with Element::get_object_name() == element_name, or 0 if such a Element instance does not exist.
Note
The computational cost of this operation can be O(n) where n is the number of elements in the FE domain.

Reimplemented in b2000::b2dbv3::Domain.

◆ get_element_iterator()

virtual element_iterator b2000::Domain::get_element_iterator ( )
pure virtual
Returns
A std::unique_ptr to ElementIterator to iterate over all elements of the domain.

Implemented in b2000::b2dbv3::Domain.

◆ get_elements_of_same_type_near()

virtual void b2000::Domain::get_elements_of_same_type_near ( const Element e,
double  dist,
std::vector< Element * > &  element_list 
)
pure virtual

Get the list of elements near a given element and of the same type. This function is useful e.g. for contact overlay elements.

Parameters
eA pointer to the Element instance (input).
distThe maximum search distance (input).
element_listA vector of pointers to Element instances (output).

The list of returned elements contains all elements of the same type as Element e, and for with the distance with e is less or equal dist. The list may also contain some elements whose distance to e is slightly larger than dist.

Implemented in b2000::b2dbv3::Domain.

◆ get_node()

b2000::Node * b2000::Domain::get_node ( const std::string &  node_name)
virtual
Returns
A pointer to the Node instance with Node::get_object_name() == node_name, or 0 if such a Node instance does not exist.
Note
The computational cost of this operation can be O(n) where n is the number of nodes in the FE domain.

Reimplemented in b2000::b2dbv3::Domain.

◆ get_node_iterator()

virtual node_iterator b2000::Domain::get_node_iterator ( )
pure virtual

Return a std::unique_ptr to NodeIterator to iterate over all nodes of the FE domain.

Implemented in b2000::b2dbv3::Domain.

◆ get_node_local_referential()

template<typename T >
const T * b2000::Domain::get_node_local_referential ( const Node node) const
inline

This function is utilized by elements etc. to obtain node-local reference frames (coordinate systems).

Returns
A pointer to an array containing the 3 base vector, arranged in column-major format, and defined in the global reference frame. If no local reference frame is defined for that node, 0 is returned.

◆ get_node_local_referential_csda()

virtual const b2000::csda< double > * b2000::Domain::get_node_local_referential_csda ( const Node node) const
pure virtual

Must be overwritten by implementations of Domain.

Implemented in b2000::b2dbv3::Domain.

◆ get_node_local_referential_double()

virtual const double * b2000::Domain::get_node_local_referential_double ( const Node node) const
pure virtual

Must be overwritten by implementations of Domain.

Implemented in b2000::b2dbv3::Domain.

◆ get_number_of_dof()

virtual size_t b2000::Domain::get_number_of_dof ( ) const
pure virtual
Returns
The number of degrees-of-freedom in the domain.

Implemented in b2000::b2dbv3::Domain.

◆ get_number_of_elements()

virtual size_t b2000::Domain::get_number_of_elements ( ) const
pure virtual
Returns
The number of elements in the domain.

Implemented in b2000::b2dbv3::Domain.

◆ get_number_of_elements_and_subelements()

virtual size_t b2000::Domain::get_number_of_elements_and_subelements ( ) const
pure virtual
Returns
The number of elements in the domain plus the numbers of their subelements (if any).

Implemented in b2000::b2dbv3::Domain.

◆ get_number_of_nodes()

virtual size_t b2000::Domain::get_number_of_nodes ( ) const
pure virtual
Returns
The number of nodes in the domain.

Implemented in b2000::b2dbv3::Domain.

◆ get_parent_element_and_nodes_mapping()

virtual Element * b2000::Domain::get_parent_element_and_nodes_mapping ( Domain parent_domain,
const Element element,
b2linalg::Matrix< double > &  parent_nodes_internal_coor 
)
inlinevirtual

Get the Element of the parent domain containing an element belonging to this domain (the local domain).

Parameters
parent_domainThe parent domain to search.
elementThe Element instance of the this domain (= the local element).
parent_nodes_internal_coorThe element-internal coordinates of the local element inside the parent element.
Returns
A pointer to the parent Element of the parent Domain or 0, if no parent element exists.

Reimplemented in b2000::b2dbv3::Domain.

◆ get_parent_element_mapping()

virtual Element * b2000::Domain::get_parent_element_mapping ( Domain parent_domain,
const Node node,
b2linalg::Vector< double > &  parent_internal_coor 
)
inlinevirtual

Get the first Element of the parent domain containing a node belonging to this domain (the local domain.

Parameters
parent_domainThe parent domain to search.
parent_domainThe parent domain to search.
nodeThe Node instance of the this domain (= the local node).
parent_internal_coorThe element-internal coordinates of the local node inside the parent element.
Returns
A pointer to the parent Element of the parent Domain or 0, if no parent element exists.

Reimplemented in b2000::b2dbv3::Domain.

◆ get_slave_node()

virtual void b2000::Domain::get_slave_node ( std::vector< std::pair< const Node *, const Node * > > &  slave_node)
pure virtual

In a domain, coinciding nodes of different branches may be merged together. In this case, one of the nodes becomes the master node and the other node becomes the slave node.

Parameters
slave_nodeA vector of (slave,master) pairs of pointers to Node instances (output).

Implemented in b2000::b2dbv3::Domain.

◆ get_value_info()

virtual const std::vector< Element::VariableInfo > b2000::Domain::get_value_info ( ) const
pure virtual
Returns
A vector containing the type of response for each variable of the whole domain (all Element instances). See also Element::get_value_info().

Implemented in b2000::b2dbv3::Domain.

◆ GetElementContainer()

std::vector< std::reference_wrapper< Element > > & b2000::Domain::GetElementContainer ( )
inline

Return private member domain_element_container_ holding all elements of this domain.

Returns
The element container holding b2000::Elements.

◆ have_temperature()

virtual bool b2000::Domain::have_temperature ( ) const
pure virtual

Whether temperature conditions affecting the right-hand side through the element response (thermal expansion) are present for the current case and subcase.

Implemented in b2000::b2dbv3::Domain.

◆ load_state()

virtual void b2000::Domain::load_state ( const std::string &  state_id)
pure virtual

Load the state of the FE domain with the identifier state_id. This function is called by the Solver instance upon restart.

Implemented in b2000::b2dbv3::Domain.

◆ save_field() [1/3]

virtual void b2000::Domain::save_field ( const std::string &  name_id,
const b2linalg::Vector< b2000::csda< double >, b2linalg::Vdense_constref > &  dof 
)
pure virtual

Save a csda-valued field defined on all degrees-of-freedom. This function is called by the Solver instance.

Parameters
name_idThe name of the field.
dofA vector containing values for all degrees-of-freedom present in the FE domain.

Implemented in b2000::b2dbv3::Domain.

◆ save_field() [2/3]

virtual void b2000::Domain::save_field ( const std::string &  name_id,
const b2linalg::Vector< double, b2linalg::Vdense_constref > &  dof 
)
pure virtual

Save a real-valued field defined on all degrees-of-freedom. This function is called by the Solver instance. Such fields may be, e.g. for stress analysis, the displacement field ("DISP"), or the field containing the summed-up internal forces ("RCFO").

Parameters
name_idThe name of the field.
dofA vector containing values for all degrees-of-freedom present in the FE domain.

Implemented in b2000::b2dbv3::Domain.

◆ save_field() [3/3]

virtual void b2000::Domain::save_field ( const std::string &  name_id,
const b2linalg::Vector< std::complex< double >, b2linalg::Vdense_constref > &  dof 
)
pure virtual

Save a complex-valued field defined on all degrees-of-freedom. This function is called by the Solver instance.

Parameters
name_idThe name of the field.
dofA vector containing values for all degrees-of-freedom present in the FE domain.

Implemented in b2000::b2dbv3::Domain.

◆ save_state()

virtual void b2000::Domain::save_state ( const std::string &  state_id)
pure virtual

Save the state of the FE domain with the identifier state_id. This function is called by the Solver instance.

Implemented in b2000::b2dbv3::Domain.

◆ set_case()

virtual void b2000::Domain::set_case ( Case case_)
pure virtual

Set the current Case instance. This function is called by the Model instance.

Implemented in b2000::b2dbv3::Domain.

◆ set_model()

virtual void b2000::Domain::set_model ( Model model)
pure virtual

Set a reference to the Model instance. This function is called by the Model instance.

Implemented in b2000::b2dbv3::Domain.

◆ set_subcase_id()

virtual void b2000::Domain::set_subcase_id ( const int  subcase_id_)
pure virtual

Set the subcase ID.

Implemented in b2000::b2dbv3::Domain.


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