Skip to content
Snippets Groups Projects
Commit f9b3cffd authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

And moved Reinit library to src and updated makefiles.

parent 1829f405
No related branches found
No related tags found
No related merge requests found
File moved
...@@ -26,7 +26,7 @@ void HL_SignedDistTraverse::initializeBoundary() ...@@ -26,7 +26,7 @@ void HL_SignedDistTraverse::initializeBoundary()
int elStatus; int elStatus;
const int nBasFcts = feSpace->getBasisFcts()->getNumber(); const int nBasFcts = feSpace->getBasisFcts()->getNumber();
if (locInd.size() < nBasFcts) if (static_cast<int>(locInd.size()) < nBasFcts)
locInd.resize(nBasFcts); locInd.resize(nBasFcts);
ElInfo *elInfo; ElInfo *elInfo;
...@@ -101,6 +101,7 @@ void HL_SignedDistTraverse::initializeBoundary() ...@@ -101,6 +101,7 @@ void HL_SignedDistTraverse::initializeBoundary()
} // end of: mesh traverse } // end of: mesh traverse
} }
void HL_SignedDistTraverse::HL_updateIteration() void HL_SignedDistTraverse::HL_updateIteration()
{ {
// ===== Create DOF vector for the last iteration step. ===== // ===== Create DOF vector for the last iteration step. =====
...@@ -150,13 +151,14 @@ void HL_SignedDistTraverse::HL_updateIteration() ...@@ -150,13 +151,14 @@ void HL_SignedDistTraverse::HL_updateIteration()
cout << "\tnumber of iterations needed: " << itCntr << "\n\n"; cout << "\tnumber of iterations needed: " << itCntr << "\n\n";
} }
void HL_SignedDistTraverse::HL_elementUpdate(ElInfo *elInfo) void HL_SignedDistTraverse::HL_elementUpdate(ElInfo *elInfo)
{ {
FUNCNAME("HL_SignedDistTraverse::HL_elementUpdate()"); FUNCNAME("HL_SignedDistTraverse::HL_elementUpdate()");
// ===== Get global indices of vertices of element. ===== // ===== Get global indices of vertices of element. =====
const int nBasFcts = feSpace->getBasisFcts()->getNumber(); const int nBasFcts = feSpace->getBasisFcts()->getNumber();
if (locInd.size() < nBasFcts) if (static_cast<int>(locInd.size()) < nBasFcts)
locInd.resize(nBasFcts); locInd.resize(nBasFcts);
feSpace->getBasisFcts()->getLocalIndices( feSpace->getBasisFcts()->getLocalIndices(
...@@ -195,6 +197,7 @@ void HL_SignedDistTraverse::HL_elementUpdate(ElInfo *elInfo) ...@@ -195,6 +197,7 @@ void HL_SignedDistTraverse::HL_elementUpdate(ElInfo *elInfo)
} }
} }
double HL_SignedDistTraverse::calcElementUpdate(ElInfo *elInfo, double HL_SignedDistTraverse::calcElementUpdate(ElInfo *elInfo,
int nXh, int nXh,
const DegreeOfFreedom *locInd) const DegreeOfFreedom *locInd)
...@@ -241,6 +244,7 @@ double HL_SignedDistTraverse::calcElementUpdate(ElInfo *elInfo, ...@@ -241,6 +244,7 @@ double HL_SignedDistTraverse::calcElementUpdate(ElInfo *elInfo,
return elUpdate->calcElementUpdate(elVert, uhVal); return elUpdate->calcElementUpdate(elVert, uhVal);
} }
bool HL_SignedDistTraverse::checkTol() bool HL_SignedDistTraverse::checkTol()
{ {
DOFVector<double>::Iterator it_sD(sD_DOF, USED_DOFS); DOFVector<double>::Iterator it_sD(sD_DOF, USED_DOFS);
......
File moved
File moved
File moved
...@@ -50,7 +50,7 @@ public: ...@@ -50,7 +50,7 @@ public:
{ {
FUNCNAME("VelocityExt::printVelDOF()"); FUNCNAME("VelocityExt::printVelDOF()");
TEST_EXIT(i < velDOF.size())("illegal index !\n"); TEST_EXIT(i < static_cast<int>(velDOF.size()))("Illegal index!\n");
FileWriter *fileWriter = new FileWriter( FileWriter *fileWriter = new FileWriter(
"VelocityExt->velocity output", "VelocityExt->velocity output",
...@@ -66,7 +66,7 @@ public: ...@@ -66,7 +66,7 @@ public:
{ {
FUNCNAME("VelocityExt::printOrigVelDOF()"); FUNCNAME("VelocityExt::printOrigVelDOF()");
TEST_EXIT(i < origVelDOF.size())("illegal index !\n"); TEST_EXIT(i < static_cast<int>(origVelDOF.size()))("Illegal index!\n");
FileWriter *fileWriter = new FileWriter( FileWriter *fileWriter = new FileWriter(
"VelocityExt->interface velocity output", "VelocityExt->interface velocity output",
...@@ -75,11 +75,9 @@ public: ...@@ -75,11 +75,9 @@ public:
fileWriter->writeFiles(adaptInfo, false); fileWriter->writeFiles(adaptInfo, false);
delete fileWriter; delete fileWriter;
}; }
/** /// Set velocity (one velocity vector).
* Set velocity (one velocity vector).
*/
void setVelocity(DOFVector<double> *origVelDOF_, void setVelocity(DOFVector<double> *origVelDOF_,
DOFVector<double> *velDOF_) DOFVector<double> *velDOF_)
{ {
...@@ -97,11 +95,9 @@ public: ...@@ -97,11 +95,9 @@ public:
origVelDOF.push_back(origVelDOF_); origVelDOF.push_back(origVelDOF_);
velDOF.push_back(velDOF_); velDOF.push_back(velDOF_);
}; }
/** /// Set velocity (multiple velocity vectors).
* Set velocity (multiple velocity vectors).
*/
void setVelocity(std::vector<DOFVector<double> *> &origVelDOF_, void setVelocity(std::vector<DOFVector<double> *> &origVelDOF_,
std::vector<DOFVector<double> *> &velDOF_) std::vector<DOFVector<double> *> &velDOF_)
{ {
...@@ -109,8 +105,8 @@ public: ...@@ -109,8 +105,8 @@ public:
nVelDOFs = origVelDOF_.size(); nVelDOFs = origVelDOF_.size();
TEST_EXIT(nVelDOFs > 0)("illegal number of velocity vectors !\n"); TEST_EXIT(nVelDOFs > 0)("Illegal number of velocity vectors!\n");
TEST_EXIT(nVelDOFs == velDOF_.size())("different sizes !\n"); TEST_EXIT(nVelDOFs == static_cast<int>(velDOF_.size()))("Different sizes!\n");
for (int i=0; i<nVelDOFs; ++i) { for (int i=0; i<nVelDOFs; ++i) {
TEST_EXIT(origVelDOF_[i])("illegal velocity vector origVelDOF !\n"); TEST_EXIT(origVelDOF_[i])("illegal velocity vector origVelDOF !\n");
...@@ -146,18 +142,27 @@ public: ...@@ -146,18 +142,27 @@ public:
* indexV is the index of the vertex(with respect to the numeration on the element), * indexV is the index of the vertex(with respect to the numeration on the element),
* for that the coordinates shall be stored. * for that the coordinates shall be stored.
*/ */
void setBarycentricCoords_2D_boundary(const double &l_0, const double &l_1, const double &l_2, const int indexV); void setBarycentricCoords_2D_boundary(const double &l_0,
const double &l_1,
const double &l_2,
const int indexV);
/** /**
* Sets barycentric coordinates for 2D for a vertex on a non-boundary element. * Sets barycentric coordinates for 2D for a vertex on a non-boundary element.
* l_0. l_1, l_2 are the coordinates. * l_0. l_1, l_2 are the coordinates.
*/ */
void setBarycentricCoords_2D(const double &l_0, const double &l_1, const double &l_2); void setBarycentricCoords_2D(const double &l_0,
const double &l_1,
const double &l_2);
/** /**
* Calculates the barycentric coordinates for 2D for a vertex on a non-boundary element. * Calculates the barycentric coordinates for 2D for a vertex on a
* non-boundary element.
*/ */
void calcBarycentricCoords_2D(const double &c_delta, const double &c_alpha, const double &norm_zhminusyh, const double &norm_xhminusyh); void calcBarycentricCoords_2D(const double &c_delta,
const double &c_alpha,
const double &norm_zhminusyh,
const double &norm_xhminusyh);
/** /**
* Sets barycentric coordinates for 3D for a vertex on a boundary element * Sets barycentric coordinates for 3D for a vertex on a boundary element
...@@ -166,24 +171,33 @@ public: ...@@ -166,24 +171,33 @@ public:
* indexV is the index of the vertex(with respect to the numeration on the element), * indexV is the index of the vertex(with respect to the numeration on the element),
* for that the coordinates shall be stored. * for that the coordinates shall be stored.
*/ */
void setBarycentricCoords_3D_boundary(const double &l_0, const double &l_1, const double &l_2, const double &l_3, const int indexV); void setBarycentricCoords_3D_boundary(const double &l_0,
const double &l_1,
const double &l_2,
const double &l_3,
const int indexV);
/// Calculates the barycentric coordinates for 3D for a boundary vertex.
void calcBarycentricCoords_3D_boundary(const DimVec<double> sp1,
const DimVec<double> sp2,
const double lambda,
int i);
/** /**
* Calculates the barycentric coordinates for 3D for a boundary vertex. * Expands 3 coordinates from a face update to 4 coordinates and stores them in
* lamVec[index]. vertNum is the index of the element face the coordinates
* belong to (0, 1 or 2).
*/ */
void calcBarycentricCoords_3D_boundary(const DimVec<double> sp1, const DimVec<double> sp2, const double lambda, int i); void copyAndExpandFaceCoords_3D(int vertNum, int index);
/** /**
* Expands 3 coordinates from a face update to 4 coordinates and stores them in lamVec[index].
* vertNum is the index of the element face the coordinates belong to(0,1,or 2).
*/
void copyAndExpandFaceCoords_3D(int vertNum,int index);
/**
* Sets barycentric coordinates for 3D for a vertex on a non-boundary element. * Sets barycentric coordinates for 3D for a vertex on a non-boundary element.
* l_0, l_1, l-2, l_3 are the coordinates. * l_0, l_1, l-2, l_3 are the coordinates.
*/ */
void setBarycentricCoords_3D(const double &l_0, const double &l_1, const double &l_2, const double &l_3); void setBarycentricCoords_3D(const double &l_0,
const double &l_1,
const double &l_2,
const double &l_3);
/** /**
* Stores the index of element face with the shortest distance to the interface so far. * Stores the index of element face with the shortest distance to the interface so far.
...@@ -201,45 +215,29 @@ public: ...@@ -201,45 +215,29 @@ public:
*/ */
void setPermutation(int vertNum, int mTrav); void setPermutation(int vertNum, int mTrav);
/** /// Sets the permutation.
* Sets the permutation.
*/
void setPermutation(int vertNum); void setPermutation(int vertNum);
/** /// Sets the permutation of the vertices in 2D.
* Sets the permutation of the vertices in 2D.
*/
void setPermutation_2D(int i_0, int i_1, int i_2); void setPermutation_2D(int i_0, int i_1, int i_2);
/** /// Sets the permutation of the vertices in 3D.
* Sets the permutation of the vertices in 3D.
*/
void setPermutation_3D(int i_0, int i_1, int i_2, int i_3); void setPermutation_3D(int i_0, int i_1, int i_2, int i_3);
/** /// Swaps two vertices in the permutation.
* Swaps two vertices in the permutation.
*/
void swapVertices(int i1, int i2); void swapVertices(int i1, int i2);
protected: protected:
/** /// Original velocity vector.
* Original velocity vector.
*/
std::vector<DOFVector<double> *> origVelDOF; std::vector<DOFVector<double> *> origVelDOF;
/** /// Dimension of mesh.
* Dimension of mesh.
*/
int dim; int dim;
/** /// DOF vector with extended velocity.
* Dof vector with extended velocity.
*/
std::vector<DOFVector<double> *> velDOF; std::vector<DOFVector<double> *> velDOF;
/** /// Number of velocity vectors to be extended.
* Number of velocity vectors to be extended.
*/
int nVelDOFs; int nVelDOFs;
/** /**
...@@ -257,9 +255,7 @@ public: ...@@ -257,9 +255,7 @@ public:
*/ */
int indexFace; int indexFace;
/** /// List with the permutation of the vertices.
* List with the permutation of the vertices.
*/
DimVec<int> permutation; DimVec<int> permutation;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment