|
TrilinosCouplings
Development
|
Example solution of a div-curl system on a hexahedral mesh using curl-conforming (edge) elements.
More...
#include "TrilinosCouplings_config.h"
#include "TrilinosCouplings_Pamgen_Utils.hpp"
#include "Intrepid_FunctionSpaceTools.hpp"
#include "Intrepid_FieldContainer.hpp"
#include "Intrepid_CellTools.hpp"
#include "Intrepid_ArrayTools.hpp"
#include "Intrepid_HCURL_HEX_I1_FEM.hpp"
#include "Intrepid_HGRAD_HEX_C1_FEM.hpp"
#include "Intrepid_RealSpaceTools.hpp"
#include "Intrepid_DefaultCubatureFactory.hpp"
#include "Intrepid_Utils.hpp"
#include "Epetra_Time.h"
#include "Epetra_Map.h"
#include "Epetra_SerialComm.h"
#include "Epetra_Import.h"
#include "Epetra_Export.h"
#include "Epetra_FECrsMatrix.h"
#include "Epetra_FEVector.h"
#include "Epetra_LinearProblem.h"
#include "Teuchos_oblackholestream.hpp"
#include "Teuchos_RCP.hpp"
#include "Teuchos_ArrayRCP.hpp"
#include "Teuchos_BLAS.hpp"
#include "Teuchos_GlobalMPISession.hpp"
#include "Teuchos_ParameterList.hpp"
#include "Teuchos_XMLParameterListHelpers.hpp"
#include "Shards_CellTopology.hpp"
#include "EpetraExt_RowMatrixOut.h"
#include "EpetraExt_MultiVectorOut.h"
#include "EpetraExt_VectorOut.h"
#include "AztecOO.h"
#include "ml_MultiLevelPreconditioner.h"
#include "ml_RefMaxwell_11_Operator.h"
#include "ml_RefMaxwell.h"
#include "ml_EdgeMatrixFreePreconditioner.h"
#include "ml_epetra_utils.h"
#include "create_inline_mesh.h"
#include "pamgen_im_exodusII_l.h"
#include "pamgen_im_ne_nemesisI_l.h"
#include "pamgen_extras.h"
|
|
#define | ABS(x) ((x)>0?(x):-(x)) |
| |
|
|
typedef Intrepid::FunctionSpaceTools | IntrepidFSTools |
| |
|
typedef Intrepid::RealSpaceTools< double > | IntrepidRSTools |
| |
|
typedef Intrepid::CellTools< double > | IntrepidCTools |
| |
|
| void | TestMultiLevelPreconditioner_CurlLSFEM (char ProblemType[], Teuchos::ParameterList &MLList, Epetra_CrsMatrix &CurlCurl, Epetra_CrsMatrix &D0clean, Epetra_CrsMatrix &M0inv, Epetra_CrsMatrix &M1, Epetra_MultiVector &xh, Epetra_MultiVector &b, double &TotalErrorResidual, double &TotalErrorExactSol) |
| | ML Preconditioner. More...
|
| |
| int | evalu (double &uExact0, double &uExact1, double &uExact2, double &x, double &y, double &z) |
| | Exact solution evaluation. More...
|
| |
| double | evalDivu (double &x, double &y, double &z, double &mu) |
| | Divergence of exact solution. More...
|
| |
| int | evalCurlu (double &curlu0, double &curlu1, double &curlu2, double &x, double &y, double &z, double &mu) |
| | Curl of exact solution. More...
|
| |
| int | evalGradDivu (double &gradDivu0, double &gradDivu1, double &gradDivu2, double &x, double &y, double &z, double &mu) |
| | Gradient of Divergence of exact solution. More...
|
| |
|
int | main (int argc, char *argv[]) |
| |
| int | Multiply_Ones (const Epetra_CrsMatrix &A, const Epetra_Vector &x, Epetra_Vector &y) |
| | Multiplies Ax = y, where all non-zero entries of A are replaced with the value 1.0. More...
|
| |
| void | solution_test (string msg, const Epetra_Operator &A, const Epetra_MultiVector &lhs, const Epetra_MultiVector &rhs, const Epetra_MultiVector &xexact, Epetra_Time &Time, double &TotalErrorExactSol, double &TotalErrorResidual) |
| | Compute ML solution residual. More...
|
| |
Example solution of a div-curl system on a hexahedral mesh 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.
For more details on the formulation see
- P. Bochev, K. Peterson, C. Siefert, "Analysis and Computation
of Compatible Least-Squares Methods for Div-Curl Equations", SIAM J. Numerical Analysis, vol 49, pp 159-191, 2011.
Div-Curl System:
curl u = g in Omega
div u = h in Omega
u x n = 0 on Gamma
Corresponding discrete linear system for edge element coeficients (x):
(Kc + Mc*Dg*MgInv*Dg'*Mc)x = b
Kc - Hcurl stiffness matrix
Mc - Hcurl mass matrix
Dg - Node to edge incidence matrix
MgInv - Hgrad mass matrix inverse
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 CurlLSFEM driver:
- CurlLSFEMin.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
- CurlLSFEMblock_in_block.xml - input file with box mesh with a center block with different material values.
◆ evalCurlu()
| int evalCurlu |
( |
double & |
curlu0, |
|
|
double & |
curlu1, |
|
|
double & |
curlu2, |
|
|
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z, |
|
|
double & |
mu |
|
) |
| |
Curl of exact solution.
- Parameters
-
| curlu0 | [out] first component of curl of exact solution |
| curlu1 | [out] second component of curl of exact solution |
| curlu2 | [out] third component of curl of exact solution |
| x | [in] x coordinate |
| y | [in] y coordinate |
| z | [in] z coordinate |
| mu | [in] material parameter |
◆ evalDivu()
| double evalDivu |
( |
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z, |
|
|
double & |
mu |
|
) |
| |
Divergence of exact solution.
- Parameters
-
| x | [in] x coordinate |
| y | [in] y coordinate |
| z | [in] z coordinate |
| mu | [in] material parameter |
- Returns
- Value of the divergence of exact solution at (x,y,z)
◆ evalGradDivu()
| int evalGradDivu |
( |
double & |
gradDivu0, |
|
|
double & |
gradDivu1, |
|
|
double & |
gradDivu2, |
|
|
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z, |
|
|
double & |
mu |
|
) |
| |
Gradient of Divergence of exact solution.
- Parameters
-
| gradDivu0 | [out] first (x) component of grad div of exact solution |
| gradDivu1 | [out] second (y) component of grad div of exact solution |
| gradDivu2 | [out] third (z) component of grad div of exact solution |
| x | [in] x coordinate |
| y | [in] y coordinate |
| z | [in] z coordinate |
| mu | [in] material parameter |
◆ evalu()
| int evalu |
( |
double & |
uExact0, |
|
|
double & |
uExact1, |
|
|
double & |
uExact2, |
|
|
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z |
|
) |
| |
Exact solution evaluation.
- Parameters
-
| uExact0 | [out] first component of exact solution at (x,y,z) |
| uExact1 | [out] second component of exact solution at (x,y,z) |
| uExact2 | [out] third component of exact solution at (x,y,z) |
| x | [in] x coordinate |
| y | [in] y coordinate |
| z | [in] z coordinate |
◆ Multiply_Ones()
| int Multiply_Ones |
( |
const Epetra_CrsMatrix & |
A, |
|
|
const Epetra_Vector & |
x, |
|
|
Epetra_Vector & |
y |
|
) |
| |
◆ solution_test()
| void solution_test |
( |
string |
msg, |
|
|
const Epetra_Operator & |
A, |
|
|
const Epetra_MultiVector & |
lhs, |
|
|
const Epetra_MultiVector & |
rhs, |
|
|
const Epetra_MultiVector & |
xexact, |
|
|
Epetra_Time & |
Time, |
|
|
double & |
TotalErrorExactSol, |
|
|
double & |
TotalErrorResidual |
|
) |
| |
Compute ML solution residual.
- Parameters
-
| A | [in] discrete operator |
| lhs | [in] solution vector |
| rhs | [in] right hand side vector |
| Time | [in] elapsed time for output |
| TotalErrorResidual | [out] error residual |
| TotalErrorExactSol | [out] error in xh (not an appropriate measure for H(curl) basis functions) |
◆ TestMultiLevelPreconditioner_CurlLSFEM()
| void TestMultiLevelPreconditioner_CurlLSFEM |
( |
char |
ProblemType[], |
|
|
Teuchos::ParameterList & |
MLList, |
|
|
Epetra_CrsMatrix & |
CurlCurl, |
|
|
Epetra_CrsMatrix & |
D0clean, |
|
|
Epetra_CrsMatrix & |
M0inv, |
|
|
Epetra_CrsMatrix & |
M1, |
|
|
Epetra_MultiVector & |
xh, |
|
|
Epetra_MultiVector & |
b, |
|
|
double & |
TotalErrorResidual, |
|
|
double & |
TotalErrorExactSol |
|
) |
| |
ML Preconditioner.
- Parameters
-
| ProblemType | [in] problem type |
| MLList | [in] ML parameter list |
| CurlCurl | [in] H(curl) stiffness matrix |
| D0clean | [in] Edge to node stiffness matrix |
| M0inv | [in] H(grad) mass matrix inverse |
| M1 | [in] H(curl) mass matrix |
| xh | [out] solution vector |
| b | [in] right-hand-side vector |
| TotalErrorResidual | [out] error residual |
| TotalErrorExactSol | [out] error in xh |
References Multiply_Ones().
void evaluateExactSolutionGrad(ArrayOut &exactSolutionGradValues, const ArrayIn &evaluationPoints)
Computation of the gradient of the exact solution at array of points in physical space.
Definition: example_Poisson_NoFE_Tpetra.cpp:1565
void evaluateMaterialTensor(ArrayOut &worksetMaterialValues, const ArrayIn &evaluationPoints)
Computation of the material tensor at array of points in physical space.
Definition: example_Poisson_NoFE_Tpetra.cpp:1498
void evaluateExactSolutionGrad(ArrayOut &exactSolutionGradValues, const ArrayIn &evaluationPoints)
Computation of the gradient of the exact solution at array of points in physical space.
Definition: example_Poisson.cpp:1514
Intrepid Poisson test problem example: common functionality.
void exactSolutionGrad(Scalar gradExact[3], const Scalar &x, const Scalar &y, const Scalar &z)
Computes gradient of the exact solution. Requires user-defined exact solution.
Definition: example_Poisson.cpp:1384
void solution_test(string msg, const Epetra_Operator &A, const Epetra_MultiVector &lhs, const Epetra_MultiVector &rhs, const Epetra_MultiVector &xexact, Epetra_Time &Time, double &TotalErrorExactSol, double &TotalErrorResidual)
Compute ML solution residual.
Definition: example_DivLSFEM.cpp:2202
int evalCurlCurlu(double &curlcurlu0, double &curlcurlu1, double &curlcurlu2, double &x, double &y, double &z, double &mu)
CurlCurl of exact solution.
Definition: example_Maxwell.cpp:2701
const Scalar exactSolution(const Scalar &x, const Scalar &y, const Scalar &z)
User-defined exact solution.
Definition: example_StabilizedADR.cpp:1175
Definition: EpetraExt_AmesosBTF_CrsMatrix.h:50
int evalu(double &uExact0, double &uExact1, double &uExact2, double &x, double &y, double &z)
ML Preconditioner.
Definition: example_Maxwell.cpp:2676
int Multiply_Ones(const Epetra_CrsMatrix &A, const Epetra_Vector &x, Epetra_Vector &y)
Multiplies Ax = y, where all non-zero entries of A are replaced with the value 1.0.
Definition: example_GradDiv.cpp:2078
void materialTensor(Scalar material[][3], const Scalar &x, const Scalar &y, const Scalar &z)
User-defined material tensor.
Definition: example_Poisson_stk.cpp:1211
const Scalar exactSolution(const Scalar &x, const Scalar &y, const Scalar &z)
User-defined exact solution.
Definition: example_Poisson_NoFE_Tpetra.cpp:1400
User-defined material tensor.
Definition: TrilinosCouplings_TpetraIntrepidHybridPoisson2DExample.cpp:1238
const Scalar1 sourceTerm(Scalar1 &x, Scalar1 &y, Scalar2 &epsilon, const bool variableEpsilon, const std::string problem)
Computes source term: f = -div(J_n). Requires user-defined exact solution and material parameters.
Definition: example_CVFEM.cpp:1366
void evaluateExactSolution(ArrayOut &exactSolutionValues, const ArrayIn &evaluationPoints)
Computation of the exact solution at array of points in physical space.
Definition: example_Poisson_NoFE_Tpetra.cpp:1546
const Scalar sourceTerm(Scalar &x, Scalar &y, Scalar &z)
Computes source term: f = -div(A.grad u). Requires user-defined exact solution and material tensor.
Definition: example_Poisson_NoFE_Tpetra.cpp:1457
const Scalar exactSolution(const Scalar &x, const Scalar &y, const Scalar &z)
User-defined exact solution.
Definition: example_Poisson_stk.cpp:1194
Tpetra version of the Intrepid Poisson test problem example.
void evaluateExactSolution(ArrayOut &exactSolutionValues, const ArrayIn &evaluationPoints)
Computation of the exact solution at array of points in physical space.
Definition: example_CVFEM.cpp:1407
void exactSolutionGrad(Scalar gradExact[3], const Scalar &x, const Scalar &y, const Scalar &z)
Computes gradient of the exact solution. Requires user-defined exact solution.
Definition: example_Poisson_stk.cpp:1232
int evalCurlu(double &curlu0, double &curlu1, double &curlu2, double &x, double &y, double &z, double &mu)
Curl of exact solution.
Definition: example_Maxwell.cpp:2688
void evaluateSourceTerm(ArrayOut &sourceTermValues, const ArrayIn &evaluationPoints)
Computation of the source term at array of points in physical space.
Definition: example_StabilizedADR.cpp:1380
void evaluateMaterialTensor(ArrayOut &worksetMaterialValues, const ArrayIn &evaluationPoints)
Computation of the material tensor at array of points in physical space.
Definition: example_Poisson_stk.cpp:1295
const Scalar exactSolution(const Scalar &x, const Scalar &y, const Scalar &z)
User-defined exact solution.
Definition: example_Poisson.cpp:1349
NewTypeRef operator()(OriginalTypeRef orig)
Definition: EpetraExt_AmesosAMDGlobal_CrsGraph.cpp:49
AmesosBTF_CrsGraph(bool upperTri=false, bool verbose=false)
Definition: EpetraExt_AmesosBTF_CrsGraph.h:60
~AmesosAMDGlobal_CrsGraph()
Definition: EpetraExt_AmesosAMDGlobal_CrsGraph.cpp:43
int evalGradDivu(double &gradDivu0, double &gradDivu1, double &gradDivu2, double &x, double &y, double &z, double &mu)
Gradient of Divergence of exact solution.
Definition: example_CurlLSFEM.cpp:2313
void evaluateExactSolutionGrad(ArrayOut &exactSolutionGradValues, const ArrayIn &evaluationPoints)
Computation of the gradient of the exact solution at array of points in physical space.
Definition: example_StabilizedADR.cpp:1422
void exactSolutionGrad(Scalar gradExact[2], const Scalar &x, const Scalar &y)
Computes gradient of the exact solution. Requires user-defined exact solution.
Definition: example_CVFEM.cpp:1347
Definition: EpetraExt_Isorropia_CrsGraph.h:45
int evalGradDivu(double &gradDivu0, double &gradDivu1, double &gradDivu2, double &x, double &y, double &z, double &kappa)
Grad of Div of exact solution.
Definition: example_GradDiv.cpp:2426
Generic Belos solver for the Intrepid Poisson test problem example.
int evalu(double &uExact0, double &uExact1, double &uExact2, double &x, double &y, double &z)
Exact solution evaluation.
Definition: example_DivLSFEM.cpp:2338
void evaluateExactSolutionGrad(ArrayOut &exactSolutionGradValues, const ArrayIn &evaluationPoints)
Computation of the gradient of the exact solution at array of points in physical space.
Definition: example_CVFEM.cpp:1427
void materialTensor(Scalar material[][3], const Scalar &x, const Scalar &y, const Scalar &z)
User-defined material tensor.
Definition: example_Poisson_NoFE_Tpetra.cpp:1414
int evalCurlu(double &curlu0, double &curlu1, double &curlu2, double &x, double &y, double &z, double &mu)
Curl of exact solution.
Definition: example_CurlLSFEM.cpp:2263
int Multiply_Ones(const Epetra_CrsMatrix &A, const Epetra_Vector &x, Epetra_Vector &y)
Multiplies Ax = y, where all non-zero entries of A are replaced with the value 1.0.
Definition: example_CurlLSFEM.cpp:1992
Definition: EpetraExt_AmesosBTFGlobal_LinearProblem.h:53
Helper functions for Poisson test problem with Intrepid + Pamgen.
int evalu(double &uExact0, double &uExact1, double &uExact2, double &x, double &y, double &z)
Exact solution evaluation.
Definition: example_CurlLSFEM.cpp:2193
Epetra version of the Intrepid Poisson test problem example.
void exactSolutionGrad(Scalar gradExact[3], const Scalar &x, const Scalar &y, const Scalar &z)
Computes gradient of the exact solution. Requires user-defined exact solution.
Definition: example_StabilizedADR.cpp:1229
void evaluateExactSolution(ArrayOut &exactSolutionValues, const ArrayIn &evaluationPoints)
Computation of the exact solution at array of points in physical space.
Definition: example_Poisson_stk.cpp:1344
~AmesosBTF_CrsGraph()
Definition: EpetraExt_AmesosBTF_CrsGraph.cpp:42
void advectionVelocity(Scalar advVel[2], const Scalar &x, const Scalar &y, const std::string problem)
User-defined advection velocity.
Definition: example_CVFEM.cpp:1303
void diffusionTensor(Scalar diffusion[][3], const Scalar &x, const Scalar &y, const Scalar &z)
User-defined diffusion tensor.
Definition: example_StabilizedADR.cpp:1190
void evaluateSourceTerm(ArrayOut &sourceTermValues, const ArrayIn &evaluationPoints)
Computation of the source term at array of points in physical space.
Definition: example_Poisson.cpp:1475
const Scalar sourceTerm(Scalar &x, Scalar &y, Scalar &z)
Computes source term: f = -div(A.grad u). Requires user-defined exact solution and material tensor.
Definition: example_Poisson_stk.cpp:1254
void materialTensor(Scalar material[][3], const Scalar &x, const Scalar &y, const Scalar &z)
User-defined material tensor.
Definition: example_Poisson.cpp:1363
double evalDivu(double &x, double &y, double &z)
Divergence of exact solution.
Definition: example_DivLSFEM.cpp:2372
double evalDivu(double &x, double &y, double &z)
Divergence of exact solution.
Definition: example_GradDiv.cpp:2356
const Scalar sourceTerm(Scalar &x, Scalar &y, Scalar &z)
Computes source term: f = -div(K.grad u - b.u) + c.u. Requires user-defined exact solution,...
Definition: example_StabilizedADR.cpp:1252
void evaluateExactSolutionGrad(ArrayOut &exactSolutionGradValues, const ArrayIn &evaluationPoints)
Computation of the gradient of the exact solution at array of points in physical space.
Definition: example_Poisson_stk.cpp:1365
void evaluateExactSolution(ArrayOut &exactSolutionValues, const ArrayIn &evaluationPoints)
Computation of the exact solution at array of points in physical space.
Definition: example_Poisson.cpp:1495
void TestMultiLevelPreconditioner_DivLSFEM(char ProblemType[], Teuchos::ParameterList &MLList, Epetra_CrsMatrix &GradDiv, Epetra_CrsMatrix &D0clean, Epetra_CrsMatrix &D1clean, Epetra_CrsMatrix &FaceNode, Epetra_CrsMatrix &M1, Epetra_CrsMatrix &M1inv, Epetra_CrsMatrix &M2, Epetra_MultiVector &xh, Epetra_MultiVector &b, double &TotalErrorResidual, double &TotalErrorExactSol)
ML Preconditioner.
Definition: example_DivLSFEM.cpp:2236
const Scalar1 diffusivity(const Scalar1 &x, const Scalar1 &y, const Scalar2 &epsilon, const bool variableEpsilon)
User-defined diffusivity.
Definition: example_CVFEM.cpp:1326
void createMesh(ArrayOut1 &elemToNode, ArrayOut2 &nodeCoords, ArrayOut1 &bcLeftId, ArrayOut1 &bcRightId, ArrayOut1 &bcTopId, ArrayOut1 &bcBotId, const std::string &meshType, const Scalar &meshSize)
Create quadrilateral or triangle mesh on the domain [0,1]x[0,1].
Definition: example_CVFEM.cpp:1456
void solution_test(string msg, const Epetra_Operator &A, const Epetra_MultiVector &lhs, const Epetra_MultiVector &rhs, const Epetra_MultiVector &xexact, Epetra_Time &Time, double &TotalErrorExactSol, double &TotalErrorResidual)
Compute ML solution residual.
Definition: example_Maxwell.cpp:2350
int Multiply_Ones(const Epetra_CrsMatrix &A, const Epetra_Vector &x, Epetra_Vector &y)
Multiplies Ax = y, where all non-zero entries of A are replaced with the value 1.0.
Definition: example_DivLSFEM.cpp:2074
void getBasis(Teuchos::RCP< Intrepid::Basis< double, IntrepidFieldContainer > > &basis, const shards::CellTopology &cellTopology, int order)
Simple factory that chooses basis function based on cell topology.
Definition: example_Poisson_stk.cpp:1472
Definition: EpetraExt_AmesosBTF_CrsGraph.h:48
void evaluateSourceTerm(ArrayOut &sourceTermValues, const ArrayIn &evaluationPoints)
Computation of the source term at array of points in physical space.
Definition: example_Poisson_NoFE_Tpetra.cpp:1526
int evalu(double &uExact0, double &uExact1, double &uExact2, double &x, double &y, double &z)
Exact solution evaluation.
Definition: example_GradDiv.cpp:2322
int Multiply_Ones(const Epetra_CrsMatrix &A, const Epetra_Vector &x, Epetra_Vector &y)
Multiplies Ax = y, where all non-zero entries of A are replaced with the value 1.0.
Definition: example_Maxwell.cpp:2283
int Multiply_Abs(const Epetra_CrsMatrix &A, const Epetra_Vector &x, Epetra_Vector &y)
Multiplies abs(A)x = y, where all non-zero entries of A are replaced with their absolute values value...
Definition: example_DivLSFEM.cpp:2132
void exactSolutionGrad(Scalar gradExact[3], const Scalar &x, const Scalar &y, const Scalar &z)
Computes gradient of the exact solution. Requires user-defined exact solution.
Definition: example_Poisson_NoFE_Tpetra.cpp:1435
void evaluateMaterialTensor(ArrayOut &worksetMaterialValues, const ArrayIn &evaluationPoints)
Computation of the material tensor at array of points in physical space.
Definition: example_Poisson.cpp:1447
void TestMultiLevelPreconditioner_CurlLSFEM(char ProblemType[], Teuchos::ParameterList &MLList, Epetra_CrsMatrix &CurlCurl, Epetra_CrsMatrix &D0clean, Epetra_CrsMatrix &M0inv, Epetra_CrsMatrix &M1, Epetra_MultiVector &xh, Epetra_MultiVector &b, double &TotalErrorResidual, double &TotalErrorExactSol)
ML Preconditioner.
Definition: example_CurlLSFEM.cpp:2093
NewTypeRef operator()(OriginalTypeRef orig)
Definition: EpetraExt_AmesosBTF_CrsGraph.cpp:48
void getPamgenMesh(FieldContainer< Scalar > &localNodeCoordsFC, FieldContainer< long long > &localCellToNodeFC, FieldContainer< int > &nodeOnBoundaryFC, FieldContainer< bool > &nodeIsOwnedFC, FieldContainer< long long > &globalNodeIdsFC, const std::string &meshInput, const int &procRank, const int &numProcs, const Epetra_Comm &Comm, Epetra_Time &Time, const string &message, const int verbose=0)
Pamgen wrapper.
Definition: example_StabilizedADR.cpp:1531
Definition: example_CurlLSFEM.cpp:180
void solution_test(string msg, const Epetra_Operator &A, const Epetra_MultiVector &lhs, const Epetra_MultiVector &rhs, const Epetra_MultiVector &xexact, Epetra_Time &Time, double &TotalErrorExactSol, double &TotalErrorResidual)
Compute ML solution residual.
Definition: example_GradDiv.cpp:2206
void evaluateExactSolution(ArrayOut &exactSolutionValues, const ArrayIn &evaluationPoints)
Computation of the exact solution at array of points in physical space.
Definition: example_StabilizedADR.cpp:1401
int evalCurlCurlu(double &curlCurlu0, double &curlCurlu1, double &curlCurlu2, double &x, double &y, double &z, double &mu)
Curl of curl of exact solution.
Definition: example_DivLSFEM.cpp:2442
int TestMultiLevelPreconditionerLaplace(char ProblemType[], Teuchos::ParameterList &MLList, Epetra_CrsMatrix &A, const Epetra_MultiVector &xexact, Epetra_MultiVector &b, Epetra_MultiVector &uh, double &TotalErrorResidual, double &TotalErrorExactSol)
ML Preconditioner.
Definition: example_Poisson.cpp:1544
void evaluateAdvectiveVector(ArrayOut &worksetAdvectionValues, const ArrayIn &evaluationPoints)
Computation of the advective vector at array of points in physical space..
Definition: example_StabilizedADR.cpp:1331
void TestMultiLevelPreconditioner_Maxwell(char ProblemType[], Teuchos::ParameterList &MLList, Epetra_CrsMatrix &CurlCurl, Epetra_CrsMatrix &D0clean, Epetra_CrsMatrix &M0inv, Epetra_CrsMatrix &M1, Epetra_MultiVector &xh, Epetra_MultiVector &b, double &TotalErrorResidual, double &TotalErrorExactSol)
ML Preconditioner.
Definition: example_Maxwell.cpp:2475
int evalCurlu(double &curlu0, double &curlu1, double &curlu2, double &x, double &y, double &z, double &mu)
Curl of exact solution.
Definition: example_DivLSFEM.cpp:2394
void TestMultiLevelPreconditioner_GradDiv(char ProblemType[], Teuchos::ParameterList &MLList, Epetra_CrsMatrix &GradDiv, Epetra_CrsMatrix &D0clean, Epetra_CrsMatrix &D1clean, Epetra_CrsMatrix &FaceNode, Epetra_CrsMatrix &M1, Epetra_CrsMatrix &M1inv, Epetra_CrsMatrix &M2, Epetra_MultiVector &xh, Epetra_MultiVector &b, double &TotalErrorResidual, double &TotalErrorExactSol)
ML Preconditioner.
Definition: example_GradDiv.cpp:2240
Definition: example_Poisson2D_pn.cpp:188
AmesosAMDGlobal_CrsGraph(bool verbose=false, bool debug=false)
Definition: EpetraExt_AmesosAMDGlobal_CrsGraph.h:60
void evaluateReactionCoefficient(ArrayOut &worksetReactionValues, const ArrayIn &evaluationPoints)
Computation of the reaction coefficient at array of points in physical space..
Definition: example_StabilizedADR.cpp:1359
void evaluateSourceTerm(ArrayOut &sourceTermValues, const ArrayIn &evaluationPoints)
Computation of the source term at array of points in physical space.
Definition: example_Poisson_stk.cpp:1324
void evaluateDiffusionTensor(ArrayOut &worksetDiffusionValues, const ArrayIn &evaluationPoints)
Computation of the diffusion tensor at array of points in physical space.
Definition: example_StabilizedADR.cpp:1301
double evalDivu(double &x, double &y, double &z, double &mu)
Divergence of exact solution.
Definition: example_CurlLSFEM.cpp:2230
const Scalar sourceTerm(Scalar &x, Scalar &y, Scalar &z)
Computes source term: f = -div(A.grad u). Requires user-defined exact solution and material tensor.
Definition: example_Poisson.cpp:1406
void advectiveVector(Scalar advection[3], const Scalar &x, const Scalar &y, const Scalar &z)
User-defined advective vector.
Definition: example_StabilizedADR.cpp:1207
int Multiply_Abs(const Epetra_CrsMatrix &A, const Epetra_Vector &x, Epetra_Vector &y)
Multiplies abs(A)x = y, where all non-zero entries of A are replaced with their absolute values value...
Definition: example_GradDiv.cpp:2136
const Scalar reactionTerm(const Scalar &x, const Scalar &y, const Scalar &z)
User-defined reaction coefficient.
Definition: example_StabilizedADR.cpp:1216
Definition: EpetraExt_AmesosAMDGlobal_CrsGraph.h:48
const Scalar exactSolution(const Scalar &x, const Scalar &y)
User-defined exact solution.
Definition: example_CVFEM.cpp:1295
void solution_test(string msg, const Epetra_Operator &A, const Epetra_MultiVector &lhs, const Epetra_MultiVector &rhs, const Epetra_MultiVector &xexact, Epetra_Time &Time, double &TotalErrorExactSol, double &TotalErrorResidual)
Compute ML solution residual.
Definition: example_CurlLSFEM.cpp:2059