Intrepid
Macros | Functions
example_02.cpp File Reference

Example building mass and stiffness matrices and right hand side for a div-curl system on a hexahedral mesh using div-conforming (face) elements. More...

#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_HDIV_HEX_I1_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_FECrsMatrix.h"
#include "Epetra_FEVector.h"
#include "Epetra_Vector.h"
#include "Teuchos_oblackholestream.hpp"
#include "Teuchos_RCP.hpp"
#include "Teuchos_BLAS.hpp"
#include "Shards_CellTopology.hpp"
#include "EpetraExt_RowMatrixOut.h"
#include "EpetraExt_MultiVectorOut.h"

Go to the source code of this file.

Functions

int evalu (double &uExact0, double &uExact1, double &uExact2, double &x, double &y, double &z)
 
double evalDivu (double &x, double &y, double &z)
 
int evalCurlu (double &curlu0, double &curlu1, double &curlu2, double &x, double &y, double &z)
 
int evalCurlCurlu (double &curlCurlu0, double &curlCurlu1, double &curlCurlu2, double &x, double &y, double &z)
 
int main (int argc, char *argv[])
 

Detailed Description

Example building mass and stiffness matrices and right hand side for a div-curl system on a hexahedral mesh using div-conforming (face) elements.

                   curl u = g  in Omega
                    div u = h  in Omega
                      u.n = 0  on Gamma

        Discrete linear system for face element coeficients (x):

                  (Kd + Md*Dc*McInv*Dc'*Md)x = b

                  Kd    - Hdiv stiffness matrix
                  Md    - Hdiv mass matrix
                  Dc    - Edge to Face incidence matrix
                  McInv - Hcurl mass matrix inverse
                  b     - right hand side vector
Author
Created by P. Bochev, D. Ridzal and K. Peterson.
Remarks
Usage
 ./Intrepid_example_Drivers_Example_02.exe NX NY NZ randomMesh mu1 mu2 mu1LX mu1RX mu1LY mu1RY mu1LZ mu1RZ verbose

    int NX              - num intervals in x direction (assumed box domain, -1,1) 
    int NY              - num intervals in y direction (assumed box domain, -1,1)
    int NZ              - num intervals in z direction (assumed box domain, -1,1)
    int randomMesh      - 1 if mesh randomizer is to be used 0 if not 
    double mu1          - material property value for region 1 
    double mu2          - material property value for region 2 
    double mu1LX        - left X boundary for region 1 
    double mu1RX        - right X boundary for region 1 
    double mu1LY        - left Y boundary for region 1 
    double mu1RY        - right Y boundary for region 1 
    double mu1LZ        - bottom Z boundary for region 1 
    double mu1RZ        - top Z boundary for region 1 
    verbose (optional)  - any character, indicates verbose output 
Sample command line
./Intrepid_example_Drivers_Example_02.exe 10 10 10 0 1.0 1.0 -1.0 1.0 -1.0 1.0 -1.0 1.0

Definition in file example_02.cpp.

Function Documentation

◆ evalCurlCurlu()

int evalCurlCurlu ( double & curlCurlu0,
double & curlCurlu1,
double & curlCurlu2,
double & x,
double & y,
double & z )

Definition at line 1185 of file example_02.cpp.

◆ evalCurlu()

int evalCurlu ( double & curlu0,
double & curlu1,
double & curlu2,
double & x,
double & y,
double & z )

Definition at line 1148 of file example_02.cpp.

◆ evalDivu()

double evalDivu ( double & x,
double & y,
double & z )

Definition at line 1129 of file example_02.cpp.

◆ evalu()

int evalu ( double & uExact0,
double & uExact1,
double & uExact2,
double & x,
double & y,
double & z )

Definition at line 1099 of file example_02.cpp.

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 134 of file example_02.cpp.