![]() |
Mimetic Operators Library Enhanced 4.0
|
Classes | |
| struct | BC1D |
| Structure to hold boundary condition data for 1D problems. More... | |
| struct | BC2D |
| Structure to hold boundary condition data for 2D problems. More... | |
| struct | BC3D |
| Structure to hold boundary condition data for 3D problems. More... | |
Functions | |
| void | addScalarBClhs (u16 k, u32 m, Real dx, const vec &dc, const vec &nc, sp_mat &Al, sp_mat &Ar) |
| Compute LHS boundary condition matrices for a 1D problem. | |
| void | addScalarBClhs (u16 k, u32 m, Real dx, u32 n, Real dy, const vec &dc, const vec &nc, sp_mat &Al, sp_mat &Ar, sp_mat &Ab, sp_mat &At) |
| void | addScalarBClhs (u16 k, u32 m, Real dx, u32 n, Real dy, u32 o, Real dz, const vec &dc, const vec &nc, sp_mat &Al, sp_mat &Ar, sp_mat &Ab, sp_mat &At, sp_mat &Af, sp_mat &Ak) |
| void | addScalarBCrhs (vec &b, const vec &v, const uvec &indices) |
| Apply boundary values to the RHS vector for a 1D problem. | |
| void | addScalarBCrhs (vec &b, const vec &dc, const vec &nc, const std::vector< vec > &v, const uvec &rl, const uvec &rr, const uvec &rb, const uvec &rt) |
| void | addScalarBCrhs (vec &b, const vec &dc, const vec &nc, const std::vector< vec > &v, const uvec &rl, const uvec &rr, const uvec &rb, const uvec &rt, const uvec &rf, const uvec &rk) |
| Apply boundary values to the RHS vector for a 3D problem. | |
| void | addScalarBC (sp_mat &A, vec &b, u16 k, u32 m, Real dx, const BC1D &bc) |
| Apply boundary conditions to a 1D discrete operator and RHS. | |
| void | addScalarBC (sp_mat &A, vec &b, u16 k, u32 m, Real dx, u32 n, Real dy, const BC2D &bc) |
| Apply boundary conditions to a 2D discrete operator and RHS. | |
| void | addScalarBC (sp_mat &A, vec &b, u16 k, u32 m, Real dx, u32 n, Real dy, u32 o, Real dz, const BC3D &bc) |
| Apply boundary conditions to a 3D discrete operator and RHS. | |
file addscalarbc.cpp
brief Implementation of boundary condition application for scalar PDEs
date 2025/01/26 Last Modified: 2026/03/04
Apply boundary conditions to a 1D discrete operator and RHS.
Modifies the linear system A*u = b to enforce boundary conditions.
| A | Linear operator (modified in place) |
| b | Right-hand side vector (modified in place) |
| k | Order of accuracy |
| m | Number of cells |
| dx | Cell spacing |
| bc | Boundary condition data |
Definition at line 286 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBC | ( | sp_mat & | A, |
| vec & | b, | ||
| u16 | k, | ||
| u32 | m, | ||
| Real | dx, | ||
| u32 | n, | ||
| Real | dy, | ||
| const BC2D & | bc ) |
Apply boundary conditions to a 2D discrete operator and RHS.
Modifies the linear system A*u = b to enforce boundary conditions.
| A | Linear operator (modified in place) |
| b | Right-hand side vector (modified in place) |
| k | Order of accuracy |
| m | Number of cells in x-direction |
| dx | Cell spacing in x-direction |
| n | Number of cells in y-direction |
| dy | Cell spacing in y-direction |
| bc | Boundary condition data |
Definition at line 307 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBC | ( | sp_mat & | A, |
| vec & | b, | ||
| u16 | k, | ||
| u32 | m, | ||
| Real | dx, | ||
| u32 | n, | ||
| Real | dy, | ||
| u32 | o, | ||
| Real | dz, | ||
| const BC3D & | bc ) |
Apply boundary conditions to a 3D discrete operator and RHS.
Modifies the linear system A*u = b to enforce boundary conditions.
| A | Linear operator (modified in place) |
| b | Right-hand side vector (modified in place) |
| k | Order of accuracy |
| m | Number of cells in x-direction |
| dx | Cell spacing in x-direction |
| n | Number of cells in y-direction |
| dy | Cell spacing in y-direction |
| o | Number of cells in z-direction |
| dz | Cell spacing in z-direction |
| bc | Boundary condition data |
Definition at line 329 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBClhs | ( | u16 | k, |
| u32 | m, | ||
| Real | dx, | ||
| const vec & | dc, | ||
| const vec & | nc, | ||
| sp_mat & | Al, | ||
| sp_mat & | Ar ) |
Compute LHS boundary condition matrices for a 1D problem.
| k | Order of accuracy |
| m | Number of cells |
| dx | Cell spacing |
| dc | Dirichlet coefficients (2x1: left, right) |
| nc | Neumann coefficients (2x1: left, right) |
| Al | Output: left boundary modification matrix |
| Ar | Output: right boundary modification matrix |
Definition at line 145 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBClhs | ( | u16 | k, |
| u32 | m, | ||
| Real | dx, | ||
| u32 | n, | ||
| Real | dy, | ||
| const vec & | dc, | ||
| const vec & | nc, | ||
| sp_mat & | Al, | ||
| sp_mat & | Ar, | ||
| sp_mat & | Ab, | ||
| sp_mat & | At ) |
brief Compute LHS boundary condition matrices for a 2D problem
| k | Order of accuracy |
| m | Number of cells in x-direction |
| dx | Cell spacing in x-direction |
| n | Number of cells in y-direction |
| dy | Cell spacing in y-direction |
| dc | Dirichlet coefficients (4x1: left, right, bottom, top) |
| nc | Neumann coefficients (4x1: left, right, bottom, top) |
| Al | Output: left edge modification matrix |
| Ar | Output: right edge modification matrix |
| Ab | Output: bottom edge modification matrix |
| At | Output: top edge modification matrix |
Definition at line 171 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBClhs | ( | u16 | k, |
| u32 | m, | ||
| Real | dx, | ||
| u32 | n, | ||
| Real | dy, | ||
| u32 | o, | ||
| Real | dz, | ||
| const vec & | dc, | ||
| const vec & | nc, | ||
| sp_mat & | Al, | ||
| sp_mat & | Ar, | ||
| sp_mat & | Ab, | ||
| sp_mat & | At, | ||
| sp_mat & | Af, | ||
| sp_mat & | Ak ) |
brief Compute LHS boundary condition matrices for a 3D problem
| k | Order of accuracy |
| m | Number of cells in x-direction |
| dx | Cell spacing in x-direction |
| n | Number of cells in y-direction |
| dy | Cell spacing in y-direction |
| o | Number of cells in z-direction |
| dz | Cell spacing in z-direction |
| dc | Dirichlet coefficients (6x1: left, right, bottom, top, front, back) |
| nc | Neumann coefficients (6x1: left, right, bottom, top, front, back) |
| Al | Output: left face modification matrix |
| Ar | Output: right face modification matrix |
| Ab | Output: bottom face modification matrix |
| At | Output: top face modification matrix |
| Af | Output: front face modification matrix |
| Ak | Output: back face modification matrix |
Definition at line 201 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBCrhs | ( | vec & | b, |
| const vec & | dc, | ||
| const vec & | nc, | ||
| const std::vector< vec > & | v, | ||
| const uvec & | rl, | ||
| const uvec & | rr, | ||
| const uvec & | rb, | ||
| const uvec & | rt ) |
brief Apply boundary values to the RHS vector for a 2D problem
| b | Right-hand side vector (modified in place) |
| dc | Dirichlet coefficients (4x1: left, right, bottom, top) |
| nc | Neumann coefficients (4x1: left, right, bottom, top) |
| v | Boundary values (4 vectors: left, right, bottom, top) |
| rl | Left edge row indices |
| rr | Right edge row indices |
| rb | Bottom edge row indices |
| rt | Top edge row indices |
Definition at line 259 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBCrhs | ( | vec & | b, |
| const vec & | dc, | ||
| const vec & | nc, | ||
| const std::vector< vec > & | v, | ||
| const uvec & | rl, | ||
| const uvec & | rr, | ||
| const uvec & | rb, | ||
| const uvec & | rt, | ||
| const uvec & | rf, | ||
| const uvec & | rk ) |
Apply boundary values to the RHS vector for a 3D problem.
| b | Right-hand side vector (modified in place) |
| dc | Dirichlet coefficients (6x1: left, right, bottom, top, front, back) |
| nc | Neumann coefficients (6x1: left, right, bottom, top, front, back) |
| v | Boundary values (6 vectors: left, right, bottom, top, front, back) |
| rl | Left face row indices |
| rr | Right face row indices |
| rb | Bottom face row indices |
| rt | Top face row indices |
| rf | Front face row indices |
| rk | Back face row indices |
Definition at line 270 of file addscalarbc.cpp.
| void AddScalarBC::addScalarBCrhs | ( | vec & | b, |
| const vec & | v, | ||
| const uvec & | indices ) |
Apply boundary values to the RHS vector for a 1D problem.
| b | Right-hand side vector (modified in place) |
| v | Boundary values (2x1: left, right) |
| indices | Row indices to update |
Definition at line 253 of file addscalarbc.cpp.