Commit a46e1929 authored by Tomáš Jakubec's avatar Tomáš Jakubec
Browse files

lovered some first letter in function names

parent 9346a213
Loading
Loading
Loading
Loading
+44 −44
Original line number Diff line number Diff line
@@ -6,17 +6,17 @@
template<typename indexType>
class CellBoundaryConnection : public CellConnection<indexType> {
    /**
     * @brief NextBElemWRTCL
     * @brief nextBElemWRTCL
     *
     * Index of the next boundary element with respect to the left cell
     */
    indexType NextBElemWRTCL;
    indexType nextBElemWRTCL;
    /**
     * @brief NextBElemWRTCR
     * @brief nextBElemWRTCR
     *
     * Index of the next boundary element with respect to right cell
     */
    indexType NextBElemWRTCR;
    indexType nextBElemWRTCR;
public:
    CellBoundaryConnection(indexType cellLeft = INVALID_INDEX(indexType),
                           indexType cellRight = INVALID_INDEX(indexType),
@@ -25,20 +25,20 @@ public:
    /*
    ** Set atribute methods
    */
    void SetNextBElemWRTCR(indexType nextIndex);
    void setNextBElemWRTCR(indexType nextIndex);

    void SetNextBElemWRTCL(indexType nextIndex);
    void setNextBElemWRTCL(indexType nextIndex);

    bool SetNextBElem(indexType nextBElemIndex, indexType cellIndex);
    bool setNextBElem(indexType nextBElemIndex, indexType cellIndex);

    indexType GetNextBElemWRTCL() const;
    indexType getNextBElemWRTCL() const;

    indexType GetNextBElemWRTCR() const;
    indexType getNextBElemWRTCR() const;

    indexType GetNextBElem(indexType cellIndex) const;
    indexType getNextBElem(indexType cellIndex) const;

    // Returns the other Cell than sent by parameter
    indexType GetOtherCellIndex(indexType cellIndex) const;
    indexType getOtherCellIndex(indexType cellIndex) const;


};
@@ -50,22 +50,22 @@ public:
template<typename indexType>
CellBoundaryConnection<indexType>::CellBoundaryConnection(indexType cellLeft, indexType cellRight, indexType nextLeft, indexType nextRight)
    : CellConnection<indexType> (cellLeft, cellRight) {
    NextBElemWRTCL = nextLeft;
    NextBElemWRTCR = nextRight;
    nextBElemWRTCL = nextLeft;
    nextBElemWRTCR = nextRight;
}

template<typename indexType>
void CellBoundaryConnection<indexType>::SetNextBElemWRTCR(indexType nextIndex){
    NextBElemWRTCR = nextIndex;
void CellBoundaryConnection<indexType>::setNextBElemWRTCR(indexType nextIndex){
    nextBElemWRTCR = nextIndex;
}

template<typename indexType>
void CellBoundaryConnection<indexType>::SetNextBElemWRTCL(indexType nextIndex){
    NextBElemWRTCL = nextIndex;
void CellBoundaryConnection<indexType>::setNextBElemWRTCL(indexType nextIndex){
    nextBElemWRTCL = nextIndex;
}

template<typename indexType>
bool CellBoundaryConnection<indexType>::SetNextBElem(indexType nextBElemIndex, indexType cellIndex){
bool CellBoundaryConnection<indexType>::setNextBElem(indexType nextBElemIndex, indexType cellIndex){

    // CellIndex is invalid then false returned
    if (cellIndex == INVALID_INDEX(indexType)){
@@ -73,16 +73,16 @@ bool CellBoundaryConnection<indexType>::SetNextBElem(indexType nextBElemIndex, i
    }
    // first test wether cell index eaqules left or right
    // then is posible to set up invalid indexes
    if (CellConnection<indexType>::GetCellLeftIndex() == cellIndex) {
    if (CellConnection<indexType>::getCellLeftIndex() == cellIndex) {

        SetNextBElemWRTCL(nextBElemIndex);
        setNextBElemWRTCL(nextBElemIndex);
        return true;

    }

    if (CellConnection<indexType>::GetCellRightIndex() == cellIndex){
    if (CellConnection<indexType>::getCellRightIndex() == cellIndex){

        SetNextBElemWRTCR(nextBElemIndex);
        setNextBElemWRTCR(nextBElemIndex);
        return true;

    }
@@ -90,17 +90,17 @@ bool CellBoundaryConnection<indexType>::SetNextBElem(indexType nextBElemIndex, i

    // Attribute CellRightIndex is invalid then
    // CellRightIndex is set as cellIndex
    if (CellConnection<indexType>::GetCellLeftIndex() == INVALID_INDEX(indexType)){
    if (CellConnection<indexType>::getCellLeftIndex() == INVALID_INDEX(indexType)){

        CellConnection<indexType>::SetCellLeftIndex(cellIndex);
        CellConnection<indexType>::setCellLeftIndex(cellIndex);

    }

    // Parameter cellIndex is equal to CellRightIndex
    // then nextEdgeWRTCL is set as nextEdgeIndex, ret true
    if (cellIndex == CellConnection<indexType>::GetCellLeftIndex()) {
    if (cellIndex == CellConnection<indexType>::getCellLeftIndex()) {

        SetNextBElemWRTCL(nextBElemIndex);
        setNextBElemWRTCL(nextBElemIndex);

        return true;

@@ -109,15 +109,15 @@ bool CellBoundaryConnection<indexType>::SetNextBElem(indexType nextBElemIndex, i
        // Attribute CellRightIndex is invalid
        // but CellLeftIndex is already filled
        // then set CellLeftIndex as cellIndex
        if(CellConnection<indexType>::GetCellRightIndex() == INVALID_INDEX(indexType)){
            CellConnection<indexType>::SetCellRightIndex(cellIndex);
        if(CellConnection<indexType>::getCellRightIndex() == INVALID_INDEX(indexType)){
            CellConnection<indexType>::setCellRightIndex(cellIndex);
        }

        // Parameter cellIndex is equal to CellLeftIndex then
        // set NextEdgeWRTCR as nextEdgeIndex, ret true
        if (cellIndex == CellConnection<indexType>::GetCellRightIndex()){
        if (cellIndex == CellConnection<indexType>::getCellRightIndex()){

            SetNextBElemWRTCR(nextBElemIndex);
            setNextBElemWRTCR(nextBElemIndex);

            return true;

@@ -137,17 +137,17 @@ bool CellBoundaryConnection<indexType>::SetNextBElem(indexType nextBElemIndex, i
}

template<typename indexType>
indexType CellBoundaryConnection<indexType>::GetNextBElemWRTCL() const {
    return NextBElemWRTCL;
indexType CellBoundaryConnection<indexType>::getNextBElemWRTCL() const {
    return nextBElemWRTCL;
}

template<typename indexType>
indexType CellBoundaryConnection<indexType>::GetNextBElemWRTCR() const {
    return NextBElemWRTCR;
indexType CellBoundaryConnection<indexType>::getNextBElemWRTCR() const {
    return nextBElemWRTCR;
}

template<typename indexType>
indexType CellBoundaryConnection<indexType>::GetNextBElem(indexType cellIndex) const{
indexType CellBoundaryConnection<indexType>::getNextBElem(indexType cellIndex) const{
    // If cell is nullptr then ret nullptr
    if (cellIndex == INVALID_INDEX(indexType)) {
        return INVALID_INDEX(indexType);
@@ -155,12 +155,12 @@ indexType CellBoundaryConnection<indexType>::GetNextBElem(indexType cellIndex) c


    // If the cell is equal the Cell1 then return the NextBElemWRTCR
    if(cellIndex == CellConnection<indexType>::GetCellRightIndex()){
        return GetNextBElemWRTCR();
    if(cellIndex == CellConnection<indexType>::getCellRightIndex()){
        return getNextBElemWRTCR();

        // If the cell is equal the Cell2 then return the NextBElemWRTCL
    } else if (cellIndex == CellConnection<indexType>::GetCellLeftIndex()){
        return GetNextBElemWRTCL();
    } else if (cellIndex == CellConnection<indexType>::getCellLeftIndex()){
        return getNextBElemWRTCL();

        // If the cell is not equal left cell neither cell right then return invalid index
    } else {
@@ -169,11 +169,11 @@ indexType CellBoundaryConnection<indexType>::GetNextBElem(indexType cellIndex) c
}

template<typename indexType>
indexType CellBoundaryConnection<indexType>::GetOtherCellIndex(indexType cellIndex) const{
    if (cellIndex == CellConnection<indexType>::GetCellLeftIndex()) {
        return CellConnection<indexType>::GetCellRightIndex();
    } else if (cellIndex == CellConnection<indexType>::GetCellRightIndex()){
        return CellConnection<indexType>::GetCellLeftIndex();
indexType CellBoundaryConnection<indexType>::getOtherCellIndex(indexType cellIndex) const{
    if (cellIndex == CellConnection<indexType>::getCellLeftIndex()) {
        return CellConnection<indexType>::getCellRightIndex();
    } else if (cellIndex == CellConnection<indexType>::getCellRightIndex()){
        return CellConnection<indexType>::getCellLeftIndex();
    }
    return INVALID_INDEX(indexType);
}
+36 −36
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
    class CellConnection {
        // Indexes to two cells which neighbours
        // with this edge
        indexType CellRightIndex, CellLeftIndex;
        indexType cellRightIndex, cellLeftIndex;
    public:
    /**
     * @brief CellConnection
@@ -21,35 +21,35 @@
                   indexType cellRight = INVALID_INDEX(indexType));

    /**
     * @brief SetCellRightIndex
     * @brief setCellRightIndex
     * @param cellIndex
     */
    void SetCellRightIndex(indexType cellIndex);
    void setCellRightIndex(indexType cellIndex);

    /**
     * @brief SetCellLeftIndex
     * @param cellIndex
     */
    void SetCellLeftIndex(indexType cellIndex);
    void setCellLeftIndex(indexType cellIndex);

    /**
     * @brief SetCellIndex
     * @param cellIndex
     * @return
     */
    bool SetCellIndex(indexType cellIndex);
    bool setCellIndex(indexType cellIndex);

    /**
     * @brief GetCellRightIndex
     * @return
     */
    indexType GetCellRightIndex() const;
    indexType getCellRightIndex() const;

    /**
     * @brief GetCellLeftIndex
     * @return
     */
    indexType GetCellLeftIndex() const;
    indexType getCellLeftIndex() const;

    // Returns the other Cell than sent by parameter
    /**
@@ -57,14 +57,14 @@
     * @param cellIndex
     * @return
     */
    indexType GetOtherCellIndex(indexType cellIndex) const;
    indexType getOtherCellIndex(indexType cellIndex) const;


    /**
     * @brief CellsOK
     * @return true if both cell indexes are set
     */
    bool CellsOK() const;
    bool cellsOK() const;


    /**
@@ -72,7 +72,7 @@
     *
     * swaps the left and right cell indexes
     */
    void SwapCellsLR();
    void swapCellsLR();

};

@@ -85,22 +85,22 @@

template<typename indexType>
CellConnection<indexType>::CellConnection(indexType cellLeft, indexType cellRight){
    CellRightIndex = cellRight;
    CellLeftIndex = cellLeft;
    cellRightIndex = cellRight;
    cellLeftIndex = cellLeft;
}

template<typename indexType>
void CellConnection<indexType>::SetCellRightIndex(indexType cellIndex){
    CellRightIndex = cellIndex;
void CellConnection<indexType>::setCellRightIndex(indexType cellIndex){
    cellRightIndex = cellIndex;
}

template<typename indexType>
void CellConnection<indexType>::SetCellLeftIndex(indexType cellIndex){
    CellLeftIndex = cellIndex;
void CellConnection<indexType>::setCellLeftIndex(indexType cellIndex){
    cellLeftIndex = cellIndex;
}

template<typename indexType>
bool CellConnection<indexType>::SetCellIndex(indexType cellIndex){
bool CellConnection<indexType>::setCellIndex(indexType cellIndex){
    // If the parameter cell is nullptr then ret false
    if (cellIndex == INVALID_INDEX(indexType)){
        return false;
@@ -108,17 +108,17 @@ bool CellConnection<indexType>::SetCellIndex(indexType cellIndex){

    // If the CellLeftIndex is lower than 0
    // then set CellLeftIndex as cellIndex, ret true
    if (GetCellLeftIndex() == INVALID_INDEX(indexType)) {
    if (getCellLeftIndex() == INVALID_INDEX(indexType)) {

        SetCellLeftIndex(cellIndex);
        setCellLeftIndex(cellIndex);

        return true;
        // If the CellRightIndex is valid
        // and CellLeftIndex is not
        // then set CellRightIndex as cellIndex
    } else if (GetCellRightIndex() == INVALID_INDEX(indexType)) {
    } else if (getCellRightIndex() == INVALID_INDEX(indexType)) {

        SetCellRightIndex(cellIndex);
        setCellRightIndex(cellIndex);

        return true;
        // If both CellLeftIndex and CellRightIndex are >= 0
@@ -133,37 +133,37 @@ bool CellConnection<indexType>::SetCellIndex(indexType cellIndex){
}

template<typename indexType>
indexType CellConnection<indexType>::GetCellRightIndex() const {
    return CellRightIndex;
indexType CellConnection<indexType>::getCellRightIndex() const {
    return cellRightIndex;
}

template<typename indexType>
indexType CellConnection<indexType>::GetCellLeftIndex() const {
    return CellLeftIndex;
indexType CellConnection<indexType>::getCellLeftIndex() const {
    return cellLeftIndex;
}

template<typename indexType>
indexType CellConnection<indexType>::GetOtherCellIndex(indexType cellIndex) const{
    if (cellIndex == GetCellLeftIndex()) {
        return GetCellRightIndex();
    } else if (cellIndex == GetCellRightIndex()){
        return GetCellLeftIndex();
indexType CellConnection<indexType>::getOtherCellIndex(indexType cellIndex) const{
    if (cellIndex == getCellLeftIndex()) {
        return getCellRightIndex();
    } else if (cellIndex == getCellRightIndex()){
        return getCellLeftIndex();
    }
    return INVALID_INDEX(indexType);
}

template<typename indexType>
bool CellConnection<indexType>::CellsOK() const {
    return GetCellRightIndex() != INVALID_INDEX(indexType) && GetCellLeftIndex() != INVALID_INDEX(indexType);
bool CellConnection<indexType>::cellsOK() const {
    return getCellRightIndex() != INVALID_INDEX(indexType) && getCellLeftIndex() != INVALID_INDEX(indexType);
}

template<typename indexType>
void CellConnection<indexType>::SwapCellsLR() {
void CellConnection<indexType>::swapCellsLR() {


    indexType cellLeftIndex = GetCellRightIndex();
    SetCellRightIndex(GetCellLeftIndex());
    SetCellLeftIndex(cellLeftIndex);
    indexType cellLeftIndex = getCellRightIndex();
    setCellRightIndex(getCellLeftIndex());
    setCellLeftIndex(cellLeftIndex);


}
+14 −14
Original line number Diff line number Diff line
@@ -6,32 +6,32 @@ template <unsigned int MeshDim, typename Real>
class ComputationallySignificantElement
{
protected:
    Vertex<MeshDim, Real> Center;
    int Flag;
    Vertex<MeshDim, Real> center;
    int flag;
public:
    ComputationallySignificantElement() {
        Center = {};
        Flag = int();
        center = {};
        flag = int();
    }

    Vertex<MeshDim, Real>& GetCenter(){
        return Center;
    Vertex<MeshDim, Real>& getCenter(){
        return center;
    }

    const Vertex<MeshDim, Real>& GetCenter() const {
        return Center;
    const Vertex<MeshDim, Real>& getCenter() const {
        return center;
    }

    void SetCenter(const Vertex<MeshDim, Real>& v) {
        Center = v;
    void setCenter(const Vertex<MeshDim, Real>& v) {
        center = v;
    }

    int& GetFlag() {
        return Flag;
    int& getFlag() {
        return flag;
    }

    const int& GetFlag() const {
        return Flag;
    const int& getFlag() const {
        return flag;
    }
};

+143 −143

File changed.

Preview size limit exceeded, changes collapsed.

+16 −16
Original line number Diff line number Diff line
@@ -61,12 +61,12 @@ class SubelementContainer : public std::array<Subelement<IndexType>, Reserve>{
    unsigned char numberOfElements = 0;

public:
    unsigned char GetNumberOfSubElements(){
    unsigned char getNumberOfSubElements(){
        return numberOfElements;
    }


    void AddSubelement(IndexType index, bool isLeft) {
    void addSubelement(IndexType index, bool isLeft) {
        if (numberOfElements < Reserve){
            this->at(numberOfElements).index = index;
            this->at(numberOfElements).isLeft = isLeft;
@@ -79,7 +79,7 @@ public:

    }

    void RemoveSubelement(unsigned char atIndex){
    void removeSubelement(unsigned char atIndex){
        if (atIndex < numberOfElements){
            for(unsigned char i = atIndex; i < numberOfElements - 1; i++){
                this->at(i) = this->at(i+1);
@@ -94,11 +94,11 @@ public:
    }

    typename std::array<Subelement<IndexType>, Reserve>::iterator end(){
        return this->begin() + GetNumberOfSubElements();
        return this->begin() + getNumberOfSubElements();
    }

    typename std::array<Subelement<IndexType>, Reserve>::const_iterator cend(){
        return this->cbegin() + GetNumberOfSubElements();
        return this->cbegin() + getNumberOfSubElements();
    }
};

@@ -118,11 +118,11 @@ class MeshElement : public MeshElementBase<IndexType>,
    SubelementContainer<IndexType, Reserve> subelements;
public:

    SubelementContainer<IndexType, Reserve>& GetSubelements(){
    SubelementContainer<IndexType, Reserve>& getSubelements(){
        return subelements;
    }

    const SubelementContainer<IndexType, Reserve>& GetSubelements() const {
    const SubelementContainer<IndexType, Reserve>& getSubelements() const {
        return subelements;
    }

@@ -221,11 +221,11 @@ public:

    }

    IndexType GetBoundaryElementIndex(){
    IndexType getBoundaryElementIndex(){
        return boundaryElementIndex;
    }

    void SetBoundaryElementIndex(IndexType index){
    void setBoundaryElementIndex(IndexType index){
        boundaryElementIndex = index;
    }

@@ -346,7 +346,7 @@ public:

    void SetupBoundaryCellsCenters() {
        for(Cell& cell : BoundaryCells){
            cell.SetCenter(GetFaces().at(cell.GetBoundaryElementIndex()).GetCenter());
            cell.SetCenter(GetFaces().at(cell.getBoundaryElementIndex()).GetCenter());
        }
    }

@@ -363,8 +363,8 @@ public:
            actual = firstBElem;
            this->parentMesh = parentMesh;
        }
        CellSubelementIterator& operator++ () {actual = parentMesh->GetFaces().at(actual).GetNextBElem(cellIndex) == firstBElem ? INVALID_INDEX(IndexType) : parentMesh->GetFaces().at(actual).GetNextBElem(cellIndex); return *this;}
        CellSubelementIterator& operator++ (int) {actual = parentMesh->GetFaces().at(actual).GetNextBElem(cellIndex) == firstBElem ? INVALID_INDEX(IndexType) : parentMesh->GetFaces().at(actual).GetNextBElem(cellIndex); return *this;}
        CellSubelementIterator& operator++ () {actual = parentMesh->GetFaces().at(actual).getNextBElem(cellIndex) == firstBElem ? INVALID_INDEX(IndexType) : parentMesh->GetFaces().at(actual).getNextBElem(cellIndex); return *this;}
        CellSubelementIterator& operator++ (int) {actual = parentMesh->GetFaces().at(actual).getNextBElem(cellIndex) == firstBElem ? INVALID_INDEX(IndexType) : parentMesh->GetFaces().at(actual).getNextBElem(cellIndex); return *this;}
        IndexType operator* (){return actual;}
        bool operator== (CellSubelementIterator& it) {return actual == it.actual;}
        bool operator!= (CellSubelementIterator& it) {return actual != it.actual;}
@@ -380,7 +380,7 @@ public:
        }

        CellSubelementIterator begin() {
            return CellSubelementIterator(cellIndex, parentMesh->GetCells()[cellIndex].GetBoundaryElementIndex(), parentMesh);
            return CellSubelementIterator(cellIndex, parentMesh->GetCells()[cellIndex].getBoundaryElementIndex(), parentMesh);
        }

        CellSubelementIterator end() {
@@ -408,8 +408,8 @@ public:
            return elementIndex;
        }

        SubelementContainer<IndexType, reserve<ElementDim>()>& GetSubelements(){
            return parentMesh->template GetElements<ElementDim>()[elementIndex].GetSubelements();
        SubelementContainer<IndexType, reserve<ElementDim>()>& getSubelements(){
            return parentMesh->template GetElements<ElementDim>()[elementIndex].getSubelements();
        }
    };

@@ -433,7 +433,7 @@ public:
            return elementIndex;
        }

        CellSubelements GetSubelements(){
        CellSubelements getSubelements(){
            return CellSubelements(parentMesh, elementIndex);
        }
    };
Loading