Skip to content
Snippets Groups Projects
Commit df4ca9a4 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

some methods are set to const

parent 543b6e3c
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,7 @@ namespace AMDiS {
BoundaryType type = localBC->getBoundaryType();
TEST_EXIT(localBCs[type] == NULL)
("There is already a condition for this type.\n");
("There is already a condition for this type %d.\n",type);
localBCs[type] = localBC;
std::vector<BoundaryCondition*>& boundMap = globalBoundaryMap[type];
......
......@@ -417,7 +417,7 @@ namespace AMDiS {
* transformation to the reference element.
* pure virtual => must be overriden in sub-class.
*/
virtual double getNormal(int side, WorldVector<double> &normal) = 0;
virtual double getNormal(int side, WorldVector<double> &normal) const = 0;
/** \brief
......
......@@ -186,7 +186,7 @@ namespace AMDiS {
/* coord; return the absulute value of the determinant from the */
/* transformation to the reference element */
/****************************************************************************/
double ElInfo1d::getNormal(int side, WorldVector<double> &normal)
double ElInfo1d::getNormal(int side, WorldVector<double> &normal) const
{
normal = coord[side] - coord[(side + 1) % 2];
double det = norm(&normal);
......
......@@ -53,7 +53,7 @@ namespace AMDiS {
double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam);
/// 1-dimensional realisation of ElInfo's getNormal method.
double getNormal(int side, WorldVector<double> &normal);
double getNormal(int side, WorldVector<double> &normal) const;
/// 1-dimensional realisation of ElInfo's getElementNormal method.
double getElementNormal( WorldVector<double> &normal) const;
......
......@@ -711,7 +711,7 @@ namespace AMDiS {
}
double ElInfo2d::getNormal(int side, WorldVector<double> &normal)
double ElInfo2d::getNormal(int side, WorldVector<double> &normal) const
{
FUNCNAME("ElInfo::getNormal()");
......@@ -722,7 +722,7 @@ namespace AMDiS {
normal[0] = coord[i1][1] - coord[i0][1];
normal[1] = coord[i0][0] - coord[i1][0];
} else { // dow == 3
WorldVector<double> e0, elementNormal;
WorldVector<double> e0, e1, e2, elementNormal;
e0 = coord[i1];
e0 -= coord[i0];
......
......@@ -54,7 +54,7 @@ namespace AMDiS {
double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam);
/// 2-dimensional realisation of ElInfo's getNormal method.
double getNormal(int side, WorldVector<double> &normal);
double getNormal(int side, WorldVector<double> &normal) const;
/// 2-dimensional realisation of ElInfo's getElementNormal method.
double getElementNormal(WorldVector<double> &normal) const;
......
......@@ -451,7 +451,7 @@ namespace AMDiS {
}
double ElInfo3d::getNormal(int face, WorldVector<double> &normal)
double ElInfo3d::getNormal(int face, WorldVector<double> &normal) const
{
FUNCNAME("ElInfo3d::getNormal()");
......
......@@ -66,7 +66,7 @@ namespace AMDiS {
double calcGrdLambda(DimVec<WorldVector<double> >& grd_lam);
/// 3-dimensional realisation of ElInfo's getNormal method.
double getNormal(int side, WorldVector<double> &normal);
double getNormal(int side, WorldVector<double> &normal) const;
/// update ElInfo after refinement (of some neighbours). Only in 3d!
void update();
......
......@@ -57,7 +57,7 @@ namespace AMDiS {
std::ifstream inputFile;
inputFile.open(fn.c_str(), std::ios::in);
if (!inputFile.is_open())
throw runtime_error("init-file cannot be opened for reading");
throw runtime_error("init-file '" + fn + "' cannot be opened for reading");
fn_include_list.insert(fn);
read(inputFile);
......
......@@ -120,8 +120,9 @@ void HL_SignedDist::calcVelocityExt(AdaptInfo *adaptInfo_,
TEST_EXIT(velExt)("velExt not defined !\n");
TEST_EXIT(vel_DOF_)("velocity vector vel_DOF_ not defined !\n");
if (calcSDFct)
if (calcSDFct) {
TEST_EXIT(lS_DOF_)("illegal level set function lS_DOF_ !\n");
}
DOFVector<double> *newVel_DOF_ =
new DOFVector<double>(vel_DOF_->getFeSpace(), "vel_DOF_");
......@@ -194,8 +195,9 @@ void HL_SignedDist::calcVelocityExt(AdaptInfo *adaptInfo_,
int nVelDOFs = vel_DOF_.size();
if (calcSDFct)
if (calcSDFct) {
TEST_EXIT(lS_DOF_)("illegal level set function lS_DOF_ !\n");
}
std::vector<DOFVector<double> *> newVel_DOF_(nVelDOFs);
for (int nV = 0; nV < nVelDOFs; ++nV) {
......@@ -275,8 +277,9 @@ void HL_SignedDist::calcVelocityExtFromVelocityField(AdaptInfo *adaptInfo_,
TEST_EXIT(velExt)("velExt not defined !\n");
TEST_EXIT(elFct == NULL)("not implemented yet for elFct != NULL !\n");
if (calcSDFct)
if (calcSDFct) {
TEST_EXIT(lS_DOF_)("illegal level set function lS_DOF_ !\n");
}
((VelocityExtFromVelocityField *)(velExt))->setVelocityField(velField_, lS_DOF_, vel_DOF_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment