# Introduction

This tutorial is very similar to the two dimensional hp-FEM tutorial in hpFEM2d.cc; you should have read it to understand this tutorial.

## Maxwell's Equations

The equations solved are the time-harmonic Maxwell's equations:  with the divergence conditions (assuming no charge density) Extracting from the second equation and inserting in into the first formally yields the so-called electric source problem. The appropriate space is However, the curl-curl form above is not defined for electric fields in . This is resolved in the variational formulation of the electric source problem:
Find such that where is with the prefect conductor boundary conditions , and . The associated bilinear operator of this variational formulation is not elliptic and the divergence condition is an independent constraint. Normally, Maxwell's equations are discretised using Nedelec's elements. However, there are good reasons why one would like to use standard H1-conforming FEM. This is possible using weighted regularization.

## Weighted Regularization

The divergence can be forced to zero by adding to the bilinear form. However, this works only in non-convex domains. With the weighted regularization and the new bilinear form where and is dense in (the space we are discretising with H1-conforming FEM). A simple choice for the weight in three dimensions is where is the set of reentrant corners and the set of reentrant edges. Then, Martin Costabel and Monique Dauge. Weighted regularization of Maxwell equations in polyhedral domains. A rehabilitation of nodal finite elements. Numer. Math., 93(2):239-277, 2002.

## Maxwell Eigenproblem

The Maxwell Eigenproblem is solved using the weighted regularization:
Find frequencies and functions such that The necessary FE spaces are built using vectorial::Space and hp3D::Space. The bilinear forms are built with hp3D::RotRot, hp3D::DivDiv and vectorial::BilinearForm and hp3D::Identity.

# Commented Program

As said above, this tutorial is very similar in large parts to hpFEM2d.cc and the documentation below is terser (ie. only new stuff is commented).

#include <cmath>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <memory>
#include <fstream>
#include <unistd.h>
#include "basics.hh"
#include "function.hh"
#include "geometry.hh"
#include "graphics.hh"
#include "integration.hh"
#include "operator.hh"
#include "space.hh"
#include "toolbox.hh"

The new includes files are hp3D.hh for the three dimensional hp-FEM, vectorial.hh for the classes to build vector valued FE spaces etc. from the scalar components and eigensolver.hh for the Eigensolvers needed below.

#include "hp3D.hh"
#include "vectorial.hh"
#include "eigensolver.hh"

## FEM Routine

Most abbreviations are the same (including the same meaning) as already known.

void fem(const concepts::InOutParameters& input,
const uint l = input.getInt("level");
const uint p = input.getInt("polynomial");
const std::string meshNameBase = input.getString("meshNameBase");

New parameters to configure the Eigensolvers are kmax (how many Eigenvalues should be computed at the same time), solverType (which type of Eigensolver, there are a few available) and shift (parameter for the shift-invert method).

const uint kmax = input.getInt("kmax");
const Real shift = input.getDouble("shift");

The following parameters are used for the weighted regularization: rho is to distinguish physical from spurious Eigenvalues by the following criterion (using the Eigenfunction ): A good value for rho is 1.5 (the default).

const Real rho = input.getDouble("rho");

weight is used to choose one of various weights (including different weigth exponents (instead of 2 as in the introduction).

const uint weight = input.getInt("weight");

Then, the array for the values of the scaling parameter s are set up.

const uint sNumber = input.getInt("sNumber");
for (uint i = 0; i < sNumber; ++i) s[i] = input.getArrayDouble("s", i);

### Mesh

std::stringstream fileCoord;
fileCoord << meshNameBase << "Coord.dat" << std::ends;
std::stringstream fileElements;
fileElements << meshNameBase << "Elements.dat" << std::ends;
std::stringstream fileBoundary;
fileBoundary << meshNameBase << "Boundary.dat" << std::ends;
concepts::Import3dMesh msh(fileCoord.str(), fileElements.str(),
fileBoundary.str());
std::cout << "Mesh: " << msh << std::endl;
graphics::MeshDX<Real>(msh, "mesh.dx");

### Space

The perfect conductor boundary conditions can be set up by carefully choosing the Dirichlet boundary conditions of the three scalar components of the vector valued FE space.

Finally, the FE spaces can be set up. First, a vector valued FE space with three components is created. This is essentially a container (as most of the classes of vectorial) which takes care of different scalar components which can be added to it.

const uint vdim = 3;

Then, one after the other scalar FE space is created and added to the vector valued FE space spc. Note that the scalar FE spaces have to be rebuilt before adding them to spc. This call to hp3D::Space::rebuild creates the elements.

hp3D::Space sspcX(msh, 0, p, &bcX); sspcX.rebuild(); spc.put(sspcX);
hp3D::Space sspcY(msh, 0, p, &bcY); sspcY.rebuild(); spc.put(sspcY);
hp3D::Space sspcZ(msh, 0, p, &bcZ); sspcZ.rebuild(); spc.put(sspcZ);
for (uint i = 0; i < l; ++i) {
std::cout << "i = " << i << std::endl;

The scalar spaces also have to be rebuilt separately after a refinement before rebuilding the vector valued space.

sspcX.rebuild();
std::cout << " scalar space: " << std::flush;
std::cout << sspcX << std::endl;
// graphics of the mesh
graphics::MeshDX<Real>(sspcX, "space.dx", 3);
graphics::drawMeshTecplot(sspcX, "space.dat", 3);
if (spc.dim() > 20) {

### Computations

The stiffness matrix has two parts: rot-rot and div-div. These two parts are built separately. Before calling the Eigensolver, a linear combination depending on s of the two is created. The classes hp3D::RotRot and hp3D::DivDiv both come with a setup routine to take care of some technicalities. The use of this routine is not mandatory but recommended.

The rot-rot part of the stiffness matrix is simple to compute.

// ** stiffness matrix **
hp3D::RotRot::setup(vrotrot_bf);
concepts::SparseMatrix<Real> rotrot(spc, vrotrot_bf);
rotrot.compress();
std::cout << " rot rot matrix: " << rotrot << std::endl;

The div-div part of the stiffness matrix is somewhat more involved: the singularities of the solutions have to be taken into account by the weight. The singular edes and vertices are marked, this information is later used by the div-div bilinear form.

hp3D::SingularSet singularities;

Various weights can be selected on the command line or via the input file. This is reflected in weight.

switch (weight) {
case 0: // TrivialWeight
hp3D::DivDiv<hp3D::TrivialWeight>::setup(vdivdiv_bf, singularities);
break;
case 1: // ShortestDist
hp3D::DivDiv<hp3D::ShortestDist>::setup(vdivdiv_bf, singularities);
break;
case 11: // ProductOfAll
hp3D::DivDiv<hp3D::ProductOfAll>::setup(vdivdiv_bf, singularities);
break;
case 21: // DaugeWeight
hp3D::DivDiv<hp3D::DaugeWeight>::setup(vdivdiv_bf, singularities);
break;
}
std::cout << " div div bilinear form: "
<< *(vdivdiv_bf.get(0)) << std::endl;
std::stringstream weightName;
weightName << *(vdivdiv_bf.get(0));

After having selected the right bilinear form (the right weight for the div-div form), the div-div stiffness matrix can be computed

concepts::SparseMatrix<Real> divdiv(spc, vdivdiv_bf);
divdiv.compress();
std::cout << " div div matrix: " << divdiv << std::endl;

The mass matrix consists of three scalar mass matrices in the diagonal blocks of the mass matrix. They are put together in the canonical way to build a vector valued bilnear form.

// ** mass matrix **
hp3D::Identity<> smass_bf;

Each call to vectorial::BilinearForm::put adds a scalar bilinear form into a block of the vector valued bilinear form. In this case, only the diagonal blocks have to be filled.

mass_bf.put(smass_bf, 0, 0);
mass_bf.put(smass_bf, 1, 1);
mass_bf.put(smass_bf, 2, 2);
concepts::SparseMatrix<Real> mass(spc, mass_bf);
std::cout << " mass matrix: " << mass << std::endl;
mass.compress();
std::cout << " mass matrix: " << mass << std::endl;

The next step is to set up the solver. There is loop over the different values of the scaling parameter s around the solution process.

// ** solver **
for (uint sIndex = 0; sIndex < sNumber; ++sIndex) {
std::cout << " s = " << s[sIndex] << std::endl;

The Eigensolver shall be constructed by a fabric, ie. a class derived from eigensolver::SolverFabric. solverType contains which solver to use and it is evaluated in the following switch case clause.

After having chosen the solver by creating the appropriate fabric, the solver can be instantiated.

A call to eigensolver::Solver::getEV returns the Eigenvalues. They are printed to screen in a list.

### Postprocessing

Then, a list of the Eigenvalues together with the categorization (the formula is given above) is printed to screen. In addition, the Eigenvalue together with the rotrot energy and the divdiv energy are stored in the output data for later postprocessing (or plotting).

Compute the rotrot energy: Compute the divdiv energy: Evaluate the criterion and print the results.

Finally, the data is stored in output.

### Refinement of the Space

Each component of the vector valued space has to be refined individually towards the singularly marked vertices and edges.

## Main Program

The main program works very similar to the previous tutorials.

### Command Line Arguments

The arrays to store the Eigenvalues and the divdiv and rotrot energies have to be prepared.

# Results

To restrict the amount of output, we are calling the program with the following input file:@code int level 1 int kmax 3 int sNumber 1 array double s { 0 2.0 } Then, the output looks like:

[./hpFEM3d-EV]
--
Parameters:
input file = t.concepts
string author "(empty)"
string comment "(empty)"
string gnuplot "./hpFEM3d-EV.gnuplot"
string meshNameBase "../../../applications/thickLshape"
string parameterout "./hpFEM3d-EV.out"
string title "Maxwell Eigenvalues in 3D using weighted regularization"
int edgRef 77
int faceRef 0
int kmax 3
int level 1
int polynomial 2
int sNumber 1
int solver 2
int vtxRef 66
int weight 11
double rho 1.5
double shift 9
array double s {
0 2
1 2
2 3
3 4
4 20
5 9
6 12
7 15
8 17
9 30
}
--
Mesh: Import3dMesh(ncell = 3)
i = 0
scalar space: Space(dim = 7, nelm = 3)
Space(dim = 7, nelm = 3)
Space(dim = 12, nelm = 3)
vector valued space (3 comp.): Space(idx = 3, vdim = 3, dim = 26, nelm = 3)
rot rot matrix: SparseMatrix(26x26, HashedSparseMatrix: 316 (46.7456%) entries bound.)
div div bilinear form: DivDiv(weight = ProductOfAll)
div div matrix: SparseMatrix(26x26, HashedSparseMatrix: 334 (49.4083%) entries bound.)
mass matrix: SparseMatrix(26x26, HashedSparseMatrix: 426 (63.0178%) entries bound.)
mass matrix: SparseMatrix(26x26, HashedSparseMatrix: 158 (23.3728%) entries bound.)
s = 2
solver = ArPack(shift-invert mode(3), not yet computed largest (algebraic) eigenvalues, sigma = 9, n = 26, tol = 0, conv. eigenpairs = 0(max = 3), Arnoldi iter = 0(max = 1000), 0 OP*x ops., 0 B*x ops., 0 steps of re-orth.)
Eigenvalues: Array<F>(3, [9.90411138346484, 14.167902552732, 14.5499375050742])
solver = ArPack(shift-invert mode(3), computed largest (algebraic) eigenvalues, sigma = 9, n = 26, tol = 1.11022302462516e-16, conv. eigenpairs = 3(max = 3), Arnoldi iter = 13(max = 1000), 34 OP*x ops., 112 B*x ops., 33 steps of re-orth.)
EV 0 = 9.90411138346484 has rotEnergy = 9.9041, divEnergy*s = 7.1322e-32, L2 norm = 1
EV 1 = 14.167902552732 has rotEnergy = 13.806, divEnergy*s = 0.36222, L2 norm = 1
EV 2 = 14.5499375050742 has rotEnergy = 13.526, divEnergy*s = 1.0238, L2 norm = 1
--
Writing gathered data to disk: ./hpFEM3d-EV.out

The mesh normally used is a thick L shaped domain in three hexahedra. The mesh looks like this: With 18726 dofs, the Eigenvalues plotted versus s: The physical Eigenvalues (green) are lined up on horizontal lines whereas the spurious Eigenvalues are on straight lines through the origin. The exact values (horizontal blue lines) are taken from Monique Dauge's Benchmax page. Below are the convergence histories for the first three Eigenvalues for selected values of s:   These convergence histories show exponential convergence: straight lines in a plot.

# Complete Source Code

#include <cmath>
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <memory>
#include <fstream>
#include <unistd.h>
#include "basics.hh"
#include "function.hh"
#include "geometry.hh"
#include "graphics.hh"
#include "integration.hh"
#include "operator.hh"
#include "space.hh"
#include "toolbox.hh"
#include "hp3D.hh"
#include "vectorial.hh"
#include "eigensolver.hh"
// ************************************************************* fem routine **
void fem(const concepts::InOutParameters& input,
const uint l = input.getInt("level");
const uint p = input.getInt("polynomial");
const std::string meshNameBase = input.getString("meshNameBase");
const uint kmax = input.getInt("kmax");
const Real shift = input.getDouble("shift");
const Real rho = input.getDouble("rho");
const uint weight = input.getInt("weight");
const uint sNumber = input.getInt("sNumber");
for (uint i = 0; i < sNumber; ++i) s[i] = input.getArrayDouble("s", i);
// mesh import: generate names
std::stringstream fileCoord;
fileCoord << meshNameBase << "Coord.dat" << std::ends;
std::stringstream fileElements;
fileElements << meshNameBase << "Elements.dat" << std::ends;
std::stringstream fileBoundary;
fileBoundary << meshNameBase << "Boundary.dat" << std::ends;
concepts::Import3dMesh msh(fileCoord.str(), fileElements.str(),
fileBoundary.str());
std::cout << "Mesh: " << msh << std::endl;
graphics::MeshDX<Real>(msh, "mesh.dx");
const uint vdim = 3;
hp3D::Space sspcX(msh, 0, p, &bcX); sspcX.rebuild(); spc.put(sspcX);
hp3D::Space sspcY(msh, 0, p, &bcY); sspcY.rebuild(); spc.put(sspcY);
hp3D::Space sspcZ(msh, 0, p, &bcZ); sspcZ.rebuild(); spc.put(sspcZ);
for (uint i = 0; i < l; ++i) {
std::cout << "i = " << i << std::endl;
sspcX.rebuild();
std::cout << " scalar space: " << std::flush;
std::cout << sspcX << std::endl;
sspcY.rebuild();
std::cout << " " << sspcY << std::endl;
sspcZ.rebuild();
std::cout << " " << sspcZ << std::endl;
spc.rebuild();
std::cout << " vector valued space (" << vdim << " comp.): "
<< std::flush;
std::cout << spc << std::endl;
// graphics of the mesh
graphics::MeshDX<Real>(sspcX, "space.dx", 3);
graphics::drawMeshTecplot(sspcX, "space.dat", 3);
if (spc.dim() > 20) {
// ** stiffness matrix **
hp3D::RotRot::setup(vrotrot_bf);
concepts::SparseMatrix<Real> rotrot(spc, vrotrot_bf);
rotrot.compress();
std::cout << " rot rot matrix: " << rotrot << std::endl;
hp3D::SingularSet singularities;
switch (weight) {
case 0: // TrivialWeight
hp3D::DivDiv<hp3D::TrivialWeight>::setup(vdivdiv_bf, singularities);
break;
case 1: // ShortestDist
hp3D::DivDiv<hp3D::ShortestDist>::setup(vdivdiv_bf, singularities);
break;
case 11: // ProductOfAll
hp3D::DivDiv<hp3D::ProductOfAll>::setup(vdivdiv_bf, singularities);
break;
case 21: // DaugeWeight
hp3D::DivDiv<hp3D::DaugeWeight>::setup(vdivdiv_bf, singularities);
break;
}
std::cout << " div div bilinear form: "
<< *(vdivdiv_bf.get(0)) << std::endl;
std::stringstream weightName;
weightName << *(vdivdiv_bf.get(0));
concepts::SparseMatrix<Real> divdiv(spc, vdivdiv_bf);
divdiv.compress();
std::cout << " div div matrix: " << divdiv << std::endl;
// ** mass matrix **
hp3D::Identity<> smass_bf;
mass_bf.put(smass_bf, 0, 0);
mass_bf.put(smass_bf, 1, 1);
mass_bf.put(smass_bf, 2, 2);
concepts::SparseMatrix<Real> mass(spc, mass_bf);
std::cout << " mass matrix: " << mass << std::endl;
mass.compress();
std::cout << " mass matrix: " << mass << std::endl;
// ** solver **
for (uint sIndex = 0; sIndex < sNumber; ++sIndex) {
std::cout << " s = " << s[sIndex] << std::endl;
// ** results **
const concepts::Array<concepts::Cmplx>& sol_eigenvalue = eigensolver.getSolver()->getEV();
= eigensolver.getSolver()->getEF();
if (sIndex == 0)
const uint nEV = sol_eigenvalue.size();
std::cout.precision(15);
std::cout << " Eigenvalues: " << sol_eigenvalue << std::endl;
// computing Rotrot and Divdiv energies
for (uint evIndex = 0; evIndex < nEV; ++evIndex) {
rotrot(*(sol_eigenfunction[evIndex]), tmp);
Real rotEnergy = real(*(sol_eigenfunction[evIndex]) * tmp);
divdiv(*(sol_eigenfunction[evIndex]), tmp);
Real divEnergy = real(*(sol_eigenfunction[evIndex]) * tmp) * s[sIndex];
std::string quality;
if ( std::fabs(rotEnergy)/std::fabs(divEnergy) >= rho) {
quality = "**";
} else {
if ( std::fabs(rotEnergy)/std::fabs(divEnergy) <= 1./rho)
quality = " ";
else quality = " *";
}
std::cout << quality << " EV " << evIndex << " = ";
std::cout.precision(15);
std::cout << sol_eigenvalue[evIndex];
std::cout.precision(5);
mass(*(sol_eigenfunction[evIndex]), tmp);
Real L2norm = real(*(sol_eigenfunction[evIndex]) * tmp);
std::cout << " has rotEnergy = " << rotEnergy
<< ", divEnergy*s = " << divEnergy
<< ", L2 norm = " << L2norm
<< std::endl;
std::stringstream name1, name2, name3;
name1 << "ev_s_" << s[sIndex] << "_k_" << evIndex << std::ends;
sol_eigenvalue[evIndex].real());
name2 << "dE_s_" << s[sIndex] << "_k_" << evIndex << std::ends;
name3 << "rE_s_" << s[sIndex] << "_k_" << evIndex << std::ends;
} // for evIndex
} // for sIndex
} // if dim > 20
// ** refinement **
if (i < l-1) {
int pMax = { 1, 1, 1 };
hp3D::Space* spaces = { &sspcX, &sspcY, &sspcZ };
for (uint j = 0; j < 3; ++j) {
(*spaces[j], input.getInt("vtxRef"), input.getInt("edgRef"),
input.getInt("faceRef"), pMax);
post(refineSpace);
} // loop over three components
std::cout << "--" << std::endl;
} // if i < l-1
} // for i
}
// ************************************************************ Main Program **
int main(int argc, char** argv) {
try {
concepts::InputParser inputParser;
concepts::Array<Real> s(input.getInt("sNumber"));
s = 6;
s = 2;
s = 3;
s = 4;
s = 20;
s = 9;
s = 12;
s = 15;
s = 17;
s = 30;
for (uint i = 0; i < (uint)input.getInt("sNumber"); ++i)
"Maxwell Eigenvalues in 3D using weighted regularization");
std::stringstream outfile;
outfile << argv << ".out" << std::ends;
std::stringstream gnuplotfile;
gnuplotfile << argv << ".gnuplot" << std::ends;
output.addString("version", "$Id: hpFEM3d-EV.cc,v 1.5 2005/08/26 15:35:48 kersten Exp$");
// ********************************************************** input data **
std::string inputfile;
int opt;
while ((opt = getopt(argc, argv, "-f:e:l:p:k:r:n:s:w:")) != EOF)
switch(opt) {
case 'f': inputfile = std::string(optarg);
inputParser.parse(inputfile);
break;
default:
std::cout << "Option '" << opt << "' unkown." << std::endl
<< "Usage: " << argv
<< " [-f FILE] [-l LEVEL] [-e SOLVER] [-k KMAX] [-p POLY] "
<< "[-r RHO] [-n MESH_NAME] [-s SHIFT] [-w WEIGHT]"
<< std::endl
<< "where" << std::endl
<< " FILE: name of the input file" << std::endl
<< " LEVEL: level of refinement" << std::endl
<< " SOLVER: JDBSYM(0), ARPACK(1)" << std::endl
<< " POLY: starting polynomial degree" << std::endl
<< " KMAX: number of eigenvalues which should be computed"
<< std::endl
<< " MESH_NAME: name of the mesh (thickLshape)" << std::endl
<< " SHIFT: shift for Eigenvalue solver" << std::endl
<< " WEIGHT:" << std::endl
<< " 0: TrivialWeight" << std::endl
<< " 1: ShortestDist" << std::endl
<< " 11: ProductOfAll" << std::endl
<< " 21: DaugeWeight" << std::endl
<< "Options given after the input file override the values "
<< std::endl << "input file." << std::endl;
exit(1);
break;
}
// ********************************** create output area for eigenvalues **
for (uint i = 0; i < (uint)input.getInt("sNumber"); ++i) {
for (uint j = 0; j < (uint)input.getInt("kmax"); ++j) {
std::stringstream name1, name2, name3;
name1 << "ev_s_" << input.getArrayDouble("s", i) << "_k_" << j
<< std::ends;
output);
name2 << "dE_s_" << input.getArrayDouble("s", i) << "_k_" << j
<< std::ends;
output);
name3 << "rE_s_" << input.getArrayDouble("s", i) << "_k_" << j
<< std::ends;
output);
}
}
// ***************************************************** show parameters **
std::cout << '[' << argv << "]" << std::endl;
std::cout << "--" << std::endl;
std::cout << "Parameters:" << std::endl
<< " input file = " << inputfile << std::endl
<< input;
std::cout << "--" << std::endl;
// ******************************************************** computations **
fem(input, output);
// ************************************** output of input data and other **
std::ofstream* ofs = new std::ofstream
(input.getString("gnuplot").c_str());
*ofs << std::setprecision(20);
delete ofs;
std::cout << " --" << std::endl
<< " Writing gathered data to disk: "
<< input.getString("parameterout") << std::endl;
ofs = new std::ofstream(input.getString("parameterout").c_str());
*ofs << "/* program:\t" << argv << std::endl
<< " * command:\t";
for (int j = 0; j < argc; ++j)
*ofs << argv[j] << " ";
*ofs << std::endl
<< " * input file:\t" << inputfile << std::endl;
*ofs << " */" << std::endl << std::setprecision(20) << inputParser;
delete ofs;
}
std::cout << e << std::endl;
return 1;
}
return 0;
}
uint size() const
Returns the requested size of the array.
Definition: array.hh:259
static void setup(vectorial::BilinearForm< Real, Real > &bf)
Sets up the bilinear form for the rot-rot part for Maxwell's equation using weighted regularization.
Vector valued space.
Definition: spaceTraits.hh:26
#define conceptsException(exc)
Prepares an exception for throwing.
Definition: exceptions.hh:344
Base class for exceptions.
Definition: exceptions.hh:86
Vector valued bilinear form.
void add(const Set< Attribute > &attrib, const Boundary &bcObject)
Adds a boundary condition with this attribute to the list of boundary conditions.
const concepts::Real norm(const concepts::Real &v)
Returns the square of a real value.
Definition: operations.hh:90
Holds parameters in hashes.
Definition: inputOutput.hh:75
void compress(Real threshold=EPS)
Compresses the matrix by dropping small entries.
A 3D hp FEM space with continuous, picewise polynomial basis functions.
Definition: space.hh:84
Timer and resource monitor.
void addInto(Matrix< H > &dest, const I fact, const uint rowoffset=0, const uint coloffset=0) const
This matrix is added as block to the given matrix dest.
Carries out a-priori given refinements.
Definition: aprioriRef.hh:39
void addArrayDouble(const char *array, const bool newArray=false)
Creates an empty array for doubles if necessary.
double getDouble(const char *name) const
Returns a double from the hash of doubles.
Space rebuild()
int getInt(const char *name, const int value=INT_MAX) const
Returns an int from the hash of ints.
Class to describe an element of the boundary.
Definition: boundary.hh:35
void addArrayInt(const char *array, const bool newArray=false)
Creates an empty array for ints if necessary
Tool to easily solve general eigenvalue problems.
void addString(const char *name, const char *value)
Adds a string to the hash of strings.
virtual void put(concepts::BilinearForm< F, G > &bf, const int i, const int j)
insert a Bilinearform bf of one vectorial dimension to the all v-dimensionial Bilinearform
Parses an input file and extracts parameters.
Definition: inputOutput.hh:443
void addMap(enum mapTypes type, const char *name, const InOutParameters &holder)
InOutParameters & inputParameters()
Returns the input data.
Definition: inputOutput.hh:461
static void setup(vectorial::BilinearForm< Real, Real > &bf, hp3D::SingularSet &singularities, const concepts::Formula< Real > *frm=0)
Sets up the bilinear form for the div-div part for Maxwell's equation using weighted regularization.
void drawMeshTecplot(concepts::Mesh &msh, const std::string &filename)
Trampoline function to create an instance of MeshTecplot.
void addInt(const char *name, const int value)
Adds an int to the hash of ints.
InOutParameters & outputParameters()
Returns the output data.
Definition: inputOutput.hh:464
double getArrayDouble(const char *array, const int number) const
Returns a double from an array.
Imports 3D mesh with tetrahedra and hexahedra.
Definition: meshImport3D.hh:94
std::string getString(const char *name, const char *value=0) const
Returns a string from the hash of strings.
void parse()
Parses the input file.
Organizes the results in the hashes from InOutParameters in a nice table.
Definition: resultsTable.hh:23
Class for handling a set of singular edges and vertices.
Definition: singularSet.hh:136
void print(std::ostream &os) const
void add(const concepts::Attribute &attrib, concepts::Mesh3 &msh)
Add all vertices and edges in the mesh with attrib to the set of singular vertices and edges.
A function class to calculate element matrices for the mass matrix.
Definition: bilinearForm.hh:84
Eigenvalue solvers.
Definition: ARPACK.hh:19
void addDouble(const char *name, const double value)
Adds a double to the hash of doubles.
Attributes for elements of the topology.
Definition: connector.hh:22
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Draws a picture of a mesh in DX format and stores the result in a file.
Definition: meshDX.hh:89
float utime()
Returns the user time since the last call of ResourceMonitor using getrusage.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich