Intrepid
Functions
example_04.cpp File Reference

Example of the CellTools class. More...

#include "Intrepid_CellTools.hpp"
#include "Intrepid_FieldContainer.hpp"
#include "Intrepid_DefaultCubatureFactory.hpp"
#include "Shards_CellTopology.hpp"
#include "Teuchos_GlobalMPISession.hpp"

Go to the source code of this file.

Functions

void vField (double &v1, double &v2, double &v3, const double &x, const double &y, const double &z)
 Evaluation of a 3D vector field in physical coordinate frame. More...
 
int main (int argc, char *argv[])
 

Detailed Description

Example of the CellTools class.

Author
Created by P. Bochev, D. Ridzal and K. Peterson, March 20, 2009

Definition in file example_04.cpp.

Function Documentation

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

Given a vector field u(x,y,z) and a face workset we want to compute the flux of u on every face in this workset. A face workset is a set of faces that are images of the same reference face. It is defined by the following items:

  1. cell topology of a parent cell
  2. a set of nodes in physical frame defining the parenct cells in the workset
  3. subcell dimension and ordinal, relative to the reference cell in 1)

Given a face workset, the key steps to accomplish the task, , are as follows:

  1. Obtain cubature points on workset faces, i.e., in physical frame;
  2. Obtain (non-normalized) face normals at cubature points on workset faces
  3. Evaluate the vector field u(x,y,z) at cubature points on workset faces
  4. Compute dot product of u(x,y,z) and the face normals, times the cubature weights

Definition at line 65 of file example_04.cpp.

References Intrepid::DefaultCubatureFactory< Scalar, ArrayPoint, ArrayWeight >::create(), Intrepid::FieldContainer< Scalar, ArrayTypeId >::resize(), and vField().

void vField ( double &  v1,
double &  v2,
double &  v3,
const double &  x,
const double &  y,
const double &  z 
)

Evaluation of a 3D vector field in physical coordinate frame.

Parameters
v1,v2,v3[out] - vector mfield evaluated at the argument point
x,y,z[in] - argument, a point in 3D Euclidean space

Definition at line 371 of file example_04.cpp.

Referenced by main().