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

const GroupOfElement + GroupOfElement::isUniform + GroupOfElement::add() + Formulation::domain()

parent 438e8f3a
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
using namespace std;
const size_t FunctionSpace::nGeoType = 9;
bool FunctionSpace::once = false;
FunctionSpace::FunctionSpace(void){
}
......@@ -20,7 +21,14 @@ FunctionSpace::~FunctionSpace(void){
delete basis[i];
}
void FunctionSpace::build(GroupOfElement& goe, string family){
void FunctionSpace::build(const GroupOfElement& goe, string family){
/*
if(once)
throw Exception("FS Once");
else
once = true;
*/
// Save GroupOfElement & Mesh //
this->goe = &goe;
this->mesh = &(goe.getMesh());
......
......@@ -32,11 +32,12 @@ class FunctionSpace{
protected:
// Number of possible geomtrical topologies //
static const size_t nGeoType;
static bool once;
protected:
// Geometry //
const Mesh* mesh;
GroupOfElement* goe;
const GroupOfElement* goe;
// Basis //
std::vector<const Basis*> basis;
......@@ -61,7 +62,7 @@ class FunctionSpace{
const Basis& getBasis(const MElement& element) const;
const Basis& getBasis(size_t i) const;
GroupOfElement& getSupport(void) const;
const GroupOfElement& getSupport(void) const;
bool isScalar(void) const;
size_t getForm(void) const;
......@@ -78,7 +79,7 @@ class FunctionSpace{
protected:
FunctionSpace(void);
void build(GroupOfElement& goe, std::string family);
void build(const GroupOfElement& goe, std::string family);
void buildDof(void);
};
......@@ -148,7 +149,7 @@ inline const Basis& FunctionSpace::getBasis(size_t i) const{
return *basis[i];
}
inline GroupOfElement& FunctionSpace::getSupport(void) const{
inline const GroupOfElement& FunctionSpace::getSupport(void) const{
return *goe;
}
......
#include "Mapper.h"
#include "FunctionSpaceScalar.h"
FunctionSpaceScalar::FunctionSpaceScalar(GroupOfElement& goe, size_t order){
FunctionSpaceScalar::FunctionSpaceScalar(const GroupOfElement& goe,
size_t order){
this->scalar = true;
this->form = 0;
this->order = order;
......@@ -9,8 +10,8 @@ FunctionSpaceScalar::FunctionSpaceScalar(GroupOfElement& goe, size_t order){
build(goe, "hierarchical");
}
FunctionSpaceScalar::FunctionSpaceScalar(GroupOfElement& goe, size_t order,
std::string family){
FunctionSpaceScalar::FunctionSpaceScalar(const GroupOfElement& goe,
size_t order, std::string family){
this->scalar = true;
this->form = 0;
this->order = order;
......
......@@ -16,8 +16,9 @@
class FunctionSpaceScalar : public FunctionSpace{
public:
FunctionSpaceScalar(GroupOfElement& goe, size_t order);
FunctionSpaceScalar(GroupOfElement& goe, size_t order, std::string family);
FunctionSpaceScalar(const GroupOfElement& goe, size_t order);
FunctionSpaceScalar(const GroupOfElement& goe, size_t order,
std::string family);
virtual ~FunctionSpaceScalar(void);
......
#include "Mapper.h"
#include "FunctionSpaceVector.h"
FunctionSpaceVector::FunctionSpaceVector(GroupOfElement& goe, size_t order){
FunctionSpaceVector::FunctionSpaceVector(const GroupOfElement& goe,
size_t order){
this->scalar = false;
this->form = 1;
this->order = order;
......@@ -9,8 +10,8 @@ FunctionSpaceVector::FunctionSpaceVector(GroupOfElement& goe, size_t order){
build(goe, "hierarchical");
}
FunctionSpaceVector::FunctionSpaceVector(GroupOfElement& goe, size_t order,
std::string family){
FunctionSpaceVector::FunctionSpaceVector(const GroupOfElement& goe,
size_t order, std::string family){
this->scalar = false;
this->form = 1;
this->order = order;
......
......@@ -17,8 +17,9 @@
class FunctionSpaceVector : public FunctionSpace{
public:
FunctionSpaceVector(GroupOfElement& goe, size_t order);
FunctionSpaceVector(GroupOfElement& goe, size_t order, std::string family);
FunctionSpaceVector(const GroupOfElement& goe, size_t order);
FunctionSpaceVector(const GroupOfElement& goe, size_t order,
std::string family);
virtual ~FunctionSpaceVector(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment