ESYS13  Revision_
Classes | Functions | Variables
finley Namespace Reference

Classes

class  FinleyAdapterException
 FinleyAdapterException exception class. More...
struct  null_deleter
class  MeshAdapter
 MeshAdapter implements the AbstractContinuousDomain interface for the Finley library. More...
class  ReferenceElementSetWrapper

Functions

void setFinleyError (Finley_ErrorCodeType errorCode, const std::string &errMess)
 Provide a C++ interface to the finley C funcion of the same name. Needed because of constness problems.
void checkFinleyError ()
 Convert a C finley error into a C++ exception.
escript::Domain_ptr brick (int n0=1, int n1=1, int n2=1, int order=1, double l0=1.0, double l1=1.0, double l2=1.0, int periodic0=0, int periodic1=0, int periodic2=0, int integrationOrder=-1, int reducedIntegrationOrder=-1, int useElementsOnFace=0, int useFullElementOrder=0, int optimize=0, const std::vector< double > &points=std::vector< double >(), const std::vector< int > &tags=std::vector< int >(), const std::map< std::string, int > &tagnamestonums=std::map< std::string, int >())
 Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2].
escript::Domain_ptr rectangle (int n0=1, int n1=1, int order=1, double l0=1.0, double l1=1.0, int periodic0=false, int periodic1=false, int integrationOrder=-1, int reducedIntegrationOrder=-1, int useElementsOnFace=0, int useFullElementOrder=0, int optimize=0, const std::vector< double > &points=std::vector< double >(), const std::vector< int > &tags=std::vector< int >(), const std::map< std::string, int > &tagnamestonums=std::map< std::string, int >())
 Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].
void cleanupAndThrow (Finley_Mesh *mesh, Esys_MPIInfo *info, string msg)
Domain_ptr loadMesh (const std::string &fileName)
 A suite of factory methods for creating various MeshAdapters.
Domain_ptr readMesh (const std::string &fileName, int integrationOrder=-1, int reducedIntegrationOrder=-1, int optimize=0)
 Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.
Domain_ptr readGmsh (const std::string &fileName, int numDim, int integrationOrder=-1, int reducedIntegrationOrder=-1, int optimize=0, int useMacroElements=0)
 Read a gmsh mesh file.
Domain_ptr brick_driver (const boost::python::list &args)
 Python driver for brick()
Domain_ptr meshMerge (const boost::python::list &meshList)
 Merges a list of meshes into one list.
Domain_ptr rectangle_driver (const boost::python::list &args)
 Python driver for rectangle()
Domain_ptr glueFaces (const boost::python::list &meshList, double safetyFactor=0.2, double tolerance=1.e-8, int optimize=0)
 Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the face elements.
Domain_ptr joinFaces (const boost::python::list &meshList, double safetyFactor=0.2, double tolerance=1.e-8, int optimize=0)
 Detects matching faces in the mesh and replaces them by joint elements.

Variables

const boost::python::list EmptyPythonList = boost::python::list()

Function Documentation

escript::Domain_ptr finley::brick ( int  n0 = 1,
int  n1 = 1,
int  n2 = 1,
int  order = 1,
double  l0 = 1.0,
double  l1 = 1.0,
double  l2 = 1.0,
int  periodic0 = 0,
int  periodic1 = 0,
int  periodic2 = 0,
int  integrationOrder = -1,
int  reducedIntegrationOrder = -1,
int  useElementsOnFace = 0,
int  useFullElementOrder = 0,
int  optimize = 0,
const std::vector< double > &  points = std::vector< double >(),
const std::vector< int > &  tags = std::vector< int >(),
const std::map< std::string, int > &  tagnamestonums = std::map< std::string, int >() 
)

Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2].

Parameters:
n0,n1,n2Input - number of elements in each dimension
orderInput - =1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1)
l0,l1,l2Input - length of each side of brick
integrationOrderInput - order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
reducedIntegrationOrderInput - order of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
useElementsOnFaceInput - whether or not to use elements on face
periodic0,periodic1,periodic2Input - whether or not boundary conditions of the dimension are periodic
useFullElementOrder
optimize

References finley::MeshAdapter::addDiracPoints(), checkFinleyError(), FALSE, Finley_Mesh_addTagMap(), Finley_RectangularMesh_Hex20(), Finley_RectangularMesh_Hex8(), finley::MeshAdapter::getMesh(), escript::AbstractDomain::getPtr(), setFinleyError(), TRUE, and VALUE_ERROR.

escript::Domain_ptr finley::brick_driver ( const boost::python::list &  args)

Python driver for brick()

Parameters:
argssee brick() definition for order of params

References dudley::brick().

Referenced by BOOST_PYTHON_MODULE().

void finley::cleanupAndThrow ( Finley_Mesh mesh,
Esys_MPIInfo info,
string  msg 
) [inline]
escript::Domain_ptr finley::glueFaces ( const boost::python::list &  meshList,
double  safetyFactor = 0.2,
double  tolerance = 1.e-8,
int  optimize = 0 
)

Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the face elements.

Parameters:
meshListInput - The list of meshes.
safetyFactorInput - ??
toleranceInput - ??
optimizeInput - switches on the optimization of node labels

References checkFinleyError(), FALSE, Finley_Mesh_glueFaces(), finley::MeshAdapter::getFinley_Mesh(), meshMerge(), and TRUE.

Referenced by BOOST_PYTHON_MODULE().

escript::Domain_ptr finley::joinFaces ( const boost::python::list &  meshList,
double  safetyFactor = 0.2,
double  tolerance = 1.e-8,
int  optimize = 0 
)

Detects matching faces in the mesh and replaces them by joint elements.

Parameters:
meshListInput - The list of meshes.
safetyFactorInput - ??
toleranceInput - ??
optimizeInput - switches on the optimization of node labels

References checkFinleyError(), FALSE, Finley_Mesh_joinFaces(), finley::MeshAdapter::getFinley_Mesh(), meshMerge(), and TRUE.

Referenced by BOOST_PYTHON_MODULE().

escript::Domain_ptr finley::loadMesh ( const std::string &  fileName)
escript::Domain_ptr finley::meshMerge ( const boost::python::list &  meshList)

Merges a list of meshes into one list.

Parameters:
meshListInput - The list of meshes.

References checkFinleyError(), Finley_Mesh_merge(), escript::AbstractDomain::getPtr(), TMPMEMALLOC, and TMPMEMFREE.

Referenced by BOOST_PYTHON_MODULE(), glueFaces(), and joinFaces().

escript::Domain_ptr finley::readGmsh ( const std::string &  fileName,
int  numDim,
int  integrationOrder = -1,
int  reducedIntegrationOrder = -1,
int  optimize = 0,
int  useMacroElements = 0 
)

Read a gmsh mesh file.

Parameters:
fileNameInput - The name of the file.
numDimInput - spatial dimension
integrationOrderInput - order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
reducedIntegrationOrderInput - order of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
optimizeInput - switches on the optimization of node labels
useMacroElements

References blocktimer_increment(), blocktimer_time(), checkFinleyError(), FALSE, Finley_Mesh_readGmsh(), escript::AbstractDomain::getPtr(), TMPMEMALLOC, TMPMEMFREE, and TRUE.

Referenced by BOOST_PYTHON_MODULE().

escript::Domain_ptr finley::readMesh ( const std::string &  fileName,
int  integrationOrder = -1,
int  reducedIntegrationOrder = -1,
int  optimize = 0 
)

Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.

Parameters:
fileNameInput - The name of the file.
integrationOrderInput - order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
reducedIntegrationOrderInput - order of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
optimizeInput - switches on the optimization of node labels

References blocktimer_increment(), blocktimer_time(), checkFinleyError(), FALSE, Finley_Mesh_read(), escript::AbstractDomain::getPtr(), TMPMEMALLOC, TMPMEMFREE, and TRUE.

Referenced by BOOST_PYTHON_MODULE().

escript::Domain_ptr finley::rectangle ( int  n0 = 1,
int  n1 = 1,
int  order = 1,
double  l0 = 1.0,
double  l1 = 1.0,
int  periodic0 = false,
int  periodic1 = false,
int  integrationOrder = -1,
int  reducedIntegrationOrder = -1,
int  useElementsOnFace = 0,
int  useFullElementOrder = 0,
int  optimize = 0,
const std::vector< double > &  points = std::vector< double >(),
const std::vector< int > &  tags = std::vector< int >(),
const std::map< std::string, int > &  tagnamestonums = std::map< std::string, int >() 
)

Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].

Parameters:
n0,n1Input - number of elements in each dimension
orderInput - =1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1)
l0,l1Input - length of each side of brick
integrationOrderInput - order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
reducedIntegrationOrderInput - order of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
periodic0,periodic1Input - whether or not the boundary conditions of the dimension are periodic
useElementsOnFaceInput - whether or not to use elements on face
useFullElementOrder
optimize

References finley::MeshAdapter::addDiracPoints(), checkFinleyError(), FALSE, Finley_ElementFile_setTagsInUse(), Finley_Mesh_addTagMap(), Finley_RectangularMesh_Rec4(), Finley_RectangularMesh_Rec8(), finley::MeshAdapter::getMesh(), escript::AbstractDomain::getPtr(), Finley_Mesh::Points, setFinleyError(), TRUE, and VALUE_ERROR.

escript::Domain_ptr finley::rectangle_driver ( const boost::python::list &  args)

Python driver for rectangle()

Parameters:
argssee rectangle() definition for order of params

References dudley::rectangle().

Referenced by BOOST_PYTHON_MODULE().

void finley::setFinleyError ( Finley_ErrorCodeType  errorCode,
const std::string &  errMess 
)

Provide a C++ interface to the finley C funcion of the same name. Needed because of constness problems.

References Finley_setError().

Referenced by brick(), and rectangle().


Variable Documentation

const boost::python::list finley::EmptyPythonList = boost::python::list()