Copyright by Benedikt Oswald, 2002-2006, all rights reserved.
Objective: compute local, aka elemental, finite elemental matrices and insert it into the global finite elemental matrix.
Details: this code represents the very connection between the PDE and its discretized formulation based on the the Galerkin approach. The discretization is based on material from the paper in J. F. Lee, IEEE Microwave and Guided Wave Letters, Vol. 4(1), January, 1994, pp. 11-13.
2003 jun 11 ~ 00:00:00 by benedikt oswald
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "gm.h"
#include "ugstruct.h"
#include "misc.h"
#include "ugdevices.h"
#include "commands.h"
#include "cmdint.h"
#include "cmdline.h"
#include "general.h"
#include "np.h"
#include "assemble.h"
#include "quadrature.h"
#include "shapes.h"
#include "idiscretization.h"
Functions | |
INT | AssembleTetrahedronPEC (NP_BASE *base, ELEMENT *t, INT argc, char **argv) |
INT AssembleTetrahedronPEC | ( | NP_BASE * | base, | |
ELEMENT * | t, | |||
INT | argc, | |||
char ** | argv | |||
) |
AssembleTetrahedronPEC - compute local matrices and accumulate them
SYNOPSIS: static int AssembleTetrahedronPEC(...)
PARAMETERS:
DESCRIPTION:
This function constructs the elemental matrices, namely:
[T_ij] e_tt + [R_ij] e_t + [S_ij] e + F_i = 0
/ where [T_ij] = epsilon | w1_i * w1_j dV /
/ where [R_ij] = sigma | w1_i * w1_j dV /
/ where [S_ij] = (1/mu) | ( Nabla x w1_i ) * ( Nabla x w1_j ) dV /
/ where [F_i] = | w1_i ) * d/dt J_0 dV /
with J_0 defined as the impressed or forced current with [T_ij] and [R_ij] being scaled versions of the same integral expression
SEE ALSO: diff2d, assemble
RETURN VALUE: INT
FE_OK if ok FE_NOT_TETRAHEDRON if not tetrahedron FE_BAD_TRAFO if bad trafo FE_NO_CONNECTION if no connection
construct elemental matrices [T_ij] and [R_ij], therefore double loop over the edges (ei,ej) of the current tetrahedron; carry out Gaussian quadrature within the doubly nested loop forevery combination of the edges of a tetrahedron; there is some optimization potential because the matrix is symmetrix and it has not yet been exploited.