OptFEM2D  0.1
Matlab optimized FEM2D
 All Files Functions Groups Pages
StiffAssemblingP1OptV1.m File Reference

Assembling Stiff Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report). More...

Go to the source code of this file.

Functions

function R = StiffAssemblingP1OptV1 (nq, nme, q, me, areas)
 Assembling Stiff Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report).
 

Detailed Description

Assembling Stiff Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report).

Definition in file StiffAssemblingP1OptV1.m.

Function Documentation

function R = StiffAssemblingP1OptV1 (   nq,
  nme,
  q,
  me,
  areas 
)

Assembling Stiff Matrix by $P_1$-Lagrange finite elements using "OptV1" version (see report).

The Stiff Matrix is given by

\[\Stiff_{i,j}=\int_\DOMH \DOT{\GRAD\FoncBase_i(\q)}{\GRAD\FoncBase_j(\q)}d\q,\ \forall (i,j)\in\ENS{1}{\nq}^2\]

where $\FoncBase_i$ are $P_1$-Lagrange basis functions.

Example
    Th=SquareMesh(10);
    R=StiffAssemblingP1OptV1(Th.nq,Th.nme,Th.me,Th.q,Th.areas);
See Also
SquareMesh
Author
Francois Cuvelier
Date
2011-11-18
New in 1.1:
(Francois Cuvelier, 2012-11-22) Added doxygen documentation using mtoc++ tool

Copyright (c) 2012, Francois Cuvelier, Gilles Scarella All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted only in compliance with the BSD license, see http://www.opensource.org/licenses/bsd-license.php

Parameters
nqtotal number of nodes of the mesh, also noted $\nq$.
nmenumber of triangles, also noted $\nme$.
q$2\times\nq$ array, ${\q}(\il,j)$ is the $\il$-th coordinate of the $j$-th vertex, $\il\in\{1,2\}$ and $j\in\{1,\hdots,n_q\}.$ Also noted $\q$.
me$3\times\nme$ int32 array, $\me(\jl,k)$ index of storage, in the array $\q$, of the $\jl$-th vertex of the triangle of index $k$, $\jl\in\{1,2,3\}$ and $k\in\{1,\hdots,\nme\}.$ Also noted $\me$.
areas$1\times\nme$ array, areas(k) is the area of triangle k.
Return values
R$\nq\times\nq$ sparse matrix

Definition at line 17 of file StiffAssemblingP1OptV1.m.