Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions mesh_handle/element.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace t8_mesh_handle
/** Forward declaration of the \ref mesh class of the handle.
*/
template <template <typename> class... TCompetences>
class mesh;
struct mesh;

/**
* Definition of the mesh element class of the \ref mesh handle.
Expand All @@ -63,7 +63,8 @@ class mesh;
* \tparam TCompetences The competences you want to add to the default functionality of the element.
*/
template <template <typename> class... TCompetences>
class element: public TCompetences<element<TCompetences...>>... {
struct element: public TCompetences<element<TCompetences...>>...
{
private:
using SelfType = element<TCompetences...>; /**< Type of the current class with all template parameters specified. */
using mesh_class = mesh<TCompetences...>; /**< Type of the mesh class used. */
Expand Down
3 changes: 2 additions & 1 deletion mesh_handle/mesh.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ namespace t8_mesh_handle
* \see element for more details on the choice of the template parameter.
*/
template <template <typename> class... TCompetences>
class mesh {
struct mesh
{
public:
using element_class = element<TCompetences...>; /**< The element class of the mesh with given competences. */
friend element_class; /**< Element class as friend such that private members (e.g. the forest) can be accessed. */
Expand Down
3 changes: 2 additions & 1 deletion src/t8_cad/t8_cad.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
/**
* This class manages OpenCASCADE shapes and implements helper functions for working with the shapes.
*/
class t8_cad {
struct t8_cad
{
public:
/**
* Constructor of the cad shape.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@
#include <span>

/** forward declaration of the class needed since the two class headers include each other. */
class t8_cmesh_vertex_conn_vertex_to_tree;
struct t8_cmesh_vertex_conn_vertex_to_tree;

/**
* A class to hold the tree to vertex connectivity of a cmesh.
*/
class t8_cmesh_vertex_conn_tree_to_vertex {
struct t8_cmesh_vertex_conn_tree_to_vertex
{
public:
/** Standard constructor. Does nothing. */
t8_cmesh_vertex_conn_tree_to_vertex (): current_state (state::EMPTY)
Expand Down Expand Up @@ -169,7 +170,7 @@ class t8_cmesh_vertex_conn_tree_to_vertex {
friend struct t8_cmesh_vertex_connectivity;

private:
enum class state {
enum struct state {
EMPTY, /*< Is initialized but empty. */
FILLED /*< Is filled with at least one entry. */
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <t8_cmesh/t8_cmesh_vertex_connectivity/t8_cmesh_vertex_connectivity_types.hxx>

/** forward declaration of ttv class needed since the two class headers include each other. */
class t8_cmesh_vertex_conn_tree_to_vertex;
struct t8_cmesh_vertex_conn_tree_to_vertex;

/** This class stores the vertex to tree lookup for
* global vertex indices for a cmesh.
Expand Down Expand Up @@ -67,7 +67,8 @@ class t8_cmesh_vertex_conn_tree_to_vertex;
* Table global_id -> TV_LIST: std::unordered_map<t8_gloidx_t, TV_LIST>
*
*/
class t8_cmesh_vertex_conn_vertex_to_tree {
struct t8_cmesh_vertex_conn_vertex_to_tree
{
public:
/** Standard constructor.
* Initializes the class and allows setting vertex entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct t8_cmesh_vertex_connectivity
~t8_cmesh_vertex_connectivity () {};

/** The state this connectivity can be in. */
enum class state {
enum struct state {
INITIALIZED, /**< Initialized but not filled */
TREE_TO_VERTEX_VALID, /**< Ready to use, but only tree_to_vertex functionality. */
VALID /**< Ready to use for full vertex connectivity. Cannot be altered anymore. */
Expand Down
3 changes: 2 additions & 1 deletion src/t8_data/t8_data_handler.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ is_internal_data (const t8_data_handler_type type)
* \tparam TType The type of data to be handled.
*/
template <typename TType>
class t8_data_handler {
struct t8_data_handler
{
public:
/**
* Construct a t8_data_handler.
Expand Down
3 changes: 2 additions & 1 deletion src/t8_data/t8_element_array_iterator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
* and let the dereference operator return it as a value_type. Therefore, read-only operations on the
* \a t8_element_array_t are possible.
*/
class t8_element_array_iterator {
struct t8_element_array_iterator
{

private:
const t8_scheme* scheme; /**< The scheme of the elements residing within the array. */
Expand Down
6 changes: 4 additions & 2 deletions src/t8_data/t8_vector_handler.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
/**
* A base class for vector handlers.
*/
class t8_abstract_vector_handler {
struct t8_abstract_vector_handler
{
public:
/**
* Pure virtual function to determine the buffer size.
Expand Down Expand Up @@ -140,7 +141,8 @@ class t8_abstract_vector_handler {
* \tparam TType The type of data to be handled.
*/
template <typename TType>
class t8_vector_handler: public t8_abstract_vector_handler {
struct t8_vector_handler: public t8_abstract_vector_handler
{
public:
/**
* Construct a t8_vector_handler.
Expand Down
3 changes: 2 additions & 1 deletion src/t8_forest/t8_forest_pfc_message.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
* between the processes that will be required to decide on whether and where
* families are split at process boundaries.
*/
class t8_forest_pfc_message {
struct t8_forest_pfc_message
{
public:
/**
* Pack the data to prepare sending.
Expand Down
24 changes: 16 additions & 8 deletions src/t8_forest/t8_forest_search/t8_forest_search.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ using t8_partition_search_batched_queries_callback = std::function<void (
/**
* A base class that performs a search in a forest.
*/
class t8_search_base {
struct t8_search_base
{
public:
/** Constructor for the t8_search_base class.
*
Expand Down Expand Up @@ -331,7 +332,8 @@ class t8_search_base {
* \tparam Udata The type of user data to be used in the search.
*/
template <typename Udata = void>
class t8_search: public t8_search_base {
struct t8_search: public t8_search_base
{
public:
/**
* Constructor for the t8_search class.
Expand Down Expand Up @@ -451,7 +453,8 @@ class t8_search: public t8_search_base {
* \tparam Udata The type of the user data, defaults to void.
*/
template <typename Query_T, typename Udata = void>
class t8_search_with_queries: public t8_search<Udata> {
struct t8_search_with_queries: public t8_search<Udata>
{
public:
/**
* Constructor for the t8_search_with_queries class.
Expand Down Expand Up @@ -564,7 +567,8 @@ class t8_search_with_queries: public t8_search<Udata> {
* \tparam Udata The type of the user data, defaults to void.
*/
template <typename Query_T, typename Udata = void>
class t8_search_with_batched_queries: public t8_search<Udata> {
struct t8_search_with_batched_queries: public t8_search<Udata>
{
public:
/**
* Constructor for the t8_search_with_batched_queries class.
Expand Down Expand Up @@ -668,7 +672,8 @@ class t8_search_with_batched_queries: public t8_search<Udata> {
/**
* A class that performs a search in the partition of a forest.
*/
class t8_partition_search_base {
struct t8_partition_search_base
{
public:
/** Constructor for the t8_partition_search_base class.
*
Expand Down Expand Up @@ -792,7 +797,8 @@ class t8_partition_search_base {
* \tparam Udata
*/
template <typename Udata = void>
class t8_partition_search: public t8_partition_search_base {
struct t8_partition_search: public t8_partition_search_base
{
public:
/**
* Constructor for the t8_partition_search class.
Expand Down Expand Up @@ -907,7 +913,8 @@ class t8_partition_search: public t8_partition_search_base {
* \tparam Udata The type of the user data, defaults to void.
*/
template <typename Query_T, typename Udata = void>
class t8_partition_search_with_queries: public t8_partition_search<Udata> {
struct t8_partition_search_with_queries: public t8_partition_search<Udata>
{
public:
/**
* Constructor for the t8_partition_search_with_queries class.
Expand Down Expand Up @@ -1027,7 +1034,8 @@ class t8_partition_search_with_queries: public t8_partition_search<Udata> {
* \tparam Udata The type of the user data, defaults to void.
*/
template <typename Query_T, typename Udata = void>
class t8_partition_search_with_batched_queries: public t8_partition_search<Udata> {
struct t8_partition_search_with_batched_queries: public t8_partition_search<Udata>
{
public:
/**
* Constructor for the t8_partition_search_with_batched_queries class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ flatten (const std::vector<std::vector<T>> &vec)
* some specific to the Lagrange geometry, some valid for all the
* geometries in t8code.
*/
class t8_lagrange_element {
struct t8_lagrange_element
{
public:
/**
* Construct a new t8_lagrange_element object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ count_leaves_from_level (const int element_level, const int refinement_level, co
* \tparam TUnderlyingEclassScheme The default scheme class of the element shape.
*/
template <t8_eclass_t TEclass, class TUnderlyingEclassScheme>
class t8_default_scheme_common: public t8_scheme_helpers<TEclass, TUnderlyingEclassScheme> {
struct t8_default_scheme_common: public t8_scheme_helpers<TEclass, TUnderlyingEclassScheme>
{
private:
friend TUnderlyingEclassScheme;
/** Private constructor which can only be used by derived schemes.
Expand Down
5 changes: 3 additions & 2 deletions src/t8_schemes/t8_default/t8_default_hex/t8_default_hex.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <t8_schemes/t8_default/t8_default_common/t8_default_common.hxx>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** The class holding a hexahedral element in the default scheme.
* We make this definition public for interoperability of element classes.
Expand All @@ -43,7 +43,8 @@ class t8_scheme;
typedef p8est_quadrant_t t8_phex_t;

/** Default implementation of the scheme for the hex element class. */
class t8_default_scheme_hex: public t8_default_scheme_common<T8_ECLASS_HEX, t8_default_scheme_hex> {
struct t8_default_scheme_hex: public t8_default_scheme_common<T8_ECLASS_HEX, t8_default_scheme_hex>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_hex () noexcept: t8_default_scheme_common (sizeof (t8_phex_t)) {};
Expand Down
5 changes: 3 additions & 2 deletions src/t8_schemes/t8_default/t8_default_line/t8_default_line.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@
#include <t8_schemes/t8_default/t8_default_line/t8_dline_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** Provide an implementation for the line element class.
* It is written as a self-contained library in the t8_dline_* files.
*/

class t8_default_scheme_line: public t8_default_scheme_common<T8_ECLASS_LINE, t8_default_scheme_line> {
struct t8_default_scheme_line: public t8_default_scheme_common<T8_ECLASS_LINE, t8_default_scheme_line>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_line () noexcept: t8_default_scheme_common (sizeof (t8_dline_t)) {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
#include <t8_schemes/t8_default/t8_default_prism/t8_dprism_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** Provide an implementation for the prism element class.
* It is written as a self-contained library in the t8_dprism_* files.
*/

class t8_default_scheme_prism: public t8_default_scheme_common<T8_ECLASS_PRISM, t8_default_scheme_prism> {
struct t8_default_scheme_prism: public t8_default_scheme_common<T8_ECLASS_PRISM, t8_default_scheme_prism>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_prism () noexcept: t8_default_scheme_common (sizeof (t8_dprism_t)) {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@
#include <t8_schemes/t8_default/t8_default_pyramid/t8_dpyramid_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** Provide an implementation for the pyramid element class. It is written as a self-contained library in the
* t8_dpyramid_* files.
*/

class t8_default_scheme_pyramid: public t8_default_scheme_common<T8_ECLASS_PYRAMID, t8_default_scheme_pyramid> {
struct t8_default_scheme_pyramid: public t8_default_scheme_common<T8_ECLASS_PYRAMID, t8_default_scheme_pyramid>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_pyramid () noexcept: t8_default_scheme_common (sizeof (t8_dpyramid_t)) {};
Expand Down
5 changes: 3 additions & 2 deletions src/t8_schemes/t8_default/t8_default_quad/t8_default_quad.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <t8_schemes/t8_default/t8_default_common/t8_default_common.hxx>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** The structure holding a quadrilateral element in the default scheme.
* We make this definition public for interoperability of element classes.
Expand Down Expand Up @@ -79,7 +79,8 @@ typedef p4est_quadrant_t t8_pquad_t;
} while (0)

/** Default implementation of the scheme for the quad element class. */
class t8_default_scheme_quad: public t8_default_scheme_common<T8_ECLASS_QUAD, t8_default_scheme_quad> {
struct t8_default_scheme_quad: public t8_default_scheme_common<T8_ECLASS_QUAD, t8_default_scheme_quad>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_quad () noexcept: t8_default_scheme_common (sizeof (t8_pquad_t)) {};
Expand Down
5 changes: 3 additions & 2 deletions src/t8_schemes/t8_default/t8_default_tet/t8_default_tet.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
#include <t8_schemes/t8_default/t8_default_tet/t8_dtet_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** Default implementation of the scheme for the tet element class. */
class t8_default_scheme_tet: public t8_default_scheme_common<T8_ECLASS_TET, t8_default_scheme_tet> {
struct t8_default_scheme_tet: public t8_default_scheme_common<T8_ECLASS_TET, t8_default_scheme_tet>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_tet () noexcept: t8_default_scheme_common (sizeof (t8_dtet_t)) {};
Expand Down
5 changes: 3 additions & 2 deletions src/t8_schemes/t8_default/t8_default_tri/t8_default_tri.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
#include <t8_schemes/t8_default/t8_default_tri/t8_dtri_bits.h>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** Default implementation of the scheme for the triangular element class. */
class t8_default_scheme_tri: public t8_default_scheme_common<T8_ECLASS_TRIANGLE, t8_default_scheme_tri> {
struct t8_default_scheme_tri: public t8_default_scheme_common<T8_ECLASS_TRIANGLE, t8_default_scheme_tri>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_tri () noexcept: t8_default_scheme_common (sizeof (t8_dtri_t)) {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@
#include <t8_schemes/t8_default/t8_default_common/t8_default_common.hxx>

/* Forward declaration of the scheme so we can use it as an argument in the eclass schemes function. */
class t8_scheme;
struct t8_scheme;

/** Default implementation of the scheme for the vertex element class. */
class t8_default_scheme_vertex: public t8_default_scheme_common<T8_ECLASS_VERTEX, t8_default_scheme_vertex> {
struct t8_default_scheme_vertex: public t8_default_scheme_common<T8_ECLASS_VERTEX, t8_default_scheme_vertex>
{
public:
/** Constructor which calls the specialized constructor for the base. */
t8_default_scheme_vertex () noexcept: t8_default_scheme_common (sizeof (t8_dvertex_t)) {};
Expand Down
5 changes: 3 additions & 2 deletions src/t8_schemes/t8_scheme.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ t8_debug_print_type ()

/** This class holds one or more element schemes.
* It also relays the function calls to the specific schemes. */
class t8_scheme {
friend class t8_scheme_builder;
struct t8_scheme
{
friend struct t8_scheme_builder;

public:
t8_scheme ()
Expand Down
3 changes: 2 additions & 1 deletion src/t8_schemes/t8_scheme_builder.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
/** The scheme builder adds eclass schemes to a scheme container and returns it.
* TODO: Make return value a reference.
*/
class t8_scheme_builder {
struct t8_scheme_builder
{
public:
t8_scheme_builder (): scheme (new t8_scheme) {};
~t8_scheme_builder () {};
Expand Down
Loading