Skip to content
Snippets Groups Projects
Commit b560e8ac authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

Cleaning FunctionSpace: don't do Basis Job anymore

parent 36f63032
Branches
Tags
No related merge requests found
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
/** /**
@class BasisGenerator @class BasisGenerator
@brief A bunch of class method to generate a Basis @brief A bunch of class method to generate a Local Basis
A BasisGenerator is a bunch of @em class A BasisGenerator is a bunch of @em class
methods to generate a Basis. methods to generate a Local Basis (BasisLocal).
@note @note
A BasisGenerator got @em only @em class @em methods, A BasisGenerator got @em only @em class @em methods,
......
...@@ -14,7 +14,10 @@ FunctionSpace::FunctionSpace(void){ ...@@ -14,7 +14,10 @@ FunctionSpace::FunctionSpace(void){
FunctionSpace::~FunctionSpace(void){ FunctionSpace::~FunctionSpace(void){
// Basis // // Basis //
delete localBasis; for(unsigned int i = 0; i < nBasis; i++)
delete (*basis)[i];
delete basis;
// Dof // // Dof //
if(dof){ if(dof){
...@@ -57,26 +60,27 @@ void FunctionSpace::build(const GroupOfElement& goe, ...@@ -57,26 +60,27 @@ void FunctionSpace::build(const GroupOfElement& goe,
int nFace = myElement.getNumFaces(); int nFace = myElement.getNumFaces();
// Init Struct // // Init Struct //
type = basisType; nBasis = 1;
localBasis = BasisGenerator::generate(elementType, basis = new vector<const Basis*>(nBasis);
(*basis)[0] = BasisGenerator::generate(elementType,
basisType, basisType,
order, "hierarchical"); order, "hierarchical");
// Number of *Per* Entity functions // // Number of *Per* Entity functions //
fPerVertex = localBasis->getNVertexBased() / nVertex; fPerVertex = (*basis)[0]->getNVertexBased() / nVertex;
// NB: fPreVertex = 0 *or* 1 // NB: fPreVertex = 0 *or* 1
if(nEdge) if(nEdge)
fPerEdge = localBasis->getNEdgeBased() / nEdge; fPerEdge = (*basis)[0]->getNEdgeBased() / nEdge;
else else
fPerEdge = 0; fPerEdge = 0;
if(nFace) if(nFace)
fPerFace = localBasis->getNFaceBased() / nFace; fPerFace = (*basis)[0]->getNFaceBased() / nFace;
else else
fPerFace = 0; fPerFace = 0;
fPerCell = localBasis->getNCellBased(); // We always got 1 cell fPerCell = (*basis)[0]->getNCellBased(); // We always got 1 cell
// Build Dof // // Build Dof //
buildDof(); buildDof();
...@@ -140,68 +144,60 @@ vector<Dof> FunctionSpace::getKeys(const MElement& elem) const{ ...@@ -140,68 +144,60 @@ vector<Dof> FunctionSpace::getKeys(const MElement& elem) const{
MElement& element = const_cast<MElement&>(elem); MElement& element = const_cast<MElement&>(elem);
// Get Element Data // // Get Element Data //
const int nVertex = element.getNumPrimaryVertices(); const unsigned int nVertex = element.getNumPrimaryVertices();
const int nEdge = element.getNumEdges(); const unsigned int nEdge = element.getNumEdges();
const int nFace = element.getNumFaces(); const unsigned int nFace = element.getNumFaces();
vector<MVertex*> vertex(nVertex); vector<MVertex*> vertex(nVertex);
vector<MEdge> edge(nEdge); vector<MEdge> edge(nEdge);
vector<MFace> face(nFace); vector<MFace> face(nFace);
for(int i = 0; i < nVertex; i++) for(unsigned int i = 0; i < nVertex; i++)
vertex[i] = element.getVertex(i); vertex[i] = element.getVertex(i);
for(int i = 0; i < nEdge; i++) for(unsigned int i = 0; i < nEdge; i++)
edge[i] = element.getEdge(i); edge[i] = element.getEdge(i);
for(int i = 0; i < nFace; i++) for(unsigned int i = 0; i < nFace; i++)
face[i] = element.getFace(i); face[i] = element.getFace(i);
// Get FunctionSpace Data for this Element //
const int nFVertex = getNFunctionPerVertex(element);
const int nFEdge = getNFunctionPerEdge(element);
const int nFFace = getNFunctionPerFace(element);
const int nFCell = getNFunctionPerCell(element);
// Create Dof // // Create Dof //
const int nDofVertex = nFVertex * nVertex; unsigned int nDof =
const int nDofEdge = nFEdge * nEdge; fPerVertex * nVertex +
const int nDofFace = nFFace * nFace; fPerEdge * nEdge +
const int nDofCell = nFCell; fPerFace * nFace +
fPerCell;
int nDof =
nDofVertex + nDofEdge + nDofFace + nDofCell;
vector<Dof> myDof(nDof); vector<Dof> myDof(nDof);
int it = 0; unsigned int it = 0;
// Add Vertex Based Dof // // Add Vertex Based Dof //
for(int i = 0; i < nVertex; i++){ for(unsigned int i = 0; i < nVertex; i++){
for(int j = 0; j < nFVertex; j++){ for(unsigned int j = 0; j < fPerVertex; j++){
myDof[it].setDof(mesh->getGlobalId(*vertex[i]), j); myDof[it].setDof(mesh->getGlobalId(*vertex[i]), j);
it++; it++;
} }
} }
// Add Edge Based Dof // // Add Edge Based Dof //
for(int i = 0; i < nEdge; i++){ for(unsigned int i = 0; i < nEdge; i++){
for(int j = 0; j < nFEdge; j++){ for(unsigned int j = 0; j < fPerEdge; j++){
myDof[it].setDof(mesh->getGlobalId(edge[i]), j); myDof[it].setDof(mesh->getGlobalId(edge[i]), j);
it++; it++;
} }
} }
// Add Face Based Dof // // Add Face Based Dof //
for(int i = 0; i < nFace; i++){ for(unsigned int i = 0; i < nFace; i++){
for(int j = 0; j < nFFace; j++){ for(unsigned int j = 0; j < fPerFace; j++){
myDof[it].setDof(mesh->getGlobalId(face[i]), j); myDof[it].setDof(mesh->getGlobalId(face[i]), j);
it++; it++;
} }
} }
// Add Cell Based Dof // // Add Cell Based Dof //
for(int j = 0; j < nFCell; j++){ for(unsigned int j = 0; j < fPerCell; j++){
myDof[it].setDof(mesh->getGlobalId(element), j); myDof[it].setDof(mesh->getGlobalId(element), j);
it++; it++;
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include "BasisLocal.h" #include "Basis.h"
#include "Comparators.h" #include "Comparators.h"
#include "Dof.h" #include "Dof.h"
...@@ -44,12 +44,15 @@ class FunctionSpace{ ...@@ -44,12 +44,15 @@ class FunctionSpace{
const GroupOfElement* goe; const GroupOfElement* goe;
// Basis // // Basis //
const BasisLocal* localBasis; std::vector<const Basis*>* basis;
unsigned int nBasis;
unsigned int fPerVertex; unsigned int fPerVertex;
unsigned int fPerEdge; unsigned int fPerEdge;
unsigned int fPerFace; unsigned int fPerFace;
unsigned int fPerCell; unsigned int fPerCell;
unsigned int type;
// Scalar Field ? //
bool scalar;
// Dofs // // Dofs //
std::set<const Dof*, DofComparator>* dof; std::set<const Dof*, DofComparator>* dof;
...@@ -61,16 +64,14 @@ class FunctionSpace{ ...@@ -61,16 +64,14 @@ class FunctionSpace{
public: public:
virtual ~FunctionSpace(void); virtual ~FunctionSpace(void);
const std::vector<const Basis*>& getBasis(const MElement& element) const;
const Basis& getBasis(unsigned int i) const;
unsigned int getNBasis(void) const;
const GroupOfElement& getSupport(void) const; const GroupOfElement& getSupport(void) const;
unsigned int getOrder(void) const; unsigned int getOrder(void) const;
unsigned int getType(void) const;
bool isScalar(void) const; bool isScalar(void) const;
unsigned int getNFunctionPerVertex(const MElement& element) const;
unsigned int getNFunctionPerEdge(const MElement& element) const;
unsigned int getNFunctionPerFace(const MElement& element) const;
unsigned int getNFunctionPerCell(const MElement& element) const;
std::vector<Dof> getKeys(const MElement& element) const; std::vector<Dof> getKeys(const MElement& element) const;
std::vector<Dof> getKeys(const MVertex& vertex) const; std::vector<Dof> getKeys(const MVertex& vertex) const;
std::vector<Dof> getKeys(const MEdge& edge) const; std::vector<Dof> getKeys(const MEdge& edge) const;
...@@ -81,9 +82,6 @@ class FunctionSpace{ ...@@ -81,9 +82,6 @@ class FunctionSpace{
const GroupOfDof& getGoDFromElement(const MElement& element) const; const GroupOfDof& getGoDFromElement(const MElement& element) const;
unsigned int getNOrientation(void) const;
unsigned int getOrientation(const MElement& element) const;
unsigned int dofNumber(void) const; unsigned int dofNumber(void) const;
unsigned int groupNumber(void) const; unsigned int groupNumber(void) const;
...@@ -116,47 +114,10 @@ class FunctionSpace{ ...@@ -116,47 +114,10 @@ class FunctionSpace{
FunctionSpace FunctionSpace
** **
@fn FunctionSpace::getOrder
@return Return the @em order
of this FunctionSpace
**
@fn FunctionSpace::getType
@return Return the @em type of
the Basis functions composing
this Function Space.
@see Basis::getType()
**
@fn FunctionSpace::isScalar @fn FunctionSpace::isScalar
@return Returns: @return Returns:
@li @c true, if this FunstionSpace is scalar @li @c true, if this FunstionSpace is scalar
@li @c flase, otherwise @li @c flase, otherwise
@see Basis::isScalar()
**
@fn FunctionSpace::getNFunctionPerVertex
@param element A MElement of the support
@return Returns the number of @em Vertex Based
Basis Functions, defined on the given element
**
@fn FunctionSpace::getNFunctionPerEdge
@param element A MElement of the support
@return Returns the number of @em Edge Based
Basis Functions, defined on the given element
**
@fn FunctionSpace::getNFunctionPerFace
@param element A MElement of the support
@return Returns the number of @em Face Based
Basis Functions, defined on the given element
**
@fn FunctionSpace::getNFunctionPerCell
@param element A MElement of the support
@return Returns the number of @em Cell Based
Basis Functions, defined on the given element
** **
@fn vector<Dof> FunctionSpace::getKeys(const MElement& element) const @fn vector<Dof> FunctionSpace::getKeys(const MElement& element) const
...@@ -198,20 +159,6 @@ class FunctionSpace{ ...@@ -198,20 +159,6 @@ class FunctionSpace{
an Exception is thrown an Exception is thrown
** **
@fn FunctionSpace::getNOrientation
@return Returns the number of
@em orientations of the
FunctionSpace reference space
@todo Multiple basis
**
@fn FunctionSpace::getOrientation
@param element A MElement
@return Returns a number charaterizing
the @em orientation of the given element
@todo Multiple basis
**
@fn FunctionSpace::dofNumber @fn FunctionSpace::dofNumber
@return Returns the number of Dof%s @return Returns the number of Dof%s
given by FunctionSpace::getAllDofs() given by FunctionSpace::getAllDofs()
...@@ -228,44 +175,30 @@ class FunctionSpace{ ...@@ -228,44 +175,30 @@ class FunctionSpace{
// Inline Functions // // Inline Functions //
////////////////////// //////////////////////
inline const GroupOfElement& FunctionSpace::getSupport(void) const{ inline const std::vector<const Basis*>&
return *goe; FunctionSpace::getBasis(const MElement& element) const{
} return *basis;
inline unsigned int FunctionSpace::getOrder(void) const{
return (unsigned int)(localBasis->getOrder());
} }
inline unsigned int FunctionSpace::getType(void) const{ inline const Basis& FunctionSpace::getBasis(unsigned int i) const{
return type; return *(*basis)[i];
}
inline bool FunctionSpace::isScalar(void) const{
return localBasis->isScalar();
} }
inline unsigned int FunctionSpace::getNFunctionPerVertex(const MElement& element) const{ inline unsigned int FunctionSpace::getNBasis(void) const{
return fPerVertex; return nBasis;
} }
inline unsigned int FunctionSpace::getNFunctionPerEdge(const MElement& element) const{ inline const GroupOfElement& FunctionSpace::getSupport(void) const{
return fPerEdge; return *goe;
}
inline unsigned int FunctionSpace::getNFunctionPerFace(const MElement& element) const{
return fPerFace;
}
inline unsigned int FunctionSpace::getNFunctionPerCell(const MElement& element) const{
return fPerCell;
} }
#include "Exception.h"
inline unsigned int FunctionSpace::getNOrientation(void) const{ inline unsigned int FunctionSpace::getOrder(void) const{
return localBasis->getNOrientation(); throw Exception("Remove me!");
return (unsigned int)((*basis)[0]->getOrder());
} }
inline unsigned int FunctionSpace::getOrientation(const MElement& element) const{ inline bool FunctionSpace::isScalar(void) const{
return localBasis->getOrientation(element); return scalar;
} }
inline unsigned int FunctionSpace::dofNumber(void) const{ inline unsigned int FunctionSpace::dofNumber(void) const{
......
...@@ -36,7 +36,7 @@ interpolate(const MElement& element, ...@@ -36,7 +36,7 @@ interpolate(const MElement& element,
// Get Basis Functions // // Get Basis Functions //
fullMatrix<double>* fun = fullMatrix<double>* fun =
localBasis->getFunctions(element, uvw[0], uvw[1], uvw[2]); (*basis)[0]->getFunctions(element, uvw[0], uvw[1], uvw[2]);
const unsigned int nFun = fun->size1(); const unsigned int nFun = fun->size1();
...@@ -73,7 +73,7 @@ interpolateInRefSpace(const MElement& element, ...@@ -73,7 +73,7 @@ interpolateInRefSpace(const MElement& element,
// Get Basis Functions // // Get Basis Functions //
fullMatrix<double>* fun = fullMatrix<double>* fun =
localBasis->getFunctions(element, uvw(0), uvw(1), uvw(2)); (*basis)[0]->getFunctions(element, uvw(0), uvw(1), uvw(2));
const unsigned int nFun = fun->size1(); const unsigned int nFun = fun->size1();
......
...@@ -31,7 +31,7 @@ interpolate(const MElement& element, ...@@ -31,7 +31,7 @@ interpolate(const MElement& element,
// Get Basis Functions // // Get Basis Functions //
fullMatrix<double>* fun = fullMatrix<double>* fun =
localBasis->getFunctions(element, uvw[0], uvw[1], uvw[2]); (*basis)[0]->getFunctions(element, uvw[0], uvw[1], uvw[2]);
const unsigned int nFun = fun->size1(); const unsigned int nFun = fun->size1();
...@@ -53,7 +53,7 @@ interpolateInRefSpace(const MElement& element, ...@@ -53,7 +53,7 @@ interpolateInRefSpace(const MElement& element,
// Get Basis Functions // // Get Basis Functions //
fullMatrix<double>* fun = fullMatrix<double>* fun =
localBasis->getFunctions(element, uvw(0), uvw(1), uvw(2)); (*basis)[0]->getFunctions(element, uvw(0), uvw(1), uvw(2));
const unsigned int nFun = fun->size1(); const unsigned int nFun = fun->size1();
......
#include "FunctionSpaceScalar.h" #include "FunctionSpaceScalar.h"
FunctionSpaceScalar::FunctionSpaceScalar(void){ FunctionSpaceScalar::FunctionSpaceScalar(void){
scalar = true;
} }
FunctionSpaceScalar::~FunctionSpaceScalar(void){ FunctionSpaceScalar::~FunctionSpaceScalar(void){
......
#ifndef _FUNCTIONSPACESCALAR_H_ #ifndef _FUNCTIONSPACESCALAR_H_
#define _FUNCTIONSPACESCALAR_H_ #define _FUNCTIONSPACESCALAR_H_
#include "Exception.h"
#include "FunctionSpace.h" #include "FunctionSpace.h"
/** /**
...@@ -35,21 +34,6 @@ class FunctionSpaceScalar : public FunctionSpace{ ...@@ -35,21 +34,6 @@ class FunctionSpaceScalar : public FunctionSpace{
const std::vector<double>& coef, const std::vector<double>& coef,
const fullVector<double>& uvw) const = 0; const fullVector<double>& uvw) const = 0;
void preEvaluateLocalFunctions(const fullMatrix<double>& point) const;
void preEvaluateGradLocalFunctions(const fullMatrix<double>& point) const;
const fullMatrix<double>&
getEvaluatedLocalFunctions(const MElement& element) const;
const fullMatrix<double>&
getEvaluatedGradLocalFunctions(const MElement& element) const;
const fullMatrix<double>&
getEvaluatedLocalFunctions(unsigned int orientation) const;
const fullMatrix<double>&
getEvaluatedGradLocalFunctions(unsigned int orientation) const;
protected: protected:
FunctionSpaceScalar(void); FunctionSpaceScalar(void);
}; };
...@@ -96,124 +80,6 @@ class FunctionSpaceScalar : public FunctionSpace{ ...@@ -96,124 +80,6 @@ class FunctionSpaceScalar : public FunctionSpace{
If the given coordinate are not in the given If the given coordinate are not in the given
@c element @em Bad @em Things may happend @c element @em Bad @em Things may happend
---> check ---> check
**
@fn FunctionSpaceScalar::preEvaluateLocalFunctions
@param point A set of @c 3D Points
Precomputes the Local Functions of this FunctionSpace
at the given Points.
@note Each row of @c point is a new Point,
and each column is a coordinate (for a total of
3 columns)
**
@fn FunctionSpaceScalar::preEvaluateGradLocalFunctions
@param point A set of @c 3D Points
Precomputes the @em Gradient of the Local Functions
of this FunctionSpace at the given Points.
@note Each row of @c point is a new Point,
and each column is a coordinate (for a total of
3 columns)
**
@fn FunctionSpaceScalar::getEvaluatedLocalFunctions(const MElement&) const
@param element A MElement
@return Returns the @em values of the @em precomputed
Basis Functions associated
to the given element (with correct @em closure)
@note
The returned values @em must be computed by
FunctionSpaceScalar::preEvaluateLocalFunctions(),
if not an Exception will be thrown
**
@fn FunctionSpaceScalar::getEvaluatedGradLocalFunctions(const MElement&) const
@param element A MElement
@return Returns the @em values of the @em precomputed
@em Gradients of the Basis Functions associated
to the given element (with correct @em closure)
@note
The returned values @em must be computed by
FunctionSpaceScalar::preEvaluateGradLocalFunctions(),
if not an Exception will be thrown
**
@fn FunctionSpaceScalar::getEvaluatedLocalFunctions(unsigned int) const
@param orientation A number definig the orientation of the reference space
@return Same as
FunctionSpaceScalar::getEvaluatedLocalFunctions(const MElement&) const
but the orientation is not given by en element but by a number (@c orientation)
**
@fn FunctionSpaceScalar::getEvaluatedGradLocalFunctions(unsigned int) const
@param orientation A number definig the orientation of the reference space
@return Same as
FunctionSpaceScalar::getEvaluatedGradLocalFunctions(const MElement&) const
but the orientation is not given by en element but by a number (@c orientation)
*/ */
//////////////////////
// Inline Functions //
//////////////////////
inline void FunctionSpaceScalar::
preEvaluateLocalFunctions(const fullMatrix<double>& point) const{
localBasis->preEvaluateFunctions(point);
}
inline void FunctionSpaceScalar::
preEvaluateGradLocalFunctions(const fullMatrix<double>& point) const{
localBasis->preEvaluateDerivatives(point);
}
inline const fullMatrix<double>&
FunctionSpaceScalar::getEvaluatedLocalFunctions(const MElement& element) const{
try{
return localBasis->getPreEvaluatedFunctions(element);
}
catch(Exception& any){
throw Exception("Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceScalar::getEvaluatedGradLocalFunctions(const MElement& element) const{
try{
return localBasis->getPreEvaluatedDerivatives(element);
}
catch(Exception& any){
throw Exception("Gradient of Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceScalar::getEvaluatedLocalFunctions(unsigned int orientation) const{
try{
return localBasis->getPreEvaluatedFunctions(orientation);
}
catch(Exception& any){
throw Exception("Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceScalar::getEvaluatedGradLocalFunctions(unsigned int orientation) const{
try{
return localBasis->getPreEvaluatedDerivatives(orientation);
}
catch(Exception& any){
throw Exception("Gradient of Local Basis Functions not PreEvaluated");
}
}
#endif #endif
#include "FunctionSpaceVector.h" #include "FunctionSpaceVector.h"
FunctionSpaceVector::FunctionSpaceVector(void){ FunctionSpaceVector::FunctionSpaceVector(void){
scalar = false;
} }
FunctionSpaceVector::~FunctionSpaceVector(void){ FunctionSpaceVector::~FunctionSpaceVector(void){
......
...@@ -35,28 +35,6 @@ class FunctionSpaceVector : public FunctionSpace{ ...@@ -35,28 +35,6 @@ class FunctionSpaceVector : public FunctionSpace{
const std::vector<double>& coef, const std::vector<double>& coef,
const fullVector<double>& uvw) const = 0; const fullVector<double>& uvw) const = 0;
void preEvaluateLocalFunctions(const fullMatrix<double>& point) const;
void preEvaluateCurlLocalFunctions(const fullMatrix<double>& point) const;
void preEvaluateDivLocalFunctions(const fullMatrix<double>& point) const;
const fullMatrix<double>&
getEvaluatedLocalFunctions(const MElement& element) const;
const fullMatrix<double>&
getEvaluatedCurlLocalFunctions(const MElement& element) const;
const fullMatrix<double>&
getEvaluatedDivLocalFunctions(const MElement& element) const;
const fullMatrix<double>&
getEvaluatedLocalFunctions(unsigned int orientation) const;
const fullMatrix<double>&
getEvaluatedCurlLocalFunctions(unsigned int orientation) const;
const fullMatrix<double>&
getEvaluatedDivLocalFunctions(unsigned int orientation) const;
protected: protected:
FunctionSpaceVector(void); FunctionSpaceVector(void);
}; };
...@@ -103,181 +81,6 @@ class FunctionSpaceVector : public FunctionSpace{ ...@@ -103,181 +81,6 @@ class FunctionSpaceVector : public FunctionSpace{
If the given coordinate are not in the given If the given coordinate are not in the given
@c element @em Bad @em Things may happend @c element @em Bad @em Things may happend
---> check ---> check
**
@fn FunctionSpaceVector::preEvaluateLocalFunctions
@param point A set of @c 3D Points
Precomputes the Local Functions of this FunctionSpace
at the given Points.
@note Each row of @c point is a new Point,
and each column is a coordinate (for a total of
3 columns)
**
@fn FunctionSpaceVector::preEvaluateCurlLocalFunctions
@param point A set of @c 3D Points
Precomputes the @em Curl of the Local Functions
of this FunctionSpace at the given Points.
@note Each row of @c point is a new Point,
and each column is a coordinate (for a total of
3 columns)
**
@fn FunctionSpaceVector::preEvaluateDivLocalFunctions
@param point A set of @c 3D Points
Precomputes the @em Divergence of the Local Functions
of this FunctionSpace at the given Points.
@note Each row of @c point is a new Point,
and each column is a coordinate (for a total of
3 columns)
**
@fn FunctionSpaceVector::getEvaluatedLocalFunctions(const MElement&) const
@param element A MElement
@return Returns the @em values of the @em precomputed
Basis Functions associated
to the given element (with correct @em closure)
@note
The returned values @em must be computed by
FunctionSpaceVector::preEvaluateLocalFunctions(),
if not an Exception will be thrown
**
@fn FunctionSpaceVector::getEvaluatedCurlLocalFunctions(const MElement&) const
@param element A MElement
@return Returns the @em values of the @em precomputed
@em Curls of the Basis Functions associated
to the given element (with correct @em closure)
@note
The returned values @em must be computed by
FunctionSpaceVector::preEvaluateCurlLocalFunctions(),
if not an Exception will be thrown
**
@fn FunctionSpaceVector::getEvaluatedDivLocalFunctions(const MElement&) const
@param element A MElement
@return Returns the @em values of the @em precomputed
@em Divergences of the Basis Functions associated
to the given element (with correct @em closure)
@note
The returned values @em must be computed by
FunctionSpaceVector::preEvaluateDivLocalFunctions(),
if not an Exception will be thrown
**
@fn FunctionSpaceVector::getEvaluatedLocalFunctions(unsigned int) const
@param orientation A number definig the orientation of the reference space
@return Same as
FunctionSpaceVector::getEvaluatedLocalFunctions(const MElement&) const
but the orientation is not given by en element but by a number (@c orientation)
**
@fn FunctionSpaceVector::getEvaluatedCurlLocalFunctions(unsigned int) const
@param orientation A number definig the orientation of the reference space
@return Same as
FunctionSpaceVector::getEvaluatedCurlLocalFunctions(const MElement&) const
but the orientation is not given by en element but by a number (@c orientation)
**
@fn FunctionSpaceVector::getEvaluatedDivLocalFunctions(unsigned int) const
@param orientation A number definig the orientation of the reference space
@return Same as
FunctionSpaceVector::getEvaluatedDivLocalFunctions(const MElement&) const
but the orientation is not given by en element but by a number (@c orientation)
*/ */
//////////////////////
// Inline Functions //
//////////////////////
inline void FunctionSpaceVector::
preEvaluateLocalFunctions(const fullMatrix<double>& point) const{
localBasis->preEvaluateFunctions(point);
}
inline void FunctionSpaceVector::
preEvaluateCurlLocalFunctions(const fullMatrix<double>& point) const{
localBasis->preEvaluateDerivatives(point);
}
inline void FunctionSpaceVector::
preEvaluateDivLocalFunctions(const fullMatrix<double>& point) const{
localBasis->preEvaluateDerivatives(point);
}
inline const fullMatrix<double>&
FunctionSpaceVector::getEvaluatedLocalFunctions(const MElement& element) const{
try{
return localBasis->getPreEvaluatedFunctions(element);
}
catch(Exception& any){
throw Exception("Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceVector::getEvaluatedCurlLocalFunctions(const MElement& element) const{
try{
return localBasis->getPreEvaluatedDerivatives(element);
}
catch(Exception& any){
throw Exception("Curl of Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceVector::getEvaluatedDivLocalFunctions(const MElement& element) const{
try{
return localBasis->getPreEvaluatedFunctions(element);
}
catch(Exception& any){
throw Exception("Divergence of Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceVector::getEvaluatedLocalFunctions(unsigned int orientation) const{
try{
return localBasis->getPreEvaluatedFunctions(orientation);
}
catch(Exception& any){
throw Exception("Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceVector::getEvaluatedCurlLocalFunctions(unsigned int orientation) const{
try{
return localBasis->getPreEvaluatedDerivatives(orientation);
}
catch(Exception& any){
throw Exception("Curl of Local Basis Functions not PreEvaluated");
}
}
inline const fullMatrix<double>&
FunctionSpaceVector::getEvaluatedDivLocalFunctions(unsigned int orientation) const{
try{
return localBasis->getPreEvaluatedFunctions(orientation);
}
catch(Exception& any){
throw Exception("Divergence of Local Basis Functions not PreEvaluated");
}
}
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment