Commit dec7dac6 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* On the way to indep meshes

parent 26882a5f
......@@ -123,13 +123,13 @@ namespace AMDiS {
ElementMatrix *mat = rememberElMat ? elementMatrix : userMat;
if (secondOrderAssembler)
secondOrderAssembler->calculateElementMatrix(rowElInfo, mat);
secondOrderAssembler->calculateElementMatrix(rowElInfo, colElInfo, mat);
if (firstOrderAssemblerGrdPsi)
firstOrderAssemblerGrdPsi->calculateElementMatrix(rowElInfo, mat);
firstOrderAssemblerGrdPsi->calculateElementMatrix(rowElInfo, colElInfo, mat);
if (firstOrderAssemblerGrdPhi)
firstOrderAssemblerGrdPhi->calculateElementMatrix(rowElInfo, mat);
firstOrderAssemblerGrdPhi->calculateElementMatrix(rowElInfo, colElInfo, mat);
if (zeroOrderAssembler) {
zeroOrderAssembler->calculateElementMatrix(rowElInfo, mat);
zeroOrderAssembler->calculateElementMatrix(rowElInfo, colElInfo, mat);
}
if (rememberElMat && userMat) {
......
......@@ -22,7 +22,8 @@ namespace AMDiS {
element_(NULL),
parent_(NULL),
macroElement_(NULL),
subElemCoords(NULL),
level_(0),
iChild(0),
coord_(mesh_->getDim(), NO_INIT),
boundary_(mesh_->getDim(), DEFAULT_VALUE, INTERIOR),
projection_(mesh_->getDim(), NO_INIT),
......@@ -31,8 +32,7 @@ namespace AMDiS {
neighbourCoord_(mesh_->getDim(), NO_INIT),
oppVertex_(mesh_->getDim(), NO_INIT),
grdLambda_(mesh_->getDim(), NO_INIT),
level_(0),
iChild(0)
subElemCoords(NULL)
{
projection_.set(NULL);
......
......@@ -260,7 +260,7 @@ namespace AMDiS {
return parametric_;
}
inline VectorOfFixVecs<DimVec<double> > *getSubElemCoords() {
inline VectorOfFixVecs<DimVec<double> > *getSubElemCoords() const {
return subElemCoords;
}
......
......@@ -1409,7 +1409,8 @@ namespace AMDiS {
Quadrature* Quadrature::provideQuadrature(int dim_, int degree_)
{
FUNCNAME("Quadrature::provideQuadrature()");
switch(dim_) {
switch (dim_) {
case 0:
degree_ = 0;
break;
......
......@@ -83,17 +83,17 @@ namespace AMDiS {
w(w_)
{};
/** \brief
* Destructor
*/
~Quadrature();
public:
/** \brief
* Copy constructor
*/
Quadrature(const Quadrature&);
/** \brief
* Destructor
*/
~Quadrature();
/** \brief
* Returns a Quadrature for dimension dim exact for degree degree.
*/
......
......@@ -156,6 +156,7 @@ namespace AMDiS {
const BasisFunction *psi = owner->getRowFESpace()->getBasisFcts();
const BasisFunction *phi = owner->getColFESpace()->getBasisFcts();
double *phival = GET_MEMORY(double, nCol);
int nPoints = quadrature->getNumPoints();
double *c = GET_MEMORY(double, nPoints);
......@@ -165,21 +166,32 @@ namespace AMDiS {
(static_cast<ZeroOrderTerm*>((*termIt)))->getC(rowElInfo, nPoints, c);
}
ScalableQuadrature *scalQuadrature = NEW ScalableQuadrature(quadrature);
// SubElInfo *subElInfo = NEW ScalElInfo(rowElInfo);
SubElInfo *subElInfo = NEW SubElInfo(colElInfo->getSubElemCoords(), rowElInfo);
Quadrature psiQuadrature(*quadrature);
ScalableQuadrature *scaledQuadrature = NEW ScalableQuadrature(&psiQuadrature);
scaledQuadrature->scaleQuadrature(*subElInfo);
for (int iq = 0; iq < nPoints; iq++) {
c[iq] *= rowElInfo->getDet();
// calculate phi at QPs only once!
for (int i = 0; i < nCol; i++) {
// phival[i] = (*(phi->getPhi(i)))(quadrature->getLambda(iq));
phival[i] = (*(phi->getPhi(i)))(quadrature->getLambda(iq));
}
for (int i = 0; i < nRow; i++) {
double psival = (*(psi->getPhi(i)))(psiQuadrature.getLambda(iq));
for (int j = 0; j < nCol; j++) {
(*mat)[i][j] += quadrature->getWeight(iq) * c[iq] * psival * phival[j];
}
}
}
DELETE scaledQuadrature;
DELETE subElInfo;
DELETE scalQuadrature;
// DELETE subElInfo;
FREE_MEMORY(phival, double, nCol);
FREE_MEMORY(c, double, nPoints);
ERROR_EXIT("SO, HIER GEHTS WEITER\n");
}
......
......@@ -24,8 +24,8 @@ namespace AMDiS {
* Creates and returns the ZeroOrderAssembler for Operator op and
* the given assembler. If all terms are piecewise constant precalculated
* integrals can be used while assembling and the returned
* ZeroOrderAssembler is of type Pre0. Otherwise a Quad0 object will
* be returned.
* ZeroOrderAssembler is of type PrecalcZOA. Otherwise a FastQuadZOA
* object will be returned.
*/
static ZeroOrderAssembler* getSubAssembler(Operator *op,
Assembler *assembler,
......
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