hp-FEM
Adaptive hp-FEM suite for nano-optics
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hpfem::materials::MaterialMap Class Reference

#include <material.hpp>

Public Member Functions

 MaterialMap (Material background=Material::vacuum())
 
MaterialMap & set (mesh::Tag tag, Material material)
 
const Material & background () const noexcept
 
bool has (mesh::Tag tag) const
 
const Material & at (mesh::Tag tag) const
 Material of a tag, the background if unlisted.
 
MaterialMap & set_cell (Index cell, Material material)
 
void clear_cells ()
 Removes all per-cell overrides.
 
Index num_cell_overrides () const noexcept
 
template<int Dim>
const Material & of_cell (const mesh::Mesh< Dim > &mesh, Index c) const
 Material of cell c of a mesh: the cell's override if set, otherwise its tag's.
 
bool is_isotropic () const
 True if every material of the map (background, tags, cell overrides) is isotropic.
 

Detailed Description

Materials by cell tag; cells whose tag is not listed (including untagged cells) get the background material. Individual cells may override their tag's material (set_cell), e.g. for a temperature-dependent permittivity that varies from cell to cell.

Constructor & Destructor Documentation

◆ MaterialMap()

hpfem::materials::MaterialMap::MaterialMap ( Material  background = Material::vacuum())
inlineexplicit

Member Function Documentation

◆ at()

const Material & hpfem::materials::MaterialMap::at ( mesh::Tag  tag) const

Material of a tag, the background if unlisted.

◆ background()

const Material & hpfem::materials::MaterialMap::background ( ) const
inlinenoexcept

◆ clear_cells()

void hpfem::materials::MaterialMap::clear_cells ( )
inline

Removes all per-cell overrides.

◆ has()

bool hpfem::materials::MaterialMap::has ( mesh::Tag  tag) const
inline

◆ is_isotropic()

bool hpfem::materials::MaterialMap::is_isotropic ( ) const

True if every material of the map (background, tags, cell overrides) is isotropic.

◆ num_cell_overrides()

Index hpfem::materials::MaterialMap::num_cell_overrides ( ) const
inlinenoexcept

◆ of_cell()

template<int Dim>
const Material & hpfem::materials::MaterialMap::of_cell ( const mesh::Mesh< Dim > &  mesh,
Index  c 
) const
inline

Material of cell c of a mesh: the cell's override if set, otherwise its tag's.

◆ set()

MaterialMap & hpfem::materials::MaterialMap::set ( mesh::Tag  tag,
Material  material 
)
Exceptions
InvalidArgumentfor mesh::kNoTag (untagged cells always use the background).

◆ set_cell()

MaterialMap & hpfem::materials::MaterialMap::set_cell ( Index  cell,
Material  material 
)

Overrides the material of one cell (takes precedence over the tag).

Exceptions
InvalidArgumentfor a negative cell index.

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