Commit 7bf56b3a authored by Naumann, Andreas's avatar Naumann, Andreas

updated implicit problem and amdis gui to new interfaces

parent a84838be
This diff is collapsed.
......@@ -207,6 +207,11 @@ namespace AMDiS {
return name;
}
inline void setName(std::string n)
{
name=n;
}
inline BoundaryManager* getBoundaryManager() const
{
return boundaryManager;
......
......@@ -529,6 +529,10 @@ namespace AMDiS {
return result;
}
inline WorldVector<double> operator*(double d, const WorldVector<double>& v)
{
return v*d;
}
inline WorldVector<double> operator+(const WorldVector<double>& v1,
const WorldVector<double>& v2)
{
......
......@@ -115,12 +115,12 @@ namespace AMDiS {
inStream.close();
//create the fespace with the correct admin
createFESpace();
createFeSpace();
r = new DOFVector< double >(getFESpace(), "r");
phi1 = new DOFVector<double>(getFESpace(), "phi1");
phi2 = new DOFVector<double>(getFESpace(), "phi2");
levelSet = new DOFVector< double >(getFESpace(), "levelSet");
r = new DOFVector< double >(getFeSpace(), "r");
phi1 = new DOFVector<double>(getFeSpace(), "phi1");
phi2 = new DOFVector<double>(getFeSpace(), "phi2");
levelSet = new DOFVector< double >(getFeSpace(), "levelSet");
inStream.open(dofFilename.c_str());
switch (serType) {
case 0:
......@@ -188,11 +188,11 @@ namespace AMDiS {
meshes[p]->deserialize(inStream);
inStream.close();
//create the fespace with the correct admin
createFESpace(NULL);
r[p] = new DOFVector< double >(getFESpace(p), "r");
phi1[p] = new DOFVector<double>(getFESpace(p), "phi1");
phi2[p] = new DOFVector<double>(getFESpace(p), "phi2");
levelSet[p] = new DOFVector< double >(getFESpace(p), "levelSet");
createFeSpace(NULL);
r[p] = new DOFVector< double >(getFeSpace(p), "r");
phi1[p] = new DOFVector<double>(getFeSpace(p), "phi1");
phi2[p] = new DOFVector<double>(getFeSpace(p), "phi2");
levelSet[p] = new DOFVector< double >(getFeSpace(p), "levelSet");
inStream.open(dofFilename.c_str());
switch (serType)
{
......
......@@ -15,8 +15,9 @@ namespace AMDiS {
grdInterpolFct(grdFct)
{
Flag adoptFlag = INIT_SYSTEM | INIT_MESH | INIT_FE_SPACE;
Flag initFlag = INIT_ALL & ~adoptFlag & ~INIT_SOLVER & ~INIT_ESTIMATOR;
Flag initFlag = INIT_ALL & ~adoptFlag & ~INIT_SOLVER & ~INIT_ESTIMATOR & ~CREATE_MESH & ~INIT_FILEWRITER;
if(initFlag.isSet(CREATE_MESH))
WARNING("CREATE_MESH is set\n");
initialize(initFlag, spaceProblem, adoptFlag);
}
......
......@@ -656,7 +656,6 @@ namespace AMDiS {
traverseInfo.updateStatus();
// Used to calculate the overall number of non zero entries.
int nnz = 0;
......@@ -1119,10 +1118,16 @@ namespace AMDiS {
it != op->getAuxFeSpaces().end(); ++it) {
if ((*it)->getMesh() != componentSpaces[i]->getMesh() ||
(*it)->getMesh() != componentSpaces[j]->getMesh()) {
// std::cout<<"auxFE "<<k<<" in position ("<<i<<","<<j<<") has different mesh\n"<<std::endl;
op->setNeedDualTraverse(true);
break;
}
}
/* std::cout<<"after adding MatOp to ("<<i<<","<<j<<"):\n";
traverseInfo.updateStatus();
for(int i2=0;i2<nComponents;i2++)
for(int j2=0;j2<nComponents;j2++)
std::cout<<"traverseInfo.getStatus("<<i2<<","<<j2<<"):"<<traverseInfo.getStatus(i2,j2)<<std::endl;*/
}
......
......@@ -229,9 +229,17 @@ namespace AMDiS {
WorldVector<double> *values = &(gradientsAtQPs[vec]->values[0]);
gradientsAtQPs[vec]->valid = true;
bool hasNan=false;
for(int i=0;i<localQuad->getNumPoints() && !hasNan;i++)
for(int j=0;j<Global::getGeo(WORLD) && !hasNan ;j++)
hasNan=isnan((values[i])[j]);
TEST_EXIT_DBG(!hasNan)("gradient contains a nan\n");
vec->getGrdAtQPs(smallElInfo, largeElInfo, localQuad, NULL, values);
hasNan=false;
for(int i=0;i<localQuad->getNumPoints() && !hasNan;i++)
for(int j=0;j<Global::getGeo(WORLD) && !hasNan ;j++)
hasNan=isnan((values[i])[j]);
TEST_EXIT_DBG(!hasNan)("gradient contains a nan\n");
return values;
}
......
......@@ -98,7 +98,11 @@ namespace AMDiS {
std::vector<OperatorTerm*>::iterator termIt;
for (termIt = terms[myRank].begin(); termIt != terms[myRank].end(); ++termIt)
(static_cast<ZeroOrderTerm*>((*termIt)))->getC(elInfo, nPoints, c);
bool hasNan=false;
for(int i=0;i<nPoints && !hasNan ;i++)
hasNan=isnan(c[i]);
TEST_EXIT(!hasNan)("there is a nan in at least one position\n");
if (symmetric) {
TEST_EXIT_DBG(nCol == nRow)("nCol != nRow, but symmetric assembling!\n");
......@@ -134,6 +138,11 @@ namespace AMDiS {
}
}
}
hasNan=false;
for(unsigned i=0;i<num_rows(mat) && !hasNan;i++)
for(unsigned j=0;j<num_cols(mat) && !hasNan; j++)
hasNan=isnan(mat[i][j]);
TEST_EXIT(!hasNan)("calculated an element matrix containing a nan\n");
}
......
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