Skip to content
Snippets Groups Projects
Commit e48f5c9e authored by PA Beaufort's avatar PA Beaufort
Browse files

the linear system is only modified if the initial harmonic map is not one-to-one (1st order)

parent f8a91064
No related branches found
No related tags found
No related merge requests found
...@@ -284,12 +284,15 @@ discreteDiskFace::discreteDiskFace(GFace *gf, triangulation* diskTriangulation, ...@@ -284,12 +284,15 @@ discreteDiskFace::discreteDiskFace(GFace *gf, triangulation* diskTriangulation,
_totLength = geoTriangulation->bord.rbegin()->first; _totLength = geoTriangulation->bord.rbegin()->first;
_U0 = geoTriangulation->bord.rbegin()->second; _U0 = geoTriangulation->bord.rbegin()->second;
orderVertices(_totLength, _U0, _coords); orderVertices(_totLength, _U0, _coords);
parametrize(); parametrize(false);
buildOct(CAD); buildOct(CAD);
printParamMesh(); printParamMesh();
if (_order > 1 && !checkOrientationUV()){ if (!checkOrientationUV()){
Msg::Info("discreteDiskFace:: parametrization is not one-to-one; the parametric mesh is going to be corrected."); Msg::Info("discreteDiskFace:: parametrization is not one-to-one; it is going to be corrected.");
optimize(); if(_order==1)
parametrize(true);
else
optimize();
buildOct(CAD); buildOct(CAD);
printParamMesh(); printParamMesh();
} }
...@@ -336,7 +339,7 @@ void discreteDiskFace::buildOct(std::vector<GFace*> *CAD) const ...@@ -336,7 +339,7 @@ void discreteDiskFace::buildOct(std::vector<GFace*> *CAD) const
Octree_Arrange(oct); Octree_Arrange(oct);
} }
bool discreteDiskFace::parametrize()// const bool discreteDiskFace::parametrize(bool one2one)// const
{ // #improveme { // #improveme
...@@ -349,7 +352,7 @@ bool discreteDiskFace::parametrize()// const ...@@ -349,7 +352,7 @@ bool discreteDiskFace::parametrize()// const
dofManager<double> myAssemblerU(lsys_u); // hashing dofManager<double> myAssemblerU(lsys_u); // hashing
dofManager<double> myAssemblerV(lsys_v); dofManager<double> myAssemblerV(lsys_v);
if(_order>1){ if(!one2one){
for(size_t i = 0; i < _U0.size(); i++){ for(size_t i = 0; i < _U0.size(); i++){
MVertex *v = _U0[i]; MVertex *v = _U0[i];
const double theta = 2 * M_PI * _coords[i]; const double theta = 2 * M_PI * _coords[i];
...@@ -389,7 +392,8 @@ bool discreteDiskFace::parametrize()// const ...@@ -389,7 +392,8 @@ bool discreteDiskFace::parametrize()// const
} }
if(_order==1){ if(one2one){
Msg::Info("discreteDiskFace::parametrize \t Modifying discrete system");
checklsys(lsys_u,&myAssemblerU,1); checklsys(lsys_u,&myAssemblerU,1);
checklsys(lsys_v,&myAssemblerV,0); checklsys(lsys_v,&myAssemblerV,0);
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "linearSystemCSR.h" #include "linearSystemCSR.h"
#include "dofManager.h" #include "dofManager.h"
inline int nodeLocalNum(MElement* e, MVertex* v) inline int nodeLocalNum(MElement* e, MVertex* v)
{ {
for(int i=0; i<e->getNumVertices(); i++) for(int i=0; i<e->getNumVertices(); i++)
...@@ -219,7 +220,7 @@ class discreteDiskFaceTriangle { ...@@ -219,7 +220,7 @@ class discreteDiskFaceTriangle {
class discreteDiskFace : public GFace { class discreteDiskFace : public GFace {
GFace *_parent; GFace *_parent;
void buildOct(std::vector<GFace*> *CAD = NULL) const; void buildOct(std::vector<GFace*> *CAD = NULL) const;
bool parametrize();// const; bool parametrize(bool);// const;
void checklsys(linearSystemCSRTaucs<double>*,dofManager<double>*,int); void checklsys(linearSystemCSRTaucs<double>*,dofManager<double>*,int);
void putOnView(bool,bool); void putOnView(bool,bool);
bool checkOrientationUV(); bool checkOrientationUV();
......
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