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,11 +284,14 @@ discreteDiskFace::discreteDiskFace(GFace *gf, triangulation* diskTriangulation,
_totLength = geoTriangulation->bord.rbegin()->first;
_U0 = geoTriangulation->bord.rbegin()->second;
orderVertices(_totLength, _U0, _coords);
parametrize();
parametrize(false);
buildOct(CAD);
printParamMesh();
if (_order > 1 && !checkOrientationUV()){
Msg::Info("discreteDiskFace:: parametrization is not one-to-one; the parametric mesh is going to be corrected.");
if (!checkOrientationUV()){
Msg::Info("discreteDiskFace:: parametrization is not one-to-one; it is going to be corrected.");
if(_order==1)
parametrize(true);
else
optimize();
buildOct(CAD);
printParamMesh();
......@@ -336,7 +339,7 @@ void discreteDiskFace::buildOct(std::vector<GFace*> *CAD) const
Octree_Arrange(oct);
}
bool discreteDiskFace::parametrize()// const
bool discreteDiskFace::parametrize(bool one2one)// const
{ // #improveme
......@@ -349,7 +352,7 @@ bool discreteDiskFace::parametrize()// const
dofManager<double> myAssemblerU(lsys_u); // hashing
dofManager<double> myAssemblerV(lsys_v);
if(_order>1){
if(!one2one){
for(size_t i = 0; i < _U0.size(); i++){
MVertex *v = _U0[i];
const double theta = 2 * M_PI * _coords[i];
......@@ -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_v,&myAssemblerV,0);
}
......
......@@ -26,6 +26,7 @@
#include "linearSystemCSR.h"
#include "dofManager.h"
inline int nodeLocalNum(MElement* e, MVertex* v)
{
for(int i=0; i<e->getNumVertices(); i++)
......@@ -219,7 +220,7 @@ class discreteDiskFaceTriangle {
class discreteDiskFace : public GFace {
GFace *_parent;
void buildOct(std::vector<GFace*> *CAD = NULL) const;
bool parametrize();// const;
bool parametrize(bool);// const;
void checklsys(linearSystemCSRTaucs<double>*,dofManager<double>*,int);
void putOnView(bool,bool);
bool checkOrientationUV();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment