KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MatUtils Class Reference

MatUtils: Matrix utility functions. More...

Detailed Description

MatUtils: Matrix utility functions.

New in 0.1:
(Daniel Wirtz, 2010-06-02) Added this class.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 17 of file MatUtils.m.

Static Public Member Functions

static function [
A ,
idxmat ] = 
laplacemat (h, d1, d2)
 Computes a 2D diffusion sparse matrix with zero neuman boundary conditions. More...
 
static function matrix
< double > A = 
divcdivumat (px, py, gradc)
 Computes the 2D matrix for the expression \(\nabla c(x) \cdot \nabla u\) arising in the general spatial-dependent diffusion term \(\nabla\cdot(c(x)\nabla u(x))\). More...
 
static function A = laplacemat3D (h, g)
 Computes a 3D laplacian sparse matrix. More...
 
static function A = generalizedLaplacemat3D (h, g, sigma)
 Computes a 3D generalized laplacian sparse matrix \(\nabla\cdot\sigma\nabla\). More...
 
static function Kinv = getExtendedInverse (Kinv, v, mode)
 For a matrix K with known inverse Kinv the matrix is extended by the vector. More...
 
static function
Asparse = 
toSparse (matrix< double > A,rowvec< integer > rowidx, n)
 Converts a full matrix A to a sparse matrix, where the entries of A are split up to the row indices specified by rowidx. More...
 
static function res = test_DivCDivUMat ()
 
static function  test_ExtendedInverseDirect ()
 Tests direct inversion extension for a matrix of size s for a fixed number of experiments each. More...
 
static function  test_ExtendedInverseSequential ()
 

Member Function Documentation

function matrix< double > A = MatUtils.divcdivumat (   px,
  py,
  gradc 
)
static

Computes the 2D matrix for the expression \(\nabla c(x) \cdot \nabla u\) arising in the general spatial-dependent diffusion term \(\nabla\cdot(c(x)\nabla u(x))\).

The coordinates in px and py have to be equally spaced, e.g. meshgrid'ed. Further the coordinate system origin is assumed to be in the top left corner, so x+ to the right and y+ to the bottom (accorcind

Arguments
px: Matrix of x coordinates py: Matrix of y coordinates gradc: Function handle \(\R^2 \to \R^2\) for gradient evaluation of \(grad c(x)\) function at points [px;py].
Author
Daniel Wirtz
Date
2014-04-07
Return values
AThe matrix with discretized entries

Definition at line 104 of file MatUtils.m.

References k, and t.

Referenced by test_DivCDivUMat().

Here is the caller graph for this function:

function A = MatUtils.generalizedLaplacemat3D (   h,
  g,
  sigma 
)
static

Computes a 3D generalized laplacian sparse matrix \(\nabla\cdot\sigma\nabla\).

Arguments
h: discretization spatial stepwidth in all three directions g: the general.geometry.RectGrid3D instance describing the geometry. sigma: the conductivity tensor, assumed to be diagonal
Author
Timm Strecker
Date
2014-03-20
Required fields of g:

Definition at line 304 of file MatUtils.m.

References k.

function Kinv = MatUtils.getExtendedInverse (   Kinv,
  v,
  mode 
)
static

For a matrix K with known inverse Kinv the matrix is extended by the vector.

Documentation Update:

Definition at line 424 of file MatUtils.m.

References t.

Referenced by test_ExtendedInverseDirect(), and test_ExtendedInverseSequential().

Here is the caller graph for this function:

function [ A , idxmat ] = MatUtils.laplacemat (   h,
  d1,
  d2 
)
static

Computes a 2D diffusion sparse matrix with zero neuman boundary conditions.

Arguments
h - discretization spatial stepwidth d1 - region dimension 1 (steps in [0 d1*h]) d2 - region dimension 2 (steps in [0 d2*h])
Author
Daniel Wirtz
Date
11.03.2010

Definition at line 34 of file MatUtils.m.

References t.

Referenced by models.pcd.PCDSystem2D.newSysDimension().

Here is the caller graph for this function:

function A = MatUtils.laplacemat3D (   h,
  g 
)
static

Computes a 3D laplacian sparse matrix.

Arguments
h: discretization spatial stepwidth g: the general.geometry.RectGrid3D instance describing the geometry.
Author
Daniel Wirtz
Date
2011-10-06
Required fields of g:

Definition at line 187 of file MatUtils.m.

References k.

Referenced by models.pcd.PCDSystem3D.newSysDimension().

Here is the caller graph for this function:

static function res = MatUtils.test_DivCDivUMat ( )
static

Definition at line 488 of file MatUtils.m.

References divcdivumat().

Here is the call graph for this function:

function MatUtils.test_ExtendedInverseDirect ( )
static

Tests direct inversion extension for a matrix of size s for a fixed number of experiments each.

Repeats all experiments for different kernel widths.

Definition at line 507 of file MatUtils.m.

References getExtendedInverse(), t, and X.

Here is the call graph for this function:

static function MatUtils.test_ExtendedInverseSequential ( )
static

Definition at line 560 of file MatUtils.m.

References getExtendedInverse(), t, and X.

Here is the call graph for this function:

function Asparse = MatUtils.toSparse ( matrix< double A,
rowvec< integer rowidx,
  n 
)
static

Converts a full matrix A to a sparse matrix, where the entries of A are split up to the row indices specified by rowidx.

Parameters
AThe matrix to "sparsify"
rowidxThe row indices of A rows inside the sparse matrix
nThe row size of the target sparse matrix.

Definition at line 467 of file MatUtils.m.

Referenced by general.POD.computePOD(), and general.MatrixDEIM.updateOrderData().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: