hp3D::SumFactorization< F > Class Template Reference

Sum factorization for an element matrix. More...

#include <sumfact.hh>

Public Member Functions

template<typename T >
void operator() (concepts::ElementMatrix< F > &em, const concepts::Array< F > &jacobian, T *coeff, const ShapeFunction3D< Real > &u, const ShapeFunction3D< Real > &v)
 Application operator. More...
 

Timing Interface

These functions are used to get timings from class internal computations.

The values are stored in a user defined concepts::InOutParameters structure in different arrays (see setTimings). These arrays can be grouped into a table for easier postprocessing with

table.addMap(concepts::ResultsTable::DOUBLE, "jacobian", output);
table.addMap(concepts::ResultsTable::DOUBLE, "whole_sumfact", output);
std::ofstream ofs("table.gnuplot");
ofs << std::setprecision(20);
concepts::Array< F > sumfact1_
 Intermediate matrices for sum factorization. More...
 
concepts::Array< F > sumfact2_
 Intermediate matrices for sum factorization. More...
 
static concepts::InOutParameterstimings_
 Place to store timing values. More...
 
static uint timeCntr_
 Counter for timing table. More...
 
static void setTimings (concepts::InOutParameters *timings)
 Sets the class to store the timing values in. More...
 
static bool timings ()
 Returns true if the class is able to do timings. More...
 

Detailed Description

template<typename F = Real>
class hp3D::SumFactorization< F >

Sum factorization for an element matrix.

This class is equiped with an interface to get timings of internal computations if compiled accordingly (see bilinearForm.cc file), see setTimings() and timings().

Todo:
Implement changing order of sum factorization, possibility is there
Bug:
If the loops are reordered using a, b and c on line 58, coeff (by use of coeffTmp) is not accessed in the correct order in the first loop to fill sumfact1_.
Author
Philipp Frauenfelder, 2002

Definition at line 44 of file sumfact.hh.

Member Function Documentation

◆ operator()()

template<typename F = Real>
template<typename T >
void hp3D::SumFactorization< F >::operator() ( concepts::ElementMatrix< F > &  em,
const concepts::Array< F > &  jacobian,
T *  coeff,
const ShapeFunction3D< Real > &  u,
const ShapeFunction3D< Real > &  v 
)

Application operator.

Adds the contribution of coeff to em.

Parameters
emElement matrix
jacobianJacobian
coeffCoefficients for the integration
uLeft shape functions
vRight shape functions

◆ setTimings()

template<typename F = Real>
static void hp3D::SumFactorization< F >::setTimings ( concepts::InOutParameters timings)
static

Sets the class to store the timing values in.

Additionally, the timeCntr_ is reset to 0. This counter is used to fill in the values into the arrays listed below in subsequent calls. The following timings are taken and stored in timings:

  • computation of the first intermediate matrix in first_temp
  • computation of the second intermediate matrix in second_temp
  • computation of the element matrix in fill_em

◆ timings()

template<typename F = Real>
static bool hp3D::SumFactorization< F >::timings ( )
static

Returns true if the class is able to do timings.

The ability to do timings depends on a compiler switch in sumfact.cc file.

Member Data Documentation

◆ sumfact1_

template<typename F = Real>
concepts::Array<F> hp3D::SumFactorization< F >::sumfact1_
private

Intermediate matrices for sum factorization.

Definition at line 94 of file sumfact.hh.

◆ sumfact2_

template<typename F = Real>
concepts::Array<F> hp3D::SumFactorization< F >::sumfact2_
private

Intermediate matrices for sum factorization.

Definition at line 94 of file sumfact.hh.

◆ timeCntr_

template<typename F = Real>
uint hp3D::SumFactorization< F >::timeCntr_
staticprivate

Counter for timing table.

Definition at line 99 of file sumfact.hh.

◆ timings_

template<typename F = Real>
concepts::InOutParameters* hp3D::SumFactorization< F >::timings_
staticprivate

Place to store timing values.

Definition at line 97 of file sumfact.hh.


The documentation for this class was generated from the following file:
void addMap(enum mapTypes type, const char *name, const InOutParameters &holder)
Organizes the results in the hashes from InOutParameters in a nice table.
Definition: resultsTable.hh:23
void print(std::ostream &os) const
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich