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

*** empty log message ***

parent 1caadbd0
No related branches found
No related tags found
No related merge requests found
...@@ -2,33 +2,36 @@ ...@@ -2,33 +2,36 @@
#include "gmshAssembler.h" #include "gmshAssembler.h"
#include "gmshLaplace.h" #include "gmshLaplace.h"
#include "Octree.h" #include "Octree.h"
#include "gmshGmmLinearSystem.h" #include "gmshLinearSystemGmm.h"
static void fixEdgeToValue (GEdge *ed, static void fixEdgeToValue (GEdge *ed,
double value, double value,
gmshAssembler &myAssembler){ gmshAssembler &myAssembler)
{
myAssembler.fixVertex(ed->getBeginVertex()->mesh_vertices[0], myAssembler.fixVertex(ed->getBeginVertex()->mesh_vertices[0],
0, 1, value); 0, 1, value);
myAssembler.fixVertex(ed->getEndVertex()->mesh_vertices[0], myAssembler.fixVertex(ed->getEndVertex()->mesh_vertices[0],
0, 1, value); 0, 1, value);
for (int i=0 ; i< ed->mesh_vertices.size();i++){ for (int i = 0 ; i < ed->mesh_vertices.size(); i++){
myAssembler.fixVertex(ed->mesh_vertices[i],0, 1, value); myAssembler.fixVertex(ed->mesh_vertices[i],0, 1, value);
} }
} }
static void fixEdgeToValueX (GEdge *ed, static void fixEdgeToValueX (GEdge *ed,
gmshAssembler &myAssembler){ gmshAssembler &myAssembler)
for (int i=0 ; i< ed->lines.size();i++){ {
myAssembler.fixVertex(ed->lines[i]->getVertex(0),0, 1, ed->lines[i]->getVertex(0)->x()); for (int i = 0 ; i < ed->lines.size(); i++){
myAssembler.fixVertex(ed->lines[i]->getVertex(1),0, 1, ed->lines[i]->getVertex(1)->x()); myAssembler.fixVertex(ed->lines[i]->getVertex(0), 0, 1, ed->lines[i]->getVertex(0)->x());
myAssembler.fixVertex(ed->lines[i]->getVertex(1), 0, 1, ed->lines[i]->getVertex(1)->x());
} }
} }
static void fixEdgeToValueY (GEdge *ed, static void fixEdgeToValueY (GEdge *ed,
gmshAssembler &myAssembler){ gmshAssembler &myAssembler)
for (int i=0 ; i< ed->lines.size();i++){ {
myAssembler.fixVertex(ed->lines[i]->getVertex(0),0, 1, ed->lines[i]->getVertex(0)->y()); for (int i = 0 ; i < ed->lines.size(); i++){
myAssembler.fixVertex(ed->lines[i]->getVertex(1),0, 1, ed->lines[i]->getVertex(1)->y()); myAssembler.fixVertex(ed->lines[i]->getVertex(0), 0, 1, ed->lines[i]->getVertex(0)->y());
myAssembler.fixVertex(ed->lines[i]->getVertex(1), 0, 1, ed->lines[i]->getVertex(1)->y());
} }
} }
...@@ -45,7 +48,6 @@ void GFaceCompound::getBoundingEdges () ...@@ -45,7 +48,6 @@ void GFaceCompound::getBoundingEdges ()
return; return;
} }
std::set<GEdge*> _unique; std::set<GEdge*> _unique;
std::list<GFace*> :: iterator it = _compound.begin(); std::list<GFace*> :: iterator it = _compound.begin();
for ( ; it != _compound.end() ; ++it){ for ( ; it != _compound.end() ; ++it){
...@@ -75,7 +77,9 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound, ...@@ -75,7 +77,9 @@ GFaceCompound::GFaceCompound(GModel *m, int tag, std::list<GFace*> &compound,
printf("%d %d %d %d \n",_U0.size(),_U1.size(),_V0.size(),_V1.size()); printf("%d %d %d %d \n",_U0.size(),_U1.size(),_V0.size(),_V1.size());
getBoundingEdges(); getBoundingEdges();
} }
GFaceCompound::~GFaceCompound(){
GFaceCompound::~GFaceCompound()
{
if (oct){ if (oct){
Octree_Delete(oct); Octree_Delete(oct);
delete [] _gfct; delete [] _gfct;
...@@ -167,7 +171,8 @@ void GFaceCompound::parametrize (bool _isU) const ...@@ -167,7 +171,8 @@ void GFaceCompound::parametrize (bool _isU) const
} }
GPoint GFaceCompound::point(double par1, double par2) const { GPoint GFaceCompound::point(double par1, double par2) const
{
parametrize(); parametrize();
double U,V; double U,V;
MTriangle *t; MTriangle *t;
...@@ -181,12 +186,10 @@ GPoint GFaceCompound::point(double par1, double par2) const { ...@@ -181,12 +186,10 @@ GPoint GFaceCompound::point(double par1, double par2) const {
/* /*
computing dX/du and dX/dv computing dX/du and dX/dv
*/ */
Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 &param) const{ Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 &param) const
{
parametrize(); parametrize();
double U,V; double U,V;
MTriangle *t; MTriangle *t;
...@@ -197,7 +200,8 @@ Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 &param) const{ ...@@ -197,7 +200,8 @@ Pair<SVector3,SVector3> GFaceCompound::firstDer(const SPoint2 &param) const{
SVector3(jac[1][0],jac[1][1],jac[1][2])); SVector3(jac[1][0],jac[1][1],jac[1][2]));
} }
static void GFaceCompoundBB(void *a, double*mmin, double*mmax){ static void GFaceCompoundBB(void *a, double*mmin, double*mmax)
{
GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a; GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a;
mmin[0] = std::min(std::min(t->p1.x(),t->p2.x()),t->p3.x()); mmin[0] = std::min(std::min(t->p1.x(),t->p2.x()),t->p3.x());
mmin[1] = std::min(std::min(t->p1.y(),t->p2.y()),t->p3.y()); mmin[1] = std::min(std::min(t->p1.y(),t->p2.y()),t->p3.y());
...@@ -206,14 +210,17 @@ static void GFaceCompoundBB(void *a, double*mmin, double*mmax){ ...@@ -206,14 +210,17 @@ static void GFaceCompoundBB(void *a, double*mmin, double*mmax){
mmin[2] = -1; mmin[2] = -1;
mmax[2] = 1; mmax[2] = 1;
} }
static void GFaceCompoundCentroid(void *a, double*c){
static void GFaceCompoundCentroid(void *a, double*c)
{
GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a; GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a;
c[0] = (t->p1.x() + t->p2.x() + t->p3.x())/3.0; c[0] = (t->p1.x() + t->p2.x() + t->p3.x())/3.0;
c[1] = (t->p1.y() + t->p2.y() + t->p3.y())/3.0; c[1] = (t->p1.y() + t->p2.y() + t->p3.y())/3.0;
c[2] = 0.0; c[2] = 0.0;
} }
static int GFaceCompoundInEle(void *a, double*c){ static int GFaceCompoundInEle(void *a, double*c)
{
GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a; GFaceCompoundTriangle *t = (GFaceCompoundTriangle *)a;
double M[2][2],R[2],X[2]; double M[2][2],R[2],X[2];
const double eps = 1.e-6; const double eps = 1.e-6;
...@@ -235,10 +242,10 @@ static int GFaceCompoundInEle(void *a, double*c){ ...@@ -235,10 +242,10 @@ static int GFaceCompoundInEle(void *a, double*c){
return 0; return 0;
} }
void GFaceCompound::getTriangle (double u, double v, void GFaceCompound::getTriangle (double u, double v,
MTriangle **t, MTriangle **t,
double &_u, double &_v)const { double &_u, double &_v) const
{
parametrize(); parametrize();
double uv[3] = {u,v,0}; double uv[3] = {u,v,0};
...@@ -262,10 +269,6 @@ void GFaceCompound::getTriangle (double u, double v, ...@@ -262,10 +269,6 @@ void GFaceCompound::getTriangle (double u, double v,
_v = X[1]; _v = X[1];
return; return;
// std::list<GFace*> :: const_iterator it = _compound.begin(); // std::list<GFace*> :: const_iterator it = _compound.begin();
// for ( ; it != _compound.end() ; ++it){ // for ( ; it != _compound.end() ; ++it){
// for ( int i=0;i<(*it)->triangles.size() ; ++i){ // for ( int i=0;i<(*it)->triangles.size() ; ++i){
...@@ -301,8 +304,8 @@ void GFaceCompound::getTriangle (double u, double v, ...@@ -301,8 +304,8 @@ void GFaceCompound::getTriangle (double u, double v,
// *t = 0; // *t = 0;
} }
void GFaceCompound::buildOct() const { void GFaceCompound::buildOct() const
{
SBoundingBox3d bb; SBoundingBox3d bb;
int count; int count;
std::list<GFace*> :: const_iterator it = _compound.begin(); std::list<GFace*> :: const_iterator it = _compound.begin();
...@@ -327,7 +330,6 @@ void GFaceCompound::buildOct() const { ...@@ -327,7 +330,6 @@ void GFaceCompound::buildOct() const {
it = _compound.begin(); it = _compound.begin();
count = 0; count = 0;
FILE * uvx = fopen ("UVX.pos","w"); FILE * uvx = fopen ("UVX.pos","w");
FILE * uvy = fopen ("UVY.pos","w"); FILE * uvy = fopen ("UVY.pos","w");
FILE * uvz = fopen ("UVZ.pos","w"); FILE * uvz = fopen ("UVZ.pos","w");
......
...@@ -111,7 +111,7 @@ GFaceCompound.o: GFaceCompound.cpp GFaceCompound.h Geo.h \ ...@@ -111,7 +111,7 @@ GFaceCompound.o: GFaceCompound.cpp GFaceCompound.h Geo.h \
../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/SPoint3.h ../Geo/MEdge.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Message.h \ ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h ../Common/Message.h \
../Numeric/FunctionSpace.h ../Common/Octree.h \ ../Numeric/FunctionSpace.h ../Common/Octree.h \
../Common/OctreeInternals.h ../Numeric/gmshGmmLinearSystem.h \ ../Common/OctreeInternals.h ../Numeric/gmshLinearSystemGmm.h \
../Numeric/gmshLinearSystem.h ../Numeric/gmshLinearSystem.h
GRegion.o: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \ GRegion.o: GRegion.cpp GModel.h GVertex.h GEntity.h Range.h SPoint3.h \
SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \ SBoundingBox3d.h GPoint.h SPoint2.h GEdge.h SVector3.h GFace.h \
......
...@@ -126,7 +126,7 @@ gmshSmoothHighOrder.o: gmshSmoothHighOrder.cpp gmshSmoothHighOrder.h \ ...@@ -126,7 +126,7 @@ gmshSmoothHighOrder.o: gmshSmoothHighOrder.cpp gmshSmoothHighOrder.h \
../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \ ../Geo/SVector3.h ../Geo/MFace.h ../Geo/MVertex.h ../Geo/SVector3.h \
../Common/Message.h ../Numeric/FunctionSpace.h \ ../Common/Message.h ../Numeric/FunctionSpace.h \
../Numeric/gmshElasticity.h ../Numeric/gmshTermOfFormulation.h \ ../Numeric/gmshElasticity.h ../Numeric/gmshTermOfFormulation.h \
../Numeric/gmshGmmLinearSystem.h ../Numeric/gmshLinearSystem.h ../Numeric/gmshLinearSystemGmm.h ../Numeric/gmshLinearSystem.h
meshGEdge.o: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \ meshGEdge.o: meshGEdge.cpp ../Geo/GModel.h ../Geo/GVertex.h \
../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \ ../Geo/GEntity.h ../Geo/Range.h ../Geo/SPoint3.h \
../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \ ../Geo/SBoundingBox3d.h ../Geo/SPoint3.h ../Geo/GPoint.h \
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "gmshAssembler.h" #include "gmshAssembler.h"
#include "gmshLaplace.h" #include "gmshLaplace.h"
#include "gmshElasticity.h" #include "gmshElasticity.h"
#include "gmshGmmLinearSystem.h" #include "gmshLinearSystemGmm.h"
#include "GFace.h" #include "GFace.h"
#include "GRegion.h" #include "GRegion.h"
......
File moved
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