diff --git a/Documentation/ProjectFile/material/fluid/density/c_density.md b/Documentation/ProjectFile/material/fluid/density/c_density.md deleted file mode 100644 index 576add64edccf5d980a0ff86143dc43a7109a788..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/material/fluid/density/c_density.md +++ /dev/null @@ -1 +0,0 @@ -\ogs_missing_documentation diff --git a/Documentation/ProjectFile/material/fluid/viscosity/c_viscosity.md b/Documentation/ProjectFile/material/fluid/viscosity/c_viscosity.md deleted file mode 100644 index 576add64edccf5d980a0ff86143dc43a7109a788..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/material/fluid/viscosity/c_viscosity.md +++ /dev/null @@ -1 +0,0 @@ -\ogs_missing_documentation diff --git a/MathLib/LinAlg/PETSc/PETScMatrix.h b/MathLib/LinAlg/PETSc/PETScMatrix.h index 6705166f74d7fd0278cedf43a45327c19eb7aa15..e827c4a47710121885573826fc0dcddb172bdbc8 100644 --- a/MathLib/LinAlg/PETSc/PETScMatrix.h +++ b/MathLib/LinAlg/PETSc/PETScMatrix.h @@ -94,12 +94,12 @@ public: Mat const& getRawMatrix() const { return _A; } /// Set all entries to zero. void setZero() { MatZeroEntries(_A); } - /* + /*! \brief Set the specified rows to zero except diagonal entries, i.e. \f$A(k, j) = \begin{cases} - 0.0, &j\not=k, j=1,2,\dots,k-1, k+1, \dots, n + 0.0, &j\not=k, j=1,2,\dots,k-1, k+1, \dots, n \\ 1.0, &j = k - \end{cases}f$, where \f$k \in \mbox{row\_pos}\f$ + \end{cases}\f$, where \f$k \in \mbox{row\_pos}\f$ This function must be called by all ranks. \param row_pos The row indicies of the specified rows. */ @@ -273,4 +273,4 @@ void PETScMatrix::add(std::vector<PetscInt> const& row_pos, bool finalizeMatrixAssembly( PETScMatrix& mat, const MatAssemblyType asm_type = MAT_FINAL_ASSEMBLY); -} // end namespace +} // namespace MathLib diff --git a/MeshLib/MeshEditing/DuplicateMeshComponents.cpp b/MeshLib/MeshEditing/DuplicateMeshComponents.cpp index ab9220e73a789d910a9500d8564c914efa2254ae..154969bc1458d32f7ca615bf7688e54b4a4350da 100644 --- a/MeshLib/MeshEditing/DuplicateMeshComponents.cpp +++ b/MeshLib/MeshEditing/DuplicateMeshComponents.cpp @@ -47,52 +47,45 @@ std::vector<MeshLib::Element*> copyElementVector( return new_elements; } +/// Copies an element without change, using the nodes vector from the result +/// mesh. +template <typename E> MeshLib::Element* copyElement(MeshLib::Element const* const element, const std::vector<MeshLib::Node*>& nodes) { - if (element->getGeomType() == MeshElemType::LINE) - { - return copyElement<MeshLib::Line>(element, nodes); - } - if (element->getGeomType() == MeshElemType::TRIANGLE) - { - return copyElement<MeshLib::Tri>(element, nodes); - } - if (element->getGeomType() == MeshElemType::QUAD) - { - return copyElement<MeshLib::Quad>(element, nodes); - } - if (element->getGeomType() == MeshElemType::TETRAHEDRON) - { - return copyElement<MeshLib::Tet>(element, nodes); - } - if (element->getGeomType() == MeshElemType::HEXAHEDRON) - { - return copyElement<MeshLib::Hex>(element, nodes); - } - if (element->getGeomType() == MeshElemType::PYRAMID) - { - return copyElement<MeshLib::Pyramid>(element, nodes); - } - if (element->getGeomType() == MeshElemType::PRISM) + auto** new_nodes = new MeshLib::Node*[element->getNumberOfNodes()]; + for (unsigned i = 0; i < element->getNumberOfNodes(); ++i) { - return copyElement<MeshLib::Prism>(element, nodes); + new_nodes[i] = nodes[element->getNode(i)->getID()]; } - - ERR("Error: Unknown element type."); - return nullptr; + return new E(new_nodes); } -template <typename E> MeshLib::Element* copyElement(MeshLib::Element const* const element, const std::vector<MeshLib::Node*>& nodes) { - auto** new_nodes = new MeshLib::Node*[element->getNumberOfNodes()]; - for (unsigned i = 0; i < element->getNumberOfNodes(); ++i) + switch (element->getGeomType()) { - new_nodes[i] = nodes[element->getNode(i)->getID()]; + case MeshElemType::LINE: + return copyElement<MeshLib::Line>(element, nodes); + case MeshElemType::TRIANGLE: + return copyElement<MeshLib::Tri>(element, nodes); + case MeshElemType::QUAD: + return copyElement<MeshLib::Quad>(element, nodes); + case MeshElemType::TETRAHEDRON: + return copyElement<MeshLib::Tet>(element, nodes); + case MeshElemType::HEXAHEDRON: + return copyElement<MeshLib::Hex>(element, nodes); + case MeshElemType::PYRAMID: + return copyElement<MeshLib::Pyramid>(element, nodes); + case MeshElemType::PRISM: + return copyElement<MeshLib::Prism>(element, nodes); + default: + { + ERR ("Error: Unknown element type."); + return nullptr; + } } - return new E(new_nodes); } std::vector<MeshLib::Element*> cloneElements( diff --git a/MeshLib/MeshEditing/DuplicateMeshComponents.h b/MeshLib/MeshEditing/DuplicateMeshComponents.h index 0214d5d4546b1d849d87d87e7933ccb5dedcee36..dc2de0a784edca50b32d4171f58b065bf39ca427 100644 --- a/MeshLib/MeshEditing/DuplicateMeshComponents.h +++ b/MeshLib/MeshEditing/DuplicateMeshComponents.h @@ -41,12 +41,6 @@ std::vector<MeshLib::Element*> copyElementVector( MeshLib::Element* copyElement(MeshLib::Element const* const element, const std::vector<MeshLib::Node*>& nodes); -/// Copies an element without change, using the nodes vector from the result -/// mesh. -template <typename E> -MeshLib::Element* copyElement(MeshLib::Element const* const element, - const std::vector<MeshLib::Node*>& nodes); - /// Clones a vector of elements using the Element::clone() function. std::vector<MeshLib::Element*> cloneElements( std::vector<MeshLib::Element*> const& elements);