1#ifndef CHI_MATH_UNKNOWN_MANAGER_H
2#define CHI_MATH_UNKNOWN_MANAGER_H
43 unsigned int in_num_components = 1,
44 unsigned int in_map_begin = 0)
57 snprintf(buffer, 100,
" %03d", c);
63 unsigned int GetMap(
unsigned int component_number = 0)
const
65 unsigned int map_value = 0;
70 throw std::out_of_range(
"Attempting to access component " +
71 std::to_string(component_number) +
73 " for a SCALAR unknown.");
78 throw std::out_of_range(
"Attempting to access component " +
79 std::to_string(component_number) +
81 " for a VECTOR_2 unknown.");
86 throw std::out_of_range(
"Attempting to access component " +
87 std::to_string(component_number) +
89 " for a VECTOR_3 unknown.");
94 throw std::out_of_range(
"Attempting to access component " +
95 std::to_string(component_number) +
97 " for a VECTOR_N unknown.");
102 throw std::out_of_range(
"Attempting to access component " +
103 std::to_string(component_number) +
105 " for a TENSOR unknown.");
138 std::initializer_list<UnknownInfo> unknown_info_list,
142 for (
const auto& uk_info : unknown_info_list)
147 const std::vector<Unknown>& unknown_info_list,
151 for (
const auto& uk : unknown_info_list)
156 std::initializer_list<Unknown> unknowns,
161 for (
const auto& uk : unknowns)
166 for (
const auto& comp_text_name : uk.component_text_names_)
199 unsigned int MapUnknown(
unsigned int unknown_id,
200 unsigned int component = 0)
const;
207 unsigned int component,
211 const std::string& in_text_name);
214 unsigned int component,
215 const std::string& in_text_name);
const unsigned int num_components_
const unsigned int map_begin_
unsigned int GetMap(unsigned int component_number=0) const
Unknown(UnknownType in_type, unsigned int in_num_components=1, unsigned int in_map_begin=0)
std::vector< int > num_off_block_connections_
std::vector< std::string > component_text_names_
unsigned int NumComponents() const
unsigned int GetMapEnd() const
unsigned int AddUnknown(UnknownType unk_type, unsigned int dimension=0)
const Unknown & GetUnknown(size_t id) const
void SetUnknownComponentNumOffBlockConnections(unsigned int unknown_id, unsigned int component, int num_conn)
UnknownManager(UnknownStorageType in_storage_type=UnknownStorageType::NODAL) noexcept
UnknownStorageType GetDOFStorageType() const
void SetUnknownNumOffBlockConnections(unsigned int unknown_id, int num_conn)
void SetUnknownComponentTextName(unsigned int unknown_id, unsigned int component, const std::string &in_text_name)
std::pair< UnknownType, unsigned int > UnknownInfo
UnknownManager & operator=(const UnknownManager &other)=default
UnknownManager(const std::vector< Unknown > &unknown_info_list, UnknownStorageType in_storage_type=UnknownStorageType::NODAL) noexcept
UnknownManager(const UnknownManager &other)=default
unsigned int MapUnknown(unsigned int unknown_id, unsigned int component=0) const
std::vector< Unknown > unknowns_
~UnknownManager()=default
void SetUnknownTextName(unsigned int unknown_id, const std::string &in_text_name)
UnknownStorageType dof_storage_type_
size_t NumberOfUnknowns() const
UnknownManager(std::initializer_list< Unknown > unknowns, UnknownStorageType in_storage_type=UnknownStorageType::NODAL) noexcept
unsigned int GetTotalUnknownStructureSize() const
static UnknownManager GetUnitaryUnknownManager()
void SetDOFStorageType(const UnknownStorageType in_storage_type)
UnknownManager(std::initializer_list< UnknownInfo > unknown_info_list, UnknownStorageType in_storage_type=UnknownStorageType::NODAL) noexcept