Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

Commit 5b2d4647 authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

prepared function hooks and codestyle in ProblemImplicit-files

parent ac593360
......@@ -25,8 +25,9 @@ namespace AMDiS {
std::vector< double >& vecPhi1 = phi1->getVector();
std::vector< double >& vecPhi2 = phi2->getVector();
std::vector< double >& vecLevelSet = levelSet->getVector();
TEST_EXIT(vecR.size() != vecPhi1.size() && vecPhi2.size() != vecR.size())("something went wrong\n");
bool checkSize = vecR.size() != vecPhi1.size() &&
vecPhi2.size() != vecR.size();
TEST_EXIT(checkSize)("something went wrong\n");
for (int i = vecR.size()-1; i >= 0; --i)
{
vecPhi1[i] = Phi1(vecR[i], eps);
......@@ -45,8 +46,10 @@ namespace AMDiS {
std::vector< double >& vecPhi1 = phi1->getVector();
std::vector< double >& vecPhi2 = phi2->getVector();
std::vector< double >& vecLevelSet = levelSet->getVector();
TEST_EXIT(vecR.size() != vecPhi1.size() && vecPhi2.size() != vecR.size())("something went wrong\n");
bool checkSize = vecR.size() != vecPhi1.size() &&
vecPhi2.size() != vecR.size();
TEST_EXIT(checkSize)("something went wrong\n");
for (int i = vecR.size()-1; i>= 0; --i)
{
vecR[i] = Phi1ToR(vecPhi1[i], eps);
......@@ -67,7 +70,9 @@ namespace AMDiS {
std::vector< double >& vecPhi2 = phi2->getVector();
std::vector< double >& vecLevelSet = levelSet->getVector();
TEST_EXIT(vecR.size() != vecPhi1.size() && vecPhi2.size() != vecR.size())("something went wrong\n");
bool checkSize = vecR.size() != vecPhi1.size() &&
vecPhi2.size() != vecR.size();
TEST_EXIT(checkSize)("something went wrong\n");
for (int i = vecR.size()-1; i >= 0; --i)
{
vecR[i] = Phi2ToR(vecPhi2[i], eps);
......@@ -134,7 +139,8 @@ namespace AMDiS {
return true;
}
void ProblemImplicitScal::initialize(Flag initFlag, ProblemScal* adaptProblem, Flag adoptFlag)
void ProblemImplicitScal::initialize(Flag initFlag,
ProblemScal* adaptProblem, Flag adoptFlag)
{
FUNCNAME("ImplicitScal::initialize()");
ProblemScal::initialize(CREATE_MESH);
......@@ -157,7 +163,8 @@ namespace AMDiS {
bool ProblemImplicitVec::createImplicitMesh(int p)
{
std::string path=name + "->implicit mesh[" + boost::lexical_cast< std::string >(p) + "]->";
std::string path=name + "->implicit mesh[" +
boost::lexical_cast< std::string >(p) + "]->";
std::string meshFilename("");
GET_PARAMETER(0, path + "mesh file", &meshFilename);
//if no file name is given, there's no implicit mesh
......@@ -190,13 +197,16 @@ namespace AMDiS {
switch (serType)
{
case 0:
calcspace::readR(inStream, eps,r[p], phi1[p], phi2[p], levelSet[p], meshes[p]);
calcspace::readR(inStream, eps,r[p], phi1[p], phi2[p],
levelSet[p], meshes[p]);
break;
case 1:
calcspace::readPhi1(inStream, eps, r[p], phi1[p], phi2[p], levelSet[p], meshes[p]);
calcspace::readPhi1(inStream, eps, r[p], phi1[p], phi2[p],
levelSet[p], meshes[p]);
break;
case 2:
calcspace::readPhi2(inStream,eps, r[p], phi1[p], phi2[p], levelSet[p], meshes[p]);
calcspace::readPhi2(inStream,eps, r[p], phi1[p], phi2[p],
levelSet[p], meshes[p]);
break;
default:
WARNING("unknown implicit mesh type\n");
......@@ -205,7 +215,8 @@ namespace AMDiS {
return true;
}
void ProblemImplicitVec::initialize(Flag initFlag, ProblemScal* adaptProblem, Flag adoptFlag)
void ProblemImplicitVec::initialize(Flag initFlag,
ProblemScal* adaptProblem, Flag adoptFlag)
{
FUNCNAME("ImplicitScal::initialize()");
ProblemVec::initialize(CREATE_MESH);
......
......@@ -18,7 +18,8 @@ namespace AMDiS {
levelSet(NULL)
{}
/// @return: true if implicit mesh type is ok (see below) and false in all other cases
/// @return: true if implicit mesh type is ok (see below) and false in
/// all other cases
/// initfile entries:
/// name+"->implicit mesh->mesh file": name of serialized mesh
/// name+"->implicit mesh->dof file": name of serialized dofvector
......@@ -44,7 +45,8 @@ namespace AMDiS {
/// DOFVector for the phasefield function 0.5*(1+tanh(3*r/eps))
DOFVector< double > *phi2;
/// DOFVector for the levelset function (levelSet(x): x \in \Omega: 1, x \not \in Omega: -1, x \in \Gamma: 0)
/// DOFVector for the levelset function
/// (levelSet(x): x \in \Omega: 1, x \not \in Omega: -1, x \in \Gamma: 0)
DOFVector< double > *levelSet;
};
......@@ -52,7 +54,8 @@ namespace AMDiS {
class ProblemImplicitVec : public ProblemVec
{
public:
ProblemImplicitVec(std::string name, ProblemIterationInterface* problem = NULL)
ProblemImplicitVec(std::string name,
ProblemIterationInterface* problem = NULL)
: ProblemVec(name, problem),
r(0),
phi1(0),
......@@ -76,7 +79,8 @@ namespace AMDiS {
/// DOFVector for the phasefield function 0.5*(1+tanh(3*r/eps))
std::vector< DOFVector< double >* > phi2;
/// DOFVector for the levelset function (levelSet(x): x \in \Omega: 1, x \not \in Omega: -1, x \in \Gamma: 0)
/// DOFVector for the levelset function
/// (levelSet(x): x \in \Omega: 1, x \not \in Omega: -1, x \in \Gamma: 0)
std::vector< DOFVector< double >* > levelSet;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment