Dudley.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
* Development from 2019 by School of Earth and Environmental Sciences
**
*****************************************************************************/
#ifndef __DUDLEY_H__
#define __DUDLEY_H__
/****************************************************************************/
/* Dudley finite element solver */
/****************************************************************************/
#include <escript/DataTypes.h>
#include <dudley/DudleyException.h>
#include <escript/Data.h>
#include <escript/EsysMPI.h>
namespace dudley {
using escript::DataTypes::index_t;
using escript::DataTypes::dim_t;
using escript::DataTypes::IndexVector;
#define DUDLEY_UNKNOWN -1
#define DUDLEY_DEGREES_OF_FREEDOM 1
#define DUDLEY_NODES 3
#define DUDLEY_ELEMENTS 4
#define DUDLEY_FACE_ELEMENTS 5
#define DUDLEY_POINTS 6
#define DUDLEY_REDUCED_ELEMENTS 10
#define DUDLEY_REDUCED_FACE_ELEMENTS 11
//
// Codes for function space types supported
enum {
DegreesOfFreedom = DUDLEY_DEGREES_OF_FREEDOM,
Nodes = DUDLEY_NODES,
Elements = DUDLEY_ELEMENTS,
ReducedElements = DUDLEY_REDUCED_ELEMENTS,
FaceElements = DUDLEY_FACE_ELEMENTS,
ReducedFaceElements = DUDLEY_REDUCED_FACE_ELEMENTS,
Points = DUDLEY_POINTS
};
inline bool hasReducedIntegrationOrder(const escript::Data& in)
{
const int fs = in.getFunctionSpace().getTypeCode();
return (fs == ReducedElements || fs == ReducedFaceElements);
}
#define DUDLEY_INITIAL_STATUS 0
} // namespace dudley
#endif // __DUDLEY_H__
DUDLEY_FACE_ELEMENTS
#define DUDLEY_FACE_ELEMENTS
Definition: Dudley.h:44
DUDLEY_DEGREES_OF_FREEDOM
#define DUDLEY_DEGREES_OF_FREEDOM
Definition: Dudley.h:41
DUDLEY_ELEMENTS
#define DUDLEY_ELEMENTS
Definition: Dudley.h:43
DUDLEY_NODES
#define DUDLEY_NODES
Definition: Dudley.h:42
DUDLEY_POINTS
#define DUDLEY_POINTS
Definition: Dudley.h:45
DUDLEY_REDUCED_FACE_ELEMENTS
#define DUDLEY_REDUCED_FACE_ELEMENTS
Definition: Dudley.h:47
DUDLEY_REDUCED_ELEMENTS
#define DUDLEY_REDUCED_ELEMENTS
Definition: Dudley.h:46
escript::Data
Data represents a collection of datapoints.
Definition: Data.h:64
escript::Data::getFunctionSpace
const FunctionSpace & getFunctionSpace() const
Return the function space.
Definition: Data.h:463
escript::FunctionSpace::getTypeCode
int getTypeCode() const
Returns the function space type code.
Definition: FunctionSpace.cpp:95
dudley
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:32
dudley::FaceElements
@ FaceElements
Definition: Dudley.h:56
dudley::ReducedFaceElements
@ ReducedFaceElements
Definition: Dudley.h:57
dudley::ReducedElements
@ ReducedElements
Definition: Dudley.h:55
dudley::DegreesOfFreedom
@ DegreesOfFreedom
Definition: Dudley.h:52
dudley::Nodes
@ Nodes
Definition: Dudley.h:53
dudley::Elements
@ Elements
Definition: Dudley.h:54
dudley::Points
@ Points
Definition: Dudley.h:58
dudley::hasReducedIntegrationOrder
bool hasReducedIntegrationOrder(const escript::Data &in)
Definition: Dudley.h:61
escript::DataTypes::IndexVector
std::vector< index_t > IndexVector
Definition: DataTypes.h:64
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:66
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:61