Example solution of the eddy current Maxwell's equations using curl-conforming (edge) elements.
More...
|
#define | ABS(x) ((x)>0?(x):-(x)) |
|
#define | SQR(x) ((x)*(x)) |
|
#define | TC_sumAll(rcpComm, in, out) Teuchos::reduceAll(*rcpComm, Teuchos::REDUCE_SUM, in, Teuchos::outArg(out)) |
|
#define | TC_minAll(rcpComm, in, out) Teuchos::reduceAll(*rcpComm, Teuchos::REDUCE_MIN, in, Teuchos::outArg(out)) |
|
#define | TC_maxAll(rcpComm, in, out) Teuchos::reduceAll(*rcpComm, Teuchos::REDUCE_MAX, in, Teuchos::outArg(out)) |
|
|
typedef double | SC |
|
typedef int | LO |
|
typedef
Tpetra::Map::global_ordinal_type | GO |
|
typedef Tpetra::Map::node_type | Node |
|
typedef Node | NO |
|
typedef Tpetra::CrsMatrix< SC,
LO, GO, Node > | Tpetra_CrsMatrix |
|
typedef Tpetra::FECrsMatrix
< SC, LO, GO, Node > | Tpetra_FECrsMatrix |
|
typedef Tpetra::FECrsGraph< LO,
GO, Node > | Tpetra_FECrsGraph |
|
typedef Tpetra::MultiVector
< SC, LO, GO, Node > | Tpetra_MultiVector |
|
typedef Tpetra::FEMultiVector
< SC, LO, GO, Node > | Tpetra_FEMultiVector |
|
typedef Tpetra::Vector< SC, LO,
GO, Node > | Tpetra_Vector |
|
typedef Tpetra::Map< LO, GO, Node > | Tpetra_Map |
|
typedef Tpetra::Import< LO, GO,
Node > | Tpetra_Import |
|
typedef Tpetra::Export< LO, GO,
Node > | Tpetra_Export |
|
typedef Tpetra::Operator< SC,
LO, GO, Node > | Tpetra_Operator |
|
typedef Xpetra::Operator< SC,
LO, GO, Node > | Xpetra_Operator |
|
typedef Xpetra::Matrix< SC, LO,
GO, NO > | Matrix |
|
typedef Xpetra::MultiVector
< SC, LO, GO, NO > | Xpetra_MultiVector |
|
typedef
Intrepid::FunctionSpaceTools | IntrepidFSTools |
|
typedef
Intrepid::RealSpaceTools
< double > | IntrepidRSTools |
|
typedef Intrepid::CellTools
< double > | IntrepidCTools |
|
|
template<class Container > |
double | distance (Container &nodeCoord, int i1, int i2) |
|
RCP< Matrix > | toXpetra (RCP< Tpetra_CrsMatrix > &mat) |
|
RCP< Xpetra_MultiVector > | toXpetra (RCP< Tpetra_MultiVector > &vec) |
|
RCP< Xpetra_Operator > | BuildPreconditioner_MueLu (char ProblemType[], Teuchos::ParameterList &MLList, RCP< Tpetra_CrsMatrix > &CurlCurl, RCP< Tpetra_CrsMatrix > &D0clean, RCP< Tpetra_CrsMatrix > &M0inv, RCP< Tpetra_CrsMatrix > &Ms, RCP< Tpetra_CrsMatrix > &M1, RCP< Tpetra_MultiVector > &coords) |
| MueLu Preconditioner. More...
|
|
int | evalu (double &uExact0, double &uExact1, double &uExact2, double &x, double &y, double &z) |
| Exact solution evaluation. More...
|
|
int | evalCurlu (double &curlu0, double &curlu1, double &curlu2, double &x, double &y, double &z, double &mu) |
| Curl of exact solution. More...
|
|
int | evalCurlCurlu (double &curlcurlu0, double &curlcurlu1, double &curlcurlu2, double &x, double &y, double &z, double &mu) |
| CurlCurl of exact solution. More...
|
|
int | main (int argc, char *argv[]) |
|
void | solution_test (string msg, const Tpetra_Operator &A, const Tpetra_MultiVector &lhs, const Tpetra_MultiVector &rhs, const Tpetra_MultiVector &xexact, double &TotalErrorExactSol, double &TotalErrorResidual) |
| Compute ML solution residual. More...
|
|
Example solution of the eddy current Maxwell's equations using curl-conforming (edge) elements.
This example uses the following Trilinos packages:
- Pamgen to generate a Hexahedral mesh.
- Intrepid to build the discretization matrices and right-hand side.
- Epetra to handle the global matrix and vector.
- ML to solve the linear system.
Maxwell System:
curl x mu^{-1} curl E + sigma E = f
Corresponding discrete linear system for edge element coeficients (x):
(Kc + Mc)x = b
Kc - Hcurl stiffness matrix
Mc - Hcurl mass matrix
b - right hand side vector
- Author
- Created by P. Bochev, D. Ridzal, K. Peterson, D. Hensinger, C. Siefert.
Input files available in Trilinos for use with the Maxwell driver:
- Maxwell.xml - basic input file with box mesh and one mesh block
- Ninja.xml - input file with distorted mesh (shaped like Ninja star) and one mesh block
- Maxwell_in_block.xml - input file with box mesh with a center block with different material values.