-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMatrix_Assembler.h
More file actions
53 lines (40 loc) · 1.72 KB
/
Matrix_Assembler.h
File metadata and controls
53 lines (40 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// Created by simonepanzeri on 26/11/2021.
//
#ifndef DEV_FDAPDE_MATRIX_ASSEMBLER_H
#define DEV_FDAPDE_MATRIX_ASSEMBLER_H
#include "FdaPDE.h"
#include "Mesh_Objects.h"
#include "Spline.h"
#include "Param_Functors.h"
#include "Pde_Expression_Templates.h"
#include "Finite_Element.h"
#include "Integration.h"
//Forward declarations to avoid unnecessary includes
template <UInt ORDER, UInt mydim, UInt ndim>
class MeshHandler;
template <UInt ORDER, UInt mydim, UInt ndim>
class FiniteElement;
template<typename A>
class EOExpr;
//!A Assembler class: discretize a generic differential operator in a sparse matrix
//template<UInt mydim, UInt ndim>
struct Assembler{
//! A template member taking three arguments: discretize differential operator
/*!
* \param oper is a template expression : the differential operator to be discretized.
* \param mesh is const reference to a MeshHandler<ORDER,2,2>: the mesh where we want to discretize the operator.
* \param fe is a const reference to a FiniteElement
* stores the discretization in SPoper_mat_
*/
//Return triplets vector
template<UInt ORDER, UInt mydim, UInt ndim, typename A>
static void operKernel(EOExpr<A> oper, const MeshHandler<ORDER,mydim,ndim>& mesh,
FiniteElement<ORDER,mydim,ndim>& fe, SpMat& OpMat);
template<UInt ORDER, UInt mydim, UInt ndim>
static void forcingTerm(const MeshHandler<ORDER,mydim,ndim>& mesh, FiniteElement<ORDER,mydim,ndim>& fe, const ForcingTerm& u, VectorXr& forcingTerm);
template<UInt DEGREE, UInt ORDER_DERIVATIVE>
static void operKernel(const Spline<DEGREE, ORDER_DERIVATIVE>& spline, SpMat& OpMat);
};
#include "Matrix_Assembler_imp.h"
#endif //DEV_FDAPDE_MATRIX_ASSEMBLER_H