-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added boundaries to grid; cut in the subspace scheme is not diagonal:
ooooo ooooo oooo ooo oo so the boundaries havn't more points git-svn-id: https://ipvs.informatik.uni-stuttgart.de/SGpp/repos/trunk@143 4eea3252-f0fb-4393-894d-40516dce545b
- Loading branch information
Alexander Heinecke
committed
Feb 13, 2009
1 parent
809f956
commit f8e3c3a
Showing
14 changed files
with
299 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/*****************************************************************************/ | ||
/* This file is part of sg++, a program package making use of spatially */ | ||
/* adaptive sparse grids to solve numerical problems */ | ||
/* */ | ||
/* Copyright (C) 2009 Alexander Heinecke (Alexander.Heinecke@mytum.de) */ | ||
/* */ | ||
/* sg++ is free software; you can redistribute it and/or modify */ | ||
/* it under the terms of the GNU General Public License as published by */ | ||
/* the Free Software Foundation; either version 3 of the License, or */ | ||
/* (at your option) any later version. */ | ||
/* */ | ||
/* sg++ is distributed in the hope that it will be useful, */ | ||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ | ||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ | ||
/* GNU General Public License for more details. */ | ||
/* */ | ||
/* You should have received a copy of the GNU General Public License */ | ||
/* along with sg++; if not, write to the Free Software */ | ||
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ | ||
/* or see <http://www.gnu.org/licenses/>. */ | ||
/*****************************************************************************/ | ||
|
||
#ifndef LINEARBOUNDARYBASE_HPP | ||
#define LINEARBOUNDARYBASE_HPP | ||
|
||
#include <cmath> | ||
|
||
namespace sg | ||
{ | ||
|
||
/** | ||
* linear base functions with boundaries | ||
* And here we have another implicit dependence on tensor products | ||
*/ | ||
template<class LT, class IT> | ||
class linearboundaryBase | ||
{ | ||
public: | ||
/** | ||
* Evaluate a base functions. | ||
* Has a dependence on the absolute position of grid point and support. | ||
*/ | ||
double eval(LT level, IT index, double p) | ||
{ | ||
if (level == 0) | ||
{ | ||
if (index == 1) | ||
{ | ||
|
||
} | ||
if (index == 3) | ||
{ | ||
|
||
} | ||
} | ||
else | ||
{ | ||
return 1.0 - fabs((1<<level) * p - index); | ||
} | ||
} | ||
}; | ||
|
||
} | ||
|
||
#endif /* LINEARBOUNDARYBASE_HPP */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/*****************************************************************************/ | ||
/* This file is part of sg++, a program package making use of spatially */ | ||
/* adaptive sparse grids to solve numerical problems */ | ||
/* */ | ||
/* Copyright (C) 2008 Jörg Blank (blankj@in.tum.de) */ | ||
/* Copyright (C) 2009 Alexander Heinecke (Alexander.Heinecke@mytum.de) */ | ||
/* */ | ||
/* sg++ is free software; you can redistribute it and/or modify */ | ||
/* it under the terms of the GNU General Public License as published by */ | ||
/* the Free Software Foundation; either version 3 of the License, or */ | ||
/* (at your option) any later version. */ | ||
/* */ | ||
/* sg++ is distributed in the hope that it will be useful, */ | ||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ | ||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ | ||
/* GNU General Public License for more details. */ | ||
/* */ | ||
/* You should have received a copy of the GNU General Public License */ | ||
/* along with sg++; if not, write to the Free Software */ | ||
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ | ||
/* or see <http://www.gnu.org/licenses/>. */ | ||
/*****************************************************************************/ | ||
|
||
#ifndef LINEARBOUNDARYGRID_HPP | ||
#define LINEARBOUNDARYGRID_HPP | ||
|
||
#include "grid/Grid.hpp" | ||
|
||
#include <iostream> | ||
|
||
namespace sg | ||
{ | ||
|
||
/** | ||
* grid with linear base functions with boundaries | ||
*/ | ||
class LinearBoundaryGrid : public Grid | ||
{ | ||
protected: | ||
LinearBoundaryGrid(std::istream& istr); | ||
|
||
public: | ||
LinearBoundaryGrid(size_t dim); | ||
virtual ~LinearBoundaryGrid(); | ||
|
||
virtual const char* getType(); | ||
|
||
virtual OperationB* createOperationB(); | ||
virtual GridGenerator* createGridGenerator(); | ||
virtual OperationMatrix* createOperationLaplace(); | ||
virtual OperationEval* createOperationEval(); | ||
virtual OperationHierarchisation* createOperationHierarchisation(); | ||
|
||
static Grid* unserialize(std::istream& istr); | ||
}; | ||
|
||
} | ||
|
||
#endif /* LINEARBOUNDARYGRID_HPP */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.