BoundaryConditionManager< dim, number > Class Template Reference
|
Developer Documentation
|
#include <boundary_conditions.hpp>
Public Member Functions | |
| void | attach_boundary_condition (std::pair< const dealii::types::boundary_id, const std::shared_ptr< dealii::Function< dim > > > id_and_function, const std::string &type) |
| Attach a boundary condition to the manager. | |
| void | set_time (const number time) |
| Set the time for all time-dependent boundary conditions. | |
| std::map< dealii::types::boundary_id, std::shared_ptr< dealii::Function< dim > > > | get_bc_of_type (const std::string type, const bool is_optional=true) const |
| Retrieve all boundary conditions of a specific type. | |
| std::vector< dealii::types::boundary_id > | get_indices_of_type (const std::string type, const bool is_optional=true) const |
| Get all boundary IDs associated with a specific type. | |
| std::string | get_type (dealii::types::boundary_id id, const bool is_optional=true) const |
| Retrieve the type of a boundary condition by its ID. | |
Private Attributes | |
| std::map< std::string, std::map< dealii::types::boundary_id, std::shared_ptr< dealii::Function< dim > > > > | bc |
| Nested map for storing boundary conditions. | |
Member Function Documentation
◆ attach_boundary_condition()
|
inline |
Attach a boundary condition to the manager.
Adds a boundary condition specified by its type, boundary ID, and function. Ensures that no duplicate boundary conditions are assigned to the same ID for the same type.
- Parameters
-
id_and_function A pair consisting of: dealii::types::boundary_id: The unique ID for the boundary.std::shared_ptr<dealii::Function<dim>>: A shared pointer to the function defining the boundary condition.
type The type of the boundary condition (e.g., "dirichlet", "neumann").
- Exceptions
-
ExcBCAlreadyAssigned If a boundary condition is already assigned to the given ID and type.
◆ get_bc_of_type()
|
inline |
Retrieve all boundary conditions of a specific type.
Provides access to the boundary conditions associated with a given type.
- Parameters
-
type The type of the boundary conditions to retrieve. is_optional A flag indicating whether the bc is optional. Defaults to true, requiring the bc not to be present.
- Returns
- A map of boundary IDs to their corresponding functions.
- Exceptions
-
dealii::ExcMessage If the specified type does not exist in the manager.
◆ get_indices_of_type()
|
inline |
Get all boundary IDs associated with a specific type.
Retrieves a list of boundary IDs for a given type of boundary condition.
- Parameters
-
type The type of the boundary conditions. is_optional A flag indicating whether the bc is optional. Defaults to true, requiring the bc not to be present.
- Returns
- A vector of boundary IDs (
dealii::types::boundary_id) associated with the given type.
◆ get_type()
|
inline |
Retrieve the type of a boundary condition by its ID.
This function searches through the boundary condition manager to find a boundary condition matching the specified ID and returns its associated type. If the ID is not found, the behavior depends on the is_optional flag:
- If
is_optionalistrue, the function returns an empty string. - If
is_optionalisfalse, the function throws an exception.
- Parameters
-
id The boundary ID to search for. is_optional A flag indicating whether the boundary condition ID is optional. - If
true, the function returns an empty string if the ID is not found. - If
false, the function throws an exception if the ID is not found.
- If
◆ set_time()
|
inline |
Set the time for all time-dependent boundary conditions.
Updates the time for all boundary conditions that are associated with functions supporting time-dependent behavior.
- Parameters
-
time The current simulation time.
Member Data Documentation
◆ bc
|
private |
Nested map for storing boundary conditions.
The map structure is organized as:
bc[<type>][<id>] = <function><type>: A string representing the type of the boundary condition (e.g., "dirichlet", "Neumann").<id>: A unique boundary identifier of typedealii::types::boundary_id.<function>: A shared pointer to aFunction<dim>object that defines the behavior of the boundary condition.
The documentation for this class was generated from the following file:
- include/meltpooldg/core/boundary_conditions.hpp
Generated by