mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-15 18:38:23 +01:00
doc: Add documentation for new Diffusion constructors and functions
This commit is contained in:
parent
3612dcf034
commit
8fcc77bc60
@ -84,21 +84,45 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Construct a new Diffusion object from a given Eigen matrix
|
||||||
|
*
|
||||||
|
*/
|
||||||
Diffusion(RowMajMat<T> &origin) : BaseSimulationGrid<T>(origin) {
|
Diffusion(RowMajMat<T> &origin) : BaseSimulationGrid<T>(origin) {
|
||||||
init_alpha();
|
init_alpha();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct a new 2D Diffusion object from a given data pointer and
|
||||||
|
* the dimensions.
|
||||||
|
*
|
||||||
|
*/
|
||||||
Diffusion(T *data, int rows, int cols)
|
Diffusion(T *data, int rows, int cols)
|
||||||
: BaseSimulationGrid<T>(data, rows, cols) {
|
: BaseSimulationGrid<T>(data, rows, cols) {
|
||||||
init_alpha();
|
init_alpha();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Construct a new 1D Diffusion object from a given data pointer and
|
||||||
|
* the length.
|
||||||
|
*
|
||||||
|
*/
|
||||||
Diffusion(T *data, std::size_t length) : BaseSimulationGrid<T>(data, length) {
|
Diffusion(T *data, std::size_t length) : BaseSimulationGrid<T>(data, length) {
|
||||||
init_alpha();
|
init_alpha();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the alphaX matrix.
|
||||||
|
*
|
||||||
|
* @return RowMajMat<T>& Reference to the alphaX matrix.
|
||||||
|
*/
|
||||||
RowMajMat<T> &getAlphaX() { return alphaX; }
|
RowMajMat<T> &getAlphaX() { return alphaX; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the alphaY matrix.
|
||||||
|
*
|
||||||
|
* @return RowMajMat<T>& Reference to the alphaY matrix.
|
||||||
|
*/
|
||||||
RowMajMat<T> &getAlphaY() {
|
RowMajMat<T> &getAlphaY() {
|
||||||
tug_assert(
|
tug_assert(
|
||||||
this->getDim(),
|
this->getDim(),
|
||||||
@ -107,8 +131,18 @@ public:
|
|||||||
return alphaY;
|
return alphaY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the alphaX matrix.
|
||||||
|
*
|
||||||
|
* @param alphaX The new alphaX matrix.
|
||||||
|
*/
|
||||||
void setAlphaX(const RowMajMat<T> &alphaX) { this->alphaX = alphaX; }
|
void setAlphaX(const RowMajMat<T> &alphaX) { this->alphaX = alphaX; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the alphaY matrix.
|
||||||
|
*
|
||||||
|
* @param alphaY The new alphaY matrix.
|
||||||
|
*/
|
||||||
void setAlphaY(const RowMajMat<T> &alphaY) {
|
void setAlphaY(const RowMajMat<T> &alphaY) {
|
||||||
tug_assert(
|
tug_assert(
|
||||||
this->getDim(),
|
this->getDim(),
|
||||||
@ -117,22 +151,6 @@ public:
|
|||||||
this->alphaY = alphaY;
|
this->alphaY = alphaY;
|
||||||
}
|
}
|
||||||
|
|
||||||
// /**
|
|
||||||
// * @brief Set up a simulation environment. The timestep and number of
|
|
||||||
// * iterations must be set. For the BTCS approach, the Thomas algorithm is
|
|
||||||
// used
|
|
||||||
// * as the default linear equation solver as this is faster for tridiagonal
|
|
||||||
// * matrices. CSV output, console output and time measure are off by
|
|
||||||
// * default. Also, the number of cores is set to the maximum number of cores
|
|
||||||
// -1
|
|
||||||
// * by default.
|
|
||||||
// *
|
|
||||||
// * @param grid Valid grid object
|
|
||||||
// * @param bc Valid boundary condition object
|
|
||||||
// * @param approach Approach to solving the problem. Either FTCS or BTCS.
|
|
||||||
// */
|
|
||||||
// Diffusion(Grid<T> &_grid, Boundary<T> &_bc) : grid(_grid), bc(_bc) {};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Setting the time step for each iteration step. Time step must be
|
* @brief Setting the time step for each iteration step. Time step must be
|
||||||
* greater than zero. Setting the timestep is required.
|
* greater than zero. Setting the timestep is required.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user