H2Lib  3.0
tet3drt0.h
Go to the documentation of this file.
1 
2 /* ------------------------------------------------------------
3  * This is the file "tet3drt0.h" of the H2Lib package.
4  * All rights reserved, Nadine Albrecht 2015
5  * ------------------------------------------------------------ */
6 
10 #ifndef TET3DRT0_H
11 #define TET3DRT0_H
12 
26 typedef struct _tet3drt0 tet3drt0;
27 
30 
32 typedef const tet3drt0 *pctet3drt0;
33 
34 #include "sparsematrix.h"
35 #include "tet3d.h"
36 #include "clustergeometry.h"
37 
38 /* ------------------------------------------------------------
39  Edge-elements for a tetrahedral mesh
40  ------------------------------------------------------------ */
41 
57 struct _tet3drt0
58 {
61 
64 
67 
73 
76 };
77 
87 
96 HEADER_PREFIX void
98 
102 HEADER_PREFIX void
104 
121 
143 
162 
163 
185 
197 HEADER_PREFIX void
199 
209 HEADER_PREFIX void
211 
223 HEADER_PREFIX void
225  field (*f)(const real *e, void *fdata), void *fdata,
226  pavector d);
227 
228 
240 HEADER_PREFIX void
242  field (*f)(const real *x, void *fdata), void *fdata,
243  pavector fv);
244 
256  field (*f)(const uint *e, void *data), void *data,
257  pavector g);
258 
274  field(*f) (const real * x, void *fdata), void *fdata,
275  pcavector x2);
276 
292  field(*f) (const real * x, void *fdata), void *fdata, pcavector x2);
293 
311  void (*q) (const real * x, void *fdata, pavector v), void *fdata,
312  pcavector x1, pcavector g);
313 
331  void (*q) (const real * x, void *fdata, pavector v), void *fdata,
332  pcavector x1, pcavector g);
333 
334 
335 /* ------------------------------------------------------------
336  Clustergeometry
337  ------------------------------------------------------------ */
338 
351 
363 
365 #endif
Representation of a trial space with lowest order Raviart-Thomas basis functions on a three-dimension...
Definition: tet3drt0.h:57
void assemble_tet3drt0_darcy_B_sparsematrix(pctet3drt0 dc, psparsematrix A, psparsematrix Af)
Assemble the lower left block of the system matrix.
Definition: avector.h:39
real norml2_pressure_facemidpoint_tet3drt0(pctet3drt0 dc, field(*f)(const real *x, void *fdata), void *fdata, pcavector x2)
Compute the -norm of the discretization error for the pressure using the centroid rule...
void update_tet3drt0(ptet3drt0 rt0)
Update the numbers of degrees of freedoms and fixed faces after mixed boundary conditions were set...
void del_tet3drt0(ptet3drt0 rt)
Delete a tet3drt0 object.
unsigned uint
Unsigned integer type.
Definition: settings.h:70
const tet3drt0 * pctet3drt0
Pointer to a constant tet3drt0 object.
Definition: tet3drt0.h:32
double _Complex field
Field type.
Definition: settings.h:171
Representation of a clustergeometry object.
Definition: clustergeometry.h:45
pctet3d t3
Triangular mesh, represented by tet3d object.
Definition: tet3drt0.h:60
void assemble_tet3drt0_b_D_avector(pctet3drt0 dc, field(*f)(const real *e, void *fdata), void *fdata, pavector d)
Discretize Dirichlet boundary values.
uint * is_dof
Determines whether an face is a degree or freedom or fixed.
Definition: tet3drt0.h:72
psparsematrix build_tet3drt0_B_interaction_sparsematrix(pctet3drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions for ...
uint * idx2dof
Consecutive indices for all degrees of freedom and all fixed faces.
Definition: tet3drt0.h:75
psparsematrix build_tet3drt0_A_interaction_sparsematrix(pctet3drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions and ...
Representation of a three-dimensional tetrahedral mesh.
Definition: tet3d.h:56
real norml2_pressure_centroid_tet3drt0(pctet3drt0 dc, field(*f)(const real *x, void *fdata), void *fdata, pcavector x2)
Compute the -norm of the discretization error for the pressure using the centroid rule...
ptet3drt0 new_tet3drt0(pctet3d gr)
Create a tet3drt0 object using a tet3d mesh.
void assemble_tet3drt0_darcy_A_sparsematrix(pctet3drt0 dc, psparsematrix A, psparsematrix Af, pavector K)
Assemble the upper left block of the system matrix.
void assemble_tet3drt0_g_N_avector(ptet3drt0 dc, field(*f)(const uint *e, void *data), void *data, pavector g)
Discretize Neumann Boundary values.
#define HEADER_PREFIX
Prefix for function declarations.
Definition: settings.h:43
double real
real floating point type.
Definition: settings.h:97
void assemble_tet3drt0_b_f_avector(ptet3drt0 dc, field(*f)(const real *x, void *fdata), void *fdata, pavector fv)
Discretize an -functional.
real norml2_flux_facemidpoint_tet3drt0(pctet3drt0 dc, void(*q)(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 face midpoint rule...
pclustergeometry build_tet3drt0_B_clustergeometry(pctet3drt0 rt, uint *idx)
Create a clustergeometry object for the clustering of the triangles.
real norml2_flux_centroid_tet3drt0(pctet3drt0 dc, void(*q)(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 centroid rule.
uint ndof
Number of degrees of freedom.
Definition: tet3drt0.h:63
Representation of a sparse matrix in compressed row format.
Definition: sparsematrix.h:42
psparsematrix build_tet3drt0_A_sparsematrix(pctet3drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions and ...
uint nfix
Number of fixed faces.
Definition: tet3drt0.h:66
pclustergeometry build_tet3drt0_A_clustergeometry(pctet3drt0 rt, uint *idx)
Create a clustergeometry object for the clustering ofthe degrees of freedom (edges).
psparsematrix build_tet3drt0_B_sparsematrix(pctet3drt0 dc)
Create a sparsematrix with a sparsity pattern matching the lowest order Raviart-Thomas functions for ...
tet3drt0 * ptet3drt0
Pointer to tet3drt0 object.
Definition: tet3drt0.h:29