69 m_sub_domain(
sbi.subDomain()),
70 m_default_mesh(m_sub_domain->defaultMesh()),
71 m_material_mng(IMeshMaterialMng::getReference(m_default_mesh)),
75 "InterfaceDistance2ForEnv",
76 IVariable::PNoDump|IVariable::PNoRestore))
78 info() <<
"Loading Hyoda's environments plugin";
79 info() <<
"Setting a maximum of " << HYODA_MAX_ENV <<
" environments";
86 int drawGlobalCell(
Cell cell, Real min, Real max, Real
val){
89 hyoda()->meshIceT()->setColor(min,max,
val,
rgb);
93 glVertex2d(m_default_mesh->nodesCoordinates()[node].x,
94 m_default_mesh->nodesCoordinates()[node].y);
101 glVertex2d(m_default_mesh->nodesCoordinates()[node].x,
102 m_default_mesh->nodesCoordinates()[node].y);
114 dist_min = math::scaMul(m_default_mesh->nodesCoordinates()[cell.
node(0)],normal);
115 dist_max =math::scaMul(m_default_mesh->nodesCoordinates()[cell.
node(0)],normal);
119 Real
dist = math::scaMul(m_default_mesh->nodesCoordinates()[node],normal);
135 info()<<
"\n\r\33[7m[HyodaEnvs::draw] Focusing on variable "<<variable->
name()<<
"\33[m";
142 debug()<<
"\33[7m[HyodaEnvs::draw] Calcul des min et max locaux aux envCells\33[m";
165 debug()<<
"\33[7m[HyodaEnvs::draw] ENUMERATE_ALLENVCELL\33[m";
169 Real3 normal = m_interface_normal[cell];
173 if (normal.
abs()==0.)
continue;
174 info()<<
"\n\r\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()<<
", normal="<<normal <<
"\33[m";
177 hyodaMix()->setCellOrigin(cell);
202 warning() <<
"\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()
203 <<
": while counting nbOrderedMilieux, ord_env="
204 <<
ord_env <<
" > " << HYODA_MAX_ENV <<
"\33[m";
205 if (
ord_env > HYODA_MAX_ENV)
continue;
245 info() <<
"\t\33[7m[HyodaEnvs::draw] xPts["<<
iEnvOrder<<
"]="<<
xPts<<
"\33[m";
269 debug()<<
"\t[HyodaEnvs::draw] Looking for num_env="<<
num_env;
274 debug()<<
"\t\t[HyodaEnvs::draw] envCell.environmentId()="<<envCell.
environmentId();
278 debug() <<
"\t\t[HyodaEnvs::draw] \33[7m"
281 debug()<<
"\t\t[HyodaEnvs::draw] iMilieux="<<
iMilieux;
283 hyodaMix()->xCellFill(cell,
xCodes,
296 warning()<<
"\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()
297 <<
": Environement "<<
num_env<<
" non trouvé dans les milieux!\33[m";
306 warning()<<
"\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()
307 <<
": tous les milieux n'ont pas été dessinés!\33[m";
313 if (order == -1 )
continue;
314 if (order > HYODA_MAX_ENV){
315 warning() <<
"\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()
316 <<
": order_env > "<<HYODA_MAX_ENV<<
"\33[m";
320 warning() <<
"\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()
321 <<
": En redessinant via order_env, le milieu "<<order
323 warning() <<
"\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()
324 <<
": On tente de patcher l'offset\33[m";
329 hyodaMix()->xCellFill(cell,
xCodes,
338 warning() <<
"\33[7m[HyodaEnvs::draw] #"<<cell.
uniqueId()
339 <<
": Même via les order_env, les milieux n'ont pas tous été dessinés\33[m";
349 IMesh* m_default_mesh;
Interface du gestionnaire d'un sous-domaine.