Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::mesh::EntityDeclaration::NodeBuilder Class Reference

Nested builder for nodes.

#include <DeclareEntities.hpp>

Public Member Functions

NodeBuilder & owning_proc (const int proc)
 Set the processor that owns the node.
NodeBuilder & id (const stk::mesh::EntityId entity_id)
 Set the entity id of the node (indexed from 1).
NodeBuilder & add_part (stk::mesh::Part *part_ptr)
 Add a part to the node (i.e, a part that the node belongs to).
NodeBuilder & add_parts (const stk::mesh::PartVector &parts)
 Add a vector of parts to the node (i.e, parts that the node belongs to).
NodeBuilder & add_parts (std::initializer_list< stk::mesh::Part * > parts)
 Add a vector of parts to the node (i.e, parts that the node belongs to).
NodeBuilder & add_class (Class *class_ptr)
 Add a class to the node (i.e, a Class that the node belongs to).
NodeBuilder & add_class (Class &class_instance)
 Add a class to the node (i.e, a Class that the node belongs to).
NodeBuilder & add_classes (const ClassVector &classes)
 Add a vector of classes to the node (i.e, Classes that the node belongs to).
NodeBuilder & add_classes (std::initializer_list< Class * > classes)
 Add a vector of classes to the node (i.e, Classes that the node belongs to).
template<typename T>
NodeBuilder & add_field_data (stk::mesh::FieldBase *const field, const std::vector< T > &data)
 Add field data to the node.
template<typename T>
NodeBuilder & add_field_data (stk::mesh::FieldBase &field, const std::vector< T > &data)
 Add field data to the node.
template<typename T>
requires std::is_arithmetic_v<T>
NodeBuilder & add_field_data (stk::mesh::FieldBase *const field, const T &data)
 Add a single scalar value as field data for the node. Use the vector overload for multi-component fields.
template<typename T>
requires std::is_arithmetic_v<T>
NodeBuilder & add_field_data (stk::mesh::FieldBase &field, const T &data)
NodeBuilder & links_to (LinkData *const link_data_ptr, const stk::mesh::EntityId linked_entity_id, const stk::mesh::EntityRank linked_entity_rank, const unsigned ordinal)
 This node is a valid linker. Link it to a given entity at the desired ordinal.
NodeBuilder & links_to (LinkData &link_data, const stk::mesh::EntityId linked_entity_id, const stk::mesh::EntityRank linked_entity_rank, const unsigned ordinal)
 This node is a valid linker. Link it to a given entity at the desired ordinal.
EntityDeclarationowner ()
 Get the owner of the builder.

Friends

std::ostream & operator<< (std::ostream &os, const NodeBuilder &builder)
 Overload the operator<<.

Internal Data

class EntityDeclaration

Member Function Documentation

◆ owning_proc()

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::owning_proc ( const int proc)
inline

◆ id()

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::id ( const stk::mesh::EntityId entity_id)
inline

◆ add_part()

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_part ( stk::mesh::Part * part_ptr)
inline
Note
You do not need to add parts that will be automatically added such as the universal part. This includes parts that the node will become a member of due to automatic part inheritance.

◆ add_parts() [1/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_parts ( const stk::mesh::PartVector & parts)
inline

◆ add_parts() [2/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_parts ( std::initializer_list< stk::mesh::Part * > parts)
inline

◆ add_class() [1/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_class ( Class * class_ptr)
inline

◆ add_class() [2/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_class ( Class & class_instance)
inline

◆ add_classes() [1/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_classes ( const ClassVector & classes)
inline

◆ add_classes() [2/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_classes ( std::initializer_list< Class * > classes)
inline

◆ add_field_data() [1/4]

template<typename T>
NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_field_data ( stk::mesh::FieldBase *const field,
const std::vector< T > & data )
inline
Parameters
fieldThe field to set data for
dataThe data to set

◆ add_field_data() [2/4]

template<typename T>
NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_field_data ( stk::mesh::FieldBase & field,
const std::vector< T > & data )
inline
Parameters
fieldThe field to set data for
dataThe data to set

◆ add_field_data() [3/4]

template<typename T>
requires std::is_arithmetic_v<T>
NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_field_data ( stk::mesh::FieldBase *const field,
const T & data )
inline

◆ add_field_data() [4/4]

template<typename T>
requires std::is_arithmetic_v<T>
NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::add_field_data ( stk::mesh::FieldBase & field,
const T & data )
inline

◆ links_to() [1/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::links_to ( LinkData *const link_data_ptr,
const stk::mesh::EntityId linked_entity_id,
const stk::mesh::EntityRank linked_entity_rank,
const unsigned ordinal )
inline
Parameters
link_data_ptrThe link data to link under.
linked_entity_idThe entity id of the entity to link to.
linked_entity_rankThe entity rank of the entity to link to.
ordinalThe slot/ordinal to link the entity at.

◆ links_to() [2/2]

NodeBuilder & mundy::mesh::EntityDeclaration::NodeBuilder::links_to ( LinkData & link_data,
const stk::mesh::EntityId linked_entity_id,
const stk::mesh::EntityRank linked_entity_rank,
const unsigned ordinal )
inline
Parameters
link_dataThe link data to link under.
linked_entity_idThe entity id of the entity to link to.
linked_entity_rankThe entity rank of the entity to link to.
ordinalThe slot/ordinal to link the entity at.

◆ owner()

EntityDeclaration & mundy::mesh::EntityDeclaration::NodeBuilder::owner ( )
inline

◆ EntityDeclaration

friend class EntityDeclaration
friend

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const NodeBuilder & builder )
friend