Dune::Copasi
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions | Variables
Dune::Copasi Namespace Reference

Namespaces

namespace  Concept
 
namespace  DiffusionReaction
 
namespace  ISTL
 

Classes

class  BitFlags
 Bit flags for enumerators. More...
 
class  BoundaryEntityMapper
 Mapper of boundary entities. More...
 
class  CellData
 Container for cell data of a grid view. More...
 
class  Constraints
 Constraints parser and operator for a leaf basis. More...
 
class  ExprTkParser
 
class  FunctorFactory
 
class  FunctorFactoryParser
 
struct  is_bitflags
 Bitflag indicator. More...
 
class  LinearSolver
 
class  LocalBasisCache
 This class describes a local basis cache. More...
 
struct  LocalDomain
 
class  LocalEquations
 
struct  Model
 
struct  ModelMultiCompartmentPkTraits
 
class  MuParser
 
class  OStreamRedirect
 Helper class to redirect std::ostream to a functor. More...
 
class  ParameterizedObjectFactoryWrapper
 simple wrapper that captures and exposes the keys of Dune::ParameterizedObjectFactory More...
 
class  Parser
 
class  ParserContext
 
class  SimpleAdaptiveStepper
 Adapt an stepper into a simple adaptive time stepper. More...
 
class  SymEngineParser
 
struct  TIFFFile
 Simple tiff file interface. More...
 
class  TIFFGrayscale
 This class describes a tiff grayscale. More...
 
class  TimeStepper
 Simple time stepper of one-step operators. More...
 

Enumerations

enum class  ParserType {
  None , SymEngine , SymEngineSBML , MuParser ,
  ExprTk
}
 

Functions

template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, BitFlags< Enum > > operator| (Enum lhs, Enum rhs)
 Bitwise or between two enums that may be bitflags.
 
template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, BitFlags< Enum > > operator& (Enum lhs, Enum rhs)
 Bitwise and between two enums that may be bitflags.
 
template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, BitFlags< Enum > > operator^ (Enum lhs, Enum rhs)
 Bitwise xor between two enums that may be bitflags.
 
template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, booloperator== (Enum lhs, Enum rhs)
 Return true if all flags of both enums (allowed to be bitflags) are equal.
 
template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, booloperator!= (Enum lhs, Enum rhs)
 
template<typename Exception , typename... Args>
auto format_exception (Exception &&e, fmt::format_string< Args... > format, Args &&... args)
 
auto ostream2spdlog ()
 Standard output redirection to spdlog.
 
template<Dune::Concept::GridView GV, class T >
void cell_data_parser (const ParameterTree &grid_config, CellData< GV, T > &cell_data)
 Parse data file with cell data and add its values to cell data.
 
template<class GridView >
std::enable_if_t< Capabilities::hasSingleGeometryType< typename GridView::Grid >::v, bool > constexpr has_single_geometry_type (const GridView &)
 Determines if grid view has a single geometry type.
 
template<class GridView >
std::enable_if_t< not Capabilities::hasSingleGeometryType< typename GridView::Grid >::v, boolhas_single_geometry_type (const GridView &grid_view)
 Determines if grid view has a single geometry type.
 
template<Concept::MultiDomainGrid MDGrid, class CellDataType = double>
std::tuple< std::unique_ptr< MDGrid >, std::unique_ptr< CellData< typename MDGrid::LevelGridView, CellDataType > > > make_multi_domain_grid_with_cell_data (Dune::ParameterTree &config, std::shared_ptr< const ParserContext > parser_context={})
 Creates a multi domain grid from a config file From given configuration file with grid and compartment section as described in the program documentation (–grid.* and –compartment.*), this funcition will read or create a grid and its sub-domains (or compartments). It will also assign a unique subdomain 'id' to each compartment in the configuration file. Finally, it will create a cell data with the contents of the gmsh_id if the file was read by gmsh, and the data files parsed with cell_data_parser.
 
template<Concept::MultiDomainGrid MDGrid>
std::unique_ptr< MDGridmake_multi_domain_grid (Dune::ParameterTree &config, std::shared_ptr< const ParserContext > parser_context={})
 Creates a multi domain grid from a config file From given configuration file with grid and compartment section as described in the program documentation (–grid.* and –compartment.*), this funcition will read or create a grid and its sub-domains (or compartments). It will also assign a unique subdomain 'id' to each compartment in the configuration file. Finally, it will create a cell data with the contents of the gmsh_id if the file was read by gmsh, and the data files parsed with cell_data_parser.
 
template<int dim>
void mark_stripes (UGGrid< dim > &grid, bool mark_others=true)
 Mark stripes for refinement.
 
std::unique_ptr< Parsermake_parser (ParserType parser_type=default_parser)
 
std::unique_ptr< Parsermake_parser (std::string_view parser_type)
 

Variables

std::vector< std::string > axis_names
 
template<class T >
constexpr bool is_bitflags_v = is_bitflags<T>::value
 Alias for Bitflag indicator.
 
const ParserType default_parser
 

Enumeration Type Documentation

◆ ParserType

Enumerator
None 
SymEngine 
SymEngineSBML 
MuParser 
ExprTk 

Function Documentation

◆ cell_data_parser()

template<Dune::Concept::GridView GV, class T >
void Dune::Copasi::cell_data_parser ( const ParameterTree & grid_config,
CellData< GV, T > & cell_data )

Parse data file with cell data and add its values to cell data.

The format of the file is documented in the config_opts.json. In particular, the cell index set in the file will be assigned to the index set of the grid view used to construct the cell data object. This means that this is mostly useful for leaf grid views and level 0 grid vies. Be careful to choose the correct one!

Author
Dylan Vermoortele
Template Parameters
GVThe grid view type
TThe type of the cell data values
Parameters
grid_configA config containing sub-sections with the paths for each cell data file
cell_dataA cell data object to store the parsed cell data

◆ format_exception()

template<typename Exception , typename... Args>
auto Dune::Copasi::format_exception ( Exception && e,
fmt::format_string< Args... > format,
Args &&... args )
inline

◆ has_single_geometry_type() [1/2]

template<class GridView >
std::enable_if_t< Capabilities::hasSingleGeometryType< typename GridView::Grid >::v, bool > constexpr Dune::Copasi::has_single_geometry_type ( const GridView & )
constexpr

Determines if grid view has a single geometry type.

If the grid only knows about one geometry type at compile-time, this function is constexpr and always true. Notice however, that the countrary does not hold and the check is done at run-time.

Parameters
[in]grid_viewThe grid view
Template Parameters
GridViewThe grid view type
Returns
True if single geometry type, False otherwise.

◆ has_single_geometry_type() [2/2]

template<class GridView >
std::enable_if_t< not Capabilities::hasSingleGeometryType< typename GridView::Grid >::v, bool > Dune::Copasi::has_single_geometry_type ( const GridView & grid_view)

Determines if grid view has a single geometry type.

If the grid only knows about one geometry type at compile-time, this function is constexpr and always true. Notice however, that the countrary does not hold and the check is done at run-time.

Parameters
[in]grid_viewThe grid view
Template Parameters
GridViewThe grid view type
Returns
True if single geometry type, False otherwise.

◆ make_multi_domain_grid()

template<Concept::MultiDomainGrid MDGrid>
std::unique_ptr< MDGrid > Dune::Copasi::make_multi_domain_grid ( Dune::ParameterTree & config,
std::shared_ptr< const ParserContext > parser_context = {} )

Creates a multi domain grid from a config file From given configuration file with grid and compartment section as described in the program documentation (–grid.* and –compartment.*), this funcition will read or create a grid and its sub-domains (or compartments). It will also assign a unique subdomain 'id' to each compartment in the configuration file. Finally, it will create a cell data with the contents of the gmsh_id if the file was read by gmsh, and the data files parsed with cell_data_parser.

Template Parameters
MDGridThe type of the multidomain-grid
CellDataTypeThe type to store values in the cell data object
Parameters
configThe configuration file
parser_contextA parser context to interpret parsed math expression
Returns
std::pair<std::unique_ptr<MDGrid>, std::unique_ptr<CellData<typename MDGrid::LevelGridView, CellDataType>>> Pointer to the resulting grid and cell data
std::unique_ptr<MDGrid> Pointer to the resulting grid

◆ make_multi_domain_grid_with_cell_data()

template<Concept::MultiDomainGrid MDGrid, class CellDataType = double>
std::tuple< std::unique_ptr< MDGrid >, std::unique_ptr< CellData< typename MDGrid::LevelGridView, CellDataType > > > Dune::Copasi::make_multi_domain_grid_with_cell_data ( Dune::ParameterTree & config,
std::shared_ptr< const ParserContext > parser_context = {} )

Creates a multi domain grid from a config file From given configuration file with grid and compartment section as described in the program documentation (–grid.* and –compartment.*), this funcition will read or create a grid and its sub-domains (or compartments). It will also assign a unique subdomain 'id' to each compartment in the configuration file. Finally, it will create a cell data with the contents of the gmsh_id if the file was read by gmsh, and the data files parsed with cell_data_parser.

Template Parameters
MDGridThe type of the multidomain-grid
CellDataTypeThe type to store values in the cell data object
Parameters
configThe configuration file
parser_contextA parser context to interpret parsed math expression
Returns
std::pair<std::unique_ptr<MDGrid>, std::unique_ptr<CellData<typename MDGrid::LevelGridView, CellDataType>>> Pointer to the resulting grid and cell data

◆ make_parser() [1/2]

std::unique_ptr< Parser > Dune::Copasi::make_parser ( ParserType parser_type = default_parser)

◆ make_parser() [2/2]

std::unique_ptr< Parser > Dune::Copasi::make_parser ( std::string_view parser_type)

◆ mark_stripes()

template<int dim>
void Dune::Copasi::mark_stripes ( UGGrid< dim > & grid,
bool mark_others = true )

Mark stripes for refinement.

If a cube element is surrounded by non-cubes in opposite sides such cube is understood to be part of a stripe of cubes. In such case, this method should mark the grid such that a stripe is a stripe after refinement (e.g. refine in the direction of perpendicular to the non cubes)

Parameters
gridThe grid
[in]mark_othersIf true, mark non-stripe entities for refinement.
Template Parameters
dimDimension of the grid

◆ operator!=()

template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, bool > Dune::Copasi::operator!= ( Enum lhs,
Enum rhs )
inlineconstexpr

Return true if any flags of both enums (allowed to be bitflags) are different

◆ operator&()

template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, BitFlags< Enum > > Dune::Copasi::operator& ( Enum lhs,
Enum rhs )
inlineconstexpr

Bitwise and between two enums that may be bitflags.

◆ operator==()

template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, bool > Dune::Copasi::operator== ( Enum lhs,
Enum rhs )
inlineconstexpr

Return true if all flags of both enums (allowed to be bitflags) are equal.

◆ operator^()

template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, BitFlags< Enum > > Dune::Copasi::operator^ ( Enum lhs,
Enum rhs )
inlineconstexpr

Bitwise xor between two enums that may be bitflags.

◆ operator|()

template<class Enum >
constexpr std::enable_if_t< is_bitflags_v< Enum >, BitFlags< Enum > > Dune::Copasi::operator| ( Enum lhs,
Enum rhs )
inlineconstexpr

Bitwise or between two enums that may be bitflags.

◆ ostream2spdlog()

auto Dune::Copasi::ostream2spdlog ( )
inline

Standard output redirection to spdlog.

During the lifetime of the obtained object, it will redirect every character streamed to std::cout, std::cerr, and std::clog towards the spdlog logging system

Variable Documentation

◆ axis_names

std::vector<std::string> Dune::Copasi::axis_names
extern

◆ default_parser

const ParserType Dune::Copasi::default_parser
extern

◆ is_bitflags_v

template<class T >
constexpr bool Dune::Copasi::is_bitflags_v = is_bitflags<T>::value
constexpr

Alias for Bitflag indicator.