PolyFEM
Loading...
Searching...
No Matches
polyfem::assembler::AssemblyValsCache Class Reference

Caches basis evaluation and geometric mapping at every element. More...

#include <AssemblyValsCache.hpp>

Public Member Functions

void init (const bool is_volume, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &gbases, const bool is_mass=false)
 computes the basis evaluation and geometric mapping for each of the given ElementBases in bases initializes cache member
 
void compute (const int el_index, const bool is_volume, const basis::ElementBases &basis, const basis::ElementBases &gbasis, ElementAssemblyValues &vals) const
 retrieves cached basis evaluation and geometric for the given element if it doesn't exist, computes and caches it (modifies cache member in the latter case)
 
void clear ()
 
bool is_mass () const
 

Private Attributes

std::vector< ElementAssemblyValuescache
 vector of basis values and geometric mapping with one entry per element
 
bool is_mass_
 

Detailed Description

Caches basis evaluation and geometric mapping at every element.

Definition at line 10 of file AssemblyValsCache.hpp.

Member Function Documentation

◆ clear()

void polyfem::assembler::AssemblyValsCache::clear ( )
inline

Definition at line 22 of file AssemblyValsCache.hpp.

References cache.

Referenced by polyfem::State::build_basis().

Here is the caller graph for this function:

◆ compute()

void polyfem::assembler::AssemblyValsCache::compute ( const int  el_index,
const bool  is_volume,
const basis::ElementBases basis,
const basis::ElementBases gbasis,
ElementAssemblyValues vals 
) const

◆ init()

void polyfem::assembler::AssemblyValsCache::init ( const bool  is_volume,
const std::vector< basis::ElementBases > &  bases,
const std::vector< basis::ElementBases > &  gbases,
const bool  is_mass = false 
)

computes the basis evaluation and geometric mapping for each of the given ElementBases in bases initializes cache member

Definition at line 11 of file AssemblyValsCache.cpp.

References cache, is_mass(), is_mass_, polyfem::utils::maybe_parallel_for(), and quadrature.

Referenced by polyfem::State::build_basis().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_mass()

bool polyfem::assembler::AssemblyValsCache::is_mass ( ) const
inline

Definition at line 27 of file AssemblyValsCache.hpp.

References is_mass_.

Referenced by init(), and polyfem::assembler::RhsAssembler::RhsAssembler().

Here is the caller graph for this function:

Member Data Documentation

◆ cache

std::vector<ElementAssemblyValues> polyfem::assembler::AssemblyValsCache::cache
private

vector of basis values and geometric mapping with one entry per element

Definition at line 30 of file AssemblyValsCache.hpp.

Referenced by clear(), compute(), and init().

◆ is_mass_

bool polyfem::assembler::AssemblyValsCache::is_mass_
private

Definition at line 31 of file AssemblyValsCache.hpp.

Referenced by compute(), init(), and is_mass().


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