PolyFEM
Loading...
Searching...
No Matches
AssemblyValsCache.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace polyfem
6{
7 namespace assembler
8 {
11 {
12 public:
16 void init(const bool is_volume, const std::vector<basis::ElementBases> &bases, const std::vector<basis::ElementBases> &gbases, const bool is_mass = false);
17
20 void compute(const int el_index, const bool is_volume, const basis::ElementBases &basis, const basis::ElementBases &gbasis, ElementAssemblyValues &vals) const;
21
22 void clear()
23 {
24 cache.clear();
25 }
26
27 inline bool is_mass() const { return is_mass_; }
28
29 private:
30 std::vector<ElementAssemblyValues> cache;
32 };
33 } // namespace assembler
34} // namespace polyfem
ElementAssemblyValues vals
Definition Assembler.cpp:22
Caches basis evaluation and geometric mapping at every element.
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 initi...
std::vector< ElementAssemblyValues > cache
vector of basis values and geometric mapping with one entry per element
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,...
stores per element basis values at given quadrature points and geometric mapping
Stores the basis functions for a given element in a mesh (facet in 2d, cell in 3d).