Skip to content
Snippets Groups Projects
Commit 8c5ddb69 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fixed embedded + adaptive vector

parent 4a531196
No related branches found
No related tags found
No related merge requests found
......@@ -45,21 +45,15 @@ class GModel
std::map<int, MVertex*> _vertexMapCache;
GEO_Internals *_geo_internals;
#if !defined(HAVE_GMSH_EMBEDDED)
void _createGEOInternals();
void _deleteGEOInternals();
#endif
OCC_Internals *_occ_internals;
#if !defined(HAVE_GMSH_EMBEDDED)
void _deleteOCCInternals();
#endif
FM_Internals *_fm_internals;
#if !defined(HAVE_GMSH_EMBEDDED)
void _createFMInternals();
void _deleteFMInternals();
#endif
// Characteristic Lengths fields
FieldManager *_fields;
......
// $Id: MElement.cpp,v 1.68 2008-05-19 18:50:32 remacle Exp $
// $Id: MElement.cpp,v 1.69 2008-06-01 09:14:21 geuzaine Exp $
//
// Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
//
......@@ -23,13 +23,13 @@
#include "MElement.h"
#include "GEntity.h"
#include "GFace.h"
#include "GaussLegendre1D.h"
#if defined(HAVE_GMSH_EMBEDDED)
# include "GmshEmbedded.h"
#else
# include "Numeric.h"
# include "FunctionSpace.h"
# include "GaussLegendre1D.h"
# include "Message.h"
# include "Context.h"
# include "qualityMeasures.h"
......@@ -825,7 +825,7 @@ MElement *MElementFactory::create(int type, std::vector<MVertex*> &v,
}
}
extern int getNGQTPts(int order);
extern int getNGQTPts(int order);
extern IntPt *getGQTPts (int order);
extern int getNGQTetPts(int order);
extern IntPt *getGQTetPts(int order);
......@@ -836,46 +836,51 @@ extern IntPt *getGQHPts(int order);
IntPt GQL[100];
void MLine:: getIntegrationPoints ( int pOrder , int *npts, IntPt **pts) const{
void MLine::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const
{
#if !defined(HAVE_GMSH_EMBEDDED)
double *t, *w;
int nbP = pOrder/2 + 1;
int nbP = pOrder / 2 + 1;
gmshGaussLegendre1D(nbP, &t, &w);
for (int i=0;i<nbP;i++){
for (int i = 0; i < nbP; i++){
GQL[i].pt[0] = t[i];
GQL[i].pt[1] = 0;
GQL[i].pt[2] = 0;
GQL[i].weight = w[i];
}
*npts = nbP;
*pts = GQL;
*pts = GQL;
#endif
}
void MTriangle:: getIntegrationPoints ( int pOrder , int *npts, IntPt **pts) const
void MTriangle:: getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const
{
#if !defined(HAVE_GMSH_EMBEDDED)
*npts = getNGQTPts(pOrder);
*pts = getGQTPts(pOrder);
*pts = getGQTPts(pOrder);
#endif
}
void MTetrahedron:: getIntegrationPoints ( int pOrder , int *npts, IntPt **pts) const
void MTetrahedron::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const
{
#if !defined(HAVE_GMSH_EMBEDDED)
*npts = getNGQTetPts(pOrder);
*pts = getGQTetPts(pOrder);
*pts = getGQTetPts(pOrder);
#endif
}
void MHexahedron:: getIntegrationPoints ( int pOrder , int *npts, IntPt **pts) const
void MHexahedron::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const
{
#if !defined(HAVE_GMSH_EMBEDDED)
*npts = getNGQHPts(pOrder);
*pts = getGQHPts(pOrder);
*pts = getGQHPts(pOrder);
#endif
}
void MQuadrangle:: getIntegrationPoints ( int pOrder , int *npts, IntPt **pts) const
void MQuadrangle::getIntegrationPoints(int pOrder, int *npts, IntPt **pts) const
{
#if !defined(HAVE_GMSH_EMBEDDED)
*npts = getNGQQPts(pOrder);
*pts = getGQQPts(pOrder);
*pts = getGQQPts(pOrder);
#endif
}
# $Id: Makefile,v 1.209 2008-05-20 19:25:33 geuzaine Exp $
# $Id: Makefile,v 1.210 2008-06-01 09:14:21 geuzaine Exp $
#
# Copyright (C) 1997-2008 C. Geuzaine, J.-F. Remacle
#
......@@ -283,7 +283,7 @@ MFace.o: MFace.cpp MFace.h MVertex.h SPoint3.h SVector3.h \
MElement.o: MElement.cpp MElement.h ../Common/GmshDefines.h MVertex.h \
SPoint3.h MEdge.h SVector3.h MFace.h GEntity.h Range.h SBoundingBox3d.h \
GFace.h GPoint.h GEdgeLoop.h GEdge.h GVertex.h SPoint2.h Pair.h \
../Numeric/GaussLegendre1D.h ../Numeric/Numeric.h \
../Numeric/NumericEmbedded.h ../Numeric/FunctionSpace.h \
../Common/GmshMatrix.h ../Common/Message.h ../Common/Context.h \
../Numeric/Numeric.h ../Numeric/NumericEmbedded.h \
../Numeric/FunctionSpace.h ../Common/GmshMatrix.h \
../Numeric/GaussLegendre1D.h ../Common/Message.h ../Common/Context.h \
../Mesh/qualityMeasures.h
......@@ -840,11 +840,11 @@ void adaptiveElements<T>::initWithLowResolution(PViewData *data, int step)
_posX = new Double_Matrix(numEle, numNodes);
_posY = new Double_Matrix(numEle, numNodes);
_posZ = new Double_Matrix(numEle, numNodes);
_val = new Double_Matrix(numEle, numVal / numComp);
_val = new Double_Matrix(numEle, numVal);
if(numComp == 3){
_valX = new Double_Matrix(numEle, numVal / numComp);
_valY = new Double_Matrix(numEle, numVal / numComp);
_valZ = new Double_Matrix(numEle, numVal / numComp);
_valX = new Double_Matrix(numEle, numVal);
_valY = new Double_Matrix(numEle, numVal);
_valZ = new Double_Matrix(numEle, numVal);
}
// store non-interpolated data
......@@ -1065,6 +1065,7 @@ adaptiveData::adaptiveData(PViewData *data)
_outData = new PViewDataList(true);
int numComp = _inData->getNumComponents(0, 0, 0);
std::vector<List_T*> p;
if(_inData->getNumLines() && _inData->getInterpolationScheme(1, p) >= 2)
_lines = new adaptiveElements<adaptiveLine>
......
......@@ -10,6 +10,7 @@ SRC = GModel.cpp\
GModelIO_Mesh.cpp\
GEntity.cpp\
GVertex.cpp GEdge.cpp GEdgeLoop.cpp GFace.cpp GRegion.cpp\
discreteEdge.cpp discreteFace.cpp discreteRegion.cpp\
MElement.cpp\
MFace.cpp MVertex.cpp\
NumericEmbedded.cpp\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment