H2Lib  3.0
tri2dp1.h
Go to the documentation of this file.
1 
2 /* ------------------------------------------------------------
3  * This is the file "tri2dp1.h" of the H2Lib package.
4  * All rights reserved, Nadine Albrecht 2015
5  * ------------------------------------------------------------ */
6 
10 #ifndef TRI2DP1_H
11 #define TRI2DP1_H
12 
20 typedef struct _tri2dp1 tri2dp1;
21 
23 typedef tri2dp1 *ptri2dp1;
24 
26 typedef const tri2dp1 *pctri2dp1;
27 
28 #include "sparsematrix.h"
29 #include "tri2d.h"
30 #include "clustergeometry.h"
31 
46 struct _tri2dp1
47 {
50 
53 
56 
58  bool *is_dof;
59 
63 };
64 
74 
78 HEADER_PREFIX void
80 
96 
114 
130  pctri2dref rf);
131 
141 HEADER_PREFIX void
143 
153 HEADER_PREFIX void
155 
171 HEADER_PREFIX void
173  field (*d)(const real *x, void *fdata), void *fdata,
174  pavector dv);
175 
188 HEADER_PREFIX void
190  field (*f)(const real *x, void *fdata), void *fdata,
191  pavector fv);
192 
207  field (*u)(const real *x, void *fdata), void *fdata,
208  pavector xs);
209 
210 
226  field (*f)(const real *x, void *fdata), void *fdata,
227  pcavector xs, pcavector xf);
228 
229 
230 /* ------------------------------------------------------------
231  Clustergeometry
232  ------------------------------------------------------------ */
233 
245 
246 
249 #endif
psparsematrix build_tri2dp1_prolongation_sparsematrix(pctri2dp1 dfine, pctri2dp1 dcoarse, pctri2dref rf)
Create a prolongation matrix.
void del_tri2dp1(ptri2dp1 dc)
Delete a tri2p1 object.
void assemble_tri2dp1_laplace_sparsematrix(pctri2dp1 dc, psparsematrix A, psparsematrix Af)
Assemble stiffness matrix.
const tri2dp1 * pctri2dp1
Pointer to a constant tri2p1 object.
Definition: tri2dp1.h:26
real norml2_tri2dp1(pctri2dp1 dc, field(*f)(const real *x, void *fdata), void *fdata, pcavector xs, pcavector xf)
Compute the -norm of the discretization error.
bool * is_dof
Determines whether a vertex is a degree of freedom.
Definition: tri2dp1.h:58
void assemble_tri2dp1_dirichlet_avector(pctri2dp1 dc, field(*d)(const real *x, void *fdata), void *fdata, pavector dv)
Discretize Dirichlet boundary values.
Definition: avector.h:39
uint nfix
Number of fixed vertices.
Definition: tri2dp1.h:55
pctri2d t2
Triangular Mesh, represented by tri2d object.
Definition: tri2dp1.h:49
void assemble_tri2dp1_mass_sparsematrix(pctri2dp1 dc, psparsematrix M, psparsematrix Mf)
Assemble mass matrix.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
Representation of a two-dimensional triangular mesh.
Definition: tri2d.h:56
Representation of the refinement relationship between two meshes.
Definition: tri2d.h:203
pclustergeometry build_tri2dp1_clustergeometry(pctri2dp1 p1, uint *idx)
Create a clustergeometry object for a FEM-discretisation with p1-functions.
double _Complex field
Field type.
Definition: settings.h:171
Representation of a clustergeometry object.
Definition: clustergeometry.h:45
uint ndof
Number of degrees of freedom.
Definition: tri2dp1.h:52
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
ptri2dp1 new_tri2dp1(pctri2d gr)
Create a tri2p1 object using a tri2d mesh.
psparsematrix build_tri2dp1_interaction_sparsematrix(pctri2dp1 dc)
Create a sparsematrix with a sparsity pattern matching the nodal basis functions representing the int...
psparsematrix build_tri2dp1_sparsematrix(pctri2dp1 dc)
Create a sparsematrix with a sparsity pattern matching the nodal basis functions representing the sys...
real normmax_tri2dp1(pctri2dp1 dc, field(*u)(const real *x, void *fdata), void *fdata, pavector xs)
Compute the vertex-wise maximum norm of the discretization error.
tri2dp1 * ptri2dp1
Pointer to a tri2p1 object.
Definition: tri2dp1.h:23
Representation of a sparse matrix in compressed row format.
Definition: sparsematrix.h:42
void assemble_tri2dp1_functional_avector(ptri2dp1 dc, field(*f)(const real *x, void *fdata), void *fdata, pavector fv)
Discretize an -functional.
Representation of a trial space with piecewise linear nodal basis functions on a two-dimensional tria...
Definition: tri2dp1.h:46
uint * idx2dof
Consecutive indices for all degrees of freedom and all fixed vertices.
Definition: tri2dp1.h:62