MeshChecker.cpp
177 built = (built && createPortIn<MimmoSharedPointer<MimmoObject>, MeshChecker>(this, &MeshChecker::setGeometry, M_GEOM, true));
178 built = (built && createPortOut<bool, MeshChecker>(this, &mimmo::MeshChecker::isGood, M_VALUEB));
179 built = (built && createPortOut<int, MeshChecker>(this, &mimmo::MeshChecker::getQualityStatusInt, M_VALUEI));
313 (*m_log)<<m_name<<" : FAILED maximum cell volume check, found value : "<< m_maxVolume << std::endl;
316 (*m_log)<<m_name<<" : maximum cell volume check PASSED with value : "<< m_maxVolume << std::endl;
324 (*m_log)<<m_name<<" : FAILED minimum cell volume check, found value : "<< m_minVolume << std::endl;
327 (*m_log)<<m_name<<" : minimum cell volume check PASSED with value : "<< m_minVolume << std::endl;
335 (*m_log)<<m_name<<" : FAILED cell skewness, found value [deg] : "<< m_maxSkewness / BITPIT_PI * 180. << std::endl;
338 (*m_log)<<m_name<<" : cell skewness PASSED with value [deg] : "<< m_maxSkewness / BITPIT_PI * 180. << std::endl;
346 (*m_log)<<m_name<<" : FAILED boundary skewness, found value [deg] : "<< m_maxSkewnessBoundary / BITPIT_PI * 180. << std::endl;
349 (*m_log)<<m_name<<" : boundary skewness PASSED with value [deg] : "<< m_maxSkewnessBoundary / BITPIT_PI * 180. << std::endl;
357 (*m_log)<<m_name<<" : FAILED cell volume change check, found value : "<< m_minVolumeChange << std::endl;
360 (*m_log)<<m_name<<" : cell volume change check PASSED with value : "<< m_minVolumeChange << std::endl;
368 (*m_log)<<m_name<<" : FAILED cell face validity check, found value : "<< m_minFaceValidity << std::endl;
371 (*m_log)<<m_name<<" : cell face validity check PASSED with value : "<< m_minFaceValidity << std::endl;
401 for (auto it = getGeometry()->getPatch()->internalCellBegin(); it!= getGeometry()->getPatch()->internalCellEnd(); ++it){
481 (*m_log)<<m_name<<" : skewness check active only for volume mesh -> check disabled" << std::endl;
491 std::array<double,3> centroidsVector = getGeometry()->evalCellCentroid(interface.getNeigh()) - getGeometry()->evalCellCentroid(interface.getOwner());
492 std::array<double,3> normal = static_cast<bitpit::VolUnstructured*>(getGeometry()->getPatch())->evalInterfaceNormal(interface.getId());
493 double angle = std::acos(dotProduct(centroidsVector,normal) / (norm2(centroidsVector)*norm2(normal)));
499 std::array<double,3> centroidsVector = getGeometry()->evalInterfaceCentroid(interface.getId()) -getGeometry()->evalCellCentroid(interface.getOwner());
500 std::array<double,3> normal = static_cast<bitpit::VolUnstructured*>(getGeometry()->getPatch())->evalInterfaceNormal(interface.getId());
501 double angle = std::acos(dotProduct(centroidsVector,normal) / (norm2(centroidsVector)*norm2(normal)));
567 (*m_log)<<m_name<<" : face validity check active only for volume mesh -> check disabled" << std::endl;
589 std::array<double,3> centerinterface = getGeometry()->getPatch()->evalInterfaceCentroid(idinter);
590 std::array<double,3> normal = static_cast<bitpit::VolUnstructured*>(getGeometry()->getPatch())->evalInterfaceNormal(idinter);
595 double area = static_cast<bitpit::VolUnstructured*>(getGeometry()->getPatch())->evalInterfaceArea(idinter);
606 for (auto it = getGeometry()->getPatch()->internalCellBegin(); it!=getGeometry()->getPatch()->internalCellEnd(); ++it){
896 out<<std::scientific<<"MinVol Threshold : "<< m_minVolumeTol <<" , MinVol found : "<<m_minVolume<<std::endl;
897 out<<std::scientific<<"MaxVol Threshold : "<< m_maxVolumeTol <<" , MaxVol found : "<<m_maxVolume<<std::endl;
898 out<<std::scientific<<"MinVolChange Threshold : "<< m_minVolumeChangeTol <<" , MinVolChange found : "<<m_minVolumeChange<<std::endl;
899 out<<std::scientific<<"MaxSkewness Threshold : "<< m_maxSkewnessTol <<" , MaxSkewness found : "<<m_maxSkewness<<std::endl;
900 out<<std::scientific<<"MaxBndSkewness Threshold : "<< m_maxSkewnessBoundaryTol <<" , MaxBndSkewness found : "<<m_maxSkewnessBoundary <<std::endl;
901 out<<std::scientific<<"MinFaceVal Threshold : "<< m_minFaceValidityTol <<" , MinFaceVal found : "<<m_minFaceValidity <<std::endl;
void setMinimumFaceValidityTolerance(double tol)
Definition: MeshChecker.cpp:235
MimmoObject is the basic geometry container for mimmo library.
Definition: MimmoObject.hpp:143
std::unique_ptr< MimmoObject > m_volumechange
Definition: MeshChecker.hpp:176
void setMaximumVolumeTolerance(double tol)
Definition: MeshChecker.cpp:208
double m_maxSkewnessBoundary
Definition: MeshChecker.hpp:152
virtual void absorbSectionXML(const bitpit::Config::Section &slotXML, std::string name="")
Definition: MeshChecker.cpp:723
@ CELL
void setMaximumBoundarySkewnessTolerance(double tol)
Definition: MeshChecker.cpp:226
void setMinimumVolumeChangeTolerance(double tol)
Definition: MeshChecker.cpp:244
std::unique_ptr< MimmoObject > m_skewness
Definition: MeshChecker.hpp:174
void warningXML(bitpit::Logger *log, std::string name)
Definition: MimmoNamespace.cpp:211
double m_maxSkewnessBoundaryTol
Definition: MeshChecker.hpp:161
MeshChecker is the class to evaluate the quality of a volume mesh.
Definition: MeshChecker.hpp:87
void setGeometry(MimmoSharedPointer< MimmoObject > obj)
Definition: MeshChecker.cpp:187
BaseManipulation is the base class of any manipulation object of the library.
Definition: BaseManipulation.hpp:102
std::unique_ptr< MimmoObject > m_facevalidity
Definition: MeshChecker.hpp:175
virtual void flushSectionXML(bitpit::Config::Section &slotXML, std::string name="")
Definition: MeshChecker.cpp:813
void setMaximumSkewnessTolerance(double tol)
Definition: MeshChecker.cpp:217
virtual void absorbSectionXML(const bitpit::Config::Section &slotXML, std::string name="")
Definition: BaseManipulation.cpp:615
MeshChecker & operator=(MeshChecker other)
Definition: MeshChecker.cpp:88
void initialize(MimmoSharedPointer< MimmoObject >, MPVLocation, const mpv_t &)
Definition: MimmoPiercedVector.tpp:593
virtual void flushSectionXML(bitpit::Config::Section &slotXML, std::string name="")
Definition: BaseManipulation.cpp:670
void setMinimumVolumeTolerance(double tol)
Definition: MeshChecker.cpp:199
void setGeometry(MimmoSharedPointer< MimmoObject > geometry)
Definition: BaseManipulation.cpp:433
MimmoSharedPointer< MimmoObject > getGeometry()
Definition: BaseManipulation.cpp:235
void setPrintResumeFile(bool flag)
Definition: MeshChecker.cpp:253