Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/d2/dc7/namespacedolfinx.html
DOLFINx 0.8.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
Namespaces | Classes | Concepts | Enumerations | Functions
dolfinx Namespace Reference

Top-level namespace. More...

Namespaces

namespace  common
 Miscellaneous classes, functions and types.
 
namespace  fem
 Finite element method functionality.
 
namespace  geometry
 Geometry data structures and algorithms.
 
namespace  graph
 Graph data structures and algorithms.
 
namespace  io
 Support for file IO.
 
namespace  la
 Linear algebra interface.
 
namespace  mesh
 Mesh data structures and algorithms on meshes.
 
namespace  MPI
 MPI support functionality.
 
namespace  nls
 Nonlinear solvers.
 
namespace  refinement
 Mesh refinement algorithms.
 

Classes

class  Table
 

Concepts

concept  scalar
 

Enumerations

enum class  TimingType : int { wall = 0 , user = 1 , system = 2 }
 

Functions

std::string version ()
 Return DOLFINx version string.
 
std::string ufcx_signature ()
 Return UFC signature string.
 
std::string git_commit_hash ()
 
bool has_debug ()
 
bool has_petsc ()
 Return true if DOLFINx is compiled with PETSc.
 
bool has_slepc ()
 Return true if DOLFINx is compiled with SLEPc.
 
bool has_scotch ()
 Return true if DOLFINx is compiled with Scotch.
 
bool has_parmetis ()
 Return true if DOLFINx is compiled with ParMETIS.
 
bool has_kahip ()
 Return true if DOLFINx is compiled with KaHIP.
 
bool has_adios2 ()
 Return true if DOLFINX is compiled with ADIOS2.
 
void init_logging (int argc, char *argv[])
 Optional initialisation of the logging backend.
 
template<typename T , int BITS = 8>
void radix_sort (std::span< T > array)
 
template<typename T , int BITS = 16>
void argsort_radix (std::span< const T > array, std::span< std::int32_t > perm)
 
template<typename T , int BITS = 16>
std::vector< std::int32_t > sort_by_perm (std::span< const T > x, std::size_t shape1)
 Compute the permutation array that sorts a 2D array by row.
 
Table timings (std::set< TimingType > type)
 
void list_timings (MPI_Comm comm, std::set< TimingType > type, Table::Reduction reduction=Table::Reduction::max)
 
std::tuple< std::size_t, double, double, double > timing (std::string task)
 

Detailed Description

Top-level namespace.

Enumeration Type Documentation

◆ TimingType

enum class TimingType : int
strong

Timing types:

  • TimingType::wall wall-clock time
  • TimingType::user user (cpu) time
  • TimingType::system system (kernel) time

Function Documentation

◆ argsort_radix()

template<typename T , int BITS = 16>
void argsort_radix ( std::span< const T > array,
std::span< std::int32_t > perm )

Returns the indices that would sort (lexicographic) a vector of bitsets.

Template Parameters
TThe size of the bitset, which corresponds to the number of bits necessary to represent a set of integers. For example, N = 96 for mapping three std::int32_t.
BITSThe number of bits to sort at a time
Parameters
[in]arrayThe array to sort
[in]permFIXME

◆ git_commit_hash()

std::string git_commit_hash ( )

Return git changeset hash (returns "unknown" if changeset is not known)

◆ has_debug()

bool has_debug ( )

Return true if DOLFINx is compiled in debugging mode, i.e., with assertions on

◆ init_logging()

void init_logging ( int argc,
char * argv[] )

Optional initialisation of the logging backend.

The log verbosity can be controlled from the command line using -dolfinx_loglevel <level>, where <level> is an integer. Increasing values increase verbosity.

The full loguru API can be used in applications to control the log system. See https://emilk.github.io/loguru/ for the loguru documentation.

Note
The logging backend is loguru (https://github.com/emilk/loguru).
Parameters
[in]argcNumber of command line arguments.
[in]argvCommand line argument vector.

◆ list_timings()

void list_timings ( MPI_Comm comm,
std::set< TimingType > type,
Table::Reduction reduction = Table::Reduction::max )

List a summary of timings and tasks. MPI_AVG reduction is printed.

Parameters
[in]commMPI Communicator
[in]typeSubset of { TimingType::wall, TimingType::user, TimingType::system }
[in]reductionMPI Reduction to apply (min, max or average)

◆ radix_sort()

template<typename T , int BITS = 8>
void radix_sort ( std::span< T > array)

Sort a vector of integers with radix sorting algorithm. The bucket size is determined by the number of bits to sort at a time (2^BITS).

Template Parameters
TIntegral type
BITSThe number of bits to sort at a time.
Parameters
[in,out]arrayThe array to sort.

◆ sort_by_perm()

template<typename T , int BITS = 16>
std::vector< std::int32_t > sort_by_perm ( std::span< const T > x,
std::size_t shape1 )

Compute the permutation array that sorts a 2D array by row.

Parameters
[in]xThe flattened 2D array to compute the permutation array for.
[in]shape1The number of columns of x.
Returns
The permutation array such that x[perm[i]] <= x[perm[i +1]]. @prex.size()must be a multiple ofshape1. @note This function is suitable for small values ofshape1. Each column ofx` is copied into an array that is then sorted.

◆ timing()

std::tuple< std::size_t, double, double, double > timing ( std::string task)

Return timing (count, total wall time, total user time, total system time) for given task.

Parameters
[in]taskName of a task
Returns
The (count, total wall time, total user time, total system time) for the task

◆ timings()

Table timings ( std::set< TimingType > type)

Return a summary of timings and tasks in a Table

Parameters
[in]typesubset of { TimingType::wall, TimingType::user, TimingType::system }
Returns
Table with timings