core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::FieldSet Class Reference

Name → FieldRec directory. More...

#include <field_set.hpp>

Public Member Functions

FieldRecadd (const std::string &name, std::size_t n, int ghost, Centering c=Centering::Cell)
 Allocate a fresh zero-initialised device buffer of n elements and register it.
 
FieldRecadopt (const std::string &name, View< double > v, int ghost, Centering c=Centering::Cell)
 Register an existing buffer under name without taking ownership of its allocation.
 
bool has (const std::string &name) const
 
FieldRecat (const std::string &name)
 
const FieldRecat (const std::string &name) const
 
std::size_t size () const
 
std::vector< std::string > names () const
 Field names in a deterministic (sorted) order — the collective-safe enumeration.
 

Detailed Description

Name → FieldRec directory.

Insertion is upsert (re-add/adopt of an existing name replaces the record) so a solver can re-adopt its members after a redistribution reallocates them. names() is sorted so every rank enumerates the set in the same order (required for collective redistribution).

Definition at line 48 of file field_set.hpp.

Member Function Documentation

◆ add()

FieldRec & peclet::core::FieldSet::add ( const std::string &  name,
std::size_t  n,
int  ghost,
Centering  c = Centering::Cell 
)
inline

Allocate a fresh zero-initialised device buffer of n elements and register it.

Definition at line 51 of file field_set.hpp.

◆ adopt()

FieldRec & peclet::core::FieldSet::adopt ( const std::string &  name,
View< double v,
int  ghost,
Centering  c = Centering::Cell 
)
inline

Register an existing buffer under name without taking ownership of its allocation.

Definition at line 58 of file field_set.hpp.

◆ has()

bool peclet::core::FieldSet::has ( const std::string &  name) const
inline

Definition at line 64 of file field_set.hpp.

◆ at() [1/2]

FieldRec & peclet::core::FieldSet::at ( const std::string &  name)
inline

Definition at line 66 of file field_set.hpp.

◆ at() [2/2]

const FieldRec & peclet::core::FieldSet::at ( const std::string &  name) const
inline

Definition at line 72 of file field_set.hpp.

◆ size()

std::size_t peclet::core::FieldSet::size ( ) const
inline

Definition at line 79 of file field_set.hpp.

◆ names()

std::vector< std::string > peclet::core::FieldSet::names ( ) const
inline

Field names in a deterministic (sorted) order — the collective-safe enumeration.

Definition at line 82 of file field_set.hpp.


The documentation for this class was generated from the following file: