docs(blocks): added doxygen comments

This commit is contained in:
2026-10-01 15:12:07 -04:00
parent c1ddf6d534
commit f94f4ee8d6
6 changed files with 422 additions and 70 deletions

View File

@@ -1,30 +1,62 @@
#pragma once
/**
* @file base.hpp
* @author Emily M. Boudreaux
* @brief This file provides the base classes for residual and value blocks in the discretization framework.
*/
namespace serif::discretization::blocks {
inline constexpr int DYNAMIC_BLOCK_SIZE = -1;
/**
* @struct block
* @brief Base class for all block types in the discretization framework.
*/
struct block {};
/**
* @struct residual_block_base
* @brief Base class for residual blocks, derived from block.
*/
struct residual_block_base : block {
static constexpr int static_block_size = DYNAMIC_BLOCK_SIZE;
};
/**
* @struct value_block_base
* @brief Base class for value blocks, derived from block.
*/
struct value_block_base : block {
static constexpr int static_block_size = DYNAMIC_BLOCK_SIZE;
};
/**
* @struct generated_value_block
* @brief Final class for generated value blocks, derived from value_block_base. These are blocks that are generated at runtime
* @todo This may be removable at this point
*/
template <typename GeneratedValue>
struct generated_value_block final : value_block_base {
using GeneratedType = GeneratedValue;
static constexpr int static_block_size = static_cast<int>(GeneratedValue::scalarArity);
};
/**
* @struct generated_residual_block
* @brief Final class for generated residual blocks, derived from residual_block_base. These are blocks that are generated at runtime
* @todo This may be removable at this point
*/
template <typename GeneratedResidual>
struct generated_residual_block final : residual_block_base {
using GeneratedType = GeneratedResidual;
static constexpr int static_block_size = static_cast<int>(GeneratedResidual::scalarArity);
};
/**
* @struct residual_block
* @brief Final class for residual blocks with a fixed index, derived from residual_block_base.
*/
template <int index_value>
struct residual_block final : residual_block_base {
static constexpr int index = index_value;
@@ -35,6 +67,10 @@ namespace serif::discretization::blocks {
}
};
/**
* @struct value_block
* @brief Final class for value blocks with a fixed index, derived from value_block_base.
*/
template <int index_value>
struct value_block final : value_block_base {
static constexpr int index = index_value;