H2Lib  3.0
tri2drt0.h
Go to the documentation of this file.
1 
2 /* ------------------------------------------------------------
3  * This is the file "tri2drt0.h" of the H2Lib package.
4  * All rights reserved, Nadine Albrecht 2015
5  * ------------------------------------------------------------ */
6 
10 #ifndef TRI2DRT0_H
11 #define TRI2DRT0_H
12 
27 typedef struct _tri2drt0 tri2drt0;
28 
31 
33 typedef const tri2drt0 *pctri2drt0;
34 
35 #include "sparsematrix.h"
36 #include "tri2d.h"
37 #include "clustergeometry.h"
38 
39 /* ------------------------------------------------------------
40  Edge-elements for a triangular mesh
41  ------------------------------------------------------------ */
42 
58 struct _tri2drt0
59 {
62 
65 
68 
74 
78 };
79 
80 /* ------------------------------------------------------------
81  Constructors and destructors
82  ------------------------------------------------------------ */
83 
93 
102 HEADER_PREFIX void
104 
108 HEADER_PREFIX void
110 
127 
149 
168 
190 
191 
203 HEADER_PREFIX void
205 
215 HEADER_PREFIX void
217 
218 
230 HEADER_PREFIX void
232  field (*f)(const real *e, void *fdata), void *fdata,
233  pavector d);
234 
246 HEADER_PREFIX void
248  field (*f)(const real *x, void *fdata), void *fdata,
249  pavector fv);
250 
262  field (*f)(const uint *e, void *data), void *data,
263  pavector g);
264 
280  field(*f) (const real * x, void *fdata), void *fdata,
281  pcavector x2);
282 
298  field(*f) (const real * x, void *fdata), void *fdata, pcavector x2);
299 
317  void (*f) (const real * x, void *fdata, pavector v), void *fdata,
318  pcavector x1, pcavector g);
319 
337  void (*f) (const real * x, void *fdata, pavector v), void *fdata,
338  pcavector x1, pcavector g);
339 
340 
341 /* ------------------------------------------------------------
342  Clustergeometry
343  ------------------------------------------------------------ */
344 
357 
369 
371 #endif
void assemble_tri2drt0_b_D_avector(pctri2drt0 dc, field(*f)(const real *e, void *fdata), void *fdata, pavector d)
Discretize Dirichlet boundary values.
psparsematrix build_tri2drt0_A_interaction_sparsematrix(pctri2drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions and ...
pclustergeometry build_tri2drt0_A_clustergeometry(pctri2drt0 rt, uint *idx)
Create a clustergeometry object for the clustering ofthe degrees of freedom (edges).
tri2drt0 * ptri2drt0
Pointer to tri2drt0 object.
Definition: tri2drt0.h:30
uint nfix
Number of fixed edges (here: Neumann edges).
Definition: tri2drt0.h:67
psparsematrix build_tri2drt0_A_sparsematrix(pctri2drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions and ...
Definition: avector.h:39
void del_tri2drt0(ptri2drt0 dc)
Delete a tri2drt0 object.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
Representation of a two-dimensional triangular mesh.
Definition: tri2d.h:56
void update_tri2drt0(ptri2drt0 rt0)
Update the numbers of degrees of freedoms and fixed edges after mixed boundary conditions were set...
uint * is_dof
Determines whether an edge is a degree of freedom or fixed.
Definition: tri2drt0.h:73
double _Complex field
Field type.
Definition: settings.h:171
psparsematrix build_tri2drt0_B_sparsematrix(pctri2drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions for ...
Representation of a clustergeometry object.
Definition: clustergeometry.h:45
const tri2drt0 * pctri2drt0
Pointer to a constant tri2drt0 object.
Definition: tri2drt0.h:33
real norml2_pressure_centroid_tri2drt0(pctri2drt0 dc, field(*f)(const real *x, void *fdata), void *fdata, pcavector x2)
Compute the -norm of the discretization error for the pressure using the midpoint rule...
void assemble_tri2drt0_darcy_A_sparsematrix(pctri2drt0 dc, psparsematrix A, psparsematrix Af, pavector K)
Assemble the upper left block of the system matrix.
void assemble_tri2drt0_g_N_avector(ptri2drt0 dc, field(*f)(const uint *e, void *data), void *data, pavector g)
Discretize Neumann Boundary values.
ptri2drt0 new_tri2drt0(pctri2d rt)
Create a tri2drt0 object using a tri2d mesh.
Representation of a trial space with lowest order Raviart-Thomas basis functions on a two-dimensional...
Definition: tri2drt0.h:58
void assemble_tri2drt0_darcy_B_sparsematrix(pctri2drt0 dc, psparsematrix A, psparsematrix Af)
Assemble the lower left block of the system matrix.
psparsematrix build_tri2drt0_B_interaction_sparsematrix(pctri2drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions for ...
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
uint * idx2dof
Consecutive indices for all degrees of freedom and all fixed edges.
Definition: tri2drt0.h:77
void assemble_tri2drt0_b_f_avector(ptri2drt0 dc, field(*f)(const real *x, void *fdata), void *fdata, pavector fv)
Discretize an -functional.
real norml2_flux_centroid_tri2drt0(pctri2drt0 dc, void(*f)(const real *x, void *fdata, pavector v), void *fdata, pcavector x1, pcavector g)
Compute the -norm of the discretization error for the flux using the midpoint rule.
pclustergeometry build_tri2drt0_B_clustergeometry(pctri2drt0 rt, uint *idx)
Create a clustergeometry object for the clustering of the triangles.
pctri2d t2
Triangular mesh, represented by tri2d object.
Definition: tri2drt0.h:61
real norml2_flux_edgemidpoint_tri2drt0(pctri2drt0 dc, void(*f)(const real *x, void *fdata, pavector v), void *fdata, pcavector x1, pcavector g)
Compute the -norm of the discretization error for the flux using the edge midpoint rule...
Representation of a sparse matrix in compressed row format.
Definition: sparsematrix.h:42
real norml2_pressure_edgemidpoint_tri2drt0(pctri2drt0 dc, field(*f)(const real *x, void *fdata), void *fdata, pcavector x2)
Compute the -norm of the discretization error for the pressure using the edge midpoint rule...
uint ndof
Number of degrees of freedom (here: inner edges + Dirichlet edges).
Definition: tri2drt0.h:64