H2Lib  3.0
tet3dp1.h
Go to the documentation of this file.
1 
2 /* ------------------------------------------------------------
3  * This is the file "tet3dp1.h" of the H2Lib package.
4  * All rights reserved, Steffen Boerm 2015
5  * ------------------------------------------------------------ */
6 
10 #ifndef TET3DP1_H
11 #define TET3DP1_H
12 
20 typedef struct _tet3dp1 tet3dp1;
21 
23 typedef tet3dp1 *ptet3dp1;
24 
26 typedef const tet3dp1 *pctet3dp1;
27 
28 #include "sparsematrix.h"
29 #include "tet3d.h"
30 #include "clustergeometry.h"
31 
46 struct _tet3dp1 {
49 
52 
55 
57  bool *is_dof;
58 
62 };
63 
73 
77 HEADER_PREFIX void
79 
95 
113 
129  pctet3dref rf);
130 
140 HEADER_PREFIX void
143 
153 HEADER_PREFIX void
156 
172 HEADER_PREFIX void
174  field (*f)(const real *x, void *fdata), void *fdata,
175  pavector d);
176 
189 HEADER_PREFIX void
191  field (*f)(const real *x, void *fdata), void *fdata,
192  pavector b);
193 
208  field (*f)(const real *x, void *fdata), void *fdata,
209  pavector xs);
210 
226  field (*f)(const real *x, void *fdata), void *fdata,
227  pcavector xs, pcavector xf);
228 
229 /* ------------------------------------------------------------
230  Clustergeometry
231  ------------------------------------------------------------ */
232 
244 
245 
248 #endif
Representation of the refinement relationship between two meshes.
Definition: tet3d.h:274
ptet3dp1 new_tet3dp1(pctet3d gr)
Create a tet3dp1 object using a tet3d mesh.
uint nfix
Number of fixed vertices.
Definition: tet3dp1.h:54
Definition: avector.h:39
void del_tet3dp1(ptet3dp1 dc)
Delete a tet3dp1 object.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
bool * is_dof
Determines whether a vertex is a degree of freedom or fixed.
Definition: tet3dp1.h:57
uint ndof
Number of degrees of freedom.
Definition: tet3dp1.h:51
double _Complex field
Field type.
Definition: settings.h:171
Representation of a clustergeometry object.
Definition: clustergeometry.h:45
void assemble_tet3dp1_mass_sparsematrix(pctet3dp1 dc, psparsematrix M, psparsematrix Mf)
Assemble mass matrix.
real norml2_tet3dp1(pctet3dp1 dc, field(*f)(const real *x, void *fdata), void *fdata, pcavector xs, pcavector xf)
Compute the -norm of the discretization error.
Representation of a three-dimensional tetrahedral mesh.
Definition: tet3d.h:56
void assemble_tet3dp1_dirichlet_avector(pctet3dp1 dc, field(*f)(const real *x, void *fdata), void *fdata, pavector d)
Discretize Dirichlet boundary values.
void assemble_tet3dp1_functional_avector(pctet3dp1 dc, field(*f)(const real *x, void *fdata), void *fdata, pavector b)
Discretize an -functional.
uint * idx2dof
Consecutive indices for all degrees of freedom and all fixed vertices.
Definition: tet3dp1.h:61
const tet3dp1 * pctet3dp1
Pointer to a constant tet3dp1 object.
Definition: tet3dp1.h:26
Representation of a trial space with piecewise linear nodal basis functions on a three-dimensional te...
Definition: tet3dp1.h:46
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
psparsematrix build_tet3dp1_sparsematrix(pctet3dp1 dc)
Create a sparsematrix with a sparsity pattern matching the nodal basis functions. ...
pctet3d gr
Tetrahedral mesh, represented by tet3d object.
Definition: tet3dp1.h:48
pclustergeometry build_tet3dp1_clustergeometry(pctet3dp1 p1, uint *idx)
Create a clustergeometry object for a FEM-discretisation with p1-functions.
psparsematrix build_tet3dp1_interaction_sparsematrix(pctet3dp1 dc)
Create a sparsematrix with a sparsity pattern matching the nodal basis functions. ...
Representation of a sparse matrix in compressed row format.
Definition: sparsematrix.h:42
real normmax_tet3dp1(pctet3dp1 dc, field(*f)(const real *x, void *fdata), void *fdata, pavector xs)
Compute the vertex-wise maximum norm of the discretization error.
void assemble_tet3dp1_laplace_sparsematrix(pctet3dp1 dc, psparsematrix A, psparsematrix Af)
Assemble stiffness matrix.
psparsematrix build_tet3dp1_prolongation_sparsematrix(pctet3dp1 dfine, pctet3dp1 dcoarse, pctet3dref rf)
Create a prolongation matrix.
tet3dp1 * ptet3dp1
Pointer to a tet3dp1 object.
Definition: tet3dp1.h:23