From 471832125e648045415ecfc22132f4f725295198 Mon Sep 17 00:00:00 2001 From: Simon Praetorius Date: Fri, 2 Aug 2013 08:58:13 +0000 Subject: [PATCH] merge of branch solver-preconditioner with trunk --- AMDiS/AMDISConfig.cmake.in | 2 + AMDiS/AMDISUse.cmake | 37 +- AMDiS/CMakeLists.txt | 105 +- AMDiS/FindHYPRE.cmake | 21 + AMDiS/doc/Doxyfile | 13 +- AMDiS/src/AMDiS.cc | 65 +- AMDiS/src/AMDiS.h | 51 +- AMDiS/src/AMDiS_fwd.h | 74 +- AMDiS/src/AUTHORS | 0 AMDiS/src/AbstractFunction.h | 36 +- AMDiS/src/AdaptBase.cc | 29 +- AMDiS/src/AdaptBase.h | 36 +- AMDiS/src/AdaptInfo.cc | 29 +- AMDiS/src/AdaptInfo.h | 36 +- AMDiS/src/AdaptInstationary.cc | 33 +- AMDiS/src/AdaptInstationary.h | 36 +- AMDiS/src/AdaptStationary.cc | 33 +- AMDiS/src/AdaptStationary.h | 36 +- AMDiS/src/Assembler.cc | 29 +- AMDiS/src/Assembler.h | 36 +- AMDiS/src/BallProject.h | 36 +- AMDiS/src/BasePreconditioner.h | 48 - AMDiS/src/BasisFunction.cc | 29 +- AMDiS/src/BasisFunction.h | 36 +- AMDiS/src/BasisFunction.hh | 29 +- AMDiS/src/Boundary.cc | 29 +- AMDiS/src/Boundary.h | 36 +- AMDiS/src/BoundaryCondition.h | 36 +- AMDiS/src/BoundaryManager.cc | 29 +- AMDiS/src/BoundaryManager.h | 36 +- AMDiS/src/BoundaryObject.cc | 29 +- AMDiS/src/BoundaryObject.h | 36 +- AMDiS/src/Cholesky.cc | 29 +- AMDiS/src/Cholesky.h | 36 +- AMDiS/src/CoarseningManager.cc | 29 +- AMDiS/src/CoarseningManager.h | 36 +- AMDiS/src/CoarseningManager1d.cc | 29 +- AMDiS/src/CoarseningManager1d.h | 36 +- AMDiS/src/CoarseningManager2d.cc | 29 +- AMDiS/src/CoarseningManager2d.h | 36 +- AMDiS/src/CoarseningManager3d.cc | 29 +- AMDiS/src/CoarseningManager3d.h | 36 +- AMDiS/src/Collection.h | 37 +- AMDiS/src/ComponentTraverseInfo.cc | 29 +- AMDiS/src/ComponentTraverseInfo.h | 36 +- AMDiS/src/Containers.h | 36 +- AMDiS/src/CouplingIterationInterface.cc | 36 +- AMDiS/src/CouplingIterationInterface.h | 36 +- AMDiS/src/CouplingProblemStat.h | 36 +- AMDiS/src/CouplingTimeInterface.h | 36 +- AMDiS/src/CreatorInterface.h | 64 +- AMDiS/src/CreatorMap.cc | 126 +- AMDiS/src/CreatorMap.h | 38 +- AMDiS/src/CreatorMap.hh | 29 +- AMDiS/src/CylinderProject.h | 36 +- AMDiS/src/DOFAdmin.cc | 29 +- AMDiS/src/DOFAdmin.h | 36 +- AMDiS/src/DOFContainer.h | 36 +- AMDiS/src/DOFIndexed.cc | 29 +- AMDiS/src/DOFIndexed.h | 36 +- AMDiS/src/DOFIterator.h | 36 +- AMDiS/src/DOFMatrix.cc | 29 +- AMDiS/src/DOFMatrix.h | 43 +- AMDiS/src/DOFVector.cc | 36 +- AMDiS/src/DOFVector.h | 52 +- AMDiS/src/DOFVector.hh | 46 +- AMDiS/src/Debug.cc | 29 +- AMDiS/src/Debug.h | 36 +- AMDiS/src/DirichletBC.cc | 29 +- AMDiS/src/DirichletBC.h | 36 +- AMDiS/src/DualTraverse.cc | 29 +- AMDiS/src/DualTraverse.h | 36 +- AMDiS/src/ElInfo.cc | 29 +- AMDiS/src/ElInfo.h | 36 +- AMDiS/src/ElInfo1d.cc | 29 +- AMDiS/src/ElInfo1d.h | 36 +- AMDiS/src/ElInfo2d.cc | 29 +- AMDiS/src/ElInfo2d.h | 36 +- AMDiS/src/ElInfo3d.cc | 29 +- AMDiS/src/ElInfo3d.h | 36 +- AMDiS/src/ElInfoStack.cc | 29 +- AMDiS/src/ElInfoStack.h | 36 +- AMDiS/src/Element.cc | 29 +- AMDiS/src/Element.h | 36 +- AMDiS/src/Element.hh | 29 +- AMDiS/src/ElementData.cc | 29 +- AMDiS/src/ElementData.h | 36 +- AMDiS/src/ElementDofIterator.cc | 29 +- AMDiS/src/ElementDofIterator.h | 36 +- AMDiS/src/ElementFunction.h | 36 +- AMDiS/src/ElementInfo.h | 36 +- AMDiS/src/ElementRegion_ED.cc | 29 +- AMDiS/src/ElementRegion_ED.h | 36 +- AMDiS/src/EmptyElementData.h | 36 +- AMDiS/src/Error.h | 36 +- AMDiS/src/Error.hh | 33 +- AMDiS/src/FiniteElemSpace.cc | 29 +- AMDiS/src/FiniteElemSpace.h | 36 +- AMDiS/src/FirstOrderAssembler.cc | 29 +- AMDiS/src/FirstOrderAssembler.h | 36 +- AMDiS/src/FirstOrderTerm.cc | 29 +- AMDiS/src/FirstOrderTerm.h | 36 +- AMDiS/src/FixVec.cc | 29 +- AMDiS/src/FixVec.h | 44 +- AMDiS/src/FixVec.hh | 29 +- AMDiS/src/FixVecConvert.h | 36 +- AMDiS/src/Flag.h | 36 +- AMDiS/src/Functors.h | 20 +- AMDiS/src/Global.cc | 35 +- AMDiS/src/Global.h | 37 +- AMDiS/src/GlobalDOFNumbering.cc | 29 +- AMDiS/src/GlobalDOFNumbering.h | 36 +- AMDiS/src/GlobalElementNumbering.cc | 29 +- AMDiS/src/GlobalElementNumbering.h | 36 +- AMDiS/src/ITL_OEMSolver.h | 129 -- AMDiS/src/ITL_OEMSolver.hh | 187 --- AMDiS/src/ITL_Preconditioner.h | 174 --- AMDiS/src/ITL_Solver.h | 368 ----- AMDiS/src/Initfile.cc | 19 + AMDiS/src/Initfile.h | 50 +- AMDiS/src/Lagrange.cc | 29 +- AMDiS/src/Lagrange.h | 36 +- AMDiS/src/LeafData.cc | 29 +- AMDiS/src/LeafData.h | 36 +- AMDiS/src/Line.cc | 29 +- AMDiS/src/Line.h | 36 +- AMDiS/src/MTL4Solver.h | 135 -- AMDiS/src/MTL4Types.h | 39 +- AMDiS/src/MacroElement.cc | 29 +- AMDiS/src/MacroElement.h | 36 +- AMDiS/src/Mapper.h | 80 - AMDiS/src/Marker.cc | 31 +- AMDiS/src/Marker.h | 36 +- AMDiS/src/MathFunctions.h | 36 +- AMDiS/src/MatrixStreams.h | 141 -- AMDiS/src/MatrixVector.cc | 29 +- AMDiS/src/MatrixVector.h | 36 +- AMDiS/src/Mesh.cc | 29 +- AMDiS/src/Mesh.h | 36 +- AMDiS/src/MeshStructure.cc | 29 +- AMDiS/src/MeshStructure.h | 36 +- AMDiS/src/MeshStructure_ED.h | 36 +- AMDiS/src/NEWS | 0 AMDiS/src/OEMSolver.h | 304 ---- AMDiS/src/OpenMP.h | 36 +- AMDiS/src/Operator.cc | 29 +- AMDiS/src/Operator.h | 36 +- AMDiS/src/Operator.hh | 29 +- AMDiS/src/OperatorTerm.cc | 29 +- AMDiS/src/OperatorTerm.h | 36 +- AMDiS/src/OperatorTerm.hh | 29 +- AMDiS/src/Parametric.cc | 29 +- AMDiS/src/Parametric.h | 36 +- AMDiS/src/PeriodicBC.cc | 29 +- AMDiS/src/PeriodicBC.h | 36 +- AMDiS/src/PeriodicConnection.h | 19 + AMDiS/src/PeriodicInfo.h | 36 +- AMDiS/src/ProblemImplicit.cc | 29 +- AMDiS/src/ProblemImplicit.h | 42 +- AMDiS/src/ProblemInstat.cc | 29 +- AMDiS/src/ProblemInstat.h | 36 +- AMDiS/src/ProblemInterpol.cc | 29 +- AMDiS/src/ProblemInterpol.h | 36 +- AMDiS/src/ProblemIterationInterface.h | 36 +- AMDiS/src/ProblemStat.cc | 94 +- AMDiS/src/ProblemStat.h | 54 +- AMDiS/src/ProblemStatBase.h | 36 +- AMDiS/src/ProblemStatDbg.cc | 29 +- AMDiS/src/ProblemStatDbg.h | 36 +- AMDiS/src/ProblemTimeInterface.h | 36 +- AMDiS/src/Projection.cc | 29 +- AMDiS/src/Projection.h | 36 +- AMDiS/src/QPInfo.cc | 29 +- AMDiS/src/QPInfo.h | 36 +- AMDiS/src/QPsiPhi.cc | 29 +- AMDiS/src/QPsiPhi.h | 36 +- AMDiS/src/Quadrature.cc | 29 +- AMDiS/src/Quadrature.h | 36 +- AMDiS/src/Quadrature.hh | 29 +- AMDiS/src/RCNeighbourList.cc | 29 +- AMDiS/src/RCNeighbourList.h | 36 +- AMDiS/src/Recovery.cc | 33 +- AMDiS/src/Recovery.h | 36 +- AMDiS/src/RefinementManager.cc | 29 +- AMDiS/src/RefinementManager.h | 36 +- AMDiS/src/RefinementManager1d.cc | 29 +- AMDiS/src/RefinementManager1d.h | 36 +- AMDiS/src/RefinementManager2d.cc | 29 +- AMDiS/src/RefinementManager2d.h | 36 +- AMDiS/src/RefinementManager3d.cc | 29 +- AMDiS/src/RefinementManager3d.h | 36 +- AMDiS/src/RobinBC.cc | 29 +- AMDiS/src/RobinBC.h | 36 +- AMDiS/src/RobinBC.hh_ | 148 -- AMDiS/src/ScalableQuadrature.cc | 29 +- AMDiS/src/ScalableQuadrature.h | 36 +- AMDiS/src/SecondOrderAssembler.cc | 29 +- AMDiS/src/SecondOrderAssembler.h | 36 +- AMDiS/src/SecondOrderTerm.cc | 29 +- AMDiS/src/SecondOrderTerm.h | 36 +- AMDiS/src/Serializable.h | 36 +- AMDiS/src/Serializer.cc | 29 +- AMDiS/src/Serializer.h | 36 +- AMDiS/src/SolverMatrix.cc | 15 - AMDiS/src/StandardProblemIteration.cc | 35 +- AMDiS/src/StandardProblemIteration.h | 36 +- AMDiS/src/SubAssembler.cc | 29 +- AMDiS/src/SubAssembler.h | 36 +- AMDiS/src/SubAssembler.hh | 29 +- AMDiS/src/SubElInfo.cc | 29 +- AMDiS/src/SubElInfo.h | 36 +- AMDiS/src/SubQuadrature.cc | 29 +- AMDiS/src/SubQuadrature.h | 36 +- AMDiS/src/SurfaceAssembler.h | 36 +- AMDiS/src/SurfaceOperator.h | 36 +- AMDiS/src/SurfaceQuadrature.cc | 29 +- AMDiS/src/SurfaceQuadrature.h | 36 +- AMDiS/src/SurfaceRegion_ED.cc | 29 +- AMDiS/src/SurfaceRegion_ED.h | 36 +- AMDiS/src/SystemVector.cc | 29 +- AMDiS/src/SystemVector.h | 38 +- AMDiS/src/Tetrahedron.cc | 29 +- AMDiS/src/Tetrahedron.h | 36 +- AMDiS/src/TimedObject.h | 36 +- AMDiS/src/Timer.cc | 19 + AMDiS/src/Timer.h | 19 + AMDiS/src/TransformDOF.h | 20 +- AMDiS/src/Traverse.cc | 29 +- AMDiS/src/Traverse.h | 36 +- AMDiS/src/Triangle.cc | 29 +- AMDiS/src/Triangle.h | 36 +- AMDiS/src/UmfPackSolver.h | 159 -- AMDiS/src/VertexInfo.h | 36 +- AMDiS/src/VertexVector.cc | 29 +- AMDiS/src/VertexVector.h | 36 +- AMDiS/src/ZeroOrderAssembler.cc | 29 +- AMDiS/src/ZeroOrderAssembler.h | 36 +- AMDiS/src/ZeroOrderTerm.cc | 29 +- AMDiS/src/ZeroOrderTerm.h | 36 +- AMDiS/src/compositeFEM/CFE_Integration.cc | 29 +- AMDiS/src/compositeFEM/CFE_Integration.h | 36 +- .../src/compositeFEM/CFE_NormAndErrorFcts.cc | 29 +- AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.h | 36 +- AMDiS/src/compositeFEM/CompositeFEMMethods.cc | 29 +- AMDiS/src/compositeFEM/CompositeFEMMethods.h | 36 +- .../src/compositeFEM/CompositeFEMOperator.cc | 29 +- AMDiS/src/compositeFEM/CompositeFEMOperator.h | 36 +- AMDiS/src/compositeFEM/ElementLevelSet.cc | 29 +- AMDiS/src/compositeFEM/ElementLevelSet.h | 36 +- AMDiS/src/compositeFEM/LevelSetAdaptMesh.cc | 29 +- AMDiS/src/compositeFEM/LevelSetAdaptMesh.h | 36 +- AMDiS/src/compositeFEM/PenaltyOperator.cc | 29 +- AMDiS/src/compositeFEM/PenaltyOperator.h | 36 +- AMDiS/src/compositeFEM/SubElementAssembler.cc | 29 +- AMDiS/src/compositeFEM/SubElementAssembler.h | 36 +- AMDiS/src/compositeFEM/SubPolytope.cc | 29 +- AMDiS/src/compositeFEM/SubPolytope.h | 36 +- AMDiS/src/compositeFEM/TranslateLsFct.h | 36 +- AMDiS/src/compositeFEM/compositeFEM.h | 36 +- AMDiS/src/est/Estimator.cc | 29 +- AMDiS/src/est/Estimator.h | 36 +- AMDiS/src/est/RecoveryEstimator.cc | 29 +- AMDiS/src/est/RecoveryEstimator.h | 36 +- AMDiS/src/est/ResidualEstimator.cc | 43 +- AMDiS/src/est/ResidualEstimator.h | 37 +- AMDiS/src/est/SimpleResidualEstimator.cc | 29 +- AMDiS/src/est/SimpleResidualEstimator.h | 37 +- AMDiS/src/io/ArhReader.cc | 29 +- AMDiS/src/io/ArhReader.h | 36 +- AMDiS/src/io/ArhWriter.cc | 29 +- AMDiS/src/io/ArhWriter.h | 36 +- AMDiS/src/io/DataCollector.h | 36 +- AMDiS/src/io/DataCollector.hh | 29 +- AMDiS/src/io/DofWriter.cc | 29 +- AMDiS/src/io/DofWriter.h | 36 +- AMDiS/src/io/ElementFileWriter.cc | 29 +- AMDiS/src/io/ElementFileWriter.h | 36 +- AMDiS/src/io/FileCompression.h | 36 +- AMDiS/src/io/FileWriter.cc | 29 +- AMDiS/src/io/FileWriter.h | 36 +- AMDiS/src/io/FileWriter.hh | 29 +- AMDiS/src/io/GNUPlotWriter.cc | 29 +- AMDiS/src/io/GNUPlotWriter.h | 36 +- AMDiS/src/io/GridWriter.h | 36 +- AMDiS/src/io/GridWriter.hh | 29 +- AMDiS/src/io/MacroInfo.cc | 29 +- AMDiS/src/io/MacroInfo.h | 36 +- AMDiS/src/io/MacroReader.cc | 29 +- AMDiS/src/io/MacroReader.h | 36 +- AMDiS/src/io/MacroWriter.cc | 29 +- AMDiS/src/io/MacroWriter.h | 36 +- AMDiS/src/io/PngReader.cc | 29 +- AMDiS/src/io/PngReader.h | 36 +- AMDiS/src/io/PngWriter.cc | 29 +- AMDiS/src/io/PngWriter.h | 36 +- AMDiS/src/io/PovrayWriter.cc | 29 +- AMDiS/src/io/PovrayWriter.h | 36 +- AMDiS/src/io/Spreadsheet.cc | 29 +- AMDiS/src/io/Spreadsheet.h | 36 +- AMDiS/src/io/ValueReader.cc | 29 +- AMDiS/src/io/ValueReader.h | 36 +- AMDiS/src/io/ValueWriter.cc | 29 +- AMDiS/src/io/ValueWriter.h | 36 +- AMDiS/src/io/VtkVectorWriter.cc | 29 +- AMDiS/src/io/VtkVectorWriter.h | 36 +- AMDiS/src/io/VtkVectorWriter.hh | 29 +- AMDiS/src/io/VtkWriter.cc | 29 +- AMDiS/src/io/VtkWriter.h | 36 +- AMDiS/src/io/VtkWriter.hh | 29 +- AMDiS/src/itl/minres.hpp | 87 -- AMDiS/src/nonlin/Newton.h | 40 +- AMDiS/src/nonlin/NewtonArmijo.h | 40 +- AMDiS/src/nonlin/NonLinSolver.h | 54 +- AMDiS/src/nonlin/ProblemNonLin.cc | 29 +- AMDiS/src/nonlin/ProblemNonLin.h | 42 +- AMDiS/src/parallel/BddcMlSolver.cc | 89 +- AMDiS/src/parallel/BddcMlSolver.h | 75 +- AMDiS/src/parallel/CheckerPartitioner.cc | 33 +- AMDiS/src/parallel/CheckerPartitioner.h | 40 +- AMDiS/src/parallel/DofComm.cc | 33 +- AMDiS/src/parallel/DofComm.h | 42 +- AMDiS/src/parallel/ElementObjectDatabase.cc | 33 +- AMDiS/src/parallel/ElementObjectDatabase.h | 41 +- AMDiS/src/parallel/InteriorBoundary.cc | 33 +- AMDiS/src/parallel/InteriorBoundary.h | 40 +- AMDiS/src/parallel/MatrixNnzStructure.cc | 65 +- AMDiS/src/parallel/MatrixNnzStructure.h | 40 +- AMDiS/src/parallel/MeshDistributor.cc | 59 +- AMDiS/src/parallel/MeshDistributor.h | 40 +- AMDiS/src/parallel/MeshLevelData.cc | 33 +- AMDiS/src/parallel/MeshLevelData.h | 50 +- AMDiS/src/parallel/MeshManipulation.cc | 35 +- AMDiS/src/parallel/MeshManipulation.h | 40 +- AMDiS/src/parallel/MeshPartitioner.cc | 33 +- AMDiS/src/parallel/MeshPartitioner.h | 40 +- AMDiS/src/parallel/MpiHelper.cc | 33 +- AMDiS/src/parallel/MpiHelper.h | 40 +- AMDiS/src/parallel/Mtl4Solver.cc | 100 -- AMDiS/src/parallel/Mtl4Solver.h | 60 - AMDiS/src/parallel/MtlFetiPrimalSolver.h | 48 +- AMDiS/src/parallel/PITL_Solver.h | 375 +---- AMDiS/src/parallel/PMTL4Solver.h | 114 ++ AMDiS/src/parallel/ParMetisPartitioner.cc | 33 +- AMDiS/src/parallel/ParMetisPartitioner.h | 40 +- .../src/parallel/ParallelCoarseSpaceSolver.cc | 75 +- .../src/parallel/ParallelCoarseSpaceSolver.h | 665 ++++---- AMDiS/src/parallel/ParallelDebug.cc | 60 +- AMDiS/src/parallel/ParallelDebug.h | 379 ++--- AMDiS/src/parallel/ParallelDofMapping.cc | 62 +- AMDiS/src/parallel/ParallelDofMapping.h | 134 +- AMDiS/src/parallel/ParallelMapper.h | 126 +- AMDiS/src/parallel/ParallelProblemStat.cc | 217 +++ AMDiS/src/parallel/ParallelProblemStat.h | 85 + AMDiS/src/parallel/ParallelProblemStatBase.cc | 73 - AMDiS/src/parallel/ParallelProblemStatBase.h | 58 - AMDiS/src/parallel/ParallelSolver.cc | 70 + AMDiS/src/parallel/ParallelSolver.h | 117 ++ AMDiS/src/parallel/ParallelTypes.h | 40 +- AMDiS/src/parallel/PeriodicMap.cc | 43 +- AMDiS/src/parallel/PeriodicMap.h | 40 +- AMDiS/src/parallel/PetscHelper.cc | 519 +++--- AMDiS/src/parallel/PetscHelper.h | 205 +-- AMDiS/src/parallel/PetscProblemStat.cc | 105 -- AMDiS/src/parallel/PetscProblemStat.h | 81 - AMDiS/src/parallel/PetscSolver.cc | 173 +- AMDiS/src/parallel/PetscSolver.h | 396 +++-- AMDiS/src/parallel/PetscSolverCahnHilliard.cc | 33 +- AMDiS/src/parallel/PetscSolverCahnHilliard.h | 45 +- .../src/parallel/PetscSolverCahnHilliard2.cc | 41 +- AMDiS/src/parallel/PetscSolverCahnHilliard2.h | 44 +- AMDiS/src/parallel/PetscSolverFeti.cc | 185 ++- AMDiS/src/parallel/PetscSolverFeti.h | 647 ++++---- AMDiS/src/parallel/PetscSolverFetiDebug.cc | 57 +- AMDiS/src/parallel/PetscSolverFetiDebug.h | 269 ++-- AMDiS/src/parallel/PetscSolverFetiMonitor.cc | 33 +- AMDiS/src/parallel/PetscSolverFetiMonitor.h | 40 +- .../src/parallel/PetscSolverFetiOperators.cc | 34 +- AMDiS/src/parallel/PetscSolverFetiOperators.h | 85 +- AMDiS/src/parallel/PetscSolverFetiStructs.h | 263 ++-- AMDiS/src/parallel/PetscSolverFetiTimings.cc | 33 +- AMDiS/src/parallel/PetscSolverFetiTimings.h | 68 +- .../parallel/PetscSolverGlobalBlockMatrix.cc | 35 +- .../parallel/PetscSolverGlobalBlockMatrix.h | 144 +- AMDiS/src/parallel/PetscSolverGlobalMatrix.cc | 109 +- AMDiS/src/parallel/PetscSolverGlobalMatrix.h | 256 +-- AMDiS/src/parallel/PetscSolverNSCH.cc | 33 +- AMDiS/src/parallel/PetscSolverNSCH.h | 44 +- AMDiS/src/parallel/PetscSolverNavierStokes.cc | 33 +- AMDiS/src/parallel/PetscSolverNavierStokes.h | 44 +- AMDiS/src/parallel/PetscSolverSchur.cc | 35 +- AMDiS/src/parallel/PetscSolverSchur.h | 171 +- AMDiS/src/parallel/SimplePartitioner.h | 40 +- AMDiS/src/parallel/StdMpi.cc | 72 +- AMDiS/src/parallel/StdMpi.h | 52 +- AMDiS/src/parallel/ZoltanPartitioner.cc | 33 +- AMDiS/src/parallel/ZoltanPartitioner.h | 40 +- AMDiS/src/reinit/BoundaryElementDist.cc | 29 +- AMDiS/src/reinit/BoundaryElementDist.h | 36 +- AMDiS/src/reinit/BoundaryElementEdgeDist.cc | 29 +- AMDiS/src/reinit/BoundaryElementEdgeDist.h | 36 +- .../src/reinit/BoundaryElementLevelSetDist.cc | 29 +- .../src/reinit/BoundaryElementLevelSetDist.h | 36 +- AMDiS/src/reinit/BoundaryElementNormalDist.cc | 29 +- AMDiS/src/reinit/BoundaryElementNormalDist.h | 36 +- AMDiS/src/reinit/BoundaryElementTopDist.cc | 29 +- AMDiS/src/reinit/BoundaryElementTopDist.h | 36 +- AMDiS/src/reinit/ElementLevelSet.cc | 29 +- AMDiS/src/reinit/ElementLevelSet.h | 36 +- AMDiS/src/reinit/ElementUpdate.h | 36 +- AMDiS/src/reinit/ElementUpdate_2d.cc | 29 +- AMDiS/src/reinit/ElementUpdate_2d.h | 36 +- AMDiS/src/reinit/ElementUpdate_3d.cc | 29 +- AMDiS/src/reinit/ElementUpdate_3d.h | 36 +- AMDiS/src/reinit/HL_SignedDist.cc | 29 +- AMDiS/src/reinit/HL_SignedDist.h | 36 +- AMDiS/src/reinit/HL_SignedDistBornemann.h | 36 +- AMDiS/src/reinit/HL_SignedDistTraverse.cc | 29 +- AMDiS/src/reinit/HL_SignedDistTraverse.h | 36 +- AMDiS/src/reinit/NormEps.cc | 29 +- AMDiS/src/reinit/NormEps.h | 36 +- AMDiS/src/reinit/VelocityExt.cc | 29 +- AMDiS/src/reinit/VelocityExt.h | 36 +- .../reinit/VelocityExtFromVelocityField.cc | 29 +- .../src/reinit/VelocityExtFromVelocityField.h | 36 +- AMDiS/src/solver/HypreSolver.h | 107 ++ AMDiS/src/solver/ITL_Preconditioner.h | 188 +++ AMDiS/src/solver/ITL_Runner.h | 209 +++ AMDiS/src/solver/ITL_Solver.h | 409 +++++ AMDiS/src/solver/KrylovPreconditioner.h | 166 ++ AMDiS/src/solver/LinearSolver.h | 320 ++++ AMDiS/src/solver/MTL4Solver.h | 126 ++ AMDiS/src/solver/MTL4SolverBase.h | 168 ++ AMDiS/src/solver/Mapper.h | 167 ++ AMDiS/src/solver/MatrixStreams.h | 331 ++++ AMDiS/src/solver/PetscSolver.cc | 143 ++ AMDiS/src/solver/PetscSolver.h | 205 +++ AMDiS/src/solver/PetscTypes.cc | 124 ++ AMDiS/src/solver/PetscTypes.h | 70 + AMDiS/src/solver/SolverMatrix.cc | 38 + AMDiS/src/{ => solver}/SolverMatrix.h | 53 +- AMDiS/src/solver/UmfPackSolver.h | 119 ++ AMDiS/src/solver/details/MTL4Solver.h | 168 ++ AMDiS/src/solver/itl/details.hpp | 53 + AMDiS/src/solver/itl/fgmres.hpp | 177 +++ AMDiS/src/solver/itl/gcr.hpp | 116 ++ AMDiS/src/solver/itl/gmres2.hpp | 181 +++ AMDiS/src/solver/itl/hypre.hpp | 282 ++++ AMDiS/src/solver/itl/minres.hpp | 96 ++ AMDiS/src/solver/itl/preonly.hpp | 54 + AMDiS/src/time/RosenbrockAdaptInstationary.cc | 29 +- AMDiS/src/time/RosenbrockAdaptInstationary.h | 36 +- AMDiS/src/time/RosenbrockMethod.cc | 29 +- AMDiS/src/time/RosenbrockMethod.h | 36 +- AMDiS/src/time/RosenbrockStationary.cc | 31 +- AMDiS/src/time/RosenbrockStationary.h | 42 +- demo/CMakeLists.txt | 4 + demo/init/ellipt.dat.2d | 16 +- demo/init/ellipt_krylov_precon.dat.2d | 37 + demo/init/heat.dat.2d | 2 +- demo/init/vecheat.dat.2d | 7 +- doc/parameters.tex | 98 +- extensions/BackgroundMesh.cc | 18 + extensions/BackgroundMesh.h | 26 +- extensions/BackgroundMesh.hh | 18 + extensions/BackgroundMesh2.h | 24 +- extensions/BackgroundMesh2.hh | 18 + extensions/BoundaryFunctions.h | 47 +- extensions/ExtendedProblemStat.h | 69 +- extensions/GeometryTools.cc | 20 +- extensions/GeometryTools.h | 24 +- extensions/GeometryTools.hh | 18 + extensions/GradientCalculations.h | 26 +- extensions/Helpers.cc | 740 ++++----- extensions/Helpers.h | 90 +- extensions/MeshFunction_Level.h | 28 +- extensions/MeshIndicator.h | 26 +- extensions/MetaTools.h | 25 +- extensions/NewtonCotesQuad.h | 26 +- extensions/POperators.cc | 1386 ++++++++--------- extensions/POperators.h | 24 +- extensions/POperators_FOT.h | 168 +- extensions/POperators_SOT.h | 201 +-- extensions/POperators_ZOT.h | 26 +- extensions/PhaseFieldConvert.h | 26 +- extensions/Refinement.h | 26 +- extensions/Refinement_DOFView.h | 26 +- extensions/Refinement_Level.h | 26 +- extensions/Refinement_MeshSize.h | 28 +- extensions/SignedDistFunctors.h | 68 +- extensions/SingularDirichletBC.h | 90 +- extensions/Tools.h | 28 +- extensions/ValueTypes.h | 43 +- extensions/VectorOperations.h | 56 +- extensions/Views.h | 26 +- extensions/VtuReader.h | 37 +- extensions/VtuReader.hh | 27 +- extensions/base_problems/BaseProblem.h | 17 +- extensions/base_problems/BaseProblem.hh | 16 + extensions/base_problems/BaseProblem_RB.h | 19 +- extensions/base_problems/CahnHilliard.cc | 16 + extensions/base_problems/CahnHilliard.h | 17 +- .../base_problems/CahnHilliardNavierStokes.cc | 16 + .../base_problems/CahnHilliardNavierStokes.h | 17 +- .../CahnHilliardNavierStokes_RB.cc | 16 + .../CahnHilliardNavierStokes_RB.h | 17 +- .../CahnHilliardNavierStokes_TwoPhase.cc | 16 + .../CahnHilliardNavierStokes_TwoPhase.h | 17 +- .../CahnHilliardNavierStokes_TwoPhase_RB.cc | 16 + .../CahnHilliardNavierStokes_TwoPhase_RB.h | 17 +- extensions/base_problems/CahnHilliard_RB.cc | 16 + extensions/base_problems/CahnHilliard_RB.h | 17 +- extensions/base_problems/DiffuseDomainFsi.cc | 16 + extensions/base_problems/DiffuseDomainFsi.h | 17 +- extensions/base_problems/LinearElasticity.cc | 16 + extensions/base_problems/LinearElasticity.h | 17 +- .../base_problems/LinearElasticityPhase.cc | 16 + .../base_problems/LinearElasticityPhase.h | 17 +- .../base_problems/NavierStokesCahnHilliard.cc | 18 +- .../base_problems/NavierStokesCahnHilliard.h | 17 +- .../base_problems/NavierStokesPhase_Chorin.cc | 16 + .../base_problems/NavierStokesPhase_Chorin.h | 17 +- .../NavierStokesPhase_TaylorHood.cc | 16 + .../NavierStokesPhase_TaylorHood.h | 17 +- .../base_problems/NavierStokes_Chorin.cc | 16 + .../base_problems/NavierStokes_Chorin.h | 17 +- .../NavierStokes_TH_MultiPhase.cc | 20 + .../NavierStokes_TH_MultiPhase.h | 17 +- .../NavierStokes_TH_MultiPhase_RB.cc | 16 + .../NavierStokes_TH_MultiPhase_RB.h | 17 +- .../base_problems/NavierStokes_TaylorHood.cc | 16 + .../base_problems/NavierStokes_TaylorHood.h | 17 +- .../NavierStokes_TaylorHood_RB.cc | 16 + .../NavierStokes_TaylorHood_RB.h | 17 +- extensions/base_problems/PhaseFieldCrystal.cc | 16 + extensions/base_problems/PhaseFieldCrystal.h | 17 +- .../base_problems/PhaseFieldCrystal_Base.cc | 16 + .../base_problems/PhaseFieldCrystal_Base.h | 19 +- .../base_problems/PhaseFieldCrystal_Phase.cc | 16 + .../base_problems/PhaseFieldCrystal_Phase.h | 17 +- .../base_problems/PhaseFieldCrystal_RB.cc | 16 + .../base_problems/PhaseFieldCrystal_RB.h | 17 +- extensions/base_problems/chns.h | 17 +- .../src/CahnHilliardNavierStokes_.h | 17 +- .../src/CahnHilliard_.cc | 16 + .../src/CahnHilliard_.h | 17 +- .../NavierStokesCahnHilliard_PC/src/nsch.cc | 20 +- .../src/benchmark.cc | 18 +- extensions/demo/other/src/drivenCavity.cc | 16 + extensions/demo/other/src/drivenCavity_rb.cc | 16 + .../other/src/drivenCavity_twophase_rb.cc | 16 + .../src/fsi_explicit/ElasticityNavierStokes.h | 17 +- .../fsi_explicit/fluidStructureInteraction.cc | 16 + .../other/src/fsi_explicit/navierStokes.h | 17 +- extensions/demo/other/src/mesh_refinement.cc | 16 + extensions/demo/other/src/mesh_refinement2.cc | 16 + extensions/demo/other/src/movingMesh.cc | 16 + extensions/demo/other/src/movingMesh.h | 17 +- extensions/demo/other/src/navierStokes.h | 17 +- .../other/src/navierStokes_diffuseDomain.cc | 16 + .../other/src/navierStokes_diffuseDomain2.cc | 16 + extensions/kdtree_nanoflann.h | 45 +- extensions/kdtree_nanoflann_dof.h | 45 +- extensions/kdtree_nanoflann_double.h | 45 +- extensions/kdtree_nanoflann_mesh.h | 45 +- .../preconditioner/BlockPreconditioner.h | 90 ++ .../preconditioner/MTLPreconCahnHilliard.h | 139 ++ .../preconditioner/MTLPreconCahnHilliard.hh | 73 + extensions/preconditioner/MTLPreconPfc.h | 194 +++ extensions/preconditioner/MTLPreconPfc.hh | 117 ++ .../preconditioner/PetscPreconCahnHilliard.cc | 103 ++ .../preconditioner/PetscPreconCahnHilliard.h | 64 + extensions/preconditioner/PetscPreconPfc.cc | 148 ++ extensions/preconditioner/PetscPreconPfc.h | 59 + .../ExtendedRosenbrockAdaptInstationary.h | 33 +- .../ExtendedRosenbrockAdaptInstationary.hh | 26 +- .../time/ExtendedRosenbrockStationary.cc | 39 +- .../time/ExtendedRosenbrockStationary.h | 54 +- test/mpi/src/test0001.cc | 6 +- test/mpi/src/test0002.cc | 1 + test/mpi/src/test0003.cc | 1 + test/mpi/src/test0004.cc | 1 + test/mpi/src/test0005.cc | 1 + test/mpi/src/test0006.cc | 1 + test/mpi/src/test0007.cc | 1 + 584 files changed, 19316 insertions(+), 12687 deletions(-) create mode 100644 AMDiS/FindHYPRE.cmake delete mode 100644 AMDiS/src/AUTHORS delete mode 100644 AMDiS/src/BasePreconditioner.h delete mode 100644 AMDiS/src/ITL_OEMSolver.h delete mode 100644 AMDiS/src/ITL_OEMSolver.hh delete mode 100644 AMDiS/src/ITL_Preconditioner.h delete mode 100644 AMDiS/src/ITL_Solver.h delete mode 100644 AMDiS/src/MTL4Solver.h delete mode 100644 AMDiS/src/Mapper.h delete mode 100644 AMDiS/src/MatrixStreams.h delete mode 100644 AMDiS/src/NEWS delete mode 100644 AMDiS/src/OEMSolver.h delete mode 100644 AMDiS/src/RobinBC.hh_ delete mode 100644 AMDiS/src/SolverMatrix.cc delete mode 100644 AMDiS/src/UmfPackSolver.h delete mode 100644 AMDiS/src/itl/minres.hpp delete mode 100644 AMDiS/src/parallel/Mtl4Solver.cc delete mode 100644 AMDiS/src/parallel/Mtl4Solver.h create mode 100644 AMDiS/src/parallel/PMTL4Solver.h create mode 100644 AMDiS/src/parallel/ParallelProblemStat.cc create mode 100644 AMDiS/src/parallel/ParallelProblemStat.h delete mode 100644 AMDiS/src/parallel/ParallelProblemStatBase.cc delete mode 100644 AMDiS/src/parallel/ParallelProblemStatBase.h create mode 100644 AMDiS/src/parallel/ParallelSolver.cc create mode 100644 AMDiS/src/parallel/ParallelSolver.h delete mode 100644 AMDiS/src/parallel/PetscProblemStat.cc delete mode 100644 AMDiS/src/parallel/PetscProblemStat.h create mode 100644 AMDiS/src/solver/HypreSolver.h create mode 100644 AMDiS/src/solver/ITL_Preconditioner.h create mode 100644 AMDiS/src/solver/ITL_Runner.h create mode 100644 AMDiS/src/solver/ITL_Solver.h create mode 100644 AMDiS/src/solver/KrylovPreconditioner.h create mode 100644 AMDiS/src/solver/LinearSolver.h create mode 100644 AMDiS/src/solver/MTL4Solver.h create mode 100644 AMDiS/src/solver/MTL4SolverBase.h create mode 100644 AMDiS/src/solver/Mapper.h create mode 100644 AMDiS/src/solver/MatrixStreams.h create mode 100644 AMDiS/src/solver/PetscSolver.cc create mode 100644 AMDiS/src/solver/PetscSolver.h create mode 100644 AMDiS/src/solver/PetscTypes.cc create mode 100644 AMDiS/src/solver/PetscTypes.h create mode 100644 AMDiS/src/solver/SolverMatrix.cc rename AMDiS/src/{ => solver}/SolverMatrix.h (55%) create mode 100644 AMDiS/src/solver/UmfPackSolver.h create mode 100644 AMDiS/src/solver/details/MTL4Solver.h create mode 100644 AMDiS/src/solver/itl/details.hpp create mode 100644 AMDiS/src/solver/itl/fgmres.hpp create mode 100644 AMDiS/src/solver/itl/gcr.hpp create mode 100644 AMDiS/src/solver/itl/gmres2.hpp create mode 100644 AMDiS/src/solver/itl/hypre.hpp create mode 100644 AMDiS/src/solver/itl/minres.hpp create mode 100644 AMDiS/src/solver/itl/preonly.hpp create mode 100644 demo/init/ellipt_krylov_precon.dat.2d create mode 100644 extensions/preconditioner/BlockPreconditioner.h create mode 100644 extensions/preconditioner/MTLPreconCahnHilliard.h create mode 100644 extensions/preconditioner/MTLPreconCahnHilliard.hh create mode 100644 extensions/preconditioner/MTLPreconPfc.h create mode 100644 extensions/preconditioner/MTLPreconPfc.hh create mode 100644 extensions/preconditioner/PetscPreconCahnHilliard.cc create mode 100644 extensions/preconditioner/PetscPreconCahnHilliard.h create mode 100644 extensions/preconditioner/PetscPreconPfc.cc create mode 100644 extensions/preconditioner/PetscPreconPfc.h diff --git a/AMDiS/AMDISConfig.cmake.in b/AMDiS/AMDISConfig.cmake.in index 22602324..db3801d0 100644 --- a/AMDiS/AMDISConfig.cmake.in +++ b/AMDiS/AMDISConfig.cmake.in @@ -68,6 +68,8 @@ set(AMDIS_NEED_ZOLTAN @ENABLE_ZOLTAN@) set(AMDIS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@) set(AMDIS_OPENMP @ENABLE_OPENMP@) set(AMDIS_NEED_UMFPACK @ENABLE_UMFPACK@) +set(AMDIS_NEED_HYPRE @ENABLE_HYPRE@) +set(AMDIS_NEED_PETSC @ENABLE_PETSC@) set(AMDIS_NEED_PNG @ENABLE_PNG@) set(AMDIS_NEED_BDDCML @ENABLE_BDDCML@) set(AMDIS_NEED_MKL @ENABLE_MKL@) diff --git a/AMDiS/AMDISUse.cmake b/AMDiS/AMDISUse.cmake index 71a4f233..0215d123 100644 --- a/AMDiS/AMDISUse.cmake +++ b/AMDiS/AMDISUse.cmake @@ -32,7 +32,42 @@ if(AMDIS_HAS_PARALLEL_DOMAIN) message(FATAL_ERROR "could not find the metis libraries needed by amdis") endif(METIS_LIB) endif() -endif(AMDIS_HAS_PARALLEL_DOMAIN) + +elseif(AMDIS_NEED_PETSC) + find_package(MPI REQUIRED) + if(MPI_FOUND) + list(APPEND AMDIS_LIBRARIES ${MPI_LIBRARIES}) + list(APPEND AMDIS_COMPILEFLAGS ${MPI_COMPILE_FLAGS}) + list(APPEND AMDIS_INCLUDE_DIRS ${MPI_INCLUDE_PATH}) + endif(MPI_FOUND) + + set(CMAKE_MODULE_PATH ${AMDIS_DIR}) + set(PETSC_EXECUTABLE_RUNS ON) + find_package(PETSc REQUIRED) + if(PETSC_FOUND) + list(APPEND AMDIS_LIBRARIES ${PETSC_LIBRARY_SYS} ${PETSC_LIBRARIES}) + list(APPEND AMDIS_INCLUDE_DIRS ${PETSC_INCLUDES}) + else() + message(FATAL_ERROR "Could not find PETSc!") + endif(PETSC_FOUND) +endif() + +if(AMDIS_NEED_HYPRE) + find_package(HYPRE REQUIRED) + if(HAVE_HYPRE) + if(NOT MPI_FOUND) + find_package(MPI REQUIRED) + if(MPI_FOUND) + list(APPEND AMDIS_LIBRARIES ${MPI_LIBRARIES}) + list(APPEND AMDIS_COMPILEFLAGS ${MPI_COMPILE_FLAGS}) + list(APPEND AMDIS_INCLUDE_DIRS ${MPI_INCLUDE_PATH}) + endif() + endif() + list(APPEND AMDIS_INCLUDE_DIRS ${HYPRE_INCLUDE_DIRECTORIES}) + list(APPEND AMDIS_COMPILEFLAGS "-DMTL_HAS_HYPRE") + list(APPEND AMDIS_LIBRARIES ${HYPRE_LIBRARIES} ) + endif() +endif(AMDIS_NEED_HYPRE) #thats bad because it affects each target add_definitions(${AMDIS_COMPILEFLAGS}) diff --git a/AMDiS/CMakeLists.txt b/AMDiS/CMakeLists.txt index 41358cee..d7822b4b 100644 --- a/AMDiS/CMakeLists.txt +++ b/AMDiS/CMakeLists.txt @@ -40,12 +40,14 @@ endif() SET(ENABLE_PARALLEL_DOMAIN "OFF" CACHE STRING "use parallel domain decomposition. please set to one of: PMTL, PETSC, OFF" ) option(USE_PETSC_DEV false) option(ENABLE_ZOLTAN false) +option(ENABLE_PETSC "Use sequential PETSc solvers" false) option(ENABLE_UMFPACK "Use of UMFPACK solver" false) +option(ENABLE_HYPRE "Use HYPRE AMG solver" false) option(ENABLE_PNG "use png reader/writer" false) option(ENABLE_BDDCML "Use of BDDCML library" false) option(ENABLE_EXTENSIONS "Use extensions" false) option(ENABLE_OPENMP "Use OpenMP" false) -option(ENABLE_OUTPUT "AMDiS output priniting, disable only for debugging!" true) +option(ENABLE_OUTPUT "AMDiS output printing, disable only for debugging!" true) mark_as_advanced(ENABLE_OUTPUT) @@ -80,7 +82,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc ${SOURCE_DIR}/CoarseningManager2d.cc ${SOURCE_DIR}/CoarseningManager3d.cc ${SOURCE_DIR}/ComponentTraverseInfo.cc - ${SOURCE_DIR}/CouplingIterationInterface.cc + ${SOURCE_DIR}/CouplingIterationInterface.cc ${SOURCE_DIR}/CreatorMap.cc ${SOURCE_DIR}/DOFAdmin.cc ${SOURCE_DIR}/DOFIndexed.cc @@ -105,7 +107,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc ${SOURCE_DIR}/Global.cc ${SOURCE_DIR}/GlobalDOFNumbering.cc ${SOURCE_DIR}/GlobalElementNumbering.cc - ${SOURCE_DIR}/Initfile.cc + ${SOURCE_DIR}/Initfile.cc ${SOURCE_DIR}/Lagrange.cc ${SOURCE_DIR}/LeafData.cc ${SOURCE_DIR}/Line.cc @@ -139,7 +141,6 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc ${SOURCE_DIR}/SecondOrderTerm.cc ${SOURCE_DIR}/Serializer.cc ${SOURCE_DIR}/StandardProblemIteration.cc - ${SOURCE_DIR}/SolverMatrix.cc ${SOURCE_DIR}/SubAssembler.cc ${SOURCE_DIR}/SubElInfo.cc ${SOURCE_DIR}/SubQuadrature.cc @@ -175,6 +176,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc ${SOURCE_DIR}/io/VtkWriter.cc ${SOURCE_DIR}/io/VtkVectorWriter.cc ${SOURCE_DIR}/nonlin/ProblemNonLin.cc + ${SOURCE_DIR}/solver/SolverMatrix.cc ${SOURCE_DIR}/time/RosenbrockAdaptInstationary.cc ${SOURCE_DIR}/time/RosenbrockMethod.cc ${SOURCE_DIR}/time/RosenbrockStationary.cc @@ -230,11 +232,11 @@ if(ENABLE_PARALLEL_DOMAIN) list(APPEND COMPILEFLAGS "-DHAVE_PARALLEL_DOMAIN_AMDIS=1") SET(PARALLEL_DOMAIN_AMDIS_SRC + ${SOURCE_DIR}/parallel/BddcMlSolver.cc ${SOURCE_DIR}/parallel/DofComm.cc ${SOURCE_DIR}/parallel/CheckerPartitioner.cc ${SOURCE_DIR}/parallel/ElementObjectDatabase.cc ${SOURCE_DIR}/parallel/InteriorBoundary.cc - ${SOURCE_DIR}/parallel/MatrixNnzStructure.cc ${SOURCE_DIR}/parallel/MeshDistributor.cc ${SOURCE_DIR}/parallel/MeshLevelData.cc ${SOURCE_DIR}/parallel/MeshManipulation.cc @@ -242,9 +244,10 @@ if(ENABLE_PARALLEL_DOMAIN) ${SOURCE_DIR}/parallel/MpiHelper.cc ${SOURCE_DIR}/parallel/ParallelDebug.cc ${SOURCE_DIR}/parallel/ParallelDofMapping.cc - ${SOURCE_DIR}/parallel/ParallelProblemStatBase.cc + ${SOURCE_DIR}/parallel/ParallelProblemStat.cc + ${SOURCE_DIR}/parallel/ParallelSolver.cc ${SOURCE_DIR}/parallel/PeriodicMap.cc - ${SOURCE_DIR}/parallel/ParMetisPartitioner.cc + ${SOURCE_DIR}/parallel/ParMetisPartitioner.cc ${SOURCE_DIR}/parallel/StdMpi.cc ${SOURCE_DIR}/parallel/ZoltanPartitioner.cc) @@ -253,13 +256,13 @@ if(ENABLE_PARALLEL_DOMAIN) set(PETSC_EXECUTABLE_RUNS ON) find_package(PETSc REQUIRED) include_directories(${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include) + list(APPEND COMPILEFLAGS "-DHAVE_PARALLEL_PETSC") list(APPEND AMDIS_INCLUDE_DIRS ${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include) list(APPEND PARALLEL_DOMAIN_AMDIS_SRC - ${SOURCE_DIR}/parallel/BddcMlSolver.cc + ${SOURCE_DIR}/parallel/MatrixNnzStructure.cc ${SOURCE_DIR}/parallel/ParallelCoarseSpaceSolver.cc ${SOURCE_DIR}/parallel/PetscHelper.cc ${SOURCE_DIR}/parallel/PetscSolver.cc - ${SOURCE_DIR}/parallel/PetscProblemStat.cc ${SOURCE_DIR}/parallel/PetscSolverFeti.cc ${SOURCE_DIR}/parallel/PetscSolverFetiDebug.cc ${SOURCE_DIR}/parallel/PetscSolverFetiMonitor.cc @@ -269,14 +272,17 @@ if(ENABLE_PARALLEL_DOMAIN) ${SOURCE_DIR}/parallel/PetscSolverGlobalBlockMatrix.cc ${SOURCE_DIR}/parallel/PetscSolverNavierStokes.cc ${SOURCE_DIR}/parallel/PetscSolverNSCH.cc - ${SOURCE_DIR}/parallel/PetscSolverCahnHilliard2.cc - ${SOURCE_DIR}/parallel/PetscSolverCahnHilliard.cc - ${SOURCE_DIR}/parallel/PetscSolverSchur.cc) + ${SOURCE_DIR}/parallel/PetscSolverCahnHilliard2.cc + ${SOURCE_DIR}/parallel/PetscSolverCahnHilliard.cc + ${SOURCE_DIR}/parallel/PetscSolverSchur.cc + ${SOURCE_DIR}/solver/PetscTypes.cc) elseif(ENABLE_PARALLEL_DOMAIN STREQUAL "PMTL") set(MTL_INCLUDE_DIR "") find_package(MTL REQUIRED) list(APPEND COMPILEFLAGS "-DMTL_HAS_MPI" "-DHAVE_PARALLEL_MTL4") - list(APPEND PARALLEL_DOMAIN_AMDIS_SRC ${SOURCE_DIR}/parallel/Mtl4Solver.cc) +# list(APPEND PARALLEL_DOMAIN_AMDIS_SRC +# ${SOURCE_DIR}/parallel/PMTL_ProblemStat.cc +# ) list(APPEND AMDIS_LIBS ${MTL_LIBRARIES}) else() message(SEND_ERROR "Set the domain-decomposition version correctly.") @@ -290,6 +296,24 @@ if(ENABLE_PARALLEL_DOMAIN) endif(ENABLE_PARALLEL_DOMAIN) +if(ENABLE_PETSC) + find_package(MPI REQUIRED) + if(MPI_FOUND) + list(APPEND COMPILEFLAGS "${MPI_COMPILE_FLAGS}") + include_directories(${MPI_INCLUDE_PATH}) + endif(MPI_FOUND) + + set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};/usr/share/cmake-2.8/Modules/;${CMAKE_SOURCE_DIR}/") + set(PETSC_EXECUTABLE_RUNS ON) + find_package(PETSc REQUIRED) + include_directories(${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include) + list(APPEND AMDIS_INCLUDE_DIRS ${PETSC_DIR}/include ${PETSC_DIR}/${PETSC_ARCH}/include) + list(APPEND COMPILEFLAGS "-DHAVE_PETSC" "-DPETSC_VERSION=${PETSC_VERSION}") + + list(APPEND AMDIS_SRC + ${SOURCE_DIR}/solver/PetscSolver.cc + ${SOURCE_DIR}/solver/PetscTypes.cc) +endif(ENABLE_PETSC) if(ENABLE_UMFPACK) find_file(UMFPACK_H umfpack.h @@ -306,6 +330,24 @@ if(ENABLE_UMFPACK) endif(ENABLE_UMFPACK) +if(ENABLE_HYPRE) + include(FindHYPRE.cmake) + message("have hypre: ${HAVE_HYPRE}") + if(HAVE_HYPRE) + if(NOT MPI_FOUND) + find_package(MPI REQUIRED) + if(MPI_FOUND) + list(APPEND COMPILEFLAGS "${MPI_COMPILE_FLAGS}") + include_directories(${MPI_INCLUDE_PATH}) + endif() + endif() + include_directories(${HYPRE_INCLUDE_DIRECTORIES}) + list(APPEND COMPILEFLAGS "-DMTL_HAS_HYPRE") + list(APPEND MYLIBS ${HYPRE_LIBRARIES} ) + endif() +endif(ENABLE_HYPRE) + + if(ENABLE_PNG) find_file(PNG_H png.h HINTS ENV CPATH /usr/include @@ -374,6 +416,13 @@ if(ENABLE_EXTENSIONS) ${EXTENSIONS_DIR}/POperators.cc ${EXTENSIONS_DIR}/time/ExtendedRosenbrockStationary.cc ${EXTENSIONS_DIR}/pugixml/src/pugixml.cpp) + + if(ENABLE_PETSC) + list(APPEND EXTENSIONS_SRC + ${EXTENSIONS_DIR}/preconditioner/PetscPreconPfc.cc + ${EXTENSIONS_DIR}/preconditioner/PetscPreconCahnHilliard.cc) + endif(ENABLE_PETSC) + list(APPEND COMPILEFLAGS "-DHAVE_EXTENSIONS=1") list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}) list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}/time) @@ -401,6 +450,13 @@ if(ENABLE_EXTENSIONS) FILE(GLOB HEADERS "${EXTENSIONS_DIR}/time/*.hh") INSTALL(FILES ${HEADERS} DESTINATION include/amdis/extensions/time/) + + FILE(GLOB HEADERS "${EXTENSIONS_DIR}/preconditioner/*.h") + INSTALL(FILES ${HEADERS} + DESTINATION include/amdis/extensions/preconditioner/) + FILE(GLOB HEADERS "${EXTENSIONS_DIR}/preconditioner/*.hh") + INSTALL(FILES ${HEADERS} + DESTINATION include/amdis/extensions/preconditioner/) list(APPEND deb_add_dirs "include/amdis/extensions/time") @@ -438,7 +494,7 @@ if(ENABLE_EXTENSIONS) ${EXTENSIONS_DIR}/base_problems/NavierStokes_TH_MultiPhase_RB.cc ${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal_Base.cc # ${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal.cc -# ${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal_Phase.cc + ${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal_Phase.cc ${EXTENSIONS_DIR}/base_problems/PhaseFieldCrystal_RB.cc) list(APPEND COMPILEFLAGS "-DHAVE_BASE_PROBLEMS=1") list(APPEND AMDIS_INCLUDE_DIRS ${EXTENSIONS_DIR}/base_problems) @@ -562,10 +618,20 @@ INSTALL(FILES ${HEADERS} DESTINATION include/amdis/time/) list(APPEND deb_add_dirs "include/amdis/time") -FILE(GLOB HEADERS "${SOURCE_DIR}/itl/*.hpp") +FILE(GLOB HEADERS "${SOURCE_DIR}/solver/*.h") +INSTALL(FILES ${HEADERS} + DESTINATION include/amdis/solver) +list(APPEND deb_add_dirs "include/amdis/solver") + +FILE(GLOB HEADERS "${SOURCE_DIR}/solver/*.hh") +INSTALL(FILES ${HEADERS} + DESTINATION include/amdis/solver) +list(APPEND deb_add_dirs "include/amdis/solver") + +FILE(GLOB HEADERS "${SOURCE_DIR}/solver/itl/*.hpp") INSTALL(FILES ${HEADERS} - DESTINATION include/amdis/itl) -list(APPEND deb_add_dirs "include/amdis/itl") + DESTINATION include/amdis/solver/itl) +list(APPEND deb_add_dirs "include/amdis/solver/itl") FILE(GLOB HEADERS "${SOURCE_DIR}/io/*.h") INSTALL(FILES ${HEADERS} @@ -604,7 +670,10 @@ INSTALL(FILES ${AMDIS_BINARY_DIR}/AMDISConfig.cmake DESTINATION share/amdis/) list(APPEND deb_add_dirs "share/amdis/") -INSTALL(FILES ${AMDIS_SOURCE_DIR}/AMDISUse.cmake +# INSTALL(FILES ${AMDIS_SOURCE_DIR}/AMDISUse.cmake +# DESTINATION share/amdis/) +FILE(GLOB CMAKE_FILES "${AMDIS_SOURCE_DIR}/*.cmake") +INSTALL(FILES ${CMAKE_FILES} DESTINATION share/amdis/) #install mtl diff --git a/AMDiS/FindHYPRE.cmake b/AMDiS/FindHYPRE.cmake new file mode 100644 index 00000000..6520d6e3 --- /dev/null +++ b/AMDiS/FindHYPRE.cmake @@ -0,0 +1,21 @@ +find_file(HYPRE_H HYPRE.h) +find_library(HYPRE_LIB HYPRE) +if(HYPRE_H AND HYPRE_LIB) + set(HAVE_HYPRE ON) + find_package(MPI REQUIRED) + #append each library in the hypre_lib directory beginning with HYPRE to the list of hypre libraries + get_filename_component(HLIB_PATH ${HYPRE_LIB} PATH) + file(GLOB HYPRE_OTHER ${HLIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}HYPRE*${CMAKE_SHARED_LIBRARY_SUFFIX}) + find_library(LAPACK_LIB lapack) + set(HYPRE_LIBRARIES ${MPI_LIBRARIES} ${HYPRE_LIB} ${HYPRE_OTHER} ${LAPACK_LIB}) + message("hypre libraries: ${HYPRE_LIBRARIES}") + get_filename_component(HYPRE_INCLUDE_DIRECTORIES ${HYPRE_H} PATH) + list(APPEND HYPRE_INCLUDE_DIRECTORIES ${MPI_CXX_INCLUDE_PATH}) +else() + if(HAVE_HYPRE) + message("could not find hypre:") + message("library: ${HYPRE_LIB}") + message("header: ${HYPRE_H}") + endif() + set(HAVE_HYPRE FALSE) +endif() diff --git a/AMDiS/doc/Doxyfile b/AMDiS/doc/Doxyfile index 5a37ac65..67483b6f 100644 --- a/AMDiS/doc/Doxyfile +++ b/AMDiS/doc/Doxyfile @@ -281,7 +281,7 @@ SUBGROUPING = YES # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. -TYPEDEF_HIDES_STRUCT = NO +TYPEDEF_HIDES_STRUCT = YES # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to # determine which symbols to keep in memory and which to flush to disk. @@ -591,12 +591,15 @@ WARN_LOGFILE = # with spaces. INPUT = ../src/ \ - ../src/io \ ../src/compositeFEM \ + ../src/est \ + ../src/io \ + ../src/nonlin \ ../src/parallel \ ../src/reinit \ + ../src/solver \ + ../src/solver/itl \ ../src/time \ - ../src/nonlin # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -613,7 +616,7 @@ INPUT_ENCODING = UTF-8 # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 -FILE_PATTERNS = *.h +FILE_PATTERNS = *.h *.hpp # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -1374,7 +1377,7 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = HAVE_PARALLEL_DOMAIN_AMDIS HAVE_PARALLEL_MTL4 HAVE_UMFPACK MTL_HAS_UMFPACK HAVE_PETSC # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. diff --git a/AMDiS/src/AMDiS.cc b/AMDiS/src/AMDiS.cc index 8193e591..b4c84293 100644 --- a/AMDiS/src/AMDiS.cc +++ b/AMDiS/src/AMDiS.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "AMDiS.h" @@ -21,24 +30,28 @@ namespace AMDiS { using namespace std; -#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(HAVE_PARALLEL_MTL4) +#if defined(HAVE_PARALLEL_MTL4) mtl::par::environment* mtl_environment = NULL; #endif void init(int argc, char **argv, std::string initFileName) { -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS -#ifdef HAVE_PARALLEL_MTL4 +#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_PETSC) + #ifdef HAVE_PARALLEL_MTL4 mtl_environment = new mtl::par::environment(argc, argv); -#else + #else PetscInitialize(&argc, &argv, NULL, NULL); - mpi::startRand(); -#endif - -#ifdef HAVE_ZOLTAN + #if defined(HAVE_PARALLEL_DOMAIN_AMDIS) + Parallel::mpi::startRand(); + #else + srand(time(NULL)); + #endif + #endif + + #ifdef HAVE_ZOLTAN float zoltanVersion = 0.0; Zoltan_Initialize(argc, argv, &zoltanVersion); -#endif + #endif #endif Parameters::clearData(); @@ -104,6 +117,7 @@ namespace AMDiS { if (vm.count("parameters") && !ignoreCommandline) Parameters::readArgv(vm["parameters"].as(),0); + // initialize global strcutures using parameters Global::init(); } @@ -123,15 +137,20 @@ namespace AMDiS { void finalize() { #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - MeshDistributor::globalMeshDistributor->exitParallelization(); - delete MeshDistributor::globalMeshDistributor; -#ifdef HAVE_PARALLEL_MTL4 + Parallel::MeshDistributor::globalMeshDistributor->exitParallelization(); + delete Parallel::MeshDistributor::globalMeshDistributor; + #ifdef HAVE_PARALLEL_MTL4 if (mtl_environment) delete mtl_environment; -#else + #else PetscFinalize(); + #endif #endif + +#ifdef HAVE_PETSC + PetscFinalize(); #endif + } } diff --git a/AMDiS/src/AMDiS.h b/AMDiS/src/AMDiS.h index 7c831b20..e7ee91a5 100644 --- a/AMDiS/src/AMDiS.h +++ b/AMDiS/src/AMDiS.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -66,8 +68,6 @@ #include "Functors.h" #include "Global.h" #include "Initfile.h" -#include "ITL_Preconditioner.h" -#include "ITL_Solver.h" #include "Lagrange.h" #include "LeafData.h" #include "Line.h" @@ -78,7 +78,6 @@ #include "Mesh.h" #include "MeshStructure.h" #include "ComponentTraverseInfo.h" -#include "OEMSolver.h" #include "Operator.h" #include "OperatorTerm.h" #include "Parametric.h" @@ -131,6 +130,10 @@ #include "nonlin/ProblemNonLin.h" #include "nonlin/NonLinSolver.h" +#include "solver/ITL_Preconditioner.h" +#include "solver/ITL_Solver.h" +#include "solver/LinearSolver.h" + #include "time/RosenbrockAdaptInstationary.h" #include "time/RosenbrockStationary.h" @@ -140,17 +143,21 @@ #include "parallel/MpiHelper.h" #include "parallel/ParallelDebug.h" #include "parallel/StdMpi.h" +#include "parallel/ParallelProblemStat.h" #if HAVE_PARALLEL_MTL4 -#include "parallel/Mtl4Solver.h" +#include "parallel/PMTL4Solver.h" #else -#include "parallel/PetscProblemStat.h" #include "parallel/PetscSolver.h" #include "parallel/PetscSolverNavierStokes.h" #endif #endif +#if HAVE_PETSC +#include +#endif + namespace AMDiS { void init(int argc, char **argv, std::string initFileName = ""); diff --git a/AMDiS/src/AMDiS_fwd.h b/AMDiS/src/AMDiS_fwd.h index 09f1ac32..be0788e7 100644 --- a/AMDiS/src/AMDiS_fwd.h +++ b/AMDiS/src/AMDiS_fwd.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -34,10 +36,10 @@ namespace AMDiS { class Assembler; class BasisFunction; class BoundaryManager; - class CGSolver; +// class CGSolver; class CoarseningManager; class CouplingIterationInterface; - class DiagonalPreconditioner; +// class DiagonalPreconditioner; class DOFAdmin; class DOFContainer; class DOFIndexedBase; @@ -53,8 +55,8 @@ namespace AMDiS { class FileWriterInterface; class FiniteElemSpace; class Flag; - class IdentityPreconditioner; - class InteriorBoundary; +// class IdentityPreconditioner; +// class Parallel::InteriorBoundary; class LeafDataPeriodic; class LevelAdmin; class Line; @@ -63,7 +65,7 @@ namespace AMDiS { class Marker; class Mesh; class MeshStructure; - class OEMSolver; + class LinearSolver; class Operator; class OperatorTerm; class Parametric; @@ -99,13 +101,23 @@ namespace AMDiS { class VertexVector; #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - class ElementObjectDatabase; - class FeSpaceDofMap; - class MatrixNnzStructure; - class MeshLevelData; - class PetscSolver; - class PetscSolverFeti; - class PetscSolverFetiDebug; + namespace Parallel { + class ElementObjectDatabase; + class FeSpaceDofMap; + class MatrixNnzStructure; + class MeshLevelData; + class PetscSolver; + class PetscSolverFeti; + class PetscSolverFetiDebug; + class PetscSolverSchur; + class PetscSolverGlobalMatrix; + class PetscSolverGlobalBlockMatrix; + class PetscSolverCahnHilliard; + class PetscSolverNavierStokes; + class ParallelDofMapping; + class ParallelProblemStat; + class ParallelSolver; + } #endif struct BoundaryObject; @@ -130,8 +142,8 @@ namespace AMDiS { template class DOFVector; template class DimVec; template class DimMat; - template class ITL_OEMSolver; - template class ITL_Preconditioner; +// template class ITL_LinearSolver; + template class ITL_Preconditioner; template class Matrix; template class MatrixOfFixVecs; template class MatVecMultiplier; diff --git a/AMDiS/src/AUTHORS b/AMDiS/src/AUTHORS deleted file mode 100644 index e69de29b..00000000 diff --git a/AMDiS/src/AbstractFunction.h b/AMDiS/src/AbstractFunction.h index 1004bb1c..dfbc2f29 100644 --- a/AMDiS/src/AbstractFunction.h +++ b/AMDiS/src/AbstractFunction.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/AdaptBase.cc b/AMDiS/src/AdaptBase.cc index a1fe0eb5..1da224e2 100644 --- a/AMDiS/src/AdaptBase.cc +++ b/AMDiS/src/AdaptBase.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "AdaptBase.h" diff --git a/AMDiS/src/AdaptBase.h b/AMDiS/src/AdaptBase.h index 550c93d5..2c2617ae 100644 --- a/AMDiS/src/AdaptBase.h +++ b/AMDiS/src/AdaptBase.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/AdaptInfo.cc b/AMDiS/src/AdaptInfo.cc index b062491d..2c1e203c 100644 --- a/AMDiS/src/AdaptInfo.cc +++ b/AMDiS/src/AdaptInfo.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "boost/lexical_cast.hpp" diff --git a/AMDiS/src/AdaptInfo.h b/AMDiS/src/AdaptInfo.h index cb280d26..079135a9 100644 --- a/AMDiS/src/AdaptInfo.h +++ b/AMDiS/src/AdaptInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/AdaptInstationary.cc b/AMDiS/src/AdaptInstationary.cc index 585df9c9..6b6372dc 100644 --- a/AMDiS/src/AdaptInstationary.cc +++ b/AMDiS/src/AdaptInstationary.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "AdaptInstationary.h" @@ -19,7 +28,7 @@ #if HAVE_PARALLEL_DOMAIN_AMDIS #include "parallel/MeshDistributor.h" -#ifndef HAVE_PARALLEL_MTL4 +#ifdef HAVE_PARALLEL_PETSC #include #endif #endif @@ -320,7 +329,7 @@ namespace AMDiS { TEST_EXIT(adaptInfo->getTimestep() > 0)("timestep <= 0!\n"); #if HAVE_PARALLEL_DOMAIN_AMDIS - MeshDistributor::globalMeshDistributor->initParallelization(); + Parallel::MeshDistributor::globalMeshDistributor->initParallelization(); #endif if (adaptInfo->getTimestepNumber() == 0) { diff --git a/AMDiS/src/AdaptInstationary.h b/AMDiS/src/AdaptInstationary.h index 878c5a4e..507a91bb 100644 --- a/AMDiS/src/AdaptInstationary.h +++ b/AMDiS/src/AdaptInstationary.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/AdaptStationary.cc b/AMDiS/src/AdaptStationary.cc index 98f5a61f..a8593cba 100644 --- a/AMDiS/src/AdaptStationary.cc +++ b/AMDiS/src/AdaptStationary.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "AdaptStationary.h" @@ -18,7 +27,7 @@ #if HAVE_PARALLEL_DOMAIN_AMDIS #include "parallel/MeshDistributor.h" -#ifndef HAVE_PARALLEL_MTL4 +#ifdef HAVE_PARALLEL_PETSC #include #endif #endif @@ -51,7 +60,7 @@ namespace AMDiS { int AdaptStationary::adapt() { #if HAVE_PARALLEL_DOMAIN_AMDIS - MeshDistributor::globalMeshDistributor->initParallelization(); + Parallel::MeshDistributor::globalMeshDistributor->initParallelization(); #endif // initial iteration diff --git a/AMDiS/src/AdaptStationary.h b/AMDiS/src/AdaptStationary.h index 7b57877c..2c99f933 100644 --- a/AMDiS/src/AdaptStationary.h +++ b/AMDiS/src/AdaptStationary.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Assembler.cc b/AMDiS/src/Assembler.cc index 85c339fe..30b4c5bf 100644 --- a/AMDiS/src/Assembler.cc +++ b/AMDiS/src/Assembler.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/Assembler.h b/AMDiS/src/Assembler.h index 367cdfa9..7691759b 100644 --- a/AMDiS/src/Assembler.h +++ b/AMDiS/src/Assembler.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/BallProject.h b/AMDiS/src/BallProject.h index 31cc90d2..02005683 100644 --- a/AMDiS/src/BallProject.h +++ b/AMDiS/src/BallProject.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/BasePreconditioner.h b/AMDiS/src/BasePreconditioner.h deleted file mode 100644 index a3348d7a..00000000 --- a/AMDiS/src/BasePreconditioner.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef BASEPRECONDITIONER_H -#define BASEPRECONDITIONER_H - -#include -#include "CreatorInterface.h" -#include "ITL_Preconditioner.h" -#include "Collection.h" - -namespace AMDiS { - - template< typename Vector > - struct CreatorInterface< ITL_BasePreconditioner< Vector > > { - typedef typename AMDiS::Collection< Vector >::PreconditionMatrix PreconditionMatrix; - virtual ITL_BasePreconditioner< Vector >* create(const PreconditionMatrix& )=0 /*{ return NULL; }*/ ; - virtual ~CreatorInterface< ITL_BasePreconditioner< Vector > >() {} - }; - - template< typename Vector > - class NullCreator< ITL_BasePreconditioner< Vector > > : - public CreatorInterface< ITL_BasePreconditioner< Vector > > - { - typedef typename AMDiS::Collection< Vector >::PreconditionMatrix PreconditionMatrix; - typedef ITL_BasePreconditioner< Vector > BaseClass; - /// Creates no object. - BaseClass* create() - { - TEST_EXIT(false)("should never class this function"); - return NULL; - } - - BaseClass* create(const PreconditionMatrix& ) { - TEST_EXIT(false)("this is the wrong null creator\n"); - return NULL; - } - /// - virtual bool isNullCreator() - { - return true; - } - virtual ~NullCreator< ITL_BasePreconditioner< Vector > >() {} - }; - - typedef CreatorInterface< ITL_BasePreconditioner< MTLTypes::MTLVector > > PreconditionCreator; - typedef ITL_BasePreconditioner< MTLTypes::MTLVector > BasePreconditioner; - -} - -#endif diff --git a/AMDiS/src/BasisFunction.cc b/AMDiS/src/BasisFunction.cc index 3149792b..0e85430a 100644 --- a/AMDiS/src/BasisFunction.cc +++ b/AMDiS/src/BasisFunction.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/BasisFunction.h b/AMDiS/src/BasisFunction.h index 7c1bc384..450a8b6e 100644 --- a/AMDiS/src/BasisFunction.h +++ b/AMDiS/src/BasisFunction.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/BasisFunction.hh b/AMDiS/src/BasisFunction.hh index 0785d747..e2a9e8b6 100644 --- a/AMDiS/src/BasisFunction.hh +++ b/AMDiS/src/BasisFunction.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BasisFunction.h" diff --git a/AMDiS/src/Boundary.cc b/AMDiS/src/Boundary.cc index a251bcfc..750edd1c 100644 --- a/AMDiS/src/Boundary.cc +++ b/AMDiS/src/Boundary.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Boundary.h" diff --git a/AMDiS/src/Boundary.h b/AMDiS/src/Boundary.h index 26e60034..dc7dfd0c 100644 --- a/AMDiS/src/Boundary.h +++ b/AMDiS/src/Boundary.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/BoundaryCondition.h b/AMDiS/src/BoundaryCondition.h index d177ef9b..3d08a0b8 100644 --- a/AMDiS/src/BoundaryCondition.h +++ b/AMDiS/src/BoundaryCondition.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/BoundaryManager.cc b/AMDiS/src/BoundaryManager.cc index 7e9ca54b..c504e67f 100644 --- a/AMDiS/src/BoundaryManager.cc +++ b/AMDiS/src/BoundaryManager.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "FiniteElemSpace.h" diff --git a/AMDiS/src/BoundaryManager.h b/AMDiS/src/BoundaryManager.h index 2e0aa596..fdd67bad 100644 --- a/AMDiS/src/BoundaryManager.h +++ b/AMDiS/src/BoundaryManager.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/BoundaryObject.cc b/AMDiS/src/BoundaryObject.cc index 2f8d933f..6478af25 100644 --- a/AMDiS/src/BoundaryObject.cc +++ b/AMDiS/src/BoundaryObject.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BoundaryObject.h" diff --git a/AMDiS/src/BoundaryObject.h b/AMDiS/src/BoundaryObject.h index cc9edbc3..7c6337c6 100644 --- a/AMDiS/src/BoundaryObject.h +++ b/AMDiS/src/BoundaryObject.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Cholesky.cc b/AMDiS/src/Cholesky.cc index 09b23421..d0387f38 100644 --- a/AMDiS/src/Cholesky.cc +++ b/AMDiS/src/Cholesky.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Cholesky.h" diff --git a/AMDiS/src/Cholesky.h b/AMDiS/src/Cholesky.h index ea82ce45..df000769 100644 --- a/AMDiS/src/Cholesky.h +++ b/AMDiS/src/Cholesky.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CoarseningManager.cc b/AMDiS/src/CoarseningManager.cc index 6ba5f78d..8ddde5b5 100644 --- a/AMDiS/src/CoarseningManager.cc +++ b/AMDiS/src/CoarseningManager.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "CoarseningManager.h" diff --git a/AMDiS/src/CoarseningManager.h b/AMDiS/src/CoarseningManager.h index 373092cc..d78620e1 100644 --- a/AMDiS/src/CoarseningManager.h +++ b/AMDiS/src/CoarseningManager.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CoarseningManager1d.cc b/AMDiS/src/CoarseningManager1d.cc index 8d4972d1..471aac93 100644 --- a/AMDiS/src/CoarseningManager1d.cc +++ b/AMDiS/src/CoarseningManager1d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "CoarseningManager1d.h" diff --git a/AMDiS/src/CoarseningManager1d.h b/AMDiS/src/CoarseningManager1d.h index 1fa47be2..b114ca81 100644 --- a/AMDiS/src/CoarseningManager1d.h +++ b/AMDiS/src/CoarseningManager1d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CoarseningManager2d.cc b/AMDiS/src/CoarseningManager2d.cc index 9e15da44..b7aaee77 100644 --- a/AMDiS/src/CoarseningManager2d.cc +++ b/AMDiS/src/CoarseningManager2d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "CoarseningManager2d.h" diff --git a/AMDiS/src/CoarseningManager2d.h b/AMDiS/src/CoarseningManager2d.h index 593f1b04..36ff95f8 100644 --- a/AMDiS/src/CoarseningManager2d.h +++ b/AMDiS/src/CoarseningManager2d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CoarseningManager3d.cc b/AMDiS/src/CoarseningManager3d.cc index 914ed3e0..85bd84e0 100644 --- a/AMDiS/src/CoarseningManager3d.cc +++ b/AMDiS/src/CoarseningManager3d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "CoarseningManager3d.h" diff --git a/AMDiS/src/CoarseningManager3d.h b/AMDiS/src/CoarseningManager3d.h index 54f6a3d6..6560205a 100644 --- a/AMDiS/src/CoarseningManager3d.h +++ b/AMDiS/src/CoarseningManager3d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Collection.h b/AMDiS/src/Collection.h index 4e2c5c1b..cb71ae94 100644 --- a/AMDiS/src/Collection.h +++ b/AMDiS/src/Collection.h @@ -1,21 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// ============================================================================ -// == == -// == TU Dresden == -// == == -// == Institut für Wissenschaftliches Rechnen == -// == Zellescher Weg 12-14 == -// == 01069 Dresden == -// == germany == -// == == -// ============================================================================ -// == == -// == https://gforge.zih.tu-dresden.de/projects/amdis/ == -// == == -// ============================================================================ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef AMDIS_COLLECTION_H #define AMDIS_COLLECTION_H diff --git a/AMDiS/src/ComponentTraverseInfo.cc b/AMDiS/src/ComponentTraverseInfo.cc index a5545173..262d05ed 100644 --- a/AMDiS/src/ComponentTraverseInfo.cc +++ b/AMDiS/src/ComponentTraverseInfo.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ComponentTraverseInfo.h" diff --git a/AMDiS/src/ComponentTraverseInfo.h b/AMDiS/src/ComponentTraverseInfo.h index 43485543..991bfe64 100644 --- a/AMDiS/src/ComponentTraverseInfo.h +++ b/AMDiS/src/ComponentTraverseInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Containers.h b/AMDiS/src/Containers.h index 88782f99..1eb85106 100644 --- a/AMDiS/src/Containers.h +++ b/AMDiS/src/Containers.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CouplingIterationInterface.cc b/AMDiS/src/CouplingIterationInterface.cc index ab2f68b6..0cc7f737 100644 --- a/AMDiS/src/CouplingIterationInterface.cc +++ b/AMDiS/src/CouplingIterationInterface.cc @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CouplingIterationInterface.h b/AMDiS/src/CouplingIterationInterface.h index aa2e29bd..b19eb44d 100644 --- a/AMDiS/src/CouplingIterationInterface.h +++ b/AMDiS/src/CouplingIterationInterface.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CouplingProblemStat.h b/AMDiS/src/CouplingProblemStat.h index f4a02c1f..10d04cc8 100644 --- a/AMDiS/src/CouplingProblemStat.h +++ b/AMDiS/src/CouplingProblemStat.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CouplingTimeInterface.h b/AMDiS/src/CouplingTimeInterface.h index c1f4c5b0..fe3187d7 100644 --- a/AMDiS/src/CouplingTimeInterface.h +++ b/AMDiS/src/CouplingTimeInterface.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/CreatorInterface.h b/AMDiS/src/CreatorInterface.h index 70a0c4d9..e9d19967 100644 --- a/AMDiS/src/CreatorInterface.h +++ b/AMDiS/src/CreatorInterface.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -33,9 +35,9 @@ namespace AMDiS { * The creation of an object of a sub class of BaseClass is deligated * to a corresponding sub class of Creator. So it is possible to * manage a CreatorMap, which can be extended at run-time. An example is - * the OEMSolverMap: If you write your own OEMSolver sub class and a - * corresponding Creator >, you can add the creator together - * with a key string to the OEMSolverMap. Then you can create an OEMSolver + * the LinearSolverMap: If you write your own LinearSolver sub class and a + * corresponding Creator >, you can add the creator together + * with a key string to the LinearSolverMap. Then you can create an LinearSolver * depending of a key string read from the init file, which can also be * your own new solver. */ @@ -88,6 +90,28 @@ namespace AMDiS { } }; + + /** + * \ingroup Common + * + * \brief + * Interface for creators with name. + */ + template< typename BaseClass > + class CreatorInterfaceName : public CreatorInterface + { + public: + virtual ~CreatorInterfaceName() {} + + /// Sets \ref name + void setName(std::string str) + { + name = str; + } + + protected: + std::string name; + }; } #endif diff --git a/AMDiS/src/CreatorMap.cc b/AMDiS/src/CreatorMap.cc index ff18226c..2c1f76c0 100644 --- a/AMDiS/src/CreatorMap.cc +++ b/AMDiS/src/CreatorMap.cc @@ -1,98 +1,130 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "CreatorMap.h" #include "MTL4Types.h" -#include "OEMSolver.h" -#include "ITL_Solver.h" -#include "ITL_Preconditioner.h" +#include "solver/LinearSolver.h" +#include "solver/ITL_Solver.h" +#include "solver/ITL_Preconditioner.h" +#include "solver/UmfPackSolver.h" +#include "solver/KrylovPreconditioner.h" #include "MatrixVector.h" #include "SystemVector.h" -#include "est/Estimator.h" #include "LeafData.h" #include "SurfaceRegion_ED.h" #include "ElementRegion_ED.h" #include "DOFMatrix.h" -#include "UmfPackSolver.h" +#include "est/Estimator.h" #include "est/RecoveryEstimator.h" #include "est/ResidualEstimator.h" #include "est/SimpleResidualEstimator.h" #include "time/RosenbrockMethod.h" #include "nonlin/NonLinSolver.h" -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS - #include "parallel/PetscSolverFeti.h" - #include "parallel/PetscSolverGlobalBlockMatrix.h" - #include "parallel/PetscSolverGlobalMatrix.h" - #include "parallel/PetscSolverNavierStokes.h" - #include "parallel/PetscSolverSchur.h" - #include "parallel/BddcMlSolver.h" +#ifdef HAVE_PETSC + #include "solver/PetscSolver.h" #endif +#ifdef MTL_HAS_HYPRE + #include "solver/HypreSolver.h" +#endif + +#if defined HAVE_PARALLEL_PETSC || defined HAVE_PETSC + #include "solver/PetscTypes.h" +#endif namespace AMDiS { template<> - void CreatorMap::addDefaultCreators() + void CreatorMap::addDefaultCreators() { - OEMSolverCreator *creator; + LinearSolverCreator *creator; creator = new CGSolver::Creator; - addCreator("cg", creator); + addCreator("mtl_cg", creator); creator = new CGSSolver::Creator; - addCreator("cgs", creator); + addCreator("mtl_cgs", creator); creator = new BiCGSolver::Creator; - addCreator("bicg", creator); + addCreator("mtl_bicg", creator); creator = new BiCGStabSolver::Creator; - addCreator("bicgstab", creator); + addCreator("mtl_bicgstab", creator); creator = new BiCGStab2Solver::Creator; - addCreator("bicgstab2", creator); + addCreator("mtl_bicgstab2", creator); creator = new BiCGStabEllSolver::Creator; - addCreator("bicgstab_ell", creator); + addCreator("mtl_bicgstab_ell", creator); creator = new QMRSolver::Creator; - addCreator("qmr", creator); + addCreator("mtl_qmr", creator); creator = new TFQMRSolver::Creator; - addCreator("tfqmr", creator); + addCreator("mtl_tfqmr", creator); creator = new GMResSolver::Creator; - addCreator("gmres", creator); + addCreator("mtl_gmres", creator); + creator = new GcrSolver::Creator; + addCreator("mtl_gcr", creator); + + creator = new FGMResSolver::Creator; + addCreator("mtl_fgmres", creator); + creator = new IDRsSolver::Creator; - addCreator("idr_s", creator); + addCreator("mtl_idr_s", creator); creator = new MinResSolver::Creator; - addCreator("minres", creator); + addCreator("mtl_minres", creator); + + creator = new PreOnly::Creator; + addCreator("mtl_preonly", creator); + addCreator("mtl_richardson", creator); #ifdef HAVE_UMFPACK creator = new UmfPackSolver::Creator; - addCreator("umfpack", creator); + addCreator("mtl_umfpack", creator); + addCreator("mtl_direct", creator); #endif -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS - addCreator("petsc", new PetscSolverGlobalMatrix::Creator); - addCreator("petsc-schur", new PetscSolverSchur::Creator); - addCreator("petsc-block", new PetscSolverGlobalBlockMatrix::Creator); - addCreator("petsc-feti", new PetscSolverFeti::Creator); - #ifdef HAVE_BDDC_ML - addCreator("bddcml", new BddcMlSolver::Creator); - #endif - addCreator("petsc-navierstokes", new PetscSolverNavierStokes::Creator); +#ifdef MTL_HAS_HYPRE + creator = new HypreSolver::Creator; + addCreator("mtl_hypre", creator); +#endif + +#if defined HAVE_PETSC + // sequential PETSc-Solver + creator = new PetscSolver<>::Creator; + addCreator("petsc_petsc", creator); // standard creator for petsc solver + addCreator("petsc", creator); + + std::map::iterator it; + PetscParameters params; + for (it = params.solverMap.begin(); + it!= params.solverMap.end(); + it++) { + CreatorMap< LinearSolver >::addCreator("petsc_" + it->first, creator); + } #endif } @@ -113,6 +145,10 @@ namespace AMDiS { creator = new IdentityPreconditioner::Creator; addCreator("no", creator); + + creator = new KrylovPreconditionerSeq::Creator; + addCreator("krylov", creator); + addCreator("solver", creator); } diff --git a/AMDiS/src/CreatorMap.h b/AMDiS/src/CreatorMap.h index 35a4d7e8..e87de3a9 100644 --- a/AMDiS/src/CreatorMap.h +++ b/AMDiS/src/CreatorMap.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -32,7 +34,7 @@ namespace AMDiS { /** \ingroup Common * \brief * A CreatorMap is used to construct objects, which types depends on key words - * determined at run time. For example the OEMSolverMap can create the different + * determined at run time. For example the LinearSolverMap can create the different * solver types depending on the solver parameter of the init file. The benefit * of such creator maps is, that you can extend them only by writing an creator * class for your own new class and give the creator together with a key word diff --git a/AMDiS/src/CreatorMap.hh b/AMDiS/src/CreatorMap.hh index fcf31b87..fcce10e8 100644 --- a/AMDiS/src/CreatorMap.hh +++ b/AMDiS/src/CreatorMap.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/CylinderProject.h b/AMDiS/src/CylinderProject.h index 56907306..a2214551 100644 --- a/AMDiS/src/CylinderProject.h +++ b/AMDiS/src/CylinderProject.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/DOFAdmin.cc b/AMDiS/src/DOFAdmin.cc index 7ce8c2fd..54b4287f 100644 --- a/AMDiS/src/DOFAdmin.cc +++ b/AMDiS/src/DOFAdmin.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/DOFAdmin.h b/AMDiS/src/DOFAdmin.h index 1dbdb960..4258985f 100644 --- a/AMDiS/src/DOFAdmin.h +++ b/AMDiS/src/DOFAdmin.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/DOFContainer.h b/AMDiS/src/DOFContainer.h index 4ff18098..60dba6b3 100644 --- a/AMDiS/src/DOFContainer.h +++ b/AMDiS/src/DOFContainer.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/DOFIndexed.cc b/AMDiS/src/DOFIndexed.cc index b5203910..c1b69316 100644 --- a/AMDiS/src/DOFIndexed.cc +++ b/AMDiS/src/DOFIndexed.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "DOFIndexed.h" diff --git a/AMDiS/src/DOFIndexed.h b/AMDiS/src/DOFIndexed.h index bfc0fc88..56650f61 100644 --- a/AMDiS/src/DOFIndexed.h +++ b/AMDiS/src/DOFIndexed.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/DOFIterator.h b/AMDiS/src/DOFIterator.h index 815fe658..27bb24cd 100644 --- a/AMDiS/src/DOFIterator.h +++ b/AMDiS/src/DOFIterator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/DOFMatrix.cc b/AMDiS/src/DOFMatrix.cc index efe26cbc..b7aace6a 100644 --- a/AMDiS/src/DOFMatrix.cc +++ b/AMDiS/src/DOFMatrix.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/DOFMatrix.h b/AMDiS/src/DOFMatrix.h index ec6b1914..32dd045f 100644 --- a/AMDiS/src/DOFMatrix.h +++ b/AMDiS/src/DOFMatrix.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -36,6 +38,7 @@ #include "DOFIndexed.h" #include "Boundary.h" #include "Serializable.h" +#include "MTL4Types.h" namespace AMDiS { @@ -52,9 +55,9 @@ namespace AMDiS { { public: /// Type of scalars in the underlying matrix - typedef double value_type; + typedef MTLTypes::value_type value_type; // double - typedef unsigned size_type; + typedef MTLTypes::size_type size_type; // unsigned (long) typedef mtl::matrix::parameters para; /// Type of underlying matrix @@ -74,7 +77,7 @@ namespace AMDiS { public: DOFMatrix(); - /// Constructs a DOFMatrix with name n and the given row and olumn FeSpaces. + /// Constructs a DOFMatrix with name n and the given row and column FeSpaces. DOFMatrix(const FiniteElemSpace* rowFeSpace, const FiniteElemSpace* colFeSpace, string n = ""); diff --git a/AMDiS/src/DOFVector.cc b/AMDiS/src/DOFVector.cc index 03435cfe..192a7f8a 100644 --- a/AMDiS/src/DOFVector.cc +++ b/AMDiS/src/DOFVector.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -103,7 +112,7 @@ namespace AMDiS { #ifdef HAVE_PARALLEL_DOMAIN_AMDIS return 0.0; #else - throw(std::runtime_error("Can not eval DOFVector at point p, because point is outside geometry.")); + ERROR_EXIT("Can not eval DOFVector at point p, because point is outside geometry."); #endif } @@ -146,8 +155,9 @@ namespace AMDiS { for (int i = 0; i < nBasFcts; i++) uh[i] = operator[](localIndices[i]); value = basFcts->evalUh(lambda, uh); - } else - throw(std::runtime_error("Can not eval DOFVector at point p, because point is outside geometry.")); + } else { + ERROR_EXIT("Can not eval DOFVector at point p, because point is outside geometry."); + } if (oldElInfo == NULL) delete elInfo; diff --git a/AMDiS/src/DOFVector.h b/AMDiS/src/DOFVector.h index 5b82c344..1a4473ac 100644 --- a/AMDiS/src/DOFVector.h +++ b/AMDiS/src/DOFVector.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -605,7 +607,7 @@ namespace AMDiS { /// Writes the data of the DOFVector to an output stream. void serialize(ostream &out) { - unsigned int size = vec.size(); + unsigned int size = static_cast(vec.size()); out.write(reinterpret_cast(&size), sizeof(unsigned int)); out.write(reinterpret_cast(&(vec[0])), size * sizeof(T)); } @@ -864,7 +866,7 @@ namespace AMDiS { std::vector*> *res); - /// Computes the integral: \f$ \int f(\vec{x})\,\text{d}\vec{x}\f$ + /// Computes the integral: \f$ \int f(\vec{x})\,d\vec{x}\f$ template TOut integrate_Coords(const FiniteElemSpace* feSpace, AbstractFunction > *fct); @@ -876,7 +878,7 @@ namespace AMDiS { return integrate_Coords(feSpace, fct); } - /// Computes the integral: \f$ \int f(v(\vec{x}))\,\text{d}\vec{x}\f$ + /// Computes the integral: \f$ \int f(v(\vec{x}))\,d\vec{x}\f$ template TOut integrate_Vec(const DOFVector &vec, AbstractFunction *fct); @@ -890,7 +892,7 @@ namespace AMDiS { /** \brief * Computes the integral of a function that includes two different DOFVectors: - * \f$ \int f(v(\vec{x}), w(\vec{x}))\,\text{d}\vec{x}\f$ + * \f$ \int f(v(\vec{x}), w(\vec{x}))\,d\vec{x}\f$ * This function works also for the case that the DOFVectors are defined on * two different meshes. */ @@ -921,22 +923,22 @@ namespace AMDiS { const DOFVector &vec2, BinaryAbstractFunction *fct); - /// Computes the integral: \f$ \int v(\vec{x}) f(\vec{x})\,\text{d}\vec{x}\f$ + /// Computes the integral: \f$ \int v(\vec{x}) f(\vec{x})\,d\vec{x}\f$ template typename ProductType::type integrate_VecTimesCoords(const DOFVector &vec, AbstractFunction > *fct); - /// Computes the integral: \f$ \int f(v(\vec{x}), \vec{x})\,\text{d}\vec{x}\f$ + /// Computes the integral: \f$ \int f(v(\vec{x}), \vec{x})\,d\vec{x}\f$ template TOut integrate_VecAndCoords(const DOFVector &vec, BinaryAbstractFunction > *fct); - /// Computes the integral: \f$ \int f(\{v_i(\vec{x})\}_i)\,\text{d}\vec{x}\f$ + /// Computes the integral: \f$ \int f(\{v_i(\vec{x})\}_i)\,d\vec{x}\f$ double integrateGeneral(const std::vector*> &vecs, AbstractFunction > *fct); /// Computes the integral: - /// \f$ \int f(\{v_i(\vec{x})\}_i,\{\nabla w_i(\vec{x})\}_i)\,\text{d}\vec{x}\f$ + /// \f$ \int f(\{v_i(\vec{x})\}_i,\{\nabla w_i(\vec{x})\}_i)\,d\vec{x}\f$ double integrateGeneralGradient(const std::vector*> &vecs, const std::vector*> &grds, BinaryAbstractFunction, std::vector > > *fct); diff --git a/AMDiS/src/DOFVector.hh b/AMDiS/src/DOFVector.hh index 63c500b5..8256c994 100644 --- a/AMDiS/src/DOFVector.hh +++ b/AMDiS/src/DOFVector.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -511,7 +520,7 @@ namespace AMDiS { } #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(result); + Parallel::mpi::globalAdd(result); #endif return result; @@ -551,7 +560,7 @@ namespace AMDiS { } #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(value); + Parallel::mpi::globalAdd(value); #endif return value; @@ -592,7 +601,7 @@ namespace AMDiS { } #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(value); + Parallel::mpi::globalAdd(value); #endif return value; @@ -647,7 +656,7 @@ namespace AMDiS { } #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(value); + Parallel::mpi::globalAdd(value); #endif return value; @@ -694,7 +703,7 @@ namespace AMDiS { } #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(value); + Parallel::mpi::globalAdd(value); #endif return value; @@ -741,7 +750,7 @@ namespace AMDiS { } #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(value); + Parallel::mpi::globalAdd(value); #endif return value; @@ -784,7 +793,7 @@ namespace AMDiS { } #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(value); + Parallel::mpi::globalAdd(value); #endif return value; @@ -1575,7 +1584,6 @@ namespace AMDiS { const BasisFunction *basFcts = feSpace->getBasisFcts(); int nBasFcts = basFcts->getNumber(); - int dow = Global::getGeo(WORLD); int nPoints = quadFast ? quadFast->getQuadrature()->getNumPoints() : quad->getNumPoints(); mtl::dense_vector localVec(nBasFcts); @@ -1640,7 +1648,6 @@ namespace AMDiS { const BasisFunction *basFcts = feSpace->getBasisFcts(); int nBasFcts = basFcts->getNumber(); - int dow = Global::getGeo(WORLD); int nPoints = quadFast ? quadFast->getQuadrature()->getNumPoints() : quad->getNumPoints(); mtl::dense_vector localVec(nBasFcts); @@ -1915,7 +1922,6 @@ namespace AMDiS { TEST_EXIT_DBG(vec)("no vector\n"); - int dow = Global::getGeo(WORLD); static std::vector*> *result = NULL; int len = num_rows(GradientType::getValues((*vec)[0])); diff --git a/AMDiS/src/Debug.cc b/AMDiS/src/Debug.cc index 9ae45a1a..be47c930 100644 --- a/AMDiS/src/Debug.cc +++ b/AMDiS/src/Debug.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/Debug.h b/AMDiS/src/Debug.h index ac58488f..ff30664c 100644 --- a/AMDiS/src/Debug.h +++ b/AMDiS/src/Debug.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/DirichletBC.cc b/AMDiS/src/DirichletBC.cc index 83a010d3..e92c249f 100644 --- a/AMDiS/src/DirichletBC.cc +++ b/AMDiS/src/DirichletBC.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "DirichletBC.h" diff --git a/AMDiS/src/DirichletBC.h b/AMDiS/src/DirichletBC.h index fdd7881a..deef6f05 100644 --- a/AMDiS/src/DirichletBC.h +++ b/AMDiS/src/DirichletBC.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/DualTraverse.cc b/AMDiS/src/DualTraverse.cc index ee154181..c1be056c 100644 --- a/AMDiS/src/DualTraverse.cc +++ b/AMDiS/src/DualTraverse.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "DualTraverse.h" diff --git a/AMDiS/src/DualTraverse.h b/AMDiS/src/DualTraverse.h index daff0fab..64d84f0a 100644 --- a/AMDiS/src/DualTraverse.h +++ b/AMDiS/src/DualTraverse.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElInfo.cc b/AMDiS/src/ElInfo.cc index ff343404..ce3212bb 100644 --- a/AMDiS/src/ElInfo.cc +++ b/AMDiS/src/ElInfo.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElInfo.h" diff --git a/AMDiS/src/ElInfo.h b/AMDiS/src/ElInfo.h index 776ddcdc..70d0986f 100644 --- a/AMDiS/src/ElInfo.h +++ b/AMDiS/src/ElInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElInfo1d.cc b/AMDiS/src/ElInfo1d.cc index 4a2c65cd..d1e9b076 100644 --- a/AMDiS/src/ElInfo1d.cc +++ b/AMDiS/src/ElInfo1d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElInfo1d.h" diff --git a/AMDiS/src/ElInfo1d.h b/AMDiS/src/ElInfo1d.h index bb79aec8..c4bc3115 100644 --- a/AMDiS/src/ElInfo1d.h +++ b/AMDiS/src/ElInfo1d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElInfo2d.cc b/AMDiS/src/ElInfo2d.cc index 2e1c5fee..83864e3d 100644 --- a/AMDiS/src/ElInfo2d.cc +++ b/AMDiS/src/ElInfo2d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElInfo2d.h" diff --git a/AMDiS/src/ElInfo2d.h b/AMDiS/src/ElInfo2d.h index c7628110..8d9b9254 100644 --- a/AMDiS/src/ElInfo2d.h +++ b/AMDiS/src/ElInfo2d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElInfo3d.cc b/AMDiS/src/ElInfo3d.cc index 76509ff9..f05c937f 100644 --- a/AMDiS/src/ElInfo3d.cc +++ b/AMDiS/src/ElInfo3d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/ElInfo3d.h b/AMDiS/src/ElInfo3d.h index cd5f6f32..270352ea 100644 --- a/AMDiS/src/ElInfo3d.h +++ b/AMDiS/src/ElInfo3d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElInfoStack.cc b/AMDiS/src/ElInfoStack.cc index 3497d6fa..235e6c04 100644 --- a/AMDiS/src/ElInfoStack.cc +++ b/AMDiS/src/ElInfoStack.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElInfoStack.h" diff --git a/AMDiS/src/ElInfoStack.h b/AMDiS/src/ElInfoStack.h index 943f7a6c..b00c911c 100644 --- a/AMDiS/src/ElInfoStack.h +++ b/AMDiS/src/ElInfoStack.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Element.cc b/AMDiS/src/Element.cc index e48eeeaa..4e3b608c 100644 --- a/AMDiS/src/Element.cc +++ b/AMDiS/src/Element.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Element.h" diff --git a/AMDiS/src/Element.h b/AMDiS/src/Element.h index 6c206d5d..c2ff5f24 100644 --- a/AMDiS/src/Element.h +++ b/AMDiS/src/Element.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Element.hh b/AMDiS/src/Element.hh index 53d46b77..cd7379d0 100644 --- a/AMDiS/src/Element.hh +++ b/AMDiS/src/Element.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ namespace AMDiS { diff --git a/AMDiS/src/ElementData.cc b/AMDiS/src/ElementData.cc index e0370882..35da52ff 100644 --- a/AMDiS/src/ElementData.cc +++ b/AMDiS/src/ElementData.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElementData.h" diff --git a/AMDiS/src/ElementData.h b/AMDiS/src/ElementData.h index 0fed27f7..6b3fd666 100644 --- a/AMDiS/src/ElementData.h +++ b/AMDiS/src/ElementData.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElementDofIterator.cc b/AMDiS/src/ElementDofIterator.cc index 3a752478..c751e3c3 100644 --- a/AMDiS/src/ElementDofIterator.cc +++ b/AMDiS/src/ElementDofIterator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElementDofIterator.h" diff --git a/AMDiS/src/ElementDofIterator.h b/AMDiS/src/ElementDofIterator.h index b7579a3d..8e0731c7 100644 --- a/AMDiS/src/ElementDofIterator.h +++ b/AMDiS/src/ElementDofIterator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElementFunction.h b/AMDiS/src/ElementFunction.h index 5463c204..2b9d7c34 100644 --- a/AMDiS/src/ElementFunction.h +++ b/AMDiS/src/ElementFunction.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElementInfo.h b/AMDiS/src/ElementInfo.h index 08990ef0..4bae41ce 100644 --- a/AMDiS/src/ElementInfo.h +++ b/AMDiS/src/ElementInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ElementRegion_ED.cc b/AMDiS/src/ElementRegion_ED.cc index ac51aaad..02be41c9 100644 --- a/AMDiS/src/ElementRegion_ED.cc +++ b/AMDiS/src/ElementRegion_ED.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElementRegion_ED.h" diff --git a/AMDiS/src/ElementRegion_ED.h b/AMDiS/src/ElementRegion_ED.h index 9f752749..0bfcd86d 100644 --- a/AMDiS/src/ElementRegion_ED.h +++ b/AMDiS/src/ElementRegion_ED.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/EmptyElementData.h b/AMDiS/src/EmptyElementData.h index 660a18c9..f4e5e047 100644 --- a/AMDiS/src/EmptyElementData.h +++ b/AMDiS/src/EmptyElementData.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Error.h b/AMDiS/src/Error.h index bb9e32ab..05c88835 100644 --- a/AMDiS/src/Error.h +++ b/AMDiS/src/Error.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Error.hh b/AMDiS/src/Error.hh index a8062d22..87fad6b8 100644 --- a/AMDiS/src/Error.hh +++ b/AMDiS/src/Error.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Mesh.h" @@ -334,7 +343,7 @@ namespace AMDiS { q = Quadrature::provideQuadrature(dim, degree); quadFast = FastQuadrature::provideFastQuadrature(basFct, *q, INIT_PHI); - double maxErr = 0.0, l2Err2 = 0.0, l2Norm2 = 0.0; + double maxErr = 0.0, l2Err2 = 0.0; double *u_vec = new double[quadFast->getQuadrature()->getNumPoints()]; int nPoints = quadFast->getNumPoints(); mtl::dense_vector uh_vec(nPoints); @@ -357,7 +366,7 @@ namespace AMDiS { quadFast->getQuadrature()->fAtQp(errU, u_vec); errUh->getVecAtQPs(elInfo, NULL, quadFast, uh_vec); double det = elInfo->getDet(); - double l2_err_el = 0.0, err = 0.0; + double l2_err_el = 0.0; double int_u_vec = 0.0; double int_uh_vec = 0.0; diff --git a/AMDiS/src/FiniteElemSpace.cc b/AMDiS/src/FiniteElemSpace.cc index 62c9c057..f0af79c3 100644 --- a/AMDiS/src/FiniteElemSpace.cc +++ b/AMDiS/src/FiniteElemSpace.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "FiniteElemSpace.h" diff --git a/AMDiS/src/FiniteElemSpace.h b/AMDiS/src/FiniteElemSpace.h index ddcb9c9d..b7b9c1af 100644 --- a/AMDiS/src/FiniteElemSpace.h +++ b/AMDiS/src/FiniteElemSpace.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/FirstOrderAssembler.cc b/AMDiS/src/FirstOrderAssembler.cc index 5d5a225f..11b3f209 100644 --- a/AMDiS/src/FirstOrderAssembler.cc +++ b/AMDiS/src/FirstOrderAssembler.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/FirstOrderAssembler.h b/AMDiS/src/FirstOrderAssembler.h index 61f2aaae..e1646192 100644 --- a/AMDiS/src/FirstOrderAssembler.h +++ b/AMDiS/src/FirstOrderAssembler.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/FirstOrderTerm.cc b/AMDiS/src/FirstOrderTerm.cc index d88e4a0b..425bb518 100644 --- a/AMDiS/src/FirstOrderTerm.cc +++ b/AMDiS/src/FirstOrderTerm.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "FirstOrderTerm.h" diff --git a/AMDiS/src/FirstOrderTerm.h b/AMDiS/src/FirstOrderTerm.h index 34085b2f..20df9d00 100644 --- a/AMDiS/src/FirstOrderTerm.h +++ b/AMDiS/src/FirstOrderTerm.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/FixVec.cc b/AMDiS/src/FixVec.cc index 6209ea20..d166434b 100644 --- a/AMDiS/src/FixVec.cc +++ b/AMDiS/src/FixVec.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/FixVec.h b/AMDiS/src/FixVec.h index 27c14317..1eb22dfa 100644 --- a/AMDiS/src/FixVec.h +++ b/AMDiS/src/FixVec.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -533,14 +535,6 @@ namespace AMDiS { return result; } -// inline WorldVector operator+(const WorldVector& v1, -// const WorldVector& v2) -// { -// WorldVector result = v1; -// result += v2; -// return result; -// } - template WorldVector operator-(const WorldVector& v1, const WorldVector& v2) diff --git a/AMDiS/src/FixVec.hh b/AMDiS/src/FixVec.hh index 38407269..d220463a 100644 --- a/AMDiS/src/FixVec.hh +++ b/AMDiS/src/FixVec.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ namespace AMDiS { diff --git a/AMDiS/src/FixVecConvert.h b/AMDiS/src/FixVecConvert.h index 53726214..dcf352f7 100644 --- a/AMDiS/src/FixVecConvert.h +++ b/AMDiS/src/FixVecConvert.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Flag.h b/AMDiS/src/Flag.h index d3492af6..e1edc054 100644 --- a/AMDiS/src/Flag.h +++ b/AMDiS/src/Flag.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Functors.h b/AMDiS/src/Functors.h index 726208d1..fc74c8a1 100644 --- a/AMDiS/src/Functors.h +++ b/AMDiS/src/Functors.h @@ -1,4 +1,22 @@ -/** \file Functors.h */ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef AMDIS_FUNCTORS_H #define AMDIS_FUNCTORS_H diff --git a/AMDiS/src/Global.cc b/AMDiS/src/Global.cc index e813c8cf..947162ec 100644 --- a/AMDiS/src/Global.cc +++ b/AMDiS/src/Global.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -20,8 +29,8 @@ #include "Line.h" #include "Triangle.h" #include "Tetrahedron.h" -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS -#include "petsc.h" +#ifdef HAVE_PARALLEL_PETSC + #include "petsc.h" #endif namespace AMDiS { @@ -178,7 +187,7 @@ namespace AMDiS { vsprintf(buff, format, arg); PRINT_LINE((*error), buff); va_end(arg); -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS +#if defined HAVE_PARALLEL_DOMAIN_AMDIS && !defined HAVE_PARALLEL_MTL4 PetscError(MPI_COMM_WORLD, __LINE__, "Msg::print_error_exit", "Global.cc", "src/", 1, PETSC_ERROR_INITIAL, buff); #else throw std::runtime_error(buff); diff --git a/AMDiS/src/Global.h b/AMDiS/src/Global.h index ba671e6a..c0af4d7b 100644 --- a/AMDiS/src/Global.h +++ b/AMDiS/src/Global.h @@ -1,21 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /** \file Global.h */ diff --git a/AMDiS/src/GlobalDOFNumbering.cc b/AMDiS/src/GlobalDOFNumbering.cc index aa66e599..2e6781c7 100644 --- a/AMDiS/src/GlobalDOFNumbering.cc +++ b/AMDiS/src/GlobalDOFNumbering.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "GlobalDOFNumbering.h" diff --git a/AMDiS/src/GlobalDOFNumbering.h b/AMDiS/src/GlobalDOFNumbering.h index 95dd8b19..3e044cba 100644 --- a/AMDiS/src/GlobalDOFNumbering.h +++ b/AMDiS/src/GlobalDOFNumbering.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/GlobalElementNumbering.cc b/AMDiS/src/GlobalElementNumbering.cc index 88807f84..eb2a30c7 100644 --- a/AMDiS/src/GlobalElementNumbering.cc +++ b/AMDiS/src/GlobalElementNumbering.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "GlobalElementNumbering.h" diff --git a/AMDiS/src/GlobalElementNumbering.h b/AMDiS/src/GlobalElementNumbering.h index 6a76e955..5ae4fae9 100644 --- a/AMDiS/src/GlobalElementNumbering.h +++ b/AMDiS/src/GlobalElementNumbering.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ITL_OEMSolver.h b/AMDiS/src/ITL_OEMSolver.h deleted file mode 100644 index 8e5d7fe5..00000000 --- a/AMDiS/src/ITL_OEMSolver.h +++ /dev/null @@ -1,129 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -/** \file ITL_OEMSolver.h */ - - -#ifndef AMDIS_ITL_OEM_SOLVER_H -#define AMDIS_ITL_OEM_SOLVER_H - -#include "MTL4Solver.h" -#include "ITL_OEMSolver.hh" -#include "MTL4Types.h" - -#include -#include - -namespace AMDiS { - - /** - * \ingroup Solver - * - *\brief - * Template for using solvers from ITL in AMDiS. - * Uses a previous definition of MTLMatrix and MTLVector. - * Additional template generalization of ITL_OEMSolver destroys class hierarchy - */ - - template - class ITL_OEMSolver : public MTL4Solver< MTLTypes::MTLMatrix, MTLTypes::MTLVector, ITL_OEMSolver_runner< ITLSolver, MTLTypes::MTLMatrix, MTLTypes::MTLVector> > { - - protected: - public: - /// The constructor reads needed parameters and sets solvers \ref name. - ITL_OEMSolver(std::string name) : - MTL4Solver< MTLTypes::MTLMatrix, MTLTypes::MTLVector, ITL_OEMSolver_runner< ITLSolver, MTLTypes::MTLMatrix, MTLTypes::MTLVector > >(name) {} - - int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - VectorialMapper& m, - bool createMatrixData, - bool storeMatrixData) - { - return MTL4Solver< MTLTypes::MTLMatrix, MTLTypes::MTLVector, ITL_OEMSolver_runner< ITLSolver, MTLTypes::MTLMatrix, MTLTypes::MTLVector > >::solve(A, x, b, m, createMatrixData, storeMatrixData); - } - - - ~ITL_OEMSolver() {} - - - /// Creator class used in the OEMSolverMap. - class Creator : public OEMSolverCreator - { - public: - virtual ~Creator() {} - - /// Returns a new CGSolver object. - OEMSolver* create() - { - return new ITL_OEMSolver(this->name); - } - }; - - }; - - /** - * \ingroup Solver - * - *\brief - * Template for using solvers from ITL that have one run-time parameter in AMDiS. - */ - template - class ITL_OEMSolver_para - : public MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_para_runner< ITLSolver, MTLTypes::MTLMatrix, MTLTypes::MTLVector > > // ITL_OEMSolver - { - public: - /// The constructor reads needed parameters and sets solvers \ref name. - ITL_OEMSolver_para(std::string name) - : MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_para_runner< ITLSolver, MTLTypes::MTLMatrix, MTLTypes::MTLVector > >(name) - {} - - int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - VectorialMapper& m, - bool createMatrixData, - bool storeMatrixData) - { - return MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_para_runner< ITLSolver, MTLTypes::MTLMatrix, MTLTypes::MTLVector > >::solve(A, x, b, m, createMatrixData, storeMatrixData); - } - - ~ITL_OEMSolver_para() {} - - /// Set parameter of iterative solver - - class Creator : public OEMSolverCreator - { - public: - virtual ~Creator() {} - - /// Returns a new CGSolver object. - OEMSolver* create() - { - return new ITL_OEMSolver_para(this->name); - } - }; - - private: - }; -} // namespace AMDiS - -#endif // AMDIS_ITL_OEM_SOLVER_H diff --git a/AMDiS/src/ITL_OEMSolver.hh b/AMDiS/src/ITL_OEMSolver.hh deleted file mode 100644 index 851d8e3e..00000000 --- a/AMDiS/src/ITL_OEMSolver.hh +++ /dev/null @@ -1,187 +0,0 @@ -#include "ITL_Preconditioner.h" - -namespace AMDiS { - template< typename Vector > - struct PreconPair { - /// Pointer to the left preconditioner - ITL_BasePreconditioner< Vector >* l; - - /// Pointer to the right preconditioner - ITL_BasePreconditioner< Vector >* r; - PreconPair(): - l(NULL), r(NULL) - {} - - }; - - struct BaseITL_runner { - OEMSolver& oem; - BaseITL_runner(OEMSolver* oemPtr): - oem(*oemPtr) - { - TEST_EXIT(oemPtr != NULL)("need a real oemsolver\n"); - } - - template< typename Vector , typename Matrix > - void setPrecon(PreconPair< Vector >& pair, const Matrix& matrix) - { - /// Creator for the left preconditioner - CreatorInterface< ITL_BasePreconditioner >* leftCreator(NULL); - - /// Creator for the right preconditioner - CreatorInterface< ITL_BasePreconditioner >* rightCreator(NULL); - - std::string preconType("no"); - std::string initFileStr = oem.getName() + "->left precon"; - Parameters::get(initFileStr, preconType); - leftCreator = - CreatorMap >::getCreator(preconType, initFileStr); - TEST_EXIT(leftCreator != NULL) - ("there is no creator for the given left preconditioner"); - - preconType = "no"; - initFileStr = oem.getName() + "->right precon"; - Parameters::get(initFileStr, preconType); - rightCreator = - CreatorMap >::getCreator(preconType, initFileStr); - TEST_EXIT(rightCreator != NULL) - ("there is no creator for the given right preconditioner"); - - pair.l = leftCreator->create(matrix); - pair.r = rightCreator->create(matrix); - } - }; - - template< typename ITLSolver, typename Matrix, typename Vector > - struct ITL_OEMSolver_para_runner : BaseITL_runner { - ITL_OEMSolver_para_runner(OEMSolver* oem_): - BaseITL_runner(oem_), - ell(1) - { - ell = oem.getMaxIterations(); - Parameters::get(oem.getName() + "->ell", ell); - } - - void init(const Matrix& A) - { - BaseITL_runner::setPrecon(preconPair, A); - - if (preconPair.l != NULL) - preconPair.l->init(); - if (preconPair.r != NULL) - preconPair.r->init(); - } - - int solve(const Matrix& A, Vector& x, Vector& b) - { - FUNCNAME("ITL_OEMSolver_para_runner::solve()"); - TEST_EXIT(preconPair.l != NULL)("there is no left preconditioner"); - TEST_EXIT(preconPair.r != NULL)("there is no right preconditioner"); - - Vector r(A * x - b); - itl::cyclic_iteration iter(r, oem.getMaxIterations(), oem.getRelative(), - oem.getTolerance(), oem.getPrint_cycle()); - - int error = solver(A, x, b, *(preconPair.l), *(preconPair.r), iter, ell); - oem.setIterations(iter.iterations()); - oem.setResidual(iter.resid()); - oem.setErrorCode(error); - - return error; - } - - void exit() - { - if (preconPair.l != NULL) { - preconPair.l->exit(); - delete preconPair.l; - preconPair.l = NULL; - } - - if (preconPair.r != NULL) { - preconPair.r->exit(); - delete preconPair.r; - preconPair.r = NULL; - } - } - - virtual BasePreconditionerType* getLeftPrecon() - { - return preconPair.l; - } - - virtual BasePreconditionerType* getRightPrecon() - { - return preconPair.r; - } - - private: - PreconPair< Vector > preconPair; - ITLSolver solver; - int ell; - }; - - template< typename ITLSolver, typename Matrix, typename Vector > - struct ITL_OEMSolver_runner : BaseITL_runner { - ITL_OEMSolver_runner(OEMSolver* oem): - BaseITL_runner(oem) - {} - - void init(const Matrix& A) - { - BaseITL_runner::setPrecon(preconPair, A); - - if (preconPair.l != NULL) - preconPair.l->init(); - if (preconPair.r != NULL) - preconPair.r->init(); - } - - int solve(const Matrix& A , Vector& x, Vector& b) - { - FUNCNAME("ITL_OEMSolver_runner::solve()"); - TEST_EXIT(preconPair.l != NULL)("there is no left preconditioner"); - TEST_EXIT(preconPair.r != NULL)("there is no right preconditioner"); - - Vector r(A * x - b); - itl::cyclic_iteration iter(r, oem.getMaxIterations(), oem.getRelative(), - oem.getTolerance(), oem.getPrint_cycle()); - - int error = solver(A, x, b, *(preconPair.l), *(preconPair.r), iter); - oem.setErrorCode(error); - oem.setIterations(iter.iterations()); - oem.setResidual(iter.resid()); - - return error; - } - - void exit() - { - if (preconPair.l != NULL) { - preconPair.l->exit(); - delete preconPair.l; - preconPair.l = NULL; - } - - if (preconPair.r != NULL) { - preconPair.r->exit(); - delete preconPair.r; - preconPair.r = NULL; - } - } - - virtual BasePreconditionerType* getLeftPrecon() - { - return preconPair.l; - } - - virtual BasePreconditionerType* getRightPrecon() - { - return preconPair.r; - } - - private: - ITLSolver solver; - PreconPair< Vector > preconPair; - }; -} diff --git a/AMDiS/src/ITL_Preconditioner.h b/AMDiS/src/ITL_Preconditioner.h deleted file mode 100644 index 2ad84d9f..00000000 --- a/AMDiS/src/ITL_Preconditioner.h +++ /dev/null @@ -1,174 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -/** \file ITL_Preconditioner.h */ - -#ifndef AMDIS_ITL_PRECONDITIONER_H -#define AMDIS_ITL_PRECONDITIONER_H - -#include "MTL4Types.h" -#include "DOFMatrix.h" -#include "CreatorInterface.h" - -#include -#include -#include -#include - -namespace AMDiS { - - struct BasePreconditionerType - { - virtual void init() {}; - virtual void exit() {}; - }; - - - /** - * \ingroup Solver - * - * \brief Common base class for wrappers to use ITL preconditioners in AMDiS. - */ - template< class Vec > - class ITL_BasePreconditioner : public BasePreconditionerType - { - public: - virtual ~ITL_BasePreconditioner() {} - - // Old style AMDiS - // virtual Vec member_solve(const Vec& vin) const =0 ; - // virtual Vec member_adjoint_solve(const Vec& vin) const =0 ; - - // New style without copying the result vector - virtual void solve(const Vec& x, Vec& y) const= 0; - virtual void adjoint_solve(const Vec& x, Vec& y) const= 0; - }; - - - - template< typename Vec > - inline //Vec - itl::pc::solver, Vec, false> - solve(const ITL_BasePreconditioner< Vec >& P, const Vec& vin) - { - return itl::pc::solver, Vec, false>(P, vin); - } - - template< typename Vec > - inline //Vec - itl::pc::solver, Vec, true> - adjoint_solve(const ITL_BasePreconditioner< Vec >& P, const Vec& vin) - { - return itl::pc::solver, Vec, true>(P, vin); - } - - /** - * \ingroup Solver - * - * \brief Wrapper for using ITL preconditioners in AMDiS. - */ - template - class ITL_Preconditioner : public ITL_BasePreconditioner< MTLVector > - { - public: - ITL_Preconditioner(const MTLMatrix& A) : precon(A) {} - void solve(const MTLVector& vin, MTLVector& vout) const - { - precon.solve(vin, vout); - } - - void adjoint_solve(const MTLVector& vin, MTLVector& vout) const - { - precon.adjoint_solve(vin, vout); - } - - /// Creator class used in the OEMSolverMap. - class Creator : public CreatorInterface< ITL_BasePreconditioner< MTLVector > > - { - public: - virtual ~Creator() {} - - /** \brief - * Creates an ITL preconditioner - */ - ITL_BasePreconditioner< MTLVector >* create(const MTLMatrix& A) { - return new ITL_Preconditioner(A); - } - }; - - private: - Preconditioner precon; - }; - - - - /** - * \ingroup Solver - * - * \brief - * Diagonal preconditioner. - */ - class DiagonalPreconditioner - : public ITL_Preconditioner, MTLTypes::MTLVector, MTLTypes::MTLMatrix > - { - typedef ITL_Preconditioner, MTLTypes::MTLVector, MTLTypes::MTLMatrix > base; - - public: - DiagonalPreconditioner(const MTLTypes::MTLMatrix& A) : base(A) {} - }; - - /** - * \ingroup Solver - * - * \brief - * Identity preconditioner. Behaves like no preconditioning. - */ - class IdentityPreconditioner - : public ITL_Preconditioner, MTLTypes::MTLVector, MTLTypes::MTLMatrix > - { - typedef ITL_Preconditioner, MTLTypes::MTLVector, MTLTypes::MTLMatrix > base; - - public: - IdentityPreconditioner(const MTLTypes::MTLMatrix& A) : base(A) {} - }; - - - /** - * \ingroup Solver - * - * \brief - * ILU (Incomplete LU factorization) preconditioner. - * - * The preconditioner is used from ITL. It corresponds for instance to - * "Iterative Methods for Sparce Linear Systems", second edition, Yousef Saad. - * The preconditioner is described in chapter 10.3 (algorithm 10.4). - */ - class ILUPreconditioner - : public ITL_Preconditioner< itl::pc::ilu_0, MTLTypes::MTLVector, MTLTypes::MTLMatrix > - {}; - - class ICPreconditioner - : public ITL_Preconditioner< itl::pc::ic_0, MTLTypes::MTLVector, MTLTypes::MTLMatrix > - {}; - - -} // namespace AMDiS - -#endif // AMDIS_ITL_PRECONDITIONER_H diff --git a/AMDiS/src/ITL_Solver.h b/AMDiS/src/ITL_Solver.h deleted file mode 100644 index 9b283fbb..00000000 --- a/AMDiS/src/ITL_Solver.h +++ /dev/null @@ -1,368 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - -/** \file ITL_Solver.h */ - -#ifndef AMDIS_ITL_SOLVER_H -#define AMDIS_ITL_SOLVER_H - -#include "ITL_OEMSolver.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "itl/minres.hpp" - - -namespace AMDiS { - - // ============================================================================ - // ===== class CGSolver ======================================================= - // ============================================================================ - - /// Helper class to establish a type from a function - class cg_solver_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) - { return itl::cg(A, x, b, l, r, iter); } - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the conjugate gradient method (CG) and can be used for - * symmetric positive definite system matrices. - * Right preconditioner is ignored. - */ - class CGSolver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - CGSolver(std::string name) : ITL_OEMSolver(name) {} - }; - - - // ============================================================================ - // ===== class CGSSolver ======================================================= - // ============================================================================ - - /// Helper class to establish a type from a function - class cgs_solver_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) - { return itl::cgs(A, x, b, l, iter); } - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the squared conjugate gradient method (CGS). - * Right preconditioner is ignored. - */ - class CGSSolver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - CGSSolver(std::string name) : ITL_OEMSolver(name) {} - }; - - - // ============================================================================ - // ===== class BiCGSolver ===================================================== - // ============================================================================ - - /// Helper class to establish a type from a function - class bicg_solver_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) - { return itl::bicg(A, x, b, l, iter); } - }; - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG method and can be used for - * system matrices. - */ - class BiCGSolver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGSolver(std::string name) : ITL_OEMSolver(name) {} - }; - - - // ============================================================================ - // ===== class BiCGStab ======================================================= - // ============================================================================ - - /// Helper class to establish a type from a function - class bicgstab_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) - { return itl::bicgstab(A, x, b, l, iter); } - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG method and can be used for - * system matrices. - */ - class BiCGStabSolver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGStabSolver(std::string name) : ITL_OEMSolver(name) {} - }; - - - // ============================================================================ - // ===== class BiCGStab2 ====================================================== - // ============================================================================ - - /// Helper class to establish a type from a function - class bicgstab2_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) - { return itl::bicgstab_2(A, x, b, l, iter); } - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG method and can be used for - * system matrices. - */ - class BiCGStab2Solver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGStab2Solver(std::string name) : ITL_OEMSolver(name) {} - }; - - - // ============================================================================ - // ===== class QMRSolver ======================================================= - // ============================================================================ - - /// Helper class to establish a type from a function - class qmr_solver_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) - { return itl::qmr(A, x, b, l, r, iter); } - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the Quasi-Minimal Residual method (QMR). - */ - class QMRSolver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - QMRSolver(std::string name) : ITL_OEMSolver(name) {} - }; - - - // ============================================================================ - // ===== class TFQMRSolver ======================================================= - // ============================================================================ - - /// Helper class to establish a type from a function - class tfqmr_solver_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) - { - return itl::tfqmr(A, x, b, l, r, iter); - } - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the Transposed-Free Quasi-Minimal Residual method (TFQMR). - * Does not use preconditioning currently. - */ - class TFQMRSolver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - TFQMRSolver(std::string name) : ITL_OEMSolver(name) {} - }; - - - - // ============================================================================ - // ===== class BiCGStabEll ====================================================== - // ============================================================================ - - /// Helper class to establish a type from a function - class bicgstab_ell_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter, int ell) - { return itl::bicgstab_ell(A, x, b, l, r, iter, ell); } - }; - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG(l) method and can be used for - * system matrices. - */ - class BiCGStabEllSolver : public ITL_OEMSolver_para - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGStabEllSolver(std::string name) : ITL_OEMSolver_para(name) {} - }; - - // ============================================================================ - // ===== class GMRES ====================================================== - // ============================================================================ - - /// Helper class to establish a type from a function - class gmres_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter, int ell) - { return itl::gmres(A, x, b, l, r, iter, ell); } - }; - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the GMRES method. - * The parameter ell is the maximal number of orthogonalized vectors. - * The method is not preconditioned - */ - class GMResSolver : public ITL_OEMSolver_para - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - GMResSolver(std::string name) : ITL_OEMSolver_para(name) {} - }; - - - // ============================================================================ - // ===== class IDRs ====================================================== - // ============================================================================ - - /// Helper class to establish a type from a function - class idr_s_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter, int ell) - { return itl::idr_s(A, x, b, l, r, iter, ell); } - }; - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by an Induced Dimension Reduction method and can be used for - * system matrices. - * The parameter s can be specified as ell. - * Peter Sonneveld and Martin B. van Gijzen, IDR(s): a family of simple and fast algorithms for solving large nonsymmetric linear systems. - * SIAM J. Sci. Comput. Vol. 31, No. 2, pp. 1035-1062 (2008). (copyright SIAM) - * - */ - class IDRsSolver : public ITL_OEMSolver_para - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - IDRsSolver(std::string name) : ITL_OEMSolver_para(name) {} - }; - - - // ============================================================================ - // ===== class Minres ======================================================== - // ============================================================================ - - /// Helper class to establish a type from a function - class minres_solver_type - { - public: - template < class LinOp, class X, class B, class L, class R, class I > - int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) - { - return itl::minres(A, x, b, l, r, iter); - } - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the Minres method. Can be used for symmetric - * indefinite systems. - */ - class MinResSolver : public ITL_OEMSolver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - MinResSolver(std::string name) : ITL_OEMSolver(name) {} - }; - - - -} // namespace AMDiS - -#endif // AMDIS_ITL_SOLVER - diff --git a/AMDiS/src/Initfile.cc b/AMDiS/src/Initfile.cc index b2695492..a9b906ed 100644 --- a/AMDiS/src/Initfile.cc +++ b/AMDiS/src/Initfile.cc @@ -1,3 +1,22 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Initfile.h" #include diff --git a/AMDiS/src/Initfile.h b/AMDiS/src/Initfile.h index 45344fcd..72b09a1c 100644 --- a/AMDiS/src/Initfile.h +++ b/AMDiS/src/Initfile.h @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef INITFILE_H #define INITFILE_H @@ -126,10 +135,14 @@ namespace AMDiS { /// convert string to intrinsic type - template - inline void convert(const std::string valStr, T& value , - typename boost::enable_if >::type* p = NULL , - typename boost::disable_if >::type* p2 = NULL) + template inline + typename boost::enable_if + < boost::mpl::and_ + < boost::is_pod, + boost::mpl::not_< boost::is_enum > >, + void + >::type + convert(const std::string valStr, T& value) { using boost::lexical_cast; using boost::numeric_cast; @@ -151,9 +164,12 @@ namespace AMDiS { } - template - inline void convert(const std::string valStr, T& value, - typename boost::enable_if< boost::is_enum< T > >::type* p = NULL) + template inline + typename boost::enable_if + < boost::is_enum, + void + >::type + convert(const std::string valStr, T& value) { int swap = 0; // try { diff --git a/AMDiS/src/Lagrange.cc b/AMDiS/src/Lagrange.cc index 3bbad7fe..cb3eced0 100644 --- a/AMDiS/src/Lagrange.cc +++ b/AMDiS/src/Lagrange.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/Lagrange.h b/AMDiS/src/Lagrange.h index 14462f22..c984b4fa 100644 --- a/AMDiS/src/Lagrange.h +++ b/AMDiS/src/Lagrange.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/LeafData.cc b/AMDiS/src/LeafData.cc index bda635c6..d73bfca9 100644 --- a/AMDiS/src/LeafData.cc +++ b/AMDiS/src/LeafData.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "LeafData.h" diff --git a/AMDiS/src/LeafData.h b/AMDiS/src/LeafData.h index ad97e585..8a8e7422 100644 --- a/AMDiS/src/LeafData.h +++ b/AMDiS/src/LeafData.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Line.cc b/AMDiS/src/Line.cc index 2b569587..6ac65911 100644 --- a/AMDiS/src/Line.cc +++ b/AMDiS/src/Line.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Line.h" diff --git a/AMDiS/src/Line.h b/AMDiS/src/Line.h index bf7f3aa1..39de87f8 100644 --- a/AMDiS/src/Line.h +++ b/AMDiS/src/Line.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/MTL4Solver.h b/AMDiS/src/MTL4Solver.h deleted file mode 100644 index 5a8623a8..00000000 --- a/AMDiS/src/MTL4Solver.h +++ /dev/null @@ -1,135 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// ============================================================================ -// == == -// == TU Dresden == -// == == -// == Institut für Wissenschaftliches Rechnen == -// == Zellescher Weg 12-14 == -// == 01069 Dresden == -// == germany == -// == == -// ============================================================================ -// == == -// == https://gforge.zih.tu-dresden.de/projects/amdis/ == -// == == -// ============================================================================ - -#ifndef MTL4SOLVER_H -#define MTL4SOLVER_H - -#include "OEMSolver.h" -#include "MatrixStreams.h" -#include "Timer.h" -#include -#include -#include - -#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(HAVE_PARALLEL_MTL4) -#include -#endif - -namespace AMDiS { - - template< typename MTLMatrix, typename MTLVector, typename Worker > - class MTL4Solver : public OEMSolver { - MTLMatrix matrix; - protected: - Worker worker; - - template< typename Mapper, bool IsDist> - void init(Mapper& mapper, boost::mpl::bool_) - { - matrix.change_dim(mapper.getNumRows(), mapper.getNumCols()); - } - -#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(HAVE_PARALLEL_MTL4) - void init(ParallelMapper& mapper, boost::mpl::true_) - { - mtl::par::block_distribution dist(mapper.getNumRows() /* , communicator */ ); - dist.setup_from_local_size(mapper.meshDistributor().getNumberRankDofs()*mapper.getNumComponents()); - matrix.init_distribution(dist, dist, mapper.getNumRows(), mapper.getNumRows()); - } -#endif - - template< bool IsDist> - void init(MTLVector& v, boost::mpl::bool_) - { - v.change_dim(num_rows(matrix)); - } - - void init(MTLVector& v, boost::mpl::true_) - { - v.init_distribution(row_distribution(matrix), num_rows(matrix)); - } - - template< typename Matrix, typename Vector, typename Mapper > - int solve(const Matrix& A, Vector& x, Vector& b, Mapper& mapper, - bool createMatrixData, - bool storeMatrixData) - { - FUNCNAME("MTL4Solver::solve()"); - - Timer t; - if (createMatrixData) { - init(mapper, mtl::traits::is_distributed()); - - set_to_zero(matrix); - MatMap< const Matrix, Mapper > matMap(A, mapper); - matrix << matMap; - worker.init(matrix); - } - - MTLVector mtl_x; - init(mtl_x, mtl::traits::is_distributed()); - set_to_zero(mtl_x); - VecMap< Vector, Mapper > xVecMap(x, mapper); - mtl_x << xVecMap; - - MTLVector mtl_b; - init(mtl_b, mtl::traits::is_distributed()); - set_to_zero(mtl_b); - VecMap< Vector, Mapper> bVecMap(b, mapper); - mtl_b << bVecMap; - - MSG("fill MTL4 matrix needed %.5f seconds\n", t.elapsed()); - - t.reset(); - error = worker.solve(matrix ,mtl_x, mtl_b); - MSG("solve MTL4 matrix needed %.5f seconds\n", t.elapsed()); - - MTLVector r(mtl_b); - r -= matrix * mtl_x; - double residual = two_norm(r); - MSG("MTL4Solver: ||b-Ax||= %e\n", residual); - - mtl_x >> xVecMap; - - worker.exit(); - - return error; - } - - public: - MTL4Solver(std::string n): - OEMSolver(n), - matrix(0,0), - worker(this) - {} - - virtual int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - VectorialMapper& m, - bool createMatrixData, - bool storeMatrixData) - { - return solve(A, x, b, m, createMatrixData, storeMatrixData); - } - - - }; -} -#endif diff --git a/AMDiS/src/MTL4Types.h b/AMDiS/src/MTL4Types.h index 6e226bfd..b6c001fb 100644 --- a/AMDiS/src/MTL4Types.h +++ b/AMDiS/src/MTL4Types.h @@ -1,13 +1,25 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file Mapper.h */ #ifndef MTL4TYPES_H #define MTL4TYPES_H @@ -17,10 +29,15 @@ namespace AMDiS { namespace MTLTypes { typedef double value_type; - typedef unsigned size_type; + typedef unsigned int size_type; typedef mtl::matrix::parameters para; typedef mtl::matrix::compressed2D< value_type, para > MTLMatrix; typedef mtl::vector::dense_vector< value_type > MTLVector; + +#if defined(HAVE_PARALLEL_MTL4) + typedef mtl::matrix::distributed< MTLMatrix > PMTLMatrix; + typedef mtl::vector::distributed< MTLVector > PMTLVector; +#endif } } diff --git a/AMDiS/src/MacroElement.cc b/AMDiS/src/MacroElement.cc index 58c4d9bb..dc5d6451 100644 --- a/AMDiS/src/MacroElement.cc +++ b/AMDiS/src/MacroElement.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/MacroElement.h b/AMDiS/src/MacroElement.h index ae2f988c..8dc62d14 100644 --- a/AMDiS/src/MacroElement.h +++ b/AMDiS/src/MacroElement.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Mapper.h b/AMDiS/src/Mapper.h deleted file mode 100644 index 1c80d673..00000000 --- a/AMDiS/src/Mapper.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef MAPPER_H -#define MAPPER_H - -#include "SolverMatrix.h" -#include -namespace AMDiS { -/* struct ScalarMapper { - ScalarMapper(int nrow, int ncol): - nrow(nrow), ncol(ncol) {} - inline int row(int r) { return r; } - inline int col(int c) { return c; } - inline int nRow() { return nrow; } - inline int nCol() { return ncol; } - protected: - int nrow; - int ncol; - }; -*/ - struct VectorialMapper - { - - VectorialMapper(const SolverMatrix >& sm ) : - nComp(sm.getOriginalMat()->getSize()), - rowOffset(0), colOffset(0), nrow(0), ncol(0), sizes(nComp) - { - const Matrix& orMat(*sm.getOriginalMat()); - const int ns = orMat.getSize(); - for (int i= 0; i < ns; i++) { - sizes[i] = orMat[i][i]->getFeSpace()->getAdmin()->getUsedSize(); - nrow += sizes[i]; - } - ncol = nrow; - } - - VectorialMapper(unsigned int nComp, int nDOFperComp) : - nComp(nComp), rowOffset(0), colOffset(0), - nrow(nComp*nDOFperComp), ncol(nrow),sizes(nComp) - { - for (unsigned int i(0); i < nComp; ++i) - sizes[i] = nDOFperComp; - } - - inline void setRow( unsigned int r) { - assert( r <= sizes.size() ); - rowOffset = sum( r); - } - - inline void setCol( unsigned int c) { colOffset = sum( c); } - - inline int row(int r) const { return r + rowOffset; } - - inline int col(int c) const { return c + colOffset; } - - inline int getNumCols() const { return ncol; } - - inline int getNumRows() const { return nrow; } - - inline int getNumComponents() { return nComp; } - - protected: - - ///compute the sum of sizes from [0, end) - inline unsigned int sum(unsigned int end) const - { - unsigned int ret(0); - for (unsigned int i(0); i < end; ++i) - ret += sizes[i]; - return ret; - } - - int nComp; - int rowOffset; - int colOffset; - int nrow; - int ncol; - std::vector< unsigned int > sizes; - }; -} - -#endif diff --git a/AMDiS/src/Marker.cc b/AMDiS/src/Marker.cc index e3589ad8..5cecbb63 100644 --- a/AMDiS/src/Marker.cc +++ b/AMDiS/src/Marker.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Marker.h" @@ -150,7 +159,7 @@ namespace AMDiS { int nLeaves = mesh->getNumberOfLeaves(); #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - mpi::globalAdd(nLeaves); + Parallel::mpi::globalAdd(nLeaves); #endif markRLimit = ESThetaP * epsP / nLeaves; diff --git a/AMDiS/src/Marker.h b/AMDiS/src/Marker.h index c24c238b..d28fcaea 100644 --- a/AMDiS/src/Marker.h +++ b/AMDiS/src/Marker.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/MathFunctions.h b/AMDiS/src/MathFunctions.h index aa354f5e..73e61249 100644 --- a/AMDiS/src/MathFunctions.h +++ b/AMDiS/src/MathFunctions.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/MatrixStreams.h b/AMDiS/src/MatrixStreams.h deleted file mode 100644 index 98ccbcab..00000000 --- a/AMDiS/src/MatrixStreams.h +++ /dev/null @@ -1,141 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// ============================================================================ -// == == -// == TU Dresden == -// == == -// == Institut für Wissenschaftliches Rechnen == -// == Zellescher Weg 12-14 == -// == 01069 Dresden == -// == germany == -// == == -// ============================================================================ -// == == -// == https://gforge.zih.tu-dresden.de/projects/amdis/ == -// == == -// ============================================================================ - -/** \file MatrixStreams.h */ - -#ifndef MATRIXSTREAMS_H -#define MATRIXSTREAMS_H - -#include "DOFMatrix.h" -#include "SolverMatrix.h" -#include "SystemVector.h" -#include "Collection.h" - -using namespace mtl::operations; -namespace AMDiS { - template< typename VecT, typename CurMap> - struct VecMap { - VecT& vec; - CurMap& mapper; - VecMap(VecT& vec, CurMap& mapper): - vec(vec),mapper(mapper) {} - }; - - template< typename MatT, typename CurMap> - struct MatMap { - MatT& mat; - CurMap& mapper; - MatMap(MatT& mat, CurMap& m): - mat(mat), mapper(m) {} - }; - - template< typename MTLMatrix, typename Mapper > - void operator<<(MTLMatrix& matrix, MatMap >, Mapper >& Asolver) - { - const Matrix< DOFMatrix* >& A = *(Asolver.mat.getOriginalMat()); - int ns = A.getSize(); - - Mapper& mapper(Asolver.mapper); - set_to_zero(matrix); - - int nnz = 0; - for (int rb = 0; rb < ns; ++rb) - for (int cb = 0; cb < ns; ++cb) - if (A[rb][cb]) - nnz += A[rb][cb]->getBaseMatrix().nnz(); - - { - typedef mtl::matrix::mapped_inserter< typename Collection< MTLMatrix >::Inserter, Mapper > Inserter; - Inserter ins(matrix, mapper, int(1.2 * nnz / matrix.dim1())); - for (int rb = 0; rb < ns; ++rb) { - mapper.setRow(rb); - for (int cb = 0; cb < ns; ++cb) { - mapper.setCol(cb); - if (A[rb][cb]) - ins << A[rb][cb]->getBaseMatrix(); - } - } - } - } - - template< typename Vector, typename CurMap > - void operator<<(Vector& dest, VecMap, CurMap >& rhs) - { - DOFVector::Iterator it_x(&rhs.vec, USED_DOFS); - int counter(0); - typedef typename Collection< Vector >::Inserter Inserter ; - - Inserter swapIns(dest); - mtl::vector::mapped_inserter< Inserter, CurMap > ins(swapIns, rhs.mapper); - - for (it_x.reset(); !it_x.end(); ++it_x) { - ins[counter] << *it_x; - counter++; - } - } - - template< typename Vector, typename CurMap > - inline void operator>>(const Vector& dest, VecMap, CurMap >& rhs) - { - DOFVector::Iterator it_x(&rhs.vec, USED_DOFS); - int counter(0); - { - mtl::vector::extracter< Vector > extracter(dest); - for (it_x.reset(); !it_x.end(); ++it_x) { - extracter[rhs.mapper.row(counter)] >> *it_x ; - counter++; - } - } - } - - template< typename Vector, typename CurMap > - void operator<<(Vector& dest, VecMap& rhs) - { - int ns = rhs.vec.getSize(); // Number of systems. - - // Copy vectors - typedef typename Collection< Vector >::Inserter Inserter; - Inserter swapInserter(dest); - mtl::vector::mapped_inserter< Inserter, CurMap > ins(swapInserter, rhs.mapper); - for (int i = 0; i < ns; i++) { - DOFVector::Iterator it_source(rhs.vec.getDOFVector(i), USED_DOFS); - int counter(0); - rhs.mapper.setRow(i); - for (it_source.reset(); !it_source.end(); ++it_source) { - ins[counter] << *it_source; - counter++; - } - } - } - - template< typename Vector, typename CurMap > - void operator>>(const Vector& dest, VecMap& rhs) - { - int ns = rhs.vec.getSize(); // Number of systems. - - // Copy vectors - for (int i = 0; i < ns; i++) { - DOFVector< double >& dofvec(*(rhs.vec.getDOFVector(i))); - rhs.mapper.setRow(i); - VecMap< DOFVector< double >, CurMap > swap(dofvec, rhs.mapper); - dest >> swap; - } - } -} -#endif diff --git a/AMDiS/src/MatrixVector.cc b/AMDiS/src/MatrixVector.cc index 638b88e5..fd96f54f 100644 --- a/AMDiS/src/MatrixVector.cc +++ b/AMDiS/src/MatrixVector.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "MatrixVector.h" diff --git a/AMDiS/src/MatrixVector.h b/AMDiS/src/MatrixVector.h index e18a8e84..e50d618f 100644 --- a/AMDiS/src/MatrixVector.h +++ b/AMDiS/src/MatrixVector.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Mesh.cc b/AMDiS/src/Mesh.cc index 0803de17..1858a19c 100644 --- a/AMDiS/src/Mesh.cc +++ b/AMDiS/src/Mesh.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/Mesh.h b/AMDiS/src/Mesh.h index c0ba1776..5ed973a3 100644 --- a/AMDiS/src/Mesh.h +++ b/AMDiS/src/Mesh.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/MeshStructure.cc b/AMDiS/src/MeshStructure.cc index d59d80fa..51d5096f 100644 --- a/AMDiS/src/MeshStructure.cc +++ b/AMDiS/src/MeshStructure.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Debug.h" diff --git a/AMDiS/src/MeshStructure.h b/AMDiS/src/MeshStructure.h index 77593db4..4ac39be0 100644 --- a/AMDiS/src/MeshStructure.h +++ b/AMDiS/src/MeshStructure.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == Amdis - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/MeshStructure_ED.h b/AMDiS/src/MeshStructure_ED.h index 752e3182..0024821b 100644 --- a/AMDiS/src/MeshStructure_ED.h +++ b/AMDiS/src/MeshStructure_ED.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/NEWS b/AMDiS/src/NEWS deleted file mode 100644 index e69de29b..00000000 diff --git a/AMDiS/src/OEMSolver.h b/AMDiS/src/OEMSolver.h deleted file mode 100644 index 263545ca..00000000 --- a/AMDiS/src/OEMSolver.h +++ /dev/null @@ -1,304 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -/** \file OEMSolver.h */ - -/** - * \defgroup Solver Solver module - * @{ @} - * - * \brief - * Contains all classes needed for solving linear and non linear equation - * systems. - */ - -#ifndef AMDIS_OEM_SOLVER_H -#define AMDIS_OEM_SOLVER_H - -#include "Global.h" -#include "AMDiS_fwd.h" -#include "Initfile.h" -#include "SolverMatrix.h" -#include "DOFVector.h" -#include "SystemVector.h" -#include "DOFMatrix.h" -#include "BasePreconditioner.h" -#include "Mapper.h" - -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS -#include "parallel/ParallelMapper.h" -#endif - -namespace AMDiS { - - /** - * \ingroup Solver - * - *\brief - * Solver for linear equation systems. - */ - class OEMSolver - { - public: - - typedef DOFMatrix::base_matrix_type matrix_type; - typedef DOFMatrix::value_type value_type; - - /// The constructor reads needed parameters and sets solvers \ref name. - OEMSolver(std::string str) - : name(str), - tolerance(0), - relative(0), - max_iter(1000), - info(0), - residual(0), - print_cycle(100), - iterations(-1), - error(-1) - {} - - /// - virtual ~OEMSolver() - {} - - void initParameters() - { - Parameters::get(name + "->tolerance", tolerance); - Parameters::get(name + "->relative tolerance", relative); - Parameters::get(name + "->max iteration", max_iter); - Parameters::get(name + "->print cycle", print_cycle); - Parameters::get(name + "->info", info); - } - - - /// Solve a linear system for a vectorial problem. - virtual int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - VectorialMapper&, - bool createMatrixData, - bool storeMatrixData) - { - FUNCNAME("OEMSolver::solveSystem()"); - TEST_EXIT(false) - ("This linear solver is not suitable for sequential problems\n"); - return -1; - } - - virtual int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - bool createMatrixData, - bool storeMatrixData) - { - VectorialMapper mapper(A); - return solveSystem(A, x, b, mapper, createMatrixData, storeMatrixData); - } - -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS - virtual int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - ParallelMapper&) - { - FUNCNAME("OEMSolver::solveSystem()"); - TEST_EXIT(false) - ("This linear solver is not suitable for domain decomposition problems\n"); - return -1; - } -#endif - - /** \name getting methods - * \{ - */ - - /// Returns solvers \ref name. - inline std::string getName() const - { - return name; - } - - /// Returns \ref tolerance - inline double getTolerance() const - { - return tolerance; - } - - /// Returns \ref max_iter - inline int getMaxIterations() const - { - return max_iter; - } - - /// Returns number of iterations in last run of an iterative solver - inline int getIterations() - { - return iterations; - } - - /// Returns error code in last run of an iterative solver - inline int getErrorCode() - { - return error; - } - - /// Returns info - inline int getInfo() - { - return info; - } - - /// Returns \ref print_cycle - inline int getPrint_cycle() const - { - return print_cycle; - } - - /// Returns \ref residual - inline double getResidual() const - { - return residual; - } - - /// Returns \ref relative - inline double getRelative() const - { - return relative; - } - - - virtual BasePreconditionerType* getLeftPrecon() - { - FUNCNAME("OEMSolver::getLeftPrecon()"); - WARNING("no left preconditioner provided!\n"); - return NULL; - } - - virtual BasePreconditionerType* getRightPrecon() - { - FUNCNAME("OEMSolver::getRightPrecon()"); - WARNING("no right preconditioner provided!\n"); - return NULL; - } - - /** \} */ - - /** \name setting methods - * \{ - */ - - /// Sets \ref tolerance - inline void setTolerance(double tol) - { - tolerance = tol; - } - - inline void setResidual(double r) - { - residual = r; - } - - /// Sets \ref relative - inline void setRelative(double rel) - { - relative = rel; - } - - /// Sets \ref max_iter - inline void setMaxIterations(int i) - { - max_iter = i; - } - - inline void setIterations(int i) - { - iterations=i; - } - - /// set the \ref error - inline void setErrorCode(int code) - { - error=code; - } - - /// Sets \ref info - inline void setInfo(int i) - { - info = i; - } - - /** \} */ - - protected: - /// solvers name. - std::string name; - - /// Solver tolerance |r|. Set in OEMSolver's constructor. - double tolerance; - - /// Relative solver tolerance |r|/|r0|. Set in OEMSolver's constructor. - double relative; - - /// maximal number of iterations. Set in OEMSolver's constructor. - int max_iter; - - /// info level during solving the system. Set in OEMSolver's constructor. - int info; - - /// current residual. - double residual; - - /// Print cycle, after how many iterations the residuum norm is logged. - int print_cycle; - - /// How many iterations were performed in last solver (not set by UmfPack) - int iterations; - - /// Error code in last solver (not set by UmfPack) - int error; - }; - - /** - * \ingroup Solver - * - * \brief - * Interface for creators of concrete OEMSolvers. - */ - class OEMSolverCreator : public CreatorInterface - { - public: - virtual ~OEMSolverCreator() {} - - /// Sets \ref problem - void setName(std::string str) - { - name = str; - } - - protected: - /// Pointer to the problem the solver will belong to. Needed as parameter - /// when constructing an OEMSolver - std::string name; - }; -} - -//#include "ITL_Solver.h" - -#endif // AMDIS_OEM_SOLVER_H diff --git a/AMDiS/src/OpenMP.h b/AMDiS/src/OpenMP.h index c1a512e6..ed3909cb 100644 --- a/AMDiS/src/OpenMP.h +++ b/AMDiS/src/OpenMP.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Operator.cc b/AMDiS/src/Operator.cc index 900bbc07..b6aa72b2 100644 --- a/AMDiS/src/Operator.cc +++ b/AMDiS/src/Operator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Operator.h" diff --git a/AMDiS/src/Operator.h b/AMDiS/src/Operator.h index 068265c6..6086ea35 100644 --- a/AMDiS/src/Operator.h +++ b/AMDiS/src/Operator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Operator.hh b/AMDiS/src/Operator.hh index 61e92dfe..8658d3b4 100644 --- a/AMDiS/src/Operator.hh +++ b/AMDiS/src/Operator.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ namespace AMDiS { diff --git a/AMDiS/src/OperatorTerm.cc b/AMDiS/src/OperatorTerm.cc index 36372a70..f297b903 100644 --- a/AMDiS/src/OperatorTerm.cc +++ b/AMDiS/src/OperatorTerm.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "OperatorTerm.h" diff --git a/AMDiS/src/OperatorTerm.h b/AMDiS/src/OperatorTerm.h index 25b09bf7..53215512 100644 --- a/AMDiS/src/OperatorTerm.h +++ b/AMDiS/src/OperatorTerm.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/OperatorTerm.hh b/AMDiS/src/OperatorTerm.hh index 3cac6c7d..c0850f8b 100644 --- a/AMDiS/src/OperatorTerm.hh +++ b/AMDiS/src/OperatorTerm.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElInfo.h" diff --git a/AMDiS/src/Parametric.cc b/AMDiS/src/Parametric.cc index 1f052108..b0a4b1b8 100644 --- a/AMDiS/src/Parametric.cc +++ b/AMDiS/src/Parametric.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Parametric.h" diff --git a/AMDiS/src/Parametric.h b/AMDiS/src/Parametric.h index eb0ca1c5..c4fb6830 100644 --- a/AMDiS/src/Parametric.h +++ b/AMDiS/src/Parametric.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/PeriodicBC.cc b/AMDiS/src/PeriodicBC.cc index e8bb99a4..7638b350 100644 --- a/AMDiS/src/PeriodicBC.cc +++ b/AMDiS/src/PeriodicBC.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "PeriodicBC.h" diff --git a/AMDiS/src/PeriodicBC.h b/AMDiS/src/PeriodicBC.h index 6ab6785d..37c2e22e 100644 --- a/AMDiS/src/PeriodicBC.h +++ b/AMDiS/src/PeriodicBC.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/PeriodicConnection.h b/AMDiS/src/PeriodicConnection.h index 1964ab38..e441e44d 100644 --- a/AMDiS/src/PeriodicConnection.h +++ b/AMDiS/src/PeriodicConnection.h @@ -1,3 +1,22 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef AMDIS_PERIODICCONNECTION_H #define AMDIS_PERIODICCONNECTION_H diff --git a/AMDiS/src/PeriodicInfo.h b/AMDiS/src/PeriodicInfo.h index 965ae2e0..85f28c11 100644 --- a/AMDiS/src/PeriodicInfo.h +++ b/AMDiS/src/PeriodicInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ProblemImplicit.cc b/AMDiS/src/ProblemImplicit.cc index a9a06b9d..1ca235d2 100644 --- a/AMDiS/src/ProblemImplicit.cc +++ b/AMDiS/src/ProblemImplicit.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ProblemImplicit.h" diff --git a/AMDiS/src/ProblemImplicit.h b/AMDiS/src/ProblemImplicit.h index cd8acc5a..05f3ad92 100644 --- a/AMDiS/src/ProblemImplicit.h +++ b/AMDiS/src/ProblemImplicit.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -24,11 +26,7 @@ #define AMDIS_PROBLEM_IMPLICIT_H #ifdef HAVE_PARALLEL_DOMAIN_AMDIS -#ifdef HAVE_PARALLEL_MTL4 -#include "parallel/Mtl4Solver.h" -#else -#include "parallel/PetscProblemStat.h" -#endif +#include "parallel/ParallelProblemStat.h" #else #include "ProblemStat.h" #endif diff --git a/AMDiS/src/ProblemInstat.cc b/AMDiS/src/ProblemInstat.cc index e6946c5e..edf184bc 100644 --- a/AMDiS/src/ProblemInstat.cc +++ b/AMDiS/src/ProblemInstat.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifdef HAVE_PARALLEL_DOMAIN_AMDIS #include diff --git a/AMDiS/src/ProblemInstat.h b/AMDiS/src/ProblemInstat.h index 7bd6e230..e2ed29b7 100644 --- a/AMDiS/src/ProblemInstat.h +++ b/AMDiS/src/ProblemInstat.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ProblemInterpol.cc b/AMDiS/src/ProblemInterpol.cc index af718351..9876b588 100644 --- a/AMDiS/src/ProblemInterpol.cc +++ b/AMDiS/src/ProblemInterpol.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ProblemInterpol.h" diff --git a/AMDiS/src/ProblemInterpol.h b/AMDiS/src/ProblemInterpol.h index 80b07d7e..3d77885d 100644 --- a/AMDiS/src/ProblemInterpol.h +++ b/AMDiS/src/ProblemInterpol.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ProblemIterationInterface.h b/AMDiS/src/ProblemIterationInterface.h index 0737ad97..81a63a14 100644 --- a/AMDiS/src/ProblemIterationInterface.h +++ b/AMDiS/src/ProblemIterationInterface.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ProblemStat.cc b/AMDiS/src/ProblemStat.cc index 83ff22df..6915927b 100644 --- a/AMDiS/src/ProblemStat.cc +++ b/AMDiS/src/ProblemStat.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -27,7 +36,7 @@ #include "RefinementManager.h" #include "DualTraverse.h" #include "Mesh.h" -#include "OEMSolver.h" +#include "solver/LinearSolver.h" #include "DirichletBC.h" #include "RobinBC.h" #include "PeriodicBC.h" @@ -253,10 +262,10 @@ namespace AMDiS { } } -#ifndef HAVE_PARALLEL_DOMAIN_AMDIS +// #ifndef HAVE_PARALLEL_DOMAIN_AMDIS if (!solver) WARNING("no solver created\n"); -#endif +// #endif // === create estimator === if (initFlag.isSet(INIT_ESTIMATOR)) @@ -504,18 +513,35 @@ namespace AMDiS { void ProblemStatSeq::createSolver() { FUNCNAME("ProblemStat::createSolver()"); + +#if defined HAVE_PARALLEL_PETSC + string backend("p_petsc"); +#elif defined HAVE_PARALLEL_MTL + string backend("p_mtl"); +#elif defined HAVE_PETSC + string backend("petsc"); +#else + string backend("mtl"); +#endif + + // === read backend-name === + string initFileStr = name + "->solver"; + Parameters::get(initFileStr + "->backend", backend); - // === create solver === + // === read solver-name === string solverType("0"); - string initFileStr = name + "->solver"; Parameters::get(initFileStr, solverType); - OEMSolverCreator *solverCreator = - dynamic_cast(CreatorMap::getCreator(solverType, initFileStr)); + + if (backend != "0" && backend != "no" && backend != "") + solverType = backend + "_" + solverType; + + // === create solver === + LinearSolverCreator *solverCreator = + dynamic_cast(CreatorMap::getCreator(solverType, initFileStr)); TEST_EXIT(solverCreator) ("No valid solver type found in parameter \"%s\"\n", initFileStr.c_str()); solverCreator->setName(initFileStr); solver = solverCreator->create(); - solver->initParameters(); } @@ -757,10 +783,7 @@ namespace AMDiS { return; } -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS - double first = MPI::Wtime(); -#endif - + Timer t; for (unsigned int i = 0; i < meshes.size(); i++) meshes[i]->dofCompress(); @@ -768,14 +791,9 @@ namespace AMDiS { #ifdef HAVE_PARALLEL_DOMAIN_AMDIS MPI::COMM_WORLD.Barrier(); - INFO(info, 8)("dof compression needed %.5f seconds\n", - MPI::Wtime() - first); - - first = MPI::Wtime(); -#else - clock_t first = clock(); + INFO(info, 8)("dof compression needed %.5f seconds\n", t.elapsed()); #endif - + t.reset(); Flag assembleFlag = flag | @@ -910,12 +928,8 @@ namespace AMDiS { #ifdef HAVE_PARALLEL_DOMAIN_AMDIS MPI::COMM_WORLD.Barrier(); - INFO(info, 8)("buildAfterCoarsen needed %.5f seconds\n", - MPI::Wtime() - first); -#else - INFO(info, 8)("buildAfterCoarsen needed %.5f seconds\n", - TIME_USED(first, clock())); #endif + INFO(info, 8)("buildAfterCoarsen needed %.5f seconds\n", t.elapsed()); } @@ -1184,23 +1198,15 @@ namespace AMDiS { { FUNCNAME("ProblemStat::writeFiles()"); -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS - double first = MPI::Wtime(); -#else - clock_t first = clock(); -#endif + Timer t; for (int i = 0; i < static_cast(fileWriters.size()); i++) fileWriters[i]->writeFiles(adaptInfo, force); #ifdef HAVE_PARALLEL_DOMAIN_AMDIS MPI::COMM_WORLD.Barrier(); - INFO(info, 8)("writeFiles needed %.5f seconds\n", - MPI::Wtime() - first); -#else - INFO(info, 8)("writeFiles needed %.5f seconds\n", - TIME_USED(first, clock())); #endif + INFO(info, 8)("writeFiles needed %.5f seconds\n", t.elapsed()); } diff --git a/AMDiS/src/ProblemStat.h b/AMDiS/src/ProblemStat.h index 9e6a0fdf..2f25d5a4 100644 --- a/AMDiS/src/ProblemStat.h +++ b/AMDiS/src/ProblemStat.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -34,7 +36,7 @@ #include "io/ElementFileWriter.h" #include "ComponentTraverseInfo.h" #include "AbstractFunction.h" -#include "SolverMatrix.h" +#include "solver/SolverMatrix.h" #include "SystemVector.h" namespace AMDiS { @@ -48,9 +50,13 @@ namespace AMDiS { }; - /// This class defines the stationary problem definition in sequential - /// computations. For parallel computations, see - /// \ref ParallelProblemStatBase. + /** + * \ingroup Problem + * + * \brief + * This class defines the stationary problem definition in sequential + * computations. For parallel computations, see \ref ParallelProblemStatBase. + **/ class ProblemStatSeq : public ProblemStatBase, public StandardProblemIteration { @@ -364,7 +370,7 @@ namespace AMDiS { } /// Returns \ref solver. - inline OEMSolver* getSolver() + inline LinearSolver* getSolver() { return solver; } @@ -454,7 +460,7 @@ namespace AMDiS { } /// Sets \ref solver. - inline void setSolver(OEMSolver* sol) + inline void setSolver(LinearSolver* sol) { solver = sol; } @@ -591,7 +597,7 @@ namespace AMDiS { vector estimator; /// Linear solver of this problem. Used in \ref solve(). - OEMSolver *solver; + LinearSolver *solver; /// System vector storing the calculated solution of the problem. SystemVector *solution; diff --git a/AMDiS/src/ProblemStatBase.h b/AMDiS/src/ProblemStatBase.h index 8ba55350..71a449e8 100644 --- a/AMDiS/src/ProblemStatBase.h +++ b/AMDiS/src/ProblemStatBase.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ProblemStatDbg.cc b/AMDiS/src/ProblemStatDbg.cc index e7b9fa4a..18d453ed 100644 --- a/AMDiS/src/ProblemStatDbg.cc +++ b/AMDiS/src/ProblemStatDbg.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/ProblemStatDbg.h b/AMDiS/src/ProblemStatDbg.h index 19589fe9..a63a5182 100644 --- a/AMDiS/src/ProblemStatDbg.h +++ b/AMDiS/src/ProblemStatDbg.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ProblemTimeInterface.h b/AMDiS/src/ProblemTimeInterface.h index bf615295..20e57af5 100644 --- a/AMDiS/src/ProblemTimeInterface.h +++ b/AMDiS/src/ProblemTimeInterface.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Projection.cc b/AMDiS/src/Projection.cc index 22c55b66..ea35054c 100644 --- a/AMDiS/src/Projection.cc +++ b/AMDiS/src/Projection.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Projection.h" diff --git a/AMDiS/src/Projection.h b/AMDiS/src/Projection.h index c19f5c99..6d0ac2b3 100644 --- a/AMDiS/src/Projection.h +++ b/AMDiS/src/Projection.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/QPInfo.cc b/AMDiS/src/QPInfo.cc index 3e2aeecf..41094ee0 100644 --- a/AMDiS/src/QPInfo.cc +++ b/AMDiS/src/QPInfo.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "QPInfo.h" diff --git a/AMDiS/src/QPInfo.h b/AMDiS/src/QPInfo.h index 2e796579..b99ad5bd 100644 --- a/AMDiS/src/QPInfo.h +++ b/AMDiS/src/QPInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/QPsiPhi.cc b/AMDiS/src/QPsiPhi.cc index 5b297571..b6b155ef 100644 --- a/AMDiS/src/QPsiPhi.cc +++ b/AMDiS/src/QPsiPhi.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/QPsiPhi.h b/AMDiS/src/QPsiPhi.h index fe97e312..f9fcb675 100644 --- a/AMDiS/src/QPsiPhi.h +++ b/AMDiS/src/QPsiPhi.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Quadrature.cc b/AMDiS/src/Quadrature.cc index c2899581..0cf58570 100644 --- a/AMDiS/src/Quadrature.cc +++ b/AMDiS/src/Quadrature.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Quadrature.h" diff --git a/AMDiS/src/Quadrature.h b/AMDiS/src/Quadrature.h index 88453b8e..90560244 100644 --- a/AMDiS/src/Quadrature.h +++ b/AMDiS/src/Quadrature.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Quadrature.hh b/AMDiS/src/Quadrature.hh index 7c4b3725..15b2e55e 100644 --- a/AMDiS/src/Quadrature.hh +++ b/AMDiS/src/Quadrature.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ namespace AMDiS { diff --git a/AMDiS/src/RCNeighbourList.cc b/AMDiS/src/RCNeighbourList.cc index 5b8fb76d..79e05b88 100644 --- a/AMDiS/src/RCNeighbourList.cc +++ b/AMDiS/src/RCNeighbourList.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "RCNeighbourList.h" diff --git a/AMDiS/src/RCNeighbourList.h b/AMDiS/src/RCNeighbourList.h index cdc7281c..69b7b5e0 100644 --- a/AMDiS/src/RCNeighbourList.h +++ b/AMDiS/src/RCNeighbourList.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Recovery.cc b/AMDiS/src/Recovery.cc index f97c812b..62680586 100644 --- a/AMDiS/src/Recovery.cc +++ b/AMDiS/src/Recovery.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Recovery.h" @@ -518,7 +527,7 @@ void Recovery::fill_struct_vec(DOFVector *uh, #ifdef HAVE_PARALLEL_DOMAIN_AMDIS DofContainer boundaryDofs; DofContainerSet boundaryDofSet; - MeshDistributor::globalMeshDistributor->getAllBoundaryDofs(feSpace, 0, boundaryDofs); + Parallel::MeshDistributor::globalMeshDistributor->getAllBoundaryDofs(feSpace, 0, boundaryDofs); boundaryDofSet.insert(boundaryDofs.begin(), boundaryDofs.end()); #endif @@ -757,7 +766,7 @@ void Recovery::recoveryUh(DOFVector *uh, DOFVector &rec_vec) // if (neighbourSize[result_it.getDOFIndex()] > 0) // *result_it /= neighbourSize[result_it.getDOFIndex()]; - MeshDistributor::globalMeshDistributor->synchVector(rec_vec); + Parallel::MeshDistributor::globalMeshDistributor->synchVector(rec_vec); #endif } diff --git a/AMDiS/src/Recovery.h b/AMDiS/src/Recovery.h index 5109da83..86036c5b 100644 --- a/AMDiS/src/Recovery.h +++ b/AMDiS/src/Recovery.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/RefinementManager.cc b/AMDiS/src/RefinementManager.cc index 3f18d28c..8a03ebd0 100644 --- a/AMDiS/src/RefinementManager.cc +++ b/AMDiS/src/RefinementManager.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "RefinementManager.h" diff --git a/AMDiS/src/RefinementManager.h b/AMDiS/src/RefinementManager.h index 558a021c..ce280be8 100644 --- a/AMDiS/src/RefinementManager.h +++ b/AMDiS/src/RefinementManager.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/RefinementManager1d.cc b/AMDiS/src/RefinementManager1d.cc index 6bc99dad..dee09087 100644 --- a/AMDiS/src/RefinementManager1d.cc +++ b/AMDiS/src/RefinementManager1d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "RefinementManager.h" diff --git a/AMDiS/src/RefinementManager1d.h b/AMDiS/src/RefinementManager1d.h index 754e8898..a83aa759 100644 --- a/AMDiS/src/RefinementManager1d.h +++ b/AMDiS/src/RefinementManager1d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/RefinementManager2d.cc b/AMDiS/src/RefinementManager2d.cc index 4072d599..b5bdd0df 100644 --- a/AMDiS/src/RefinementManager2d.cc +++ b/AMDiS/src/RefinementManager2d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "RefinementManager.h" diff --git a/AMDiS/src/RefinementManager2d.h b/AMDiS/src/RefinementManager2d.h index c0c76484..63422c90 100644 --- a/AMDiS/src/RefinementManager2d.h +++ b/AMDiS/src/RefinementManager2d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/RefinementManager3d.cc b/AMDiS/src/RefinementManager3d.cc index 1bef5603..c7081aa8 100644 --- a/AMDiS/src/RefinementManager3d.cc +++ b/AMDiS/src/RefinementManager3d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "RefinementManager.h" diff --git a/AMDiS/src/RefinementManager3d.h b/AMDiS/src/RefinementManager3d.h index c19a006a..a686d443 100644 --- a/AMDiS/src/RefinementManager3d.h +++ b/AMDiS/src/RefinementManager3d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/RobinBC.cc b/AMDiS/src/RobinBC.cc index f4178450..1aa9dfc5 100644 --- a/AMDiS/src/RobinBC.cc +++ b/AMDiS/src/RobinBC.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "RobinBC.h" diff --git a/AMDiS/src/RobinBC.h b/AMDiS/src/RobinBC.h index 33471599..9cadf4f1 100644 --- a/AMDiS/src/RobinBC.h +++ b/AMDiS/src/RobinBC.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/RobinBC.hh_ b/AMDiS/src/RobinBC.hh_ deleted file mode 100644 index 374ad36f..00000000 --- a/AMDiS/src/RobinBC.hh_ +++ /dev/null @@ -1,148 +0,0 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - -#include "Assembler.h" -#include "est/Estimator.h" - -template -void RobinBC::fillLocalBC(DOFVector* vector, - ElInfo* elInfo, - const DegreeOfFreedom* dofIndices, - const BoundaryType* localBound, - int nBasFcts) -{ - int dim = elInfo->getMesh()->getDim(); - int i; - - if(neumannOperators) { - for(i=0; i < dim+1; i++) { - if(elInfo->getBoundOfBoundary(i) == boundaryType) { - vector->assemble(1.0, elInfo, localBound, (*neumannOperators)[i]); - } - } - } -} - -template -void RobinBC::fillLocalBC(DOFMatrix* matrix, - ElInfo* elInfo, - const DegreeOfFreedom* dofIndices, - const BoundaryType* localBound, - int nBasFcts) -{ - int dim = elInfo->getMesh()->getDim(); - int i; - - if(robinOperators) { - for(i=0; i < dim+1; i++) { - if(elInfo->getBoundOfBoundary(i) == boundaryType) { - matrix->assemble(1.0, elInfo, localBound, (*robinOperators)[i]); - } - } - } -} - -template -double RobinBC::boundResidual(ElInfo *elInfo, Estimator *estimator) -{ - int dim = elInfo->getMesh()->getDim(); - int i, j, iq; - DimVec lambda(dim, NO_INIT); - double n_A_grdUh, val, f; - WorldVector normal, grdUh, A_grdUh; - - const DimVec &Lambda = elInfo->getGrdLambda(); - double det = elInfo->getDet(); - - int numPoints; - int dow = Global::getGeo(WORLD); - - bool neumannQuad = false; - - TEST_EXIT(neumannOperators || robinOperators) - ("neither neumann nor robin operators set!\n"); - - if(!robinOperators) - neumannQuad = true; - else { - if(neumannOperators) { - if((*neumannOperators)[0]->getAssembler()-> - getZeroOrderAssembler()->getQuadrature()->getNumPoints() > - (*robinOperators)[0]->getAssembler()-> - getZeroOrderAssembler()->getQuadrature()->getNumPoints()) - { - neumannQuad = true; - } - } - } - - Quadrature *quadrature = NULL; - - int face; - for(face = 0; face < dim+1; face++) { - - elInfo->getNormal(face, normal); - - quadrature = - neumannQuad ? - (*neumannOperators)[face]->getAssembler()-> - getZeroOrderAssembler()->getQuadrature() : - (*robinOperators)[face]->getAssembler()-> - getZeroOrderAssembler()->getQuadrature(); - - numPoints = quadrature->getNumPoints(); - - if(elInfo->getBoundOfBoundary(face) == boundaryType) { - - (*neumannOperators)[face]->getAssembler()->getZeroOrderAssembler()-> - initElement(elInfo); - - val = 0.0; - for (iq = 0; iq < numPoints; iq++) { - lambda = quadrature->getLambda(iq); - - estimator->bas_fcts->evalGrdUh(lambda, Lambda, estimator->uhEl, &grdUh); - - if (estimator->isDiag) { - for (i = 0; i < dow; i++) - A_grdUh[i] = (*(estimator->A))[i][i]*grdUh[i]; - } else { - for (i = 0; i < dow; i++) - for (A_grdUh[i] = j = 0; j < dow; j++) - A_grdUh[i] += (*(estimator->A))[i][j]*grdUh[j]; - } - - f = 0.0; - - if(robinOperators) { - double uhAtQp = 0.0; - for(i=0; i < estimator->bas_fcts->getNumber(); i++) - uhAtQp += estimator->uhEl[i]* - (*(estimator->bas_fcts->getPhi(i)))(lambda); - (*robinOperators)[face]->evalZeroOrder(elInfo, iq, &f); - f *= uhAtQp; - } - - if(neumannOperators) - (*neumannOperators)[face]->evalZeroOrder(elInfo, iq, &f); - - n_A_grdUh = (normal*A_grdUh) - f; - val += quadrature->getWeight(iq)*sqr(n_A_grdUh); - } - } - } - - if (estimator->norm == NO_NORM || estimator->norm == L2_NORM) - return(estimator->C1*estimator->h2_from_det(det, dim)*det*val); - else - return(estimator->C1*det*val); -} diff --git a/AMDiS/src/ScalableQuadrature.cc b/AMDiS/src/ScalableQuadrature.cc index e2ef10bc..baf24e07 100644 --- a/AMDiS/src/ScalableQuadrature.cc +++ b/AMDiS/src/ScalableQuadrature.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ScalableQuadrature.h" diff --git a/AMDiS/src/ScalableQuadrature.h b/AMDiS/src/ScalableQuadrature.h index 10ac21b0..0d352efa 100644 --- a/AMDiS/src/ScalableQuadrature.h +++ b/AMDiS/src/ScalableQuadrature.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SecondOrderAssembler.cc b/AMDiS/src/SecondOrderAssembler.cc index 9b446d0f..c064b959 100644 --- a/AMDiS/src/SecondOrderAssembler.cc +++ b/AMDiS/src/SecondOrderAssembler.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/SecondOrderAssembler.h b/AMDiS/src/SecondOrderAssembler.h index 140deae3..765c8e5a 100644 --- a/AMDiS/src/SecondOrderAssembler.h +++ b/AMDiS/src/SecondOrderAssembler.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SecondOrderTerm.cc b/AMDiS/src/SecondOrderTerm.cc index a99bfbdb..a410fdb0 100644 --- a/AMDiS/src/SecondOrderTerm.cc +++ b/AMDiS/src/SecondOrderTerm.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "SecondOrderTerm.h" diff --git a/AMDiS/src/SecondOrderTerm.h b/AMDiS/src/SecondOrderTerm.h index e6c57766..773e8576 100644 --- a/AMDiS/src/SecondOrderTerm.h +++ b/AMDiS/src/SecondOrderTerm.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Serializable.h b/AMDiS/src/Serializable.h index 582183ba..99c3647a 100644 --- a/AMDiS/src/Serializable.h +++ b/AMDiS/src/Serializable.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Serializer.cc b/AMDiS/src/Serializer.cc index a4e1842f..92c97f42 100644 --- a/AMDiS/src/Serializer.cc +++ b/AMDiS/src/Serializer.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Serializer.h" diff --git a/AMDiS/src/Serializer.h b/AMDiS/src/Serializer.h index 531d8ba5..3fbe38f7 100644 --- a/AMDiS/src/Serializer.h +++ b/AMDiS/src/Serializer.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SolverMatrix.cc b/AMDiS/src/SolverMatrix.cc deleted file mode 100644 index daf769ae..00000000 --- a/AMDiS/src/SolverMatrix.cc +++ /dev/null @@ -1,15 +0,0 @@ -#include "SolverMatrix.h" -#include "Mapper.h" -#include "MatrixStreams.h" - -namespace AMDiS { - void SolverMatrix< Matrix >::buildMatrix() const - { - VectorialMapper mapper(*this); - matrix.change_dim(mapper.getNumRows(), mapper.getNumCols()); - set_to_zero(matrix); - MatMap< const SolverMatrix< Matrix >, VectorialMapper > matMap(*this,mapper); - matrix << matMap; - - } -} diff --git a/AMDiS/src/StandardProblemIteration.cc b/AMDiS/src/StandardProblemIteration.cc index 66a57805..9803e91e 100644 --- a/AMDiS/src/StandardProblemIteration.cc +++ b/AMDiS/src/StandardProblemIteration.cc @@ -1,19 +1,29 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "StandardProblemIteration.h" #include "AdaptInfo.h" #include "ProblemStatBase.h" #include "Global.h" +#include "Timer.h" namespace AMDiS { @@ -66,7 +76,7 @@ namespace AMDiS { Flag flag = 0, markFlag = 0; #ifdef HAVE_PARALLEL_DOMAIN_AMDIS - double first = MPI::Wtime(); + Timer t; #endif if (toDo.isSet(MARK)) @@ -90,8 +100,7 @@ namespace AMDiS { #ifdef HAVE_PARALLEL_DOMAIN_AMDIS MPI::COMM_WORLD.Barrier(); - INFO(info, 8)("Local mesh adaption needed %.5f seconds\n", - MPI::Wtime() - first); + INFO(info, 8)("Local mesh adaption needed %.5f seconds\n", t.elapsed()); #endif if (toDo.isSet(BUILD)) diff --git a/AMDiS/src/StandardProblemIteration.h b/AMDiS/src/StandardProblemIteration.h index bd04b9d5..01894614 100644 --- a/AMDiS/src/StandardProblemIteration.h +++ b/AMDiS/src/StandardProblemIteration.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SubAssembler.cc b/AMDiS/src/SubAssembler.cc index b2e57538..055bbdb3 100644 --- a/AMDiS/src/SubAssembler.cc +++ b/AMDiS/src/SubAssembler.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "SubAssembler.h" diff --git a/AMDiS/src/SubAssembler.h b/AMDiS/src/SubAssembler.h index f59bb44b..53af0c00 100644 --- a/AMDiS/src/SubAssembler.h +++ b/AMDiS/src/SubAssembler.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SubAssembler.hh b/AMDiS/src/SubAssembler.hh index 696e1ca0..94f2deb4 100644 --- a/AMDiS/src/SubAssembler.hh +++ b/AMDiS/src/SubAssembler.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Quadrature.h" diff --git a/AMDiS/src/SubElInfo.cc b/AMDiS/src/SubElInfo.cc index a4148944..d672e07d 100644 --- a/AMDiS/src/SubElInfo.cc +++ b/AMDiS/src/SubElInfo.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "SubElInfo.h" diff --git a/AMDiS/src/SubElInfo.h b/AMDiS/src/SubElInfo.h index 5ea226d9..32f910fb 100644 --- a/AMDiS/src/SubElInfo.h +++ b/AMDiS/src/SubElInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SubQuadrature.cc b/AMDiS/src/SubQuadrature.cc index 7cfacb5e..032ffb80 100644 --- a/AMDiS/src/SubQuadrature.cc +++ b/AMDiS/src/SubQuadrature.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "SubQuadrature.h" diff --git a/AMDiS/src/SubQuadrature.h b/AMDiS/src/SubQuadrature.h index ca352612..d53d20c0 100644 --- a/AMDiS/src/SubQuadrature.h +++ b/AMDiS/src/SubQuadrature.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SurfaceAssembler.h b/AMDiS/src/SurfaceAssembler.h index 61a23d3f..e8dd38a9 100644 --- a/AMDiS/src/SurfaceAssembler.h +++ b/AMDiS/src/SurfaceAssembler.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SurfaceOperator.h b/AMDiS/src/SurfaceOperator.h index 469c8bc6..d8c9acca 100644 --- a/AMDiS/src/SurfaceOperator.h +++ b/AMDiS/src/SurfaceOperator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SurfaceQuadrature.cc b/AMDiS/src/SurfaceQuadrature.cc index 907b51ed..49eb47da 100644 --- a/AMDiS/src/SurfaceQuadrature.cc +++ b/AMDiS/src/SurfaceQuadrature.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/SurfaceQuadrature.h b/AMDiS/src/SurfaceQuadrature.h index a5c1797e..ab9fe3fd 100644 --- a/AMDiS/src/SurfaceQuadrature.h +++ b/AMDiS/src/SurfaceQuadrature.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SurfaceRegion_ED.cc b/AMDiS/src/SurfaceRegion_ED.cc index a20cc076..6a80110b 100644 --- a/AMDiS/src/SurfaceRegion_ED.cc +++ b/AMDiS/src/SurfaceRegion_ED.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "SurfaceRegion_ED.h" diff --git a/AMDiS/src/SurfaceRegion_ED.h b/AMDiS/src/SurfaceRegion_ED.h index b87f2e75..2045993e 100644 --- a/AMDiS/src/SurfaceRegion_ED.h +++ b/AMDiS/src/SurfaceRegion_ED.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/SystemVector.cc b/AMDiS/src/SystemVector.cc index 6aca0529..17f625c7 100644 --- a/AMDiS/src/SystemVector.cc +++ b/AMDiS/src/SystemVector.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "SystemVector.h" diff --git a/AMDiS/src/SystemVector.h b/AMDiS/src/SystemVector.h index e43e356f..92ecd120 100644 --- a/AMDiS/src/SystemVector.h +++ b/AMDiS/src/SystemVector.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -353,7 +355,7 @@ namespace AMDiS { return sqrt(result); } - inline void mv(Matrix &matrix, + inline void mv(const Matrix &matrix, const SystemVector &x, SystemVector &result, bool add = false) diff --git a/AMDiS/src/Tetrahedron.cc b/AMDiS/src/Tetrahedron.cc index acf2202f..c79920ff 100644 --- a/AMDiS/src/Tetrahedron.cc +++ b/AMDiS/src/Tetrahedron.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Tetrahedron.h" diff --git a/AMDiS/src/Tetrahedron.h b/AMDiS/src/Tetrahedron.h index a7fa5792..826bc0d3 100644 --- a/AMDiS/src/Tetrahedron.h +++ b/AMDiS/src/Tetrahedron.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/TimedObject.h b/AMDiS/src/TimedObject.h index 9859282d..7f7ae2d8 100644 --- a/AMDiS/src/TimedObject.h +++ b/AMDiS/src/TimedObject.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Timer.cc b/AMDiS/src/Timer.cc index 666be5d8..9cc3c5a2 100644 --- a/AMDiS/src/Timer.cc +++ b/AMDiS/src/Timer.cc @@ -1,3 +1,22 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Timer.h" #ifdef HAVE_PARALLEL_DOMAIN_AMDIS #include diff --git a/AMDiS/src/Timer.h b/AMDiS/src/Timer.h index 91cfe822..e9068fb6 100644 --- a/AMDiS/src/Timer.h +++ b/AMDiS/src/Timer.h @@ -1,3 +1,22 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef AMDIS_TIMER_H #define AMDIS_TIMER_H diff --git a/AMDiS/src/TransformDOF.h b/AMDiS/src/TransformDOF.h index 4f6d53b9..0764e211 100644 --- a/AMDiS/src/TransformDOF.h +++ b/AMDiS/src/TransformDOF.h @@ -1,4 +1,22 @@ -/** \file TransformDOF.h */ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef AMDIS_TRANSFORM_DOF_H #define AMDIS_TRANSFORM_DOF_H diff --git a/AMDiS/src/Traverse.cc b/AMDiS/src/Traverse.cc index 8bc5fead..79917219 100644 --- a/AMDiS/src/Traverse.cc +++ b/AMDiS/src/Traverse.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Traverse.h" diff --git a/AMDiS/src/Traverse.h b/AMDiS/src/Traverse.h index edb23c86..e68a5f63 100644 --- a/AMDiS/src/Traverse.h +++ b/AMDiS/src/Traverse.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/Triangle.cc b/AMDiS/src/Triangle.cc index 66e6130e..3cb4e585 100644 --- a/AMDiS/src/Triangle.cc +++ b/AMDiS/src/Triangle.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Triangle.h" diff --git a/AMDiS/src/Triangle.h b/AMDiS/src/Triangle.h index 8ada40a2..947e33ac 100644 --- a/AMDiS/src/Triangle.h +++ b/AMDiS/src/Triangle.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/UmfPackSolver.h b/AMDiS/src/UmfPackSolver.h deleted file mode 100644 index df4ce232..00000000 --- a/AMDiS/src/UmfPackSolver.h +++ /dev/null @@ -1,159 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -/** \file UmfPackSolver.h */ - -#ifndef AMDIS_UMFPACKSOLVER_H -#define AMDIS_UMFPACKSOLVER_H - -#if defined HAVE_UMFPACK && defined MTL_HAS_UMFPACK - -#include -#include -#include -#include "MTL4Solver.h" - -namespace AMDiS { - - /** - * \ingroup Solver - * - * \brief - * Wrapper for the external UMFPACK solver: - * http://www.cise.ufl.edu/research/sparse/umfpack/ - * - * This is a direct solver for large sparse matrices. - */ - template< typename Matrix > - struct Umfpack_runner - { - typedef Matrix matrix_type ; - OEMSolver& oem; - Umfpack_runner(OEMSolver* oem_): - oem(*oem_), - solver(NULL), - store_symbolic(0), - symmetric_strategy(0), - alloc_init(0.7) - { - FUNCNAME_DBG("Umfpack_runner::Umfpack_runner()"); - - TEST_EXIT_DBG(oem_ != NULL)("Need real OEMSolver\n"); - Parameters::get(oem.getName() + "->store symbolic", store_symbolic); - Parameters::get(oem.getName() + "->symmetric strategy", symmetric_strategy); - Parameters::get(oem.getName() + "->alloc init", alloc_init); - } - - void init(const Matrix& A) - { - if (solver != NULL) { - delete solver; - solver = NULL; - } - - solver = new mtl::matrix::umfpack::solver(A, symmetric_strategy, alloc_init); - } - - template< typename Vector> - int solve(const Matrix& A, Vector& x, Vector& b) - { - FUNCNAME("Umfpack_runner::solve()"); - TEST_EXIT(solver != NULL)("The umfpack solver was not initialized\n"); -#if 0 - if (store_symbolic) - solver->update_numeric(); - else - solver->update(); -#endif - - int code = (*solver)(x, b); - if (oem.getInfo() > 0) { - mtl::dense_vector r(b); - r -= A * x; - double residual = two_norm(r); - oem.setResidual(residual); - oem.setErrorCode(code); - MSG("UmfPackSolver: ||b-Ax|| = %e\n", residual); - TEST_EXIT(residual <= oem.getTolerance())("Tolerance tol = %e could not be reached!\n Set tolerance by '->solver->tolerance:' \n", oem.getTolerance()); - } - return code; - } - - void exit() - {} - - ~Umfpack_runner() - { - if (solver != NULL) { - delete solver; - solver = NULL; - } - } - - private: - mtl::matrix::umfpack::solver *solver; - - int store_symbolic; - - int symmetric_strategy; - - double alloc_init; - }; - - using namespace MTLTypes; - class UmfPackSolver : public MTL4Solver > - { - protected: - - public: - /// Creator class used in the OEMSolverMap. - class Creator : public OEMSolverCreator - { - public: - virtual ~Creator() {} - - /// Returns a new UmfPackSolver object. - OEMSolver* create() - { - return new UmfPackSolver(this->name); - } - }; - - /// Constructor - UmfPackSolver(std::string name) - : MTL4Solver< MTLMatrix, MTLVector, Umfpack_runner< MTLMatrix > >(name) - {} - - int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - VectorialMapper& m, - bool createMatrixData, - bool storeMatrixData) - { - return solve(A, x, b, m, createMatrixData, storeMatrixData); - } - }; - -} - -#endif // HAVE_UMFPACK - -#endif // AMDIS_UMFPACKSOLVER_H diff --git a/AMDiS/src/VertexInfo.h b/AMDiS/src/VertexInfo.h index ea39c734..7d6756b8 100644 --- a/AMDiS/src/VertexInfo.h +++ b/AMDiS/src/VertexInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/VertexVector.cc b/AMDiS/src/VertexVector.cc index fef1ee2f..09326885 100644 --- a/AMDiS/src/VertexVector.cc +++ b/AMDiS/src/VertexVector.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "VertexVector.h" diff --git a/AMDiS/src/VertexVector.h b/AMDiS/src/VertexVector.h index 6dd9e472..c837e9d0 100644 --- a/AMDiS/src/VertexVector.h +++ b/AMDiS/src/VertexVector.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ZeroOrderAssembler.cc b/AMDiS/src/ZeroOrderAssembler.cc index 1b39ac32..6553ca3c 100644 --- a/AMDiS/src/ZeroOrderAssembler.cc +++ b/AMDiS/src/ZeroOrderAssembler.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/ZeroOrderAssembler.h b/AMDiS/src/ZeroOrderAssembler.h index 43970c64..083a8908 100644 --- a/AMDiS/src/ZeroOrderAssembler.h +++ b/AMDiS/src/ZeroOrderAssembler.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/ZeroOrderTerm.cc b/AMDiS/src/ZeroOrderTerm.cc index 85e28dde..07dd0398 100644 --- a/AMDiS/src/ZeroOrderTerm.cc +++ b/AMDiS/src/ZeroOrderTerm.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ZeroOrderTerm.h" diff --git a/AMDiS/src/ZeroOrderTerm.h b/AMDiS/src/ZeroOrderTerm.h index 20088a8e..eec70bd7 100644 --- a/AMDiS/src/ZeroOrderTerm.h +++ b/AMDiS/src/ZeroOrderTerm.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/CFE_Integration.cc b/AMDiS/src/compositeFEM/CFE_Integration.cc index 7fe39133..3010ad48 100644 --- a/AMDiS/src/compositeFEM/CFE_Integration.cc +++ b/AMDiS/src/compositeFEM/CFE_Integration.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "CFE_Integration.h" diff --git a/AMDiS/src/compositeFEM/CFE_Integration.h b/AMDiS/src/compositeFEM/CFE_Integration.h index 8e8a4ade..fd64a0b3 100644 --- a/AMDiS/src/compositeFEM/CFE_Integration.h +++ b/AMDiS/src/compositeFEM/CFE_Integration.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc b/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc index 625f6a3c..04aeadab 100644 --- a/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc +++ b/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.h b/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.h index 561f646f..3f8061ec 100644 --- a/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.h +++ b/AMDiS/src/compositeFEM/CFE_NormAndErrorFcts.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/CompositeFEMMethods.cc b/AMDiS/src/compositeFEM/CompositeFEMMethods.cc index 42b12d39..86e858e7 100644 --- a/AMDiS/src/compositeFEM/CompositeFEMMethods.cc +++ b/AMDiS/src/compositeFEM/CompositeFEMMethods.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BasisFunction.h" diff --git a/AMDiS/src/compositeFEM/CompositeFEMMethods.h b/AMDiS/src/compositeFEM/CompositeFEMMethods.h index 1fa4e49b..77d416cb 100644 --- a/AMDiS/src/compositeFEM/CompositeFEMMethods.h +++ b/AMDiS/src/compositeFEM/CompositeFEMMethods.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/CompositeFEMOperator.cc b/AMDiS/src/compositeFEM/CompositeFEMOperator.cc index 2c8c32e7..d46e3c05 100644 --- a/AMDiS/src/compositeFEM/CompositeFEMOperator.cc +++ b/AMDiS/src/compositeFEM/CompositeFEMOperator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/compositeFEM/CompositeFEMOperator.h b/AMDiS/src/compositeFEM/CompositeFEMOperator.h index a1330d29..1a4fd81e 100644 --- a/AMDiS/src/compositeFEM/CompositeFEMOperator.h +++ b/AMDiS/src/compositeFEM/CompositeFEMOperator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/ElementLevelSet.cc b/AMDiS/src/compositeFEM/ElementLevelSet.cc index 5979a45f..2a193f9f 100644 --- a/AMDiS/src/compositeFEM/ElementLevelSet.cc +++ b/AMDiS/src/compositeFEM/ElementLevelSet.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElementLevelSet.h" diff --git a/AMDiS/src/compositeFEM/ElementLevelSet.h b/AMDiS/src/compositeFEM/ElementLevelSet.h index ef958d81..a6f54f30 100644 --- a/AMDiS/src/compositeFEM/ElementLevelSet.h +++ b/AMDiS/src/compositeFEM/ElementLevelSet.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/LevelSetAdaptMesh.cc b/AMDiS/src/compositeFEM/LevelSetAdaptMesh.cc index 2a2ee42c..ef4e1c46 100644 --- a/AMDiS/src/compositeFEM/LevelSetAdaptMesh.cc +++ b/AMDiS/src/compositeFEM/LevelSetAdaptMesh.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Traverse.h" diff --git a/AMDiS/src/compositeFEM/LevelSetAdaptMesh.h b/AMDiS/src/compositeFEM/LevelSetAdaptMesh.h index 5d1c5d19..191ae3df 100644 --- a/AMDiS/src/compositeFEM/LevelSetAdaptMesh.h +++ b/AMDiS/src/compositeFEM/LevelSetAdaptMesh.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/PenaltyOperator.cc b/AMDiS/src/compositeFEM/PenaltyOperator.cc index e3ead563..5da67b80 100644 --- a/AMDiS/src/compositeFEM/PenaltyOperator.cc +++ b/AMDiS/src/compositeFEM/PenaltyOperator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "PenaltyOperator.h" diff --git a/AMDiS/src/compositeFEM/PenaltyOperator.h b/AMDiS/src/compositeFEM/PenaltyOperator.h index da31a3ee..3a9a9bc8 100644 --- a/AMDiS/src/compositeFEM/PenaltyOperator.h +++ b/AMDiS/src/compositeFEM/PenaltyOperator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/SubElementAssembler.cc b/AMDiS/src/compositeFEM/SubElementAssembler.cc index a42289c9..0744e0f1 100644 --- a/AMDiS/src/compositeFEM/SubElementAssembler.cc +++ b/AMDiS/src/compositeFEM/SubElementAssembler.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/compositeFEM/SubElementAssembler.h b/AMDiS/src/compositeFEM/SubElementAssembler.h index d46c30b9..86d807c1 100644 --- a/AMDiS/src/compositeFEM/SubElementAssembler.h +++ b/AMDiS/src/compositeFEM/SubElementAssembler.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/SubPolytope.cc b/AMDiS/src/compositeFEM/SubPolytope.cc index 0d41130c..c2c3ce49 100644 --- a/AMDiS/src/compositeFEM/SubPolytope.cc +++ b/AMDiS/src/compositeFEM/SubPolytope.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElInfo.h" diff --git a/AMDiS/src/compositeFEM/SubPolytope.h b/AMDiS/src/compositeFEM/SubPolytope.h index 014143f5..192f314b 100644 --- a/AMDiS/src/compositeFEM/SubPolytope.h +++ b/AMDiS/src/compositeFEM/SubPolytope.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/TranslateLsFct.h b/AMDiS/src/compositeFEM/TranslateLsFct.h index ea0336b4..42b24300 100644 --- a/AMDiS/src/compositeFEM/TranslateLsFct.h +++ b/AMDiS/src/compositeFEM/TranslateLsFct.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/compositeFEM/compositeFEM.h b/AMDiS/src/compositeFEM/compositeFEM.h index 26540ffb..ee300fd9 100644 --- a/AMDiS/src/compositeFEM/compositeFEM.h +++ b/AMDiS/src/compositeFEM/compositeFEM.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/est/Estimator.cc b/AMDiS/src/est/Estimator.cc index 7f847912..3fe5d394 100644 --- a/AMDiS/src/est/Estimator.cc +++ b/AMDiS/src/est/Estimator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "Estimator.h" diff --git a/AMDiS/src/est/Estimator.h b/AMDiS/src/est/Estimator.h index fddbcff0..a0ffa938 100644 --- a/AMDiS/src/est/Estimator.h +++ b/AMDiS/src/est/Estimator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/est/RecoveryEstimator.cc b/AMDiS/src/est/RecoveryEstimator.cc index 540f2b74..e790bbd6 100644 --- a/AMDiS/src/est/RecoveryEstimator.cc +++ b/AMDiS/src/est/RecoveryEstimator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "RecoveryEstimator.h" diff --git a/AMDiS/src/est/RecoveryEstimator.h b/AMDiS/src/est/RecoveryEstimator.h index b64b53c2..b3582481 100644 --- a/AMDiS/src/est/RecoveryEstimator.h +++ b/AMDiS/src/est/RecoveryEstimator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/est/ResidualEstimator.cc b/AMDiS/src/est/ResidualEstimator.cc index 6362e324..1c37433b 100644 --- a/AMDiS/src/est/ResidualEstimator.cc +++ b/AMDiS/src/est/ResidualEstimator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ResidualEstimator.h" @@ -171,19 +180,19 @@ namespace AMDiS { DOFVector > coords(uh[0]->getFeSpace(), "tmp"); mesh->getDofIndexCoords(coords); - InteriorBoundary &intBoundary = - MeshDistributor::globalMeshDistributor->getIntBoundary(0); + Parallel::InteriorBoundary &intBoundary = + Parallel::MeshDistributor::globalMeshDistributor->getIntBoundary(0); ElInfo *elInfo = mesh->createNewElInfo(); elInfo->setFillFlag(Mesh::FILL_COORDS); - StdMpi > stdMpiDet(MeshDistributor::globalMeshDistributor->getMpiComm(0)); - StdMpi > > > stdMpiGrdUh(MeshDistributor::globalMeshDistributor->getMpiComm(0)); + Parallel::StdMpi > stdMpiDet(Parallel::MeshDistributor::globalMeshDistributor->getMpiComm(0)); + Parallel::StdMpi > > > stdMpiGrdUh(Parallel::MeshDistributor::globalMeshDistributor->getMpiComm(0)); - RankToBoundMap allBounds = intBoundary.getOther(); + Parallel::RankToBoundMap allBounds = intBoundary.getOther(); allBounds.insert(intBoundary.getOwn().begin(), intBoundary.getOwn().end()); - for (RankToBoundMap::iterator it = allBounds.begin(); + for (Parallel::RankToBoundMap::iterator it = allBounds.begin(); it != allBounds.end(); ++it) { vector subBound; @@ -242,7 +251,7 @@ namespace AMDiS { stdMpiDet.startCommunication(); stdMpiGrdUh.startCommunication(); - for (RankToBoundMap::iterator it = allBounds.begin(); + for (Parallel::RankToBoundMap::iterator it = allBounds.begin(); it != allBounds.end(); ++it) { vector subBound; diff --git a/AMDiS/src/est/ResidualEstimator.h b/AMDiS/src/est/ResidualEstimator.h index bc7846ec..1cc3c0fd 100644 --- a/AMDiS/src/est/ResidualEstimator.h +++ b/AMDiS/src/est/ResidualEstimator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -64,7 +66,6 @@ namespace AMDiS { class ResidualEstimator : public Estimator { public: - /// Creator class used in the OEMSolverMap. class Creator : public EstimatorCreator { public: diff --git a/AMDiS/src/est/SimpleResidualEstimator.cc b/AMDiS/src/est/SimpleResidualEstimator.cc index 749fba1e..fcceef79 100644 --- a/AMDiS/src/est/SimpleResidualEstimator.cc +++ b/AMDiS/src/est/SimpleResidualEstimator.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "est/SimpleResidualEstimator.h" diff --git a/AMDiS/src/est/SimpleResidualEstimator.h b/AMDiS/src/est/SimpleResidualEstimator.h index 433ae0b8..41b08c59 100644 --- a/AMDiS/src/est/SimpleResidualEstimator.h +++ b/AMDiS/src/est/SimpleResidualEstimator.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -46,7 +48,6 @@ namespace AMDiS { class SimpleResidualEstimator : public Estimator { public: - /// Creator class used in the OEMSolverMap. class Creator : public EstimatorCreator { public: diff --git a/AMDiS/src/io/ArhReader.cc b/AMDiS/src/io/ArhReader.cc index 71cd84b7..cbcb88c5 100644 --- a/AMDiS/src/io/ArhReader.cc +++ b/AMDiS/src/io/ArhReader.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/ArhReader.h b/AMDiS/src/io/ArhReader.h index 8d2a3357..e076504d 100644 --- a/AMDiS/src/io/ArhReader.h +++ b/AMDiS/src/io/ArhReader.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == Amdis - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/ArhWriter.cc b/AMDiS/src/io/ArhWriter.cc index c6d0517e..8628ee30 100644 --- a/AMDiS/src/io/ArhWriter.cc +++ b/AMDiS/src/io/ArhWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/ArhWriter.h b/AMDiS/src/io/ArhWriter.h index 166ce2ec..2ef6fc0a 100644 --- a/AMDiS/src/io/ArhWriter.h +++ b/AMDiS/src/io/ArhWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == Amdis - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/DataCollector.h b/AMDiS/src/io/DataCollector.h index e468b95b..608445e2 100644 --- a/AMDiS/src/io/DataCollector.h +++ b/AMDiS/src/io/DataCollector.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/DataCollector.hh b/AMDiS/src/io/DataCollector.hh index f8613aa5..e4ebc034 100644 --- a/AMDiS/src/io/DataCollector.hh +++ b/AMDiS/src/io/DataCollector.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /** \file DataCollector.hh */ diff --git a/AMDiS/src/io/DofWriter.cc b/AMDiS/src/io/DofWriter.cc index 5d32dce5..86c2c643 100644 --- a/AMDiS/src/io/DofWriter.cc +++ b/AMDiS/src/io/DofWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "DofWriter.h" diff --git a/AMDiS/src/io/DofWriter.h b/AMDiS/src/io/DofWriter.h index b3236c05..ff5ad48c 100644 --- a/AMDiS/src/io/DofWriter.h +++ b/AMDiS/src/io/DofWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/ElementFileWriter.cc b/AMDiS/src/io/ElementFileWriter.cc index 79783757..bcb77ad1 100644 --- a/AMDiS/src/io/ElementFileWriter.cc +++ b/AMDiS/src/io/ElementFileWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/ElementFileWriter.h b/AMDiS/src/io/ElementFileWriter.h index e678ab8d..37f5dbc4 100644 --- a/AMDiS/src/io/ElementFileWriter.h +++ b/AMDiS/src/io/ElementFileWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/FileCompression.h b/AMDiS/src/io/FileCompression.h index 9b438dc8..99c9f478 100644 --- a/AMDiS/src/io/FileCompression.h +++ b/AMDiS/src/io/FileCompression.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef AMDIS_FILE_COMPRESSION_H #define AMDIS_FILE_COMPRESSION_H diff --git a/AMDiS/src/io/FileWriter.cc b/AMDiS/src/io/FileWriter.cc index 45793ac2..552af1ad 100644 --- a/AMDiS/src/io/FileWriter.cc +++ b/AMDiS/src/io/FileWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "boost/lexical_cast.hpp" diff --git a/AMDiS/src/io/FileWriter.h b/AMDiS/src/io/FileWriter.h index 9014e297..4e93f8e8 100644 --- a/AMDiS/src/io/FileWriter.h +++ b/AMDiS/src/io/FileWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/FileWriter.hh b/AMDiS/src/io/FileWriter.hh index 6f99f3a7..e237e630 100644 --- a/AMDiS/src/io/FileWriter.hh +++ b/AMDiS/src/io/FileWriter.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /** \file FileWriter.hh */ diff --git a/AMDiS/src/io/GNUPlotWriter.cc b/AMDiS/src/io/GNUPlotWriter.cc index c6f0484d..94425719 100644 --- a/AMDiS/src/io/GNUPlotWriter.cc +++ b/AMDiS/src/io/GNUPlotWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "GNUPlotWriter.h" diff --git a/AMDiS/src/io/GNUPlotWriter.h b/AMDiS/src/io/GNUPlotWriter.h index 9f203ebf..14f44daf 100644 --- a/AMDiS/src/io/GNUPlotWriter.h +++ b/AMDiS/src/io/GNUPlotWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/GridWriter.h b/AMDiS/src/io/GridWriter.h index 553da77a..b811f17c 100644 --- a/AMDiS/src/io/GridWriter.h +++ b/AMDiS/src/io/GridWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/GridWriter.hh b/AMDiS/src/io/GridWriter.hh index 97115301..5c135f41 100644 --- a/AMDiS/src/io/GridWriter.hh +++ b/AMDiS/src/io/GridWriter.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/MacroInfo.cc b/AMDiS/src/io/MacroInfo.cc index ac1fbb4d..b277ea85 100644 --- a/AMDiS/src/io/MacroInfo.cc +++ b/AMDiS/src/io/MacroInfo.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "MacroInfo.h" diff --git a/AMDiS/src/io/MacroInfo.h b/AMDiS/src/io/MacroInfo.h index df9d3d55..d3836b8d 100644 --- a/AMDiS/src/io/MacroInfo.h +++ b/AMDiS/src/io/MacroInfo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/MacroReader.cc b/AMDiS/src/io/MacroReader.cc index e15066d6..a7a24a75 100644 --- a/AMDiS/src/io/MacroReader.cc +++ b/AMDiS/src/io/MacroReader.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/MacroReader.h b/AMDiS/src/io/MacroReader.h index b407638b..c7e34f77 100644 --- a/AMDiS/src/io/MacroReader.h +++ b/AMDiS/src/io/MacroReader.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/MacroWriter.cc b/AMDiS/src/io/MacroWriter.cc index b155cbbe..65b1cfa1 100644 --- a/AMDiS/src/io/MacroWriter.cc +++ b/AMDiS/src/io/MacroWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/MacroWriter.h b/AMDiS/src/io/MacroWriter.h index 1fe26219..5ee9e4e9 100644 --- a/AMDiS/src/io/MacroWriter.h +++ b/AMDiS/src/io/MacroWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/PngReader.cc b/AMDiS/src/io/PngReader.cc index 2a0af47c..4684ec58 100644 --- a/AMDiS/src/io/PngReader.cc +++ b/AMDiS/src/io/PngReader.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #if defined HAVE_PNG diff --git a/AMDiS/src/io/PngReader.h b/AMDiS/src/io/PngReader.h index ce31d795..a8854b0f 100644 --- a/AMDiS/src/io/PngReader.h +++ b/AMDiS/src/io/PngReader.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/PngWriter.cc b/AMDiS/src/io/PngWriter.cc index 01164cf3..a258b66d 100644 --- a/AMDiS/src/io/PngWriter.cc +++ b/AMDiS/src/io/PngWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #if defined HAVE_PNG diff --git a/AMDiS/src/io/PngWriter.h b/AMDiS/src/io/PngWriter.h index 497954a5..090491f6 100644 --- a/AMDiS/src/io/PngWriter.h +++ b/AMDiS/src/io/PngWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/PovrayWriter.cc b/AMDiS/src/io/PovrayWriter.cc index 585bab62..0da9b633 100644 --- a/AMDiS/src/io/PovrayWriter.cc +++ b/AMDiS/src/io/PovrayWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "PovrayWriter.h" diff --git a/AMDiS/src/io/PovrayWriter.h b/AMDiS/src/io/PovrayWriter.h index cc9a3760..f99e4dd7 100644 --- a/AMDiS/src/io/PovrayWriter.h +++ b/AMDiS/src/io/PovrayWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/Spreadsheet.cc b/AMDiS/src/io/Spreadsheet.cc index 5cb39df1..7f97faea 100644 --- a/AMDiS/src/io/Spreadsheet.cc +++ b/AMDiS/src/io/Spreadsheet.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/Spreadsheet.h b/AMDiS/src/io/Spreadsheet.h index 795c6bd9..6ec469dd 100644 --- a/AMDiS/src/io/Spreadsheet.h +++ b/AMDiS/src/io/Spreadsheet.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == Amdis - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/ValueReader.cc b/AMDiS/src/io/ValueReader.cc index 85dd82c2..68a99b40 100644 --- a/AMDiS/src/io/ValueReader.cc +++ b/AMDiS/src/io/ValueReader.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/ValueReader.h b/AMDiS/src/io/ValueReader.h index 7b97bec3..e1cc2fa2 100644 --- a/AMDiS/src/io/ValueReader.h +++ b/AMDiS/src/io/ValueReader.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/ValueWriter.cc b/AMDiS/src/io/ValueWriter.cc index 5435282d..47510c68 100644 --- a/AMDiS/src/io/ValueWriter.cc +++ b/AMDiS/src/io/ValueWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/ValueWriter.h b/AMDiS/src/io/ValueWriter.h index f3a229ff..5097dc63 100644 --- a/AMDiS/src/io/ValueWriter.h +++ b/AMDiS/src/io/ValueWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/VtkVectorWriter.cc b/AMDiS/src/io/VtkVectorWriter.cc index 25544a5a..8c330bd4 100644 --- a/AMDiS/src/io/VtkVectorWriter.cc +++ b/AMDiS/src/io/VtkVectorWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/VtkVectorWriter.h b/AMDiS/src/io/VtkVectorWriter.h index fc1251b4..76d786c9 100644 --- a/AMDiS/src/io/VtkVectorWriter.h +++ b/AMDiS/src/io/VtkVectorWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/VtkVectorWriter.hh b/AMDiS/src/io/VtkVectorWriter.hh index 9333264c..c6ad34d2 100644 --- a/AMDiS/src/io/VtkVectorWriter.hh +++ b/AMDiS/src/io/VtkVectorWriter.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /** \file VtkVectorWriter.hh */ diff --git a/AMDiS/src/io/VtkWriter.cc b/AMDiS/src/io/VtkWriter.cc index 08ea4627..f8f1ede9 100644 --- a/AMDiS/src/io/VtkWriter.cc +++ b/AMDiS/src/io/VtkWriter.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/io/VtkWriter.h b/AMDiS/src/io/VtkWriter.h index 35ea3c93..6f0836e2 100644 --- a/AMDiS/src/io/VtkWriter.h +++ b/AMDiS/src/io/VtkWriter.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/io/VtkWriter.hh b/AMDiS/src/io/VtkWriter.hh index 963c1f9b..1ac863e2 100644 --- a/AMDiS/src/io/VtkWriter.hh +++ b/AMDiS/src/io/VtkWriter.hh @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include diff --git a/AMDiS/src/itl/minres.hpp b/AMDiS/src/itl/minres.hpp deleted file mode 100644 index 2c6fa729..00000000 --- a/AMDiS/src/itl/minres.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// Software License for MTL -// -// Copyright (c) 2007 The Trustees of Indiana University. -// 2008 Dresden University of Technology and the Trustees of Indiana University. -// All rights reserved. -// Authors: Peter Gottschling and Andrew Lumsdaine -// -// This file is part of the Matrix Template Library -// -// See also license.mtl.txt in the distribution. - -// Written by Thomas Witkowski - -#ifndef ITL_MINRES_INCLUDE -#define ITL_MINRES_INCLUDE - -#include - -namespace itl { - - template < typename Matrix, typename Vector, - typename LeftPreconditioner, typename RightPreconditioner, -typename Iteration > - int minres(const Matrix &A, Vector &x, const Vector &b, const -LeftPreconditioner &L, const RightPreconditioner &R, Iteration& iter) - { - - using std::abs; - using mtl::irange; using mtl::imax; using math::reciprocal; - typedef typename mtl::Collection::value_type Scalar; - typedef typename mtl::Collection::size_type Size; - - if (size(b) == 0) - throw mtl::logic_error("empty rhs vector"); - - Scalar zero= math::zero(b[0]), one= math::one(b[0]); - Vector v0(size(x), zero), v1(b - A * x), v2(v1), z1(solve(L, v1)), z2(size(x), zero); - Vector w0(size(x), zero), w1(size(x), zero), w2(size(x), zero); - - Scalar s0(zero), s1(zero), c0(one), c1(one), gamma0(one); - Scalar gamma1(sqrt(dot(z1, v1))), gamma2(zero), eta(gamma1); - Scalar sigma1(one), alpha0(zero), alpha1(zero), alpha2(zero), alpha3(zero); - - while (!iter.finished(abs(eta))) { - z1 *= reciprocal(gamma1); - v2 = A * z1; - sigma1 = dot(v2, z1); - v2 += -(sigma1 / gamma1) * v1 - (gamma1 / gamma0) * v0; - - z2 = solve(L, v2); - - gamma2 = sqrt(dot(z2, v2)); - alpha0 = c1 * sigma1 - c0 * s1 * gamma1; - alpha1 = sqrt(alpha0 * alpha0 + gamma2 * gamma2); - alpha2 = s1 * sigma1 + c0 * c1 * gamma1; - alpha3 = s0 * gamma1; - - c0 = c1; - c1 = alpha0 / alpha1; - s0 = s1; - s1 = gamma2 / alpha1; - - w2 = z1 - alpha3 * w0 - alpha2 * w1; - w2 *= reciprocal(alpha1); - - x += c1 * eta * w2; - eta *= -s1; - - w0 = w1; - w1 = w2; - v0 = v1; - v1 = v2; - z1 = z2; - - gamma0 = gamma1; - gamma1 = gamma2; - - ++iter; - } - - return iter; - } - -} // namespace itl; - -#endif // ITL_MINRES_INCLUDE - diff --git a/AMDiS/src/nonlin/Newton.h b/AMDiS/src/nonlin/Newton.h index 4a274ca3..251247e7 100644 --- a/AMDiS/src/nonlin/Newton.h +++ b/AMDiS/src/nonlin/Newton.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -25,7 +27,7 @@ #include "CreatorInterface.h" #include "NonLinSolver.h" -#include "OEMSolver.h" +#include "solver/LinearSolver.h" #include "io/VtkWriter.h" namespace AMDiS { @@ -54,7 +56,7 @@ namespace AMDiS { }; /// Calls constructor of base class NonLinSolver - Newton(const std::string& name, OEMSolver *linSolver) + Newton(const std::string& name, LinearSolver *linSolver) : NonLinSolver(name, linSolver), b(NULL), buildCycle(1) diff --git a/AMDiS/src/nonlin/NewtonArmijo.h b/AMDiS/src/nonlin/NewtonArmijo.h index 36ef9f5f..0ce5f1be 100644 --- a/AMDiS/src/nonlin/NewtonArmijo.h +++ b/AMDiS/src/nonlin/NewtonArmijo.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /// literature: some ideas based on "Zur Numerik nichtlinearer Gelichungssysteme (Teil 2)", Werner Vogt, TU Ilmenau, 2004 @@ -26,7 +28,7 @@ #include "CreatorInterface.h" #include "NonLinSolver.h" -#include "OEMSolver.h" +#include "solver/LinearSolver.h" #include "io/VtkWriter.h" namespace AMDiS { @@ -55,7 +57,7 @@ namespace AMDiS { }; /// Calls constructor of base class NonLinSolver - NewtonArmijo(const std::string& name, OEMSolver *linSolver) + NewtonArmijo(const std::string& name, LinearSolver *linSolver) : NonLinSolver(name, linSolver), b(NULL), buildCycle(1), diff --git a/AMDiS/src/nonlin/NonLinSolver.h b/AMDiS/src/nonlin/NonLinSolver.h index 413eef0c..bae37e97 100644 --- a/AMDiS/src/nonlin/NonLinSolver.h +++ b/AMDiS/src/nonlin/NonLinSolver.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -29,15 +31,11 @@ #include "CreatorInterface.h" #include "MatrixVector.h" #include "DOFMatrix.h" -#include "OEMSolver.h" +#include "solver/LinearSolver.h" #include "ProblemStat.h" #ifdef HAVE_PARALLEL_DOMAIN_AMDIS -#ifdef HAVE_PARALLEL_MTL4 -#include "parallel/Mtl4Solver.h" -#else -#include "parallel/PetscProblemStat.h" -#endif +#include "parallel/ParallelProblemStat.h" #endif namespace AMDiS { @@ -56,7 +54,7 @@ namespace AMDiS { * * \param name Name of this solver */ - NonLinSolver(const std::string &name, OEMSolver *solver) + NonLinSolver(const std::string &name, LinearSolver *solver) : name(name), linSolver(solver), tolerance(1.e-8), @@ -100,7 +98,7 @@ namespace AMDiS { return tolerance; } - inline OEMSolver* getLinearSolver() + inline LinearSolver* getLinearSolver() { return linSolver; } @@ -133,7 +131,7 @@ namespace AMDiS { std::string name; /// Linear solver object. - OEMSolver *linSolver; + LinearSolver *linSolver; /// Solver tolerance. double tolerance; @@ -166,7 +164,7 @@ namespace AMDiS { name = n; } - void setLinearSolver(OEMSolver *solver) + void setLinearSolver(LinearSolver *solver) { linearSolver = solver; } @@ -174,7 +172,7 @@ namespace AMDiS { protected: std::string name; - OEMSolver *linearSolver; + LinearSolver *linearSolver; }; } diff --git a/AMDiS/src/nonlin/ProblemNonLin.cc b/AMDiS/src/nonlin/ProblemNonLin.cc index ec1e30de..2853060b 100644 --- a/AMDiS/src/nonlin/ProblemNonLin.cc +++ b/AMDiS/src/nonlin/ProblemNonLin.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ProblemNonLin.h" diff --git a/AMDiS/src/nonlin/ProblemNonLin.h b/AMDiS/src/nonlin/ProblemNonLin.h index fbe8f387..af76f3d4 100644 --- a/AMDiS/src/nonlin/ProblemNonLin.h +++ b/AMDiS/src/nonlin/ProblemNonLin.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -30,11 +32,7 @@ #include #ifdef HAVE_PARALLEL_DOMAIN_AMDIS -#ifdef HAVE_PARALLEL_MTL4 -#include "parallel/Mtl4Solver.h" -#else -#include "parallel/PetscProblemStat.h" -#endif +#include "parallel/ParallelProblemStat.h" #endif using namespace std; diff --git a/AMDiS/src/parallel/BddcMlSolver.cc b/AMDiS/src/parallel/BddcMlSolver.cc index 2894c79f..9ccb18c0 100644 --- a/AMDiS/src/parallel/BddcMlSolver.cc +++ b/AMDiS/src/parallel/BddcMlSolver.cc @@ -1,13 +1,23 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + #ifdef HAVE_BDDC_ML @@ -18,30 +28,17 @@ extern "C" { #include "parallel/BddcMlSolver.h" #include "parallel/MpiHelper.h" -namespace AMDiS { - - void BddcMlSolver::fillPetscMatrix(Matrix *m) - { - FUNCNAME("BddcMlSolver::fillPetscMatrix()"); - - mat = m; - } - - - void BddcMlSolver::fillPetscRhs(SystemVector *vec) - { - FUNCNAME("BddcMlSolver::fillPetscRhs()"); - - rhsVec = vec; - } - +namespace AMDiS { namespace Parallel { - void BddcMlSolver::solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo) + int BddcMlSolver::solveLinearSystem(const Matrix& mat, + SystemVector &vec, + SystemVector &rhsVec, + bool createMatrixData,// ignored + bool storeMatrixData) // igonred { FUNCNAME("BddcMlSolver::solvePetscMatrix()"); - TEST_EXIT(rhsVec)("Should not happen!\n"); - TEST_EXIT(mat)("Should not happen!\n"); + TEST_EXIT(meshDistributor)("No meshDistributor provided!\n"); int nComponents = vec.getSize(); const FiniteElemSpace *feSpace = vec.getFeSpace(0); @@ -199,9 +196,9 @@ namespace AMDiS { for (int i = 0; i < ndofs; i++) fixv[i] = 0.0; - for (int i = 0; i < rhsVec->getSize(); i++) { + for (int i = 0; i < rhsVec.getSize(); i++) { map& dcValues = - rhsVec->getDOFVector(i)->getDirichletValues(); + rhsVec.getDOFVector(i)->getDirichletValues(); for (map::iterator it = dcValues.begin(); it != dcValues.end(); ++it) { @@ -216,7 +213,7 @@ namespace AMDiS { // local rhs data double rhs[ndofs]; for (int i = 0; i < nComponents; i++) { - DOFVector& dofvec = *(rhsVec->getDOFVector(i)); + DOFVector& dofvec = *(rhsVec.getDOFVector(i)); for (int j = 0; j < nnods; j++) rhs[j * nComponents + i] = dofvec[j]; } @@ -231,7 +228,7 @@ namespace AMDiS { // matrix type (set here to unsymmetric) int matrixtype = 0; - Parameters::get(initFileStr + "->bddcml->matrix type", matrixtype); + Parameters::get(name + "->bddcml->matrix type", matrixtype); // Non zero structure of matrix vector i_sparse; @@ -241,7 +238,7 @@ namespace AMDiS { for (int i = 0; i < nComponents; i++) for (int j = 0; j < nComponents; j++) if ((*mat)[i][j]) - addDofMatrix((*mat)[i][j], + addDofMatrix(mat[i][j], i_sparse, j_sparse, a_sparse, nComponents, i, j); @@ -358,7 +355,7 @@ namespace AMDiS { int use_adaptive_int = 0; int use_user_constraint_int = 0; - Parameters::get(initFileStr + "->bddcml->arithmetic constraints", use_arithmetic_int); + Parameters::get(name + "->bddcml->arithmetic constraints", use_arithmetic_int); MSG("call to \"bddcml_setup_preconditioner\" with the following arguments (each in one line):\n"); MSG(" matrixtype = %d\n", matrixtype); @@ -404,22 +401,12 @@ namespace AMDiS { } bddcml_finalize(); + + return 0; } - void BddcMlSolver::destroyMatrixData() - { - FUNCNAME("BddcMlSolver::destroyMatrixData()"); - } - - - void BddcMlSolver::destroyVectorData() - { - FUNCNAME("BddcMlSolver::destroyVectorData()"); - } - - - void BddcMlSolver::addDofMatrix(DOFMatrix* dmat, + void BddcMlSolver::addDofMatrix(const DOFMatrix* dmat, vector& i_sparse, vector& j_sparse, vector& a_sparse, @@ -447,7 +434,7 @@ namespace AMDiS { cend = end(dmat->getBaseMatrix()); cursor != cend; ++cursor) { for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) { - i_sparse.push_back(*cursor * nComponents + ithRowComponent); + i_sparse.push_back(cursor.value() * nComponents + ithRowComponent); j_sparse.push_back(col(*icursor) * nComponents + ithColComponent); a_sparse.push_back(value(*icursor)); } @@ -455,7 +442,7 @@ namespace AMDiS { } -} +} } // end namespaces #endif diff --git a/AMDiS/src/parallel/BddcMlSolver.h b/AMDiS/src/parallel/BddcMlSolver.h index 1cb56a96..d612752e 100644 --- a/AMDiS/src/parallel/BddcMlSolver.h +++ b/AMDiS/src/parallel/BddcMlSolver.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -24,47 +26,41 @@ #define AMDIS_BDDC_ML_SOLVER_H #include "AMDiS_fwd.h" -#include "parallel/PetscSolver.h" +#include "parallel/ParallelSolver.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; #ifdef HAVE_BDDC_ML - class BddcMlSolver : public PetscSolver + class BddcMlSolver : public ParallelSolver { public: /// Creator class - class Creator : public OEMSolverCreator + class Creator : public LinearSolverCreator { public: virtual ~Creator() {} /// Returns a new PetscSolver object. - OEMSolver* create() + LinearSolver* create() { return new BddcMlSolver(this->name); } }; BddcMlSolver(string name) - : PetscSolver(name), - rhsVec(NULL), - mat(NULL) - {} - - void fillPetscMatrix(Matrix *mat); - - void fillPetscRhs(SystemVector *vec); - - void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); - - void destroyMatrixData(); - - void destroyVectorData(); + : ParallelSolver(name, true) {} protected: + /// Implementation of \ref LinearSolver::solveLinearSystem() + virtual int solveLinearSystem(const SolverMatrix >& A, + SystemVector& x, + SystemVector& b, + bool createMatrixData, + bool storeMatrixData); + void addDofMatrix(DOFMatrix* mat, vector& i_sparse, vector& j_sparse, @@ -72,15 +68,12 @@ namespace AMDiS { int nComponents, int ithRowComponent, int ithColComponent); - protected: - SystemVector *rhsVec; - - Matrix *mat; }; #endif -} +} // end namespace Parallel +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/CheckerPartitioner.cc b/AMDiS/src/parallel/CheckerPartitioner.cc index a44e00ca..f70a08a2 100644 --- a/AMDiS/src/parallel/CheckerPartitioner.cc +++ b/AMDiS/src/parallel/CheckerPartitioner.cc @@ -1,20 +1,29 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/CheckerPartitioner.h" #include "Traverse.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { CheckerPartitioner::CheckerPartitioner(string name, MPI::Intracomm *comm) : MeshPartitioner(name, comm), @@ -339,4 +348,4 @@ namespace AMDiS { } } -} +} } diff --git a/AMDiS/src/parallel/CheckerPartitioner.h b/AMDiS/src/parallel/CheckerPartitioner.h index 2844be67..58ff187a 100644 --- a/AMDiS/src/parallel/CheckerPartitioner.h +++ b/AMDiS/src/parallel/CheckerPartitioner.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -28,7 +30,7 @@ #include "Initfile.h" #include "parallel/MeshPartitioner.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -69,6 +71,6 @@ namespace AMDiS { bool multilevel; }; -} +} } #endif diff --git a/AMDiS/src/parallel/DofComm.cc b/AMDiS/src/parallel/DofComm.cc index a7304241..84505221 100644 --- a/AMDiS/src/parallel/DofComm.cc +++ b/AMDiS/src/parallel/DofComm.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/DofComm.h" @@ -18,7 +27,7 @@ #include "ElementDofIterator.h" #include "DOFVector.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -186,4 +195,4 @@ namespace AMDiS { it->second.create(boundary[it->first]); } -} +} } diff --git a/AMDiS/src/parallel/DofComm.h b/AMDiS/src/parallel/DofComm.h index 28e97af4..6c9d8532 100644 --- a/AMDiS/src/parallel/DofComm.h +++ b/AMDiS/src/parallel/DofComm.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -29,7 +31,7 @@ #include "FiniteElemSpace.h" #include "Global.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -143,8 +145,6 @@ namespace AMDiS { inline void beginDofIter(const FiniteElemSpace *fe = NULL) { - FUNCNAME("DofComm::Iterator::beginDofIter()"); - if (fe != NULL) { feMapIter = dataIter->second.begin(); @@ -259,6 +259,6 @@ namespace AMDiS { map levelDofComm; }; -} +} } #endif // AMDIS_DOF_COMM_H diff --git a/AMDiS/src/parallel/ElementObjectDatabase.cc b/AMDiS/src/parallel/ElementObjectDatabase.cc index 0a2164a0..50a4fe8c 100644 --- a/AMDiS/src/parallel/ElementObjectDatabase.cc +++ b/AMDiS/src/parallel/ElementObjectDatabase.cc @@ -1,20 +1,29 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "VertexVector.h" #include "parallel/ElementObjectDatabase.h" #include "parallel/MeshLevelData.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { void ElementObjectDatabase::create(map& rankMap, MeshLevelData& ld) { @@ -1217,4 +1226,4 @@ namespace AMDiS { return value; } -} +} } diff --git a/AMDiS/src/parallel/ElementObjectDatabase.h b/AMDiS/src/parallel/ElementObjectDatabase.h index 302e4f26..0950b049 100644 --- a/AMDiS/src/parallel/ElementObjectDatabase.h +++ b/AMDiS/src/parallel/ElementObjectDatabase.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -36,7 +38,7 @@ #include "Serializer.h" #include "FiniteElemSpace.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -147,6 +149,7 @@ namespace AMDiS { bool resetIterator() { iterGeoPos = CENTER; + return true; // ??? } /** \brief @@ -622,6 +625,6 @@ namespace AMDiS { MeshLevelData* levelData; }; -} +} } #endif diff --git a/AMDiS/src/parallel/InteriorBoundary.cc b/AMDiS/src/parallel/InteriorBoundary.cc index f285a66c..6e38a4ab 100644 --- a/AMDiS/src/parallel/InteriorBoundary.cc +++ b/AMDiS/src/parallel/InteriorBoundary.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/InteriorBoundary.h" @@ -18,7 +27,7 @@ #include "Serializer.h" #include "VertexVector.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -855,4 +864,4 @@ namespace AMDiS { ERROR_EXIT("Not yet implemented!\n"); } -} +} } diff --git a/AMDiS/src/parallel/InteriorBoundary.h b/AMDiS/src/parallel/InteriorBoundary.h index a06f8e41..e451e450 100644 --- a/AMDiS/src/parallel/InteriorBoundary.h +++ b/AMDiS/src/parallel/InteriorBoundary.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -30,7 +32,7 @@ #include "BoundaryObject.h" #include "parallel/ParallelTypes.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -260,6 +262,6 @@ namespace AMDiS { map levelIntBound; }; -} +} } #endif // AMDIS_INTERIORBOUNDARY_H diff --git a/AMDiS/src/parallel/MatrixNnzStructure.cc b/AMDiS/src/parallel/MatrixNnzStructure.cc index 4f9e65b7..38e42dd6 100644 --- a/AMDiS/src/parallel/MatrixNnzStructure.cc +++ b/AMDiS/src/parallel/MatrixNnzStructure.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -16,7 +25,7 @@ #include "parallel/MatrixNnzStructure.h" #include "parallel/ParallelDofMapping.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { MatrixNnzStructure::~MatrixNnzStructure() { @@ -129,7 +138,10 @@ namespace AMDiS { // === Prepare MTL4 iterators for the current DOF matrix. === Matrix baseMat = dofMat->getBaseMatrix(); - traits::col::type col(baseMat); + + traits::col::type getCol(baseMat); + traits::row::type getRow(baseMat); + traits::const_value::type value(baseMat); cursor_type cursor = begin(baseMat); cursor_type cend = end(baseMat); @@ -143,18 +155,19 @@ namespace AMDiS { // Go to the corresponding matrix row (note, both the mapping and the // matrix rows are stored in increasing order). - while (*cursor != rowIt->first) + while (cursor.value() != rowIt->first) ++cursor; + size_t _row = cursor.value(); // The corresponding global matrix row index of the current row DOF. int petscRowIdx = 0; if (localMatrix) { - petscRowIdx = rowDofMap.getLocalMatIndex(rowComp, *cursor); + petscRowIdx = rowDofMap.getLocalMatIndex(rowComp, _row); } else { if (rowDofMap.isMatIndexFromGlobal()) petscRowIdx = rowDofMap.getMatIndex(rowComp, rowIt->second.global); else - petscRowIdx = rowDofMap.getMatIndex(rowComp, *cursor); + petscRowIdx = rowDofMap.getMatIndex(rowComp, _row); } @@ -165,7 +178,7 @@ namespace AMDiS { perMap->fillAssociations(rowFeSpace, rowIt->second.global, elObjDb, perRowAsc); - if (localMatrix || rowDofMap[rowComp].isRankDof(*cursor)) { + if (localMatrix || rowDofMap[rowComp].isRankDof(_row)) { // === The current row DOF is a rank DOF, so create the === // === corresponding nnz values directly on rank's nnz data. === @@ -177,8 +190,8 @@ namespace AMDiS { TEST_EXIT_DBG(localPetscRowIdx >= 0 && localPetscRowIdx < nRankRows) ("Should not happen! \n Debug info: DOF = %d globalRowIndx = %d petscRowIdx = %d localPetscRowIdx = %d rStart = %d compontens = %d from %d nRankRows = %d\n", - *cursor, - rowDofMap[rowComp][*cursor].global, + _row, + rowDofMap[rowComp][_row].global, petscRowIdx, localPetscRowIdx, rankStartRowIndex, @@ -190,7 +203,7 @@ namespace AMDiS { if (localMatrix) { for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) - if (colDofMap[colComp].isSet(col(*icursor))) + if (colDofMap[colComp].isSet(getCol(*icursor))) dnnz[localPetscRowIdx]++; } else { MultiIndex colDofIndex; @@ -198,7 +211,7 @@ namespace AMDiS { // Traverse all non zero entries in this row. for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) { - if (colDofMap[colComp].find(col(*icursor), colDofIndex) == false) + if (colDofMap[colComp].find(getCol(*icursor), colDofIndex) == false) continue; // Set of periodic row associations (is empty, if row DOF is not @@ -208,7 +221,7 @@ namespace AMDiS { perMap->fillAssociations(colFeSpace, colDofIndex.global, elObjDb, perColAsc); if (perColAsc.empty()) { - if (colDofMap[colComp].isRankDof(col(*icursor))) + if (colDofMap[colComp].isRankDof(getCol(*icursor))) dnnz[localPetscRowIdx]++; else onnz[localPetscRowIdx]++; @@ -247,23 +260,23 @@ namespace AMDiS { // === ponding rank. === // Send all non zero entries to the member of the row DOF. - int sendToRank = sendDofToRank[make_pair(*cursor, rowComp)]; + int sendToRank = sendDofToRank[make_pair(cursor.value(), rowComp)]; MultiIndex colDofIndex; for (icursor_type icursor = begin(cursor), icend = end(cursor); icursor != icend; ++icursor) { - if (colDofMap[colComp].find(col(*icursor), colDofIndex) == false) + if (colDofMap[colComp].find(getCol(*icursor), colDofIndex) == false) continue; int petscColIdx = (colDofMap.isMatIndexFromGlobal() ? colDofMap.getMatIndex(colComp, colDofIndex.global) : - colDofMap.getMatIndex(colComp, col(*icursor))); + colDofMap.getMatIndex(colComp, getCol(*icursor))); sendMatrixEntry[sendToRank]. push_back(make_pair(petscRowIdx, petscColIdx)); } - } // if (isRankDof[*cursor]) ... else ... + } // if (isRankDof[cursor.value()]) ... else ... } // for each row in mat[i][j] } } @@ -364,4 +377,4 @@ namespace AMDiS { } } -} +} } diff --git a/AMDiS/src/parallel/MatrixNnzStructure.h b/AMDiS/src/parallel/MatrixNnzStructure.h index 8e03191b..c14a8708 100644 --- a/AMDiS/src/parallel/MatrixNnzStructure.h +++ b/AMDiS/src/parallel/MatrixNnzStructure.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -27,7 +29,7 @@ #include "parallel/ParallelDofMapping.h" #include "parallel/PeriodicMap.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -67,6 +69,6 @@ namespace AMDiS { int *onnz; }; -} +} } #endif diff --git a/AMDiS/src/parallel/MeshDistributor.cc b/AMDiS/src/parallel/MeshDistributor.cc index 2c62f0b2..1e735234 100644 --- a/AMDiS/src/parallel/MeshDistributor.cc +++ b/AMDiS/src/parallel/MeshDistributor.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -29,7 +38,7 @@ #include "parallel/CheckerPartitioner.h" #include "parallel/MpiHelper.h" #include "parallel/DofComm.h" -#include "parallel/ParallelProblemStatBase.h" +#include "parallel/ParallelProblemStat.h" #include "io/ElementFileWriter.h" #include "io/MacroInfo.h" #include "io/MacroWriter.h" @@ -53,7 +62,7 @@ #include "RefinementManager3d.h" #include "Debug.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using boost::lexical_cast; using namespace boost::filesystem; @@ -179,7 +188,7 @@ namespace AMDiS { double first = MPI::Wtime(); MSG("Initialization phase 1 needed %.5f seconds\n", - first - ParallelProblemStatBase::initTimeStamp); + first - ParallelProblemStat::initTimeStamp); TEST_EXIT(MPI::COMM_WORLD.Get_size() > 1) ("Parallelization does not work with only one process!\n"); @@ -606,8 +615,6 @@ namespace AMDiS { void MeshDistributor::removeDofMap(ParallelDofMapping &dofMap) { - FUNCNAME("MeshDistributor::removeDofMap()"); - vector::iterator it = find(dofMaps.begin(), dofMaps.end(), &dofMap); @@ -862,8 +869,6 @@ namespace AMDiS { int level, DofContainer& dofs) { - FUNCNAME("MeshDistributor::getAllBoundaryDofs()"); - DofContainerSet dofSet; for (DofComm::Iterator it(dofComm[level].getSendDofs(), feSpace); !it.end(); it.nextRank()) @@ -879,8 +884,6 @@ namespace AMDiS { void MeshDistributor::removePeriodicBoundaryConditions() { - FUNCNAME("MeshDistributor::removePeriodicBoundaryConditions()"); - // Remove periodic boundaries in boundary manager on matrices and vectors. for (unsigned int i = 0; i < problemStat.size(); i++) removePeriodicBoundaryConditions(problemStat[i]); @@ -900,8 +903,6 @@ namespace AMDiS { void MeshDistributor::removePeriodicBoundaryConditions(ProblemStatSeq *probStat) { - FUNCNAME("MeshDistributor::removePeriodicBoundaryConditions()"); - int nComponents = probStat->getNumComponents(); for (int j = 0; j < nComponents; j++) { @@ -922,8 +923,6 @@ namespace AMDiS { void MeshDistributor::removePeriodicBoundaryConditions(BoundaryIndexMap& boundaryMap) { - FUNCNAME("MeshDistributor::removePeriodicBoundaryConditions()"); - BoundaryIndexMap::iterator it = boundaryMap.begin(); while (it != boundaryMap.end()) { if (it->second->isPeriodic()) @@ -1196,8 +1195,6 @@ namespace AMDiS { int &maxDofs, int &sumDofs) { - FUNCNAME("MeshDistributor::getImbalanceFactor()"); - MPI::Intracomm &mpiComm = MPI::COMM_WORLD; int mpiSize = mpiComm.Get_size(); @@ -1250,7 +1247,7 @@ namespace AMDiS { bool MeshDistributor::checkAndAdaptBoundary(RankToBoundMap &allBound) { - FUNCNAME("MeshDistributor::checkAndAdaptBoundary()"); + FUNCNAME_DBG("MeshDistributor::checkAndAdaptBoundary()"); // === Create mesh structure codes for all ranks boundary elements. === @@ -1279,7 +1276,7 @@ namespace AMDiS { bool meshChanged = false; - int cCounter = 0; +// int cCounter = 0; for (RankToBoundMap::iterator it = allBound.begin(); it != allBound.end(); ++it) { @@ -1808,8 +1805,6 @@ namespace AMDiS { void MeshDistributor::removeMacroElements() { - FUNCNAME("MeshDistributor::removeMacroElements()"); - std::set macrosToRemove; for (deque::iterator it = mesh->firstMacroElement(); it != mesh->endOfMacroElements(); ++it) @@ -1948,7 +1943,7 @@ namespace AMDiS { dofMaps[i]->update(); #if (DEBUG != 0) - // dofMaps[i]->printInfo(); + dofMaps[i]->printInfo(); #endif } @@ -1962,8 +1957,6 @@ namespace AMDiS { void MeshDistributor::updateLocalGlobalNumbering(ParallelDofMapping &dofMap, const FiniteElemSpace *feSpace) { - FUNCNAME("MeshDistributor::updateLocalGlobalNumbering()"); - DofComm &dcom = dofMap.getDofComm(); @@ -2293,4 +2286,4 @@ namespace AMDiS { deserialized = true; } -} +} } diff --git a/AMDiS/src/parallel/MeshDistributor.h b/AMDiS/src/parallel/MeshDistributor.h index dc7e7666..46ba9ca3 100644 --- a/AMDiS/src/parallel/MeshDistributor.h +++ b/AMDiS/src/parallel/MeshDistributor.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -44,7 +46,7 @@ #include "BoundaryManager.h" #include "SystemVector.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -635,6 +637,6 @@ namespace AMDiS { friend class ParallelDebug; }; -} +} } #endif // AMDIS_MESHDISTRIBUTOR_H diff --git a/AMDiS/src/parallel/MeshLevelData.cc b/AMDiS/src/parallel/MeshLevelData.cc index 7291dad9..d1d16230 100644 --- a/AMDiS/src/parallel/MeshLevelData.cc +++ b/AMDiS/src/parallel/MeshLevelData.cc @@ -1,20 +1,29 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include #include "parallel/MeshLevelData.h" #include "Global.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -168,4 +177,4 @@ namespace AMDiS { return static_cast(levelRanks[level].count(rank)); } -} +} } diff --git a/AMDiS/src/parallel/MeshLevelData.h b/AMDiS/src/parallel/MeshLevelData.h index f73c53f3..bb098a71 100644 --- a/AMDiS/src/parallel/MeshLevelData.h +++ b/AMDiS/src/parallel/MeshLevelData.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -30,7 +32,7 @@ #include #include "Global.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -60,12 +62,12 @@ namespace AMDiS { return levelRanks[level]; } - /* std::set& getLevelNeighbours(int level) */ - /* { */ - /* TEST_EXIT_DBG(level < nLevel)("Should not happen!\n"); */ + std::set& getLevelNeighbours(int level) + { + TEST_EXIT_DBG(level < nLevel)("Should not happen!\n"); - /* return levelNeighbours[level]; */ - /* } */ + return levelNeighbours[level]; + } inline int getNumberOfLevels() { @@ -124,6 +126,6 @@ namespace AMDiS { vector mpiGroups; }; -} +} } #endif diff --git a/AMDiS/src/parallel/MeshManipulation.cc b/AMDiS/src/parallel/MeshManipulation.cc index a76b52fe..c2abfdbe 100644 --- a/AMDiS/src/parallel/MeshManipulation.cc +++ b/AMDiS/src/parallel/MeshManipulation.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/MeshManipulation.h" @@ -17,7 +26,7 @@ #include "Traverse.h" #include "Debug.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { MeshManipulation::MeshManipulation(Mesh *m) : mesh(m) @@ -431,7 +440,7 @@ namespace AMDiS { // code, but the refinement does not introduce new DOFs on the face, // that should be adapted. Thus, we can ommit the refinement. if (subObj == FACE) { - if (s0 != -1 && s1 == -1 || s0 == -1 && s1 != -1) { + if ((s0 != -1 && s1 == -1) || (s0 == -1 && s1 != -1)) { if (ithObj <= 1 && pcode->lookAhead() == 0) { elementRefined = false; pcode->nextElement(); @@ -514,4 +523,4 @@ namespace AMDiS { return meshChanged; } -} +} } diff --git a/AMDiS/src/parallel/MeshManipulation.h b/AMDiS/src/parallel/MeshManipulation.h index 0b888349..14ee4675 100644 --- a/AMDiS/src/parallel/MeshManipulation.h +++ b/AMDiS/src/parallel/MeshManipulation.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -29,7 +31,7 @@ #include "AMDiS_fwd.h" #include "parallel/ElementObjectDatabase.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { class MeshManipulation { public: @@ -84,7 +86,7 @@ namespace AMDiS { bool rMode; }; -} +} } #endif diff --git a/AMDiS/src/parallel/MeshPartitioner.cc b/AMDiS/src/parallel/MeshPartitioner.cc index 0206f5f1..ded08c98 100644 --- a/AMDiS/src/parallel/MeshPartitioner.cc +++ b/AMDiS/src/parallel/MeshPartitioner.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/MeshPartitioner.h" @@ -16,7 +25,7 @@ #include "Traverse.h" #include "Serializer.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { bool MeshPartitioner::createInitialPartitioning() { @@ -194,4 +203,4 @@ namespace AMDiS { SerUtil::deserialize(in, elInBox); } -} +} } diff --git a/AMDiS/src/parallel/MeshPartitioner.h b/AMDiS/src/parallel/MeshPartitioner.h index 56faada5..01c29a59 100644 --- a/AMDiS/src/parallel/MeshPartitioner.h +++ b/AMDiS/src/parallel/MeshPartitioner.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -33,7 +35,7 @@ #include "parallel/ParallelDofMapping.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -195,6 +197,6 @@ namespace AMDiS { /// from this rank to other ranks. map > recvElements, sendElements; }; -} +} } #endif diff --git a/AMDiS/src/parallel/MpiHelper.cc b/AMDiS/src/parallel/MpiHelper.cc index a4331550..1fb8cf46 100644 --- a/AMDiS/src/parallel/MpiHelper.cc +++ b/AMDiS/src/parallel/MpiHelper.cc @@ -1,19 +1,28 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include #include "MpiHelper.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { namespace mpi { @@ -58,5 +67,5 @@ namespace AMDiS { srand(time(NULL) * (MPI::COMM_WORLD.Get_rank() + 1)); } } -} +} } diff --git a/AMDiS/src/parallel/MpiHelper.h b/AMDiS/src/parallel/MpiHelper.h index d67f2bc7..42eda626 100644 --- a/AMDiS/src/parallel/MpiHelper.h +++ b/AMDiS/src/parallel/MpiHelper.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -28,7 +30,7 @@ #include #include "Global.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { namespace mpi { void globalAdd(MPI::Intracomm &mpiComm, double &value); @@ -99,6 +101,6 @@ namespace AMDiS { } } -} +} } #endif diff --git a/AMDiS/src/parallel/Mtl4Solver.cc b/AMDiS/src/parallel/Mtl4Solver.cc deleted file mode 100644 index 32d7f843..00000000 --- a/AMDiS/src/parallel/Mtl4Solver.cc +++ /dev/null @@ -1,100 +0,0 @@ -#include "parallel/Mtl4Solver.h" -#include "parallel/PITL_Solver.h" -#include "parallel/ParallelMapper.h" - -namespace AMDiS { - namespace Parallel { - - void Mtl4Solver::addPMTLSolvers() - { - OEMSolverCreator *creator; - - creator = new CGSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pcg", creator); - - creator = new CGSSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pcgs", creator); - - creator = new BiCGSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pbicg", creator); - - creator = new BiCGStabSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pbicgstab", creator); - - creator = new BiCGStab2Solver::Creator; - CreatorMap< OEMSolver >::addCreator("pbicgstab2", creator); - - creator = new BiCGStabEllSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pbicgstab_ell", creator); - - creator = new QMRSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pqmr", creator); - - creator = new TFQMRSolver::Creator; - CreatorMap< OEMSolver >::addCreator("ptfqmr", creator); - - creator = new GMResSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pgmres", creator); - - creator = new IDRsSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pidr_s", creator); - - creator = new MinResSolver::Creator; - CreatorMap< OEMSolver >::addCreator("pminres", creator); - } - - - void Mtl4Solver::createSolver() - { - FUNCNAME("Parallel::Mtl4Solver::createSolver()"); - - // === create solver === - std::string solverType("0"); - std::string initFileStr(name + "->solver"); - Parameters::get(initFileStr, solverType); - solverType = "p" + solverType; - OEMSolverCreator *solverCreator = - dynamic_cast(CreatorMap::getCreator(solverType, initFileStr)); - TEST_EXIT(solverCreator)("no solver type\n"); - solverCreator->setName(name + "->solver"); - solver = solverCreator->create(); - solver->initParameters(); - } - - - void Mtl4Solver::createPrecon() - {} - - - void Mtl4Solver::solve(AdaptInfo* adaptInfo, bool createMatrixData, - bool storeMatrixData) - { - FUNCNAME("Mtl4Solver::solve()"); - - clock_t first = clock(); - - ParallelMapper pmapper(*meshDistributor, nComponents); - solver->solveSystem(solverMatrix, *solution, *rhs, pmapper); - - INFO(info, 8)("solution of discrete system needed %.5f seconds\n", - TIME_USED(first, clock())); - } - } - - template< > - void CreatorMap< Parallel::ParallelPreconditioner >::addDefaultCreators() { - Parallel::ParallelPreconditionCreator *creator; - - creator = new Parallel::DiagonalPreconditioner::Creator; - addCreator("diag", creator); - - creator = new Parallel::ILUPreconditioner::Creator; - addCreator("ilu", creator); - - creator = new Parallel::ICPreconditioner::Creator; - addCreator("ic", creator); - - creator = new Parallel::IdentityPreconditioner::Creator; - addCreator("no", creator); - } -} diff --git a/AMDiS/src/parallel/Mtl4Solver.h b/AMDiS/src/parallel/Mtl4Solver.h deleted file mode 100644 index 671c6fb0..00000000 --- a/AMDiS/src/parallel/Mtl4Solver.h +++ /dev/null @@ -1,60 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -/** \file Mtl4Solver.h */ - -#ifndef AMDIS_MTL4_SOLVER_H -#define AMDIS_MTL4_SOLVER_H - -#include "ParallelProblemStatBase.h" - -namespace AMDiS { - - namespace Parallel { - class Mtl4Solver : public ParallelProblemStatBase - { - void addPMTLSolvers(); - //void addPMTLPrecons(); - public: - Mtl4Solver(std::string nameStr, - ProblemIterationInterface *problemIteration = NULL) - : ParallelProblemStatBase(nameStr, problemIteration) - { - addPMTLSolvers(); - //addPMTLPrecons(); - } - - - ~Mtl4Solver() - {} - - - void solve(AdaptInfo *adaptInfo, bool createMatrixData = true, - bool storeMatrixData = false ); - void createPrecon(); - void createSolver(); - }; - } - - typedef Parallel::Mtl4Solver ParallelProblemStat; - typedef ParallelProblemStat ProblemStat; -} - -#endif diff --git a/AMDiS/src/parallel/MtlFetiPrimalSolver.h b/AMDiS/src/parallel/MtlFetiPrimalSolver.h index 90a79bae..6f6c7c8f 100644 --- a/AMDiS/src/parallel/MtlFetiPrimalSolver.h +++ b/AMDiS/src/parallel/MtlFetiPrimalSolver.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /** \file MtlFetiPrimalSolver.h */ @@ -23,11 +25,11 @@ #include "AMDiS_fwd.h" -#include "OEMSolver.h" +#include "LinearSolver.h" #include "parallel/PetscSolver.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { /// Solver for the primal nodes based on MTL class MtlFetiPrimalSolver @@ -35,13 +37,13 @@ class MtlFetiPrimalSolver { public: /// Creator class - class Creator : public OEMSolverCreator + class Creator : public LinearSolverCreator { public: virtual ~Creator() {} /// Returns a new PetscSolver object. - OEMSolver* create() + LinearSolver* create() { return new MtlFetiPrimalSolver(this->name); } @@ -49,13 +51,13 @@ class MtlFetiPrimalSolver /// Constructor of FETI-DP solver class. explicit MtlFetiPrimalSolver(string name) - : OEMSolver(name) + : LinearSolver(name) {} }; - +} } // namespace AMDiS #endif // AMDIS_MTL_FETI_PRIMAL_SOLVER_H diff --git a/AMDiS/src/parallel/PITL_Solver.h b/AMDiS/src/parallel/PITL_Solver.h index 16d38851..b4dab17c 100644 --- a/AMDiS/src/parallel/PITL_Solver.h +++ b/AMDiS/src/parallel/PITL_Solver.h @@ -1,326 +1,87 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// ============================================================================ -// == == -// == TU Dresden == -// == == -// == Institut für Wissenschaftliches Rechnen == -// == Zellescher Weg 12-14 == -// == 01069 Dresden == -// == germany == -// == == -// ============================================================================ -// == == -// == https://gforge.zih.tu-dresden.de/projects/amdis/ == -// == == -// ============================================================================ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + /** \file PITL_Solver.h */ #ifndef AMDIS_PITL_SOLVER_H #define AMDIS_PITL_SOLVER_H -#include "ITL_Solver.h" - -namespace AMDiS { - namespace Parallel { - typedef mtl::matrix::distributed< MTLTypes::MTLMatrix > MTLMatrix; - typedef mtl::vector::distributed< MTLTypes::MTLVector > MTLVector; - typedef CreatorInterface< ITL_BasePreconditioner< MTLVector > > ParallelPreconditionCreator; - typedef ITL_BasePreconditioner< MTLVector > ParallelPreconditioner; - - template< typename ITLSolver > - class PITL_Solver : public AMDiS::MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_runner< ITLSolver, MTLMatrix, MTLVector > > { - public: - PITL_Solver(std::string name): - AMDiS::MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_runner< ITLSolver, MTLMatrix, MTLVector > >(name) {} - - int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - ParallelMapper& m) - { - return AMDiS::MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_runner< ITLSolver, MTLMatrix, MTLVector > >::solve(A,x,b,m); - } - - - /// Creator class used in the OEMSolverMap. - class Creator : public OEMSolverCreator - { - public: - virtual ~Creator() {} - - /// Returns a new CGSolver object. - OEMSolver* create() - { - return new PITL_Solver(this->name); - } - }; - }; - - template< typename ITLSolver > - class PITL_Solver_para : public AMDiS::MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_para_runner< ITLSolver, MTLMatrix, MTLVector > > { - public: - PITL_Solver_para(std::string name): - AMDiS::MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_para_runner< ITLSolver, MTLMatrix, MTLVector > >(name) {} - - int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - ParallelMapper& m) - { - return AMDiS::MTL4Solver< MTLMatrix, MTLVector, ITL_OEMSolver_para_runner< ITLSolver, MTLMatrix, MTLVector > >::solve(A,x,b,m); - } - - /// Creator class used in the OEMSolverMap. - class Creator : public OEMSolverCreator - { - public: - virtual ~Creator() {} - - /// Returns a new CGSolver object. - OEMSolver* create() - { - return new PITL_Solver_para(this->name); - } - }; - }; - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the conjugate gradient method (CG) and can be used for - * symmetric positive definite system matrices. - * Right preconditioner is ignored. - */ - class CGSolver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - CGSolver(std::string name) : PITL_Solver(name) {} - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the squared conjugate gradient method (CGS). - * Right preconditioner is ignored. - */ - class CGSSolver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - CGSSolver(std::string name) : PITL_Solver(name) {} - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG method and can be used for - * system matrices. - */ - class BiCGSolver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGSolver(std::string name) : PITL_Solver(name) {} - }; - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG method and can be used for - * system matrices. - */ - class BiCGStabSolver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGStabSolver(std::string name) : PITL_Solver(name) {} - }; - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG method and can be used for - * system matrices. - */ - class BiCGStab2Solver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGStab2Solver(std::string name) : PITL_Solver(name) {} - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the Quasi-Minimal Residual method (QMR). - */ - class QMRSolver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - QMRSolver(std::string name) : PITL_Solver(name) {} - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the Transposed-Free Quasi-Minimal Residual method (TFQMR). - * Does not use preconditioning currently. - */ - class TFQMRSolver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - TFQMRSolver(std::string name) : PITL_Solver(name) {} - }; +#ifdef HAVE_PARALLEL_MTL4 +#include "solver/ITL_Solver.h" +#include "parallel/PMTL4Solver.h" +#include "MTL4Types.h" - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by a stabilized BiCG(l) method and can be used for - * system matrices. - */ - class BiCGStabEllSolver : public PITL_Solver_para +namespace AMDiS +{ + namespace Parallel + { + using namespace MTLTypes; + + template< typename SolverType > + struct PITL_Solver : PMTL4Solver< PMTLMatrix, PMTLVector, ITL_Runner< SolverType, PMTLMatrix, PMTLVector > > { - public: - /// The constructor reads required parameters and sets solvers \ref name. - BiCGStabEllSolver(std::string name) : PITL_Solver_para(name) {} + PITL_Solver(std::string name) + : PMTL4Solver< PMTLMatrix, PMTLVector, ITL_Runner< SolverType, PMTLMatrix, PMTLVector > >(name) {} }; - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the GMRES method. - * The parameter ell is the maximal number of orthogonalized vectors. - * The method is not preconditioned - */ - class GMResSolver : public PITL_Solver_para - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - GMResSolver(std::string name) : PITL_Solver_para(name) {} - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by an Induced Dimension Reduction method and can be used for - * system matrices. - * The parameter s can be specified as ell. - * Peter Sonneveld and Martin B. van Gijzen, IDR(s): a family of simple and fast algorithms for solving large nonsymmetric linear systems. - * SIAM J. Sci. Comput. Vol. 31, No. 2, pp. 1035-1062 (2008). (copyright SIAM) - * - */ - class IDRsSolver : public PITL_Solver_para - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - IDRsSolver(std::string name) : PITL_Solver_para(name) {} - }; - - - /** - * \ingroup Solver - * - * \brief - * Solves a linear system by the Minres method. Can be used for symmetric - * indefinite systems. - */ - class MinResSolver : public PITL_Solver - { - public: - /// The constructor reads required parameters and sets solvers \ref name. - MinResSolver(std::string name) : PITL_Solver(name) {} - }; - - /** - * \ingroup Solver - * - * \brief - * Diagonal preconditioner. - */ - class DiagonalPreconditioner - : public ITL_Preconditioner, MTLVector, MTLMatrix > - { - typedef ITL_Preconditioner, MTLVector, MTLMatrix > base; - - public: - DiagonalPreconditioner(const MTLMatrix& A) : base(A) {} - }; - - /** - * \ingroup Solver - * - * \brief - * Identity preconditioner. Behaves like no preconditioning. - */ - class IdentityPreconditioner - : public ITL_Preconditioner, MTLVector, MTLMatrix > - { - typedef ITL_Preconditioner, MTLVector, MTLMatrix > base; - - public: - IdentityPreconditioner(const MTLMatrix& A) : base(A) {} - }; - - - // ============================================================================ - // ===== class ILUPreconditioner ============================================== - // ============================================================================ - - /** - * \ingroup Solver - * - * \brief - * ILU (Incomplete LU factorization) preconditioner. - * - * The preconditioner is used from ITL. It corresponds for instance to "Iterative Methods for - * Sparce Linear Systems", second edition, Yousef Saad. The preconditioner is - * described in chapter 10.3 (algorithm 10.4). - */ - class ILUPreconditioner - : public ITL_Preconditioner< itl::pc::ilu_0,MTLVector, MTLMatrix > - {}; - - class ICPreconditioner - : public ITL_Preconditioner< itl::pc::ic_0, MTLVector, MTLMatrix > - {}; - - - } - template< > - struct Collection< Parallel::MTLMatrix > { - typedef mtl::matrix::inserter< Parallel::MTLMatrix , mtl::update_plus< Parallel::MTLMatrix::value_type > > Inserter; + typedef PITL_Solver< cg_solver_type > P_CGSolver; + typedef PITL_Solver< cgs_solver_type > P_CGSSolver; +// typedef PITL_Solver< bicg_solver_type > P_BiCGSolver; + typedef PITL_Solver< bicgstab_type > P_BiCGStabSolver; + typedef PITL_Solver< bicgstab2_type > P_BiCGStab2Solver; + typedef PITL_Solver< qmr_solver_type > P_QMRSolver; + typedef PITL_Solver< tfqmr_solver_type > P_TFQMRSolver; + typedef PITL_Solver< bicgstab_ell_type > P_BiCGStabEllSolver; + typedef PITL_Solver< gmres_type > P_GMResSolver; + typedef PITL_Solver< idr_s_type > P_IDRsSolver; + typedef PITL_Solver< minres_solver_type > P_MinResSolver; + typedef PITL_Solver< gcr_type > P_GcrSolver; + typedef PITL_Solver< fgmres_type > P_FGMResSolver; + typedef PITL_Solver< preonly_type > P_PreOnly; + + typedef ITL_BasePreconditioner< PMTLMatrix, PMTLVector > ParallelPreconditioner; + typedef CreatorInterface< ParallelPreconditioner > ParallelPreconditionCreator; + + typedef ITL_Preconditioner, PMTLMatrix, PMTLVector > P_DiagonalPreconditioner; + typedef ITL_Preconditioner, PMTLMatrix, PMTLVector > P_IdentityPreconditioner; + typedef ITL_Preconditioner, PMTLMatrix, PMTLVector > P_ILUPreconditioner; + typedef ITL_Preconditioner, PMTLMatrix, PMTLVector > P_ICPreconditioner; + + } // end namespace Parallel + + template < > + struct Collection< MTLTypes::PMTLMatrix > { + typedef mtl::matrix::inserter< MTLTypes::PMTLMatrix , mtl::update_plus< MTLTypes::PMTLMatrix::value_type > > Inserter; }; - template< > - struct Collection< Parallel::MTLVector > { - typedef mtl::vector::inserter< Parallel::MTLVector , mtl::update_plus< Parallel::MTLVector::value_type > > Inserter; - typedef Parallel::MTLMatrix PreconditionMatrix; + template < > + struct Collection< MTLTypes::PMTLVector > { + typedef mtl::vector::inserter< MTLTypes::PMTLVector, mtl::update_plus< MTLTypes::PMTLVector::value_type > > Inserter; + typedef MTLTypes::PMTLMatrix PreconditionMatrix; }; } // namespace AMDiS +#endif // HAVE_PARALLEL_MTL4 + #endif // AMDIS_PITL_SOLVER diff --git a/AMDiS/src/parallel/PMTL4Solver.h b/AMDiS/src/parallel/PMTL4Solver.h new file mode 100644 index 00000000..dfbfb473 --- /dev/null +++ b/AMDiS/src/parallel/PMTL4Solver.h @@ -0,0 +1,114 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file PMtl4Solver.h */ + +#ifndef AMDIS_PMTL4_SOLVER_H +#define AMDIS_PMTL4_SOLVER_H + +#ifdef HAVE_PARALLEL_MTL4 + +#include "solver/MTL4SolverBase.h" +#include "parallel/ParallelSolver.h" + +namespace AMDiS { + + namespace Parallel { + + + /** \ingroup Solver + * + * \brief + * Wrapper class for different PMTL4 solvers. These solvers + * are parametrized by Matrix- and VectorType. The different + * algorithms, like krylov subspace methods or other external + * solvers where PMTL4 provides an interface, can be assigned + * by different Runner objects. + **/ + template< typename MatrixType, typename VectorType, typename Runner > + class PMTL4Solver : public ParallelSolver, protected MTL4SolverBase + { + public: + typedef PMTL4Solver self; + typedef MTL4SolverBase details; + + using details::solve; + + /// Creator class used in the LinearSolverMap. + class Creator : public LinearSolverCreator + { + public: + virtual ~Creator() {} + + /// Returns a new MTL4Solver object. + LinearSolver* create() + { + return new self(this->name); + } + }; + + /// Constructor + PMTL4Solver(std::string n) + : ParallelSolver(n, false), + details(this) + {} + + + /// Implementation of \ref LinearSolver::getRunner() + virtual OEMRunner* getRunner() + { + return details::getRunner(); + } + + + /// Implementation of \ref LinearSolver::getLeftPrecon() + virtual OEMPreconditioner* getLeftPrecon() + { + return details::getLeftPrecon(); + } + + + /// Implementation of \ref LinearSolver::getRightPrecon() + virtual OEMPreconditioner* getRightPrecon() + { + return details::getRightPrecon(); + } + + protected: + /// Implementation of \ref LinearSolver::solveLinearSystem() + virtual int solveLinearSystem(const SolverMatrix >& A, + SystemVector& x, + SystemVector& b, + bool createMatrixData, + bool storeMatrixData) + { + ParallelMapper mapper(*ParallelSolver::getDofMapping()); + return details::solve(A, x, b, mapper, createMatrixData, storeMatrixData); + } + }; + + } // end namespace Parallel +} // end namespace AMDiS + +#endif // HAVE_PARALLEL_MTL4 + +#endif // AMDIS_PMTL4_SOLVER_H + diff --git a/AMDiS/src/parallel/ParMetisPartitioner.cc b/AMDiS/src/parallel/ParMetisPartitioner.cc index 8a52fbc5..db622883 100644 --- a/AMDiS/src/parallel/ParMetisPartitioner.cc +++ b/AMDiS/src/parallel/ParMetisPartitioner.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -25,7 +34,7 @@ #include "DOFVector.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { ParMetisMesh::ParMetisMesh(Mesh *mesh, MPI::Intracomm *comm, std::map& elementInRank, @@ -529,4 +538,4 @@ namespace AMDiS { return true; } -} +} } diff --git a/AMDiS/src/parallel/ParMetisPartitioner.h b/AMDiS/src/parallel/ParMetisPartitioner.h index f896eb29..a891b8a2 100644 --- a/AMDiS/src/parallel/ParMetisPartitioner.h +++ b/AMDiS/src/parallel/ParMetisPartitioner.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -33,7 +35,7 @@ #include "parallel/MeshPartitioner.h" #include "parallel/ParallelDofMapping.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -197,6 +199,6 @@ namespace AMDiS { double itr; }; -} +} } #endif diff --git a/AMDiS/src/parallel/ParallelCoarseSpaceSolver.cc b/AMDiS/src/parallel/ParallelCoarseSpaceSolver.cc index a5e56b24..fbaf0288 100644 --- a/AMDiS/src/parallel/ParallelCoarseSpaceSolver.cc +++ b/AMDiS/src/parallel/ParallelCoarseSpaceSolver.cc @@ -1,36 +1,59 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/ParallelCoarseSpaceSolver.h" #include "parallel/ParallelDofMapping.h" #include "parallel/MatrixNnzStructure.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; ParallelCoarseSpaceSolver::ParallelCoarseSpaceSolver(string name) - : OEMSolver(name), + : ParallelSolver(name, true), initFileStr(name), - interiorMap(NULL), lastMeshNnz(-1), alwaysCreateNnzStructure(false), - meshDistributor(NULL), - meshLevel(0), rStartInterior(0), nGlobalOverallInterior(0) { Parameters::get("parallel->always create nnz structure", alwaysCreateNnzStructure); + + } + + + void ParallelCoarseSpaceSolver::init(vector &fe0, + vector &fe1, + bool createGlobalMapping) + { + FUNCNAME("ParallelCoarseSpaceSolver::init()"); + + TEST_EXIT(meshDistributor)("No mesh distributor object defined!\n"); + + domainComm = meshDistributor->getMpiComm(meshLevel); + if (meshLevel >= 1) + coarseSpaceComm = meshDistributor->getMpiComm(meshLevel - 1); + + ParallelSolver::init(fe0, fe1, createGlobalMapping); } @@ -59,21 +82,7 @@ namespace AMDiS { uniqueCoarseMap.end()) uniqueCoarseMap.push_back(coarseDofs); } - - - void ParallelCoarseSpaceSolver::setMeshDistributor(MeshDistributor *md, - int level) - { - FUNCNAME("ParallelCoarseSpaceSolver::setMeshDistributor()"); - - meshLevel = level; - meshDistributor = md; - - domainComm = meshDistributor->getMpiComm(meshLevel); - if (meshLevel >= 1) - coarseSpaceComm = meshDistributor->getMpiComm(meshLevel - 1); - } - + void ParallelCoarseSpaceSolver::prepare() { @@ -236,8 +245,8 @@ namespace AMDiS { &mat[i + 1][i + 1]); } MatSetOption(mat[i + 1][i + 1], MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE); - cMap->createVec(vecSol[i + 1]); - cMap->createVec(vecRhs[i + 1]); + createVec(*cMap, vecSol[i + 1]); + createVec(*cMap, vecRhs[i + 1]); } for (int i = 0; i < nCoarseMap + 1; i++) { @@ -395,4 +404,4 @@ namespace AMDiS { } } -} +} } // end namespaces diff --git a/AMDiS/src/parallel/ParallelCoarseSpaceSolver.h b/AMDiS/src/parallel/ParallelCoarseSpaceSolver.h index 1df792a4..fe8f0cc3 100644 --- a/AMDiS/src/parallel/ParallelCoarseSpaceSolver.h +++ b/AMDiS/src/parallel/ParallelCoarseSpaceSolver.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -31,325 +33,326 @@ #include "parallel/ParallelDofMapping.h" #include "parallel/MeshDistributor.h" #include "parallel/MatrixNnzStructure.h" -#include "OEMSolver.h" - -namespace AMDiS { - - /** - * This class implements a block structured PETSc matrix/vec which seperates - * the discretization of the interior of subdomains and the discretization - * of the coarse space. Thus, we have one matrix block for the interior and - * one matrix block for the coarse space plus the coupling blocks. Some notes: - * - For a single level domain decomposition method (e.g. the standad - * FETI-DP method), the interior matrix is local to the current rank and the - * coarse space matrix is a globally distributed matrix. - * - There are different coarse spaces for different components possible. In - * this case, there are as many blocks as there are different coarse spaces - * plus one block for the interior matrix. - * - This class also manages the creation of the corresponding non zero - * structure of the matrices. - */ - class ParallelCoarseSpaceSolver : public OEMSolver { - public: - /// Constructor - ParallelCoarseSpaceSolver(string name); - - /// Set parallel DOF mapping for the interior DOFs. - void setDofMapping(ParallelDofMapping *interiorDofs) - { - interiorMap = interiorDofs; - } - - /// Returns the parallel DOF mapping for the interior DOFs. - ParallelDofMapping* getDofMapping() - { - return interiorMap; - } +#include "parallel/ParallelSolver.h" +#include "solver/LinearSolver.h" + +namespace AMDiS +{ + namespace Parallel + { - /** \brief - * Sets the coarse space for all or a specific component. - * - * \param[in] coarseDofs Coarse space DOF mapping. - * \param[in] component If the standard value -1 is used, the coarse - * space DOF mapping is set for all components - * of the equation. Otherwise, the coarse space - * DOF mapping is set only for the given one. - */ - void setCoarseSpaceDofMapping(ParallelDofMapping *coarseDofs, - int component = -1); - - /// Set mesh distributor object - void setMeshDistributor(MeshDistributor *m, int level); - - /// Creates matrices and vectors with respect to the coarse space. - void createMatVec(Matrix& seqMat); - - /// Run PETSc's matrix assembly routines. - void matAssembly(); - - /// Run PETSc's vector assembly routines on rhs vectors. - void vecRhsAssembly(); - - /// Run PETSc's vector assembly routines on solution vectors. - void vecSolAssembly(); - - /// Destroys PETSc matrix objects. - void matDestroy(); - - /// Destroys PETSc vector objects. - void vecDestroy(); - - - /// Just for super trick - vector >& getMat() - { - return mat; - } - - /// Just for super trick - vector& getVecRhs() - { - return vecRhs; - } - - - /// Get interior matrix. - inline Mat& getMatInterior() - { - TEST_EXIT_DBG(mat.size() > 0)("No matrix data!\n"); - return mat[0][0]; - } - - /// Get coarse space matrix. - inline Mat& getMatCoarse(int coarseSpace0 = 0, int coarseSpace1 = 0) - { - TEST_EXIT_DBG(mat.size() > coarseSpace0 + 1)("No matrix data!\n"); - TEST_EXIT_DBG(mat.size() > coarseSpace1 + 1)("No matrix data!\n"); - return mat[coarseSpace0 + 1][coarseSpace1 + 1]; - } - - /// Get coupling matrix of the interior and some coarse space. - inline Mat& getMatInteriorCoarse(int coarseSpace = 0) - { - TEST_EXIT_DBG(mat.size() > coarseSpace + 1)("No matrix data!\n"); - return mat[0][coarseSpace + 1]; - } - - /// Get coupling of some coarse space matrix and the interior. - inline Mat& getMatCoarseInterior(int coarseSpace = 0) - { - TEST_EXIT_DBG(mat.size() > coarseSpace + 1)("No matrix data!\n"); - return mat[coarseSpace + 1][0]; - } - - /// Get the coarse space matrix of some system component. - inline Mat& getMatCoarseByComponent(int rowComp, int colComp = -1) - { - int rowMatIndex = componentIthCoarseMap[rowComp] + 1; - int colMatIndex = componentIthCoarseMap[(colComp == -1 ? rowComp : colComp)] + 1; - return mat[rowMatIndex][colMatIndex]; - } - - /// Get coupling matrix of the interior and the coarse space of a - /// system component. - inline Mat& getMatInteriorCoarseByComponent(int comp) - { - int matIndex = componentIthCoarseMap[comp] + 1; - return mat[0][matIndex]; - } - - /// Get coupling matrix of the coarse space of a system component and the - /// interior matrix. - inline Mat& getMatCoarseInteriorByComponent(int comp) - { - int matIndex = componentIthCoarseMap[comp] + 1; - return mat[matIndex][0]; - } - - /// Get the RHS vector of the interior. - inline Vec& getVecRhsInterior() - { - return vecRhs[0]; - } - - /// Get the RHS vector of some coarse space. - inline Vec& getVecRhsCoarse(int coarseSpace = 0) - { - return vecRhs[coarseSpace + 1]; - } - - /// Get the RHS vector of the coarse space of a system component. - inline Vec& getVecRhsCoarseByComponent(int comp) - { - int vecIndex = componentIthCoarseMap[comp] + 1; - return vecRhs[vecIndex]; - } - - /// Get the solution vector of the interior. - inline Vec& getVecSolInterior() - { - return vecSol[0]; - } - - /// Get the solution vector of some coarse space. - inline Vec& getVecSolCoarse(int coarseSpace = 0) - { - FUNCNAME("ParallelCoarseSpaceSolver::getVecSolCoarse()"); - - TEST_EXIT_DBG(coarseSpace + 1 < vecSol.size()) - ("Wrong component %d, vecSol has only %d!\n", coarseSpace + 1, vecSol.size()); - - return vecSol[coarseSpace + 1]; - } - - /// Get the solution vector of the coarse space of a system component. - inline Vec& getVecSolCoarseByComponent(int comp) - { - int vecIndex = componentIthCoarseMap[comp] + 1; - return vecSol[vecIndex]; - } - - /** \brief - * Checks whether a given DOF index in some component is a coarse space DOF. - * Note (TODO): The specification of both, the component number and FE - * space is not really necessary. Rewrite this! - * - * \param[in] component Component number of the system. - * \param[in] dof DOF index - * - * \return True, if the dof is a coarse space DOF in the component. - * False otherwise. - */ - inline bool isCoarseSpace(int component, - DegreeOfFreedom dof) - { - FUNCNAME("ParallelCoarseSpaceSolver::isCoarseSpace()"); + /** \ingroup Solver + * + * \brief + * This class implements a block structured PETSc matrix/vec which seperates + * the discretization of the interior of subdomains and the discretization + * of the coarse space. Thus, we have one matrix block for the interior and + * one matrix block for the coarse space plus the coupling blocks. Some notes: + * - For a single level domain decomposition method (e.g. the standad + * FETI-DP method), the interior matrix is local to the current rank and the + * coarse space matrix is a globally distributed matrix. + * - There are different coarse spaces for different components possible. In + * this case, there are as many blocks as there are different coarse spaces + * plus one block for the interior matrix. + * - This class also manages the creation of the corresponding non zero + * structure of the matrices. + */ + class ParallelCoarseSpaceSolver : public ParallelSolver + { + public: + /// Constructor + ParallelCoarseSpaceSolver(string name); + + /// Destructor + virtual ~ParallelCoarseSpaceSolver() {}; + + /// Specialization of ParallelSolver::init() + virtual void init(vector &componentSpaces, + vector &feSpaces, + bool createGlobalMapping = true); + + /** \brief + * Sets the coarse space for all or a specific component. + * + * \param[in] coarseDofs Coarse space DOF mapping. + * \param[in] component If the standard value -1 is used, the coarse + * space DOF mapping is set for all components + * of the equation. Otherwise, the coarse space + * DOF mapping is set only for the given one. + */ + void setCoarseSpaceDofMapping(ParallelDofMapping *coarseDofs, + int component = -1); - if (coarseSpaceMap.empty()) - return false; - - TEST_EXIT_DBG(coarseSpaceMap.count(component)) - ("Component %d has no coarse space defined!\n", component); - return (*(coarseSpaceMap[component]))[component].isSet(dof); - } + /// Create a parallel distributed PETSc vector based on this mapping. + void createVec(ParallelDofMapping& map, Vec &vec) + { + VecCreateMPI(map.getMpiComm(), map.getRankDofs(), map.getOverallDofs(), &vec); + } + + /// Create a parallel distributed PETsc vector based on this mapping but + /// with a different (larger) global size. This is used in multi-level + /// method to embed a local vector into a subdomain spaned by several + /// ranks. + void createVec(ParallelDofMapping& map, Vec &vec, int nGlobalRows) + { + VecCreateMPI(map.getMpiComm(), map.getRankDofs(), nGlobalRows, &vec); + } + + void createLocalVec(ParallelDofMapping& map, Vec &vec) + { + VecCreateSeq(PETSC_COMM_SELF, map.getRankDofs(), &vec); + } + + /// Creates matrices and vectors with respect to the coarse space. + void createMatVec(Matrix& seqMat); + + /// Run PETSc's matrix assembly routines. + void matAssembly(); + + /// Run PETSc's vector assembly routines on rhs vectors. + void vecRhsAssembly(); + + /// Run PETSc's vector assembly routines on solution vectors. + void vecSolAssembly(); + + /// Destroys PETSc matrix objects. + void matDestroy(); + + /// Destroys PETSc vector objects. + void vecDestroy(); + + + /// Just for super trick + vector >& getMat() + { + return mat; + } + + /// Just for super trick + vector& getVecRhs() + { + return vecRhs; + } + + + /// Get interior matrix. + inline Mat& getMatInterior() + { + TEST_EXIT_DBG(mat.size() > 0)("No matrix data!\n"); + return mat[0][0]; + } + + /// Get coarse space matrix. + inline Mat& getMatCoarse(int coarseSpace0 = 0, int coarseSpace1 = 0) + { + TEST_EXIT_DBG(static_cast(mat.size()) > coarseSpace0 + 1)("No matrix data!\n"); + TEST_EXIT_DBG(static_cast(mat.size()) > coarseSpace1 + 1)("No matrix data!\n"); + return mat[coarseSpace0 + 1][coarseSpace1 + 1]; + } + + /// Get coupling matrix of the interior and some coarse space. + inline Mat& getMatInteriorCoarse(int coarseSpace = 0) + { + TEST_EXIT_DBG(static_cast(mat.size()) > coarseSpace + 1)("No matrix data!\n"); + return mat[0][coarseSpace + 1]; + } + + /// Get coupling of some coarse space matrix and the interior. + inline Mat& getMatCoarseInterior(int coarseSpace = 0) + { + TEST_EXIT_DBG(static_cast(mat.size()) > coarseSpace + 1)("No matrix data!\n"); + return mat[coarseSpace + 1][0]; + } + + /// Get the coarse space matrix of some system component. + inline Mat& getMatCoarseByComponent(int rowComp, int colComp = -1) + { + int rowMatIndex = componentIthCoarseMap[rowComp] + 1; + int colMatIndex = componentIthCoarseMap[(colComp == -1 ? rowComp : colComp)] + 1; + return mat[rowMatIndex][colMatIndex]; + } + + /// Get coupling matrix of the interior and the coarse space of a + /// system component. + inline Mat& getMatInteriorCoarseByComponent(int comp) + { + int matIndex = componentIthCoarseMap[comp] + 1; + return mat[0][matIndex]; + } + + /// Get coupling matrix of the coarse space of a system component and the + /// interior matrix. + inline Mat& getMatCoarseInteriorByComponent(int comp) + { + int matIndex = componentIthCoarseMap[comp] + 1; + return mat[matIndex][0]; + } + + /// Get the RHS vector of the interior. + inline Vec& getVecRhsInterior() + { + return vecRhs[0]; + } + + /// Get the RHS vector of some coarse space. + inline Vec& getVecRhsCoarse(int coarseSpace = 0) + { + return vecRhs[coarseSpace + 1]; + } + + /// Get the RHS vector of the coarse space of a system component. + inline Vec& getVecRhsCoarseByComponent(int comp) + { + int vecIndex = componentIthCoarseMap[comp] + 1; + return vecRhs[vecIndex]; + } + + /// Get the solution vector of the interior. + inline Vec& getVecSolInterior() + { + return vecSol[0]; + } + + /// Get the solution vector of some coarse space. + inline Vec& getVecSolCoarse(int coarseSpace = 0) + { + FUNCNAME("ParallelCoarseSpaceSolver::getVecSolCoarse()"); + + TEST_EXIT_DBG(coarseSpace + 1 < static_cast(vecSol.size())) + ("Wrong component %d, vecSol has only %d!\n", coarseSpace + 1, vecSol.size()); + + return vecSol[coarseSpace + 1]; + } + + /// Get the solution vector of the coarse space of a system component. + inline Vec& getVecSolCoarseByComponent(int comp) + { + int vecIndex = componentIthCoarseMap[comp] + 1; + return vecSol[vecIndex]; + } + + /** \brief + * Checks whether a given DOF index in some component is a coarse space DOF. + * Note (TODO): The specification of both, the component number and FE + * space is not really necessary. Rewrite this! + * + * \param[in] component Component number of the system. + * \param[in] dof DOF index + * + * \return True, if the dof is a coarse space DOF in the component. + * False otherwise. + */ + inline bool isCoarseSpace(int component, + DegreeOfFreedom dof) + { + FUNCNAME("ParallelCoarseSpaceSolver::isCoarseSpace()"); + + if (coarseSpaceMap.empty()) + return false; + + TEST_EXIT_DBG(coarseSpaceMap.count(component)) + ("Component %d has no coarse space defined!\n", component); + + return (*(coarseSpaceMap[component]))[component].isSet(dof); + } + + + /// Returns whether the solver has a coarse grid. + inline bool hasCoarseSpace() + { + return (!coarseSpaceMap.empty()); + } + + protected: + /// Prepare internal data structures. First, it create \ref uniqueCoarseMap + /// and \ref componentIthCoarseMap . Both are used to create the correct + /// number of matrix and vectors in \ref mat and \ref vec. + virtual void prepare(); + + /// Computes the values of \ref rStartInterior and + /// \ref nGlobalOverallInterior. + void updateSubdomainData(); + + private: + /// Checks for mesh changes. Returns true if the mesh has been changed + /// until the last matrix creation. Is used to rebuild matrix nz structure. + bool checkMeshChange(); + + protected: + /// Matrix of PETSc matrices. mat[0][0] is the interior discretization + /// matrix, mat[1][1] corresponds to the first coarse space and so on. + /// mat[i][j], with i not equal to j, are the coupling between the interior + /// and the coarse space matrices, and between the different coarse spaces + /// respectively. + vector > mat; + + /// Solution and RHS vectors. vec[0] is the interior vector, vec[1] the + /// first coarse space vector and so on. + vector vecSol, vecRhs; + + /// Matrix of objects to control the matrix non zero structure of the + /// corresponding PETSc matrices stored in \ref mat. + vector > nnz; + + /** \brief + * Stores for each system component (i.e. each PDE variable) the coarse + * space that is used for its discretization. + * + * Example: We solve the Stokes equation in 2D with a different coarse + * space for the velocity unknowns (component 0 and 1) and the pressure + * (component 2). Than: + * componentIthCoarseMap[0] = 0 + * componentIthCoarseMap[1] = 0 + * componentIthCoarseMap[2] = 1 + * The indices can directly be used to access the correspondig parallel + * DOF mapping in \ref uniqueCoarseMap. + */ + vector componentIthCoarseMap; + + /// Stores a set of all coarse space DOF mapping. All entries are unique. + vector uniqueCoarseMap; + + /// Stores the mesh change index of the mesh the nnz structure was created + /// for. Therefore, if the mesh change index is higher than this value, we + /// have to create a new nnz structure for PETSc matrices, because the mesh + /// has been changed and therefore also the assembled matrix structure. + int lastMeshNnz; + + /// If this variable is set to true, the non-zero matrix structure is + /// created each time from scratch by calling \ref createPetscNnzStrcuture. + /// This can be necessary if the number of non-zeros in the matrix varies + /// though the mesh does not change. This may happen if there are many + /// operators using DOFVectors from old timestep containing many zeros due to + /// some phase fields. + bool alwaysCreateNnzStructure; + + /// Offset for the interior DOFs of the local interior with respect to the + /// subdomain. In the case of a one-level method, each local interior + /// is exactly one subdomain. In the case of a multi-level method, one + /// subdomain may consists of several rank domains. This value defines than + /// the offset ot rank's interior rows to the subdomain's interior rows. + int rStartInterior; + + /// Number of overall rows in subdomain's interior. For one-level methods, + /// this value is equal to the number of rows in rank's interior. See also + /// explenation for \ref rStarInterior. + int nGlobalOverallInterior; + + /// Parallel DOF mapping of the (optional) coarse space. Allows to define + /// different coarse spaces for different components. + map coarseSpaceMap; + + MPI::Intracomm domainComm; + MPI::Intracomm coarseSpaceComm; + + /// Prefix string for parameters in init file. + string initFileStr; + }; - /// Returns whether the solver has a coarse grid. - inline bool hasCoarseSpace() - { - return (!coarseSpaceMap.empty()); - } + } // end namespace Parallel +} // end namespace AMDiS - protected: - /// Prepare internal data structures. First, it create \ref uniqueCoarseMap - /// and \ref componentIthCoarseMap . Both are used to create the correct - /// number of matrix and vectors in \ref mat and \ref vec. - void prepare(); - - /// Computes the values of \ref rStartInterior and - /// \ref nGlobalOverallInterior. - void updateSubdomainData(); - - private: - /// Checks for mesh changes. Returns true if the mesh has been changed - /// until the last matrix creation. Is used to rebuild matrix non - /// zero stricture. - bool checkMeshChange(); - - protected: - /// Matrix of PETSc matrices. mat[0][0] is the interior discretization - /// matrix, mat[1][1] corresponds to the first coarse space and so on. - /// mat[i][j], with i not equal to j, are the coupling between the interior - /// and the coarse space matrices, and between the different coarse spaces - /// respectively. - vector > mat; - - /// Solution and RHS vectors. vec[0] is the interior vector, vec[1] the - /// first coarse space vector and so on. - vector vecSol, vecRhs; - - /// Matrix of objects to control the matrix non zero structure of the - /// corresponding PETSc matrices stored in \ref mat. - vector > nnz; - - /** \brief - * Stores for each system component (i.e. each PDE variable) the coarse - * space that is used for its discretization. - * - * Example: We solve the Stokes equation in 2D with a different coarse - * space for the velocity unknowns (component 0 and 1) and the pressure - * (component 2). Than: - * componentIthCoarseMap[0] = 0 - * componentIthCoarseMap[1] = 0 - * componentIthCoarseMap[2] = 1 - * The indices can directly be used to access the correspondig parallel - * DOF mapping in \ref uniqueCoarseMap. - */ - vector componentIthCoarseMap; - - /// Stores a set of all coarse space DOF mapping. All entries are unique. - vector uniqueCoarseMap; - - /// Stores the mesh change index of the mesh the nnz structure was created - /// for. Therefore, if the mesh change index is higher than this value, we - /// have to create a new nnz structure for PETSc matrices, because the mesh - /// has been changed and therefore also the assembled matrix structure. - int lastMeshNnz; - - /// If this variable is set to true, the non-zero matrix structure is - /// created each time from scratch by calling \ref createPetscNnzStrcuture. - /// This can be necessary if the number of non-zeros in the matrix varies - /// though the mesh does not change. This may happen if there are many - /// operators using DOFVectors from old timestep containing many zeros due to - /// some phase fields. - bool alwaysCreateNnzStructure; - - /// Prefix string for parameters in init file. - string initFileStr; - - /// Pointer to a mesh distributor object. - MeshDistributor *meshDistributor; - - /// Level of subdomain/interior discretization. Is used for multi-level - /// methods only. - int meshLevel; - -#if 0 - /// MPI communicator on the subdomain level. If no multi-level is used - /// this is alway MPI_COMM_SELF. In the case of a multi-level method, this - /// is a subset of MPI_COMM_WORLD. - MPI::Intracomm mpiCommLocal; - - /// MPI communicator on the coarse space level. If no multi-level method - /// is used, this is always MPI_COMM_WORLD, otherwise a subset of it. - MPI::Intracomm mpiCommGlobal; #endif - MPI::Intracomm domainComm; - - MPI::Intracomm coarseSpaceComm; - - /// Offset for the interior DOFs of the local interior with respect to the - /// subdomain. In the case of a one-level method, each local interior - /// is exactly one subdomain. In the case of a multi-level method, one - /// subdomain may consists of several rank domains. This value defines than - /// the offset ot rank's interior rows to the subdomain's interior rows. - int rStartInterior; - - /// Number of overall rows in subdomain's interior. For one-level methods, - /// this value is equal to the number of rows in rank's interior. See also - /// explenation for \ref rStarInterior. - int nGlobalOverallInterior; - - /// Parallel DOF mapping for the interior. - ParallelDofMapping *interiorMap; - - /// Parallel DOF mapping of the (optional) coarse space. Allows to define - /// different coarse spaces for different components. - map coarseSpaceMap; - }; - -} - -#endif diff --git a/AMDiS/src/parallel/ParallelDebug.cc b/AMDiS/src/parallel/ParallelDebug.cc index 1aaf5022..ea10b7f8 100644 --- a/AMDiS/src/parallel/ParallelDebug.cc +++ b/AMDiS/src/parallel/ParallelDebug.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/ParallelDebug.h" @@ -21,7 +30,7 @@ #include "io/VtkWriter.h" #include "ElementDofIterator.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -508,16 +517,17 @@ namespace AMDiS { int mpiRank = mpiComm.Get_rank(); int mpiSize = mpiComm.Get_size(); - typedef map, int> CoordsIndexMap; + typedef map > CoordsIndexMap; CoordsIndexMap coordsToIndex; DOFIterator > it(&coords, USED_DOFS); for (it.reset(); !it.end(); ++it) { - coordsToIndex[(*it)] = (*(pdb.dofMaps[level]))[feSpace][it.getDOFIndex()].global; - // MSG(" CHECK FOR DOF %d/%d AT COORDS %f %f %f\n", - // it.getDOFIndex(), - // coordsToIndex[(*it)], - // (*it)[0], (*it)[1], (pdb.mesh->getDim() == 3 ? (*it)[2] : 0.0)); + int idx = (*(pdb.dofMaps[level]))[feSpace][it.getDOFIndex()].global; + coordsToIndex[idx] = *it; +// MSG(" CHECK FOR DOF %d/%d AT COORDS %f %f %f\n", +// it.getDOFIndex(), +// coordsToIndex[(*it)], +// (*it)[0], (*it)[1], (pdb.mesh->getDim() == 3 ? (*it)[2] : 0.0)); } StdMpi stdMpi(mpiComm, true); @@ -537,10 +547,13 @@ namespace AMDiS { for (; !it.endDofIter(); it.nextDof()) { WorldVector recvCoords = coords[it.getDofIndex()]; + int idx = (*(pdb.dofMaps[level]))[feSpace][it.getDofIndex()].global; - TEST_EXIT_DBG(otherCoords.count(recvCoords))("Should not happen!\n"); + TEST_EXIT_DBG(otherCoords.count(idx))("Global index not found in neighbour partition\n"); - if (coordsToIndex[recvCoords] != otherCoords[recvCoords]) { + WorldVector diff = otherCoords[idx] - recvCoords; + double dist = sqrt(diff*diff); + if (dist > DBL_TOL) { stringstream oss; oss.precision(5); oss << "DOF at coords "; @@ -548,11 +561,12 @@ namespace AMDiS { oss << recvCoords[i] << " "; oss << " do not fit together on rank " << mpiComm.Get_rank() << " (global index: " - << coordsToIndex[recvCoords] << ") and on rank " - << it.getRank() << " (global index: " << otherCoords[recvCoords] - << ") - LEVEL " << level; + << it.getDofIndex() << ") and on rank " + << it.getRank() << " " + << " - LEVEL " << level; MSG("[DBG] %s\n", oss.str().c_str()); + foundError = 1; } } @@ -1098,4 +1112,4 @@ namespace AMDiS { } } -} +} } // end namespaces diff --git a/AMDiS/src/parallel/ParallelDebug.h b/AMDiS/src/parallel/ParallelDebug.h index 8106f523..cdf2a4a9 100644 --- a/AMDiS/src/parallel/ParallelDebug.h +++ b/AMDiS/src/parallel/ParallelDebug.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -26,178 +28,181 @@ #include "parallel/ParallelTypes.h" #include "parallel/MeshDistributor.h" -namespace AMDiS { - - using namespace std; - - class ParallelDebug +namespace AMDiS +{ + namespace Parallel { - protected: - typedef vector > CoordsVec; - - /// Defines a mapping type from rank numbers to sets of coordinates. - typedef map RankToCoords; - - public: - /** \brief - * Tests the interior and the periodic boundaries on all ranks if their order - * fits together. - * - * \param[in] pdb Parallel problem definition used for debugging. - */ - static void testInteriorBoundary(MeshDistributor &pdb); - - /** \brief - * Test if all periodic boundaries are set in a consistent way on all ranks. - * - * \param[in] pdb Parallel problem definition used for debugging. - */ - static void testPeriodicBoundary(MeshDistributor &pdb); - - /** \brief - * Test if all periodic boundaries are set in a consistent way on all ranks. - * - * \param[in] pdb Parallel problem definition used for debugging. - * \oaram[in] feSpace FE space for which the DOFs are tested. - */ - static void testPeriodicBoundary(MeshDistributor &pdb, - const FiniteElemSpace *feSpace); - - /** \brief - * This function is used for debugging only. It traverses all interior - * boundaries and compares the DOF indices on them with the DOF indices of - * the boundarys neighbours. The function fails, when DOF indices on an - * interior boundary do not fit together. - * - * \param[in] pdb Parallel problem definition used for debugging. - * \param[in] printCoords If true, the coords of all common dofs are - * printed to the screen. - */ - static void testCommonDofs(MeshDistributor &pdb, bool printCoords = false); - - /** \brief - * This function is used for debugging only. It checks if on all ranks DOFs - * with the same coordinates have the same global index. For this, the - * function genartes on all ranks a list of all DOFs with their coordinates - * and global indices and sends the list to all neighbouring ranks. - * - * \param[in] pdb Parallel problem definition used for debugging. - */ - static void testGlobalIndexByCoords(MeshDistributor &pdb); - - /** \brief - * Tests if all elements in the macro mesh are memeber of exactly one rank. - * - * \param[in] pdb Parallel problem definition used for debugging. - */ - static void testAllElements(MeshDistributor &pdb); - - /** \brief - * Tests for all ranks simultaneously, if the number of all send and received - * DOFs fits together for all communication partners. - * - * \param[in] pdb Parallel problem definition used for debugging. - */ - static void testDofContainerCommunication(MeshDistributor &pdb); - - /// Tests if there are multiple DOFs in mesh with the same coords. - static void testDoubleDofs(Mesh *mesh); - - /** \brief - * This function is used for debugging only. It prints all information from - * the local to global dof mapping, see \ref mapLocalGlobalDofs. - * - * \param[in] pdb Parallel problem definition used for debugging. - * \param[in] rank If specified, only the information from the given rank - * is printed. - */ - static void printMapLocalGlobal(MeshDistributor &pdb, int rank = -1); - - /** \brief - * This function is used for debugging only. It prints all information about - * the periodic mapping of dofs, that are on periodic boundaries. - * - * \param[in] pdb Parallel problem definition used for debugging. - * \param[in] rank If specified, only the information from the given rank - * is printed. - */ - static void printMapPeriodic(MeshDistributor &pdb, int rank = -1); - - /** \brief - * This function is used for debugging only. It prints information about DOFs - * in rank's partition. - * - * \param[in] pdb Parallel problem definition used for debugging. - * \param[in] rank If specified, only the information from the - * given rank is printed. - * \param[in] rankDofs List of all dofs in ranks partition that are - * owned by rank. - * \param[in] rankAllDofs List of all dofs in ranks partition. - */ - static void printRankDofs(MeshDistributor &pdb, - int rank, - DofContainer& rankDofs, - DofContainer& rankAllDofs); - - /** \brief - * This functions prints all information about all interior boundaries on - * all ranks. - * - * \param[in] intBoundary The boundary object to be printed. - * \param[in] force If true, the information is always printed to - * screen. Otherwise, this is done only if AMDiS - * is compiled in debug mode or if the init file - * parameter "parallel->debug->print boundary info" - * is set. - */ - static void printBoundaryInfo(InteriorBoundary &intBoundary, - bool force = false); - - - static void writeDebugFile(const FiniteElemSpace *feSpace, - ParallelDofMapping &dofMap, - string prefix, - string postfix); - - /** \brief - * This functions create a Paraview file with the macro mesh where the - * elements are colored by the partition they are part of. - */ - static void writePartitioning(MeshDistributor &pdb, string filename); - - /** \brief - * The mesh is written to a value and all values are assigned by the rank - * number where the vertex is contained in. - * - * \param[in] filename Name of the output file without extension (.vtu). - * \param[in] counter Counter index. If not negative, this number is - * added to the filename. - * \param[in] feSpace - */ - static void writePartitioningFile(string filename, - int counter, - const FiniteElemSpace *feSpace); + using namespace std; + + class ParallelDebug + { + protected: + typedef vector > CoordsVec; + + /// Defines a mapping type from rank numbers to sets of coordinates. + typedef map RankToCoords; + + public: + /** \brief + * Tests the interior and the periodic boundaries on all ranks if their order + * fits together. + * + * \param[in] pdb Parallel problem definition used for debugging. + */ + static void testInteriorBoundary(MeshDistributor &pdb); + + /** \brief + * Test if all periodic boundaries are set in a consistent way on all ranks. + * + * \param[in] pdb Parallel problem definition used for debugging. + */ + static void testPeriodicBoundary(MeshDistributor &pdb); + + /** \brief + * Test if all periodic boundaries are set in a consistent way on all ranks. + * + * \param[in] pdb Parallel problem definition used for debugging. + * \oaram[in] feSpace FE space for which the DOFs are tested. + */ + static void testPeriodicBoundary(MeshDistributor &pdb, + const FiniteElemSpace *feSpace); - static bool followThisBound(int rankElIndex, int neighElIndex); - - static void followBoundary(MeshDistributor &pdb); - - static void followBoundary(Mesh *mesh, - AtomicBoundary &bound, - MeshStructure &code); - - /** \brief - * Writes Element Map of local Rank - * Map containes for each DOF in each Element (resulting in massive doubling of DOFs): - * localElementNumber elementLevel localDOFNumber dofType dofCoords(0-2) elementLocalDOFNumber typeOfElement (0-2) - */ - static void writeCsvElementMap(const FiniteElemSpace *feSpace, - ParallelDofMapping &dofMap, - string prefix, - string postfix); - }; - -} // namespace AMDiS + /** \brief + * This function is used for debugging only. It traverses all interior + * boundaries and compares the DOF indices on them with the DOF indices of + * the boundarys neighbours. The function fails, when DOF indices on an + * interior boundary do not fit together. + * + * \param[in] pdb Parallel problem definition used for debugging. + * \param[in] printCoords If true, the coords of all common dofs are + * printed to the screen. + */ + static void testCommonDofs(MeshDistributor &pdb, bool printCoords = false); + + /** \brief + * This function is used for debugging only. It checks if on all ranks DOFs + * with the same coordinates have the same global index. For this, the + * function generates on all ranks a list of all DOFs with their coordinates + * and global indices and sends the list to all neighbouring ranks. + * + * \param[in] pdb Parallel problem definition used for debugging. + */ + static void testGlobalIndexByCoords(MeshDistributor &pdb); + + /** \brief + * Tests if all elements in the macro mesh are memeber of exactly one rank. + * + * \param[in] pdb Parallel problem definition used for debugging. + */ + static void testAllElements(MeshDistributor &pdb); + + /** \brief + * Tests for all ranks simultaneously, if the number of all send and received + * DOFs fits together for all communication partners. + * + * \param[in] pdb Parallel problem definition used for debugging. + */ + static void testDofContainerCommunication(MeshDistributor &pdb); + + /// Tests if there are multiple DOFs in mesh with the same coords. + static void testDoubleDofs(Mesh *mesh); + + /** \brief + * This function is used for debugging only. It prints all information from + * the local to global dof mapping, see \ref mapLocalGlobalDofs. + * + * \param[in] pdb Parallel problem definition used for debugging. + * \param[in] rank If specified, only the information from the given rank + * is printed. + */ + static void printMapLocalGlobal(MeshDistributor &pdb, int rank = -1); + + /** \brief + * This function is used for debugging only. It prints all information about + * the periodic mapping of dofs, that are on periodic boundaries. + * + * \param[in] pdb Parallel problem definition used for debugging. + * \param[in] rank If specified, only the information from the given rank + * is printed. + */ + static void printMapPeriodic(MeshDistributor &pdb, int rank = -1); + + /** \brief + * This function is used for debugging only. It prints information about DOFs + * in rank's partition. + * + * \param[in] pdb Parallel problem definition used for debugging. + * \param[in] rank If specified, only the information from the + * given rank is printed. + * \param[in] rankDofs List of all dofs in ranks partition that are + * owned by rank. + * \param[in] rankAllDofs List of all dofs in ranks partition. + */ + static void printRankDofs(MeshDistributor &pdb, + int rank, + DofContainer& rankDofs, + DofContainer& rankAllDofs); + + /** \brief + * This functions prints all information about all interior boundaries on + * all ranks. + * + * \param[in] intBoundary The boundary object to be printed. + * \param[in] force If true, the information is always printed to + * screen. Otherwise, this is done only if AMDiS + * is compiled in debug mode or if the init file + * parameter "parallel->debug->print boundary info" + * is set. + */ + static void printBoundaryInfo(InteriorBoundary &intBoundary, + bool force = false); + + + static void writeDebugFile(const FiniteElemSpace *feSpace, + ParallelDofMapping &dofMap, + string prefix, + string postfix); + + /** \brief + * This functions create a Paraview file with the macro mesh where the + * elements are colored by the partition they are part of. + */ + static void writePartitioning(MeshDistributor &pdb, string filename); + + /** \brief + * The mesh is written to a value and all values are assigned by the rank + * number where the vertex is contained in. + * + * \param[in] filename Name of the output file without extension (.vtu). + * \param[in] counter Counter index. If not negative, this number is + * added to the filename. + * \param[in] feSpace + */ + static void writePartitioningFile(string filename, + int counter, + const FiniteElemSpace *feSpace); + + + static bool followThisBound(int rankElIndex, int neighElIndex); + + static void followBoundary(MeshDistributor &pdb); + + static void followBoundary(Mesh *mesh, + AtomicBoundary &bound, + MeshStructure &code); + + /** \brief + * Writes Element Map of local Rank + * Map containes for each DOF in each Element (resulting in massive doubling of DOFs): + * localElementNumber elementLevel localDOFNumber dofType dofCoords(0-2) elementLocalDOFNumber typeOfElement (0-2) + */ + static void writeCsvElementMap(const FiniteElemSpace *feSpace, + ParallelDofMapping &dofMap, + string prefix, + string postfix); + }; + } // end namespace Parallel +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/ParallelDofMapping.cc b/AMDiS/src/parallel/ParallelDofMapping.cc index 587684e5..5017d17e 100644 --- a/AMDiS/src/parallel/ParallelDofMapping.cc +++ b/AMDiS/src/parallel/ParallelDofMapping.cc @@ -1,30 +1,39 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/ParallelDofMapping.h" #include "parallel/StdMpi.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; - void DofToMatIndex::getReverse(int rowIndex, int &component, int &dofIndex) + void DofToMatIndex::getReverse(int rowIndex, int &component, int &dofIndex) const { FUNCNAME("DofToMatIndex::getReverse()"); - for (map >::iterator it0 = data.begin(); + for (map >::const_iterator it0 = data.begin(); it0 != data.end(); ++it0) - for (boost::container::flat_map::iterator it1 = it0->second.begin(); + for (boost::container::flat_map::const_iterator it1 = it0->second.begin(); it1 != it0->second.end(); ++it1) if (it1->second == rowIndex) { component = it0->first; @@ -402,13 +411,15 @@ namespace AMDiS { !it.end(); it.nextRank()) { vector sendGlobalDofs; - for (; !it.endDofIter(); it.nextDof()) - if (dofMap.count(it.getDofIndex())) + for (; !it.endDofIter(); it.nextDof()) { + if (dofMap.count(it.getDofIndex())) { if (globalIndex) sendGlobalDofs.push_back(dofToMatIndex.get(component, dofMap[it.getDofIndex()].global)); else sendGlobalDofs.push_back(dofToMatIndex.get(component, it.getDofIndex())); + } + } int rank = it.getRank(); // if (meshLevel > 0) @@ -477,7 +488,7 @@ namespace AMDiS { for (DofComm::Iterator it(dofComm->getPeriodicDofs(), componentSpaces[component]); !it.end(); it.nextRank()) { - int rank = it.getRank(); +// int rank = it.getRank(); // if (meshLevel > 0) // rank = levelData->mapRank(rank, 0, meshLevel); @@ -505,6 +516,7 @@ namespace AMDiS { } +#ifndef HAVE_PARALLEL_MTL4 void ParallelDofMapping::createIndexSet(IS &is, int firstComponent, int nComponents) @@ -525,14 +537,15 @@ namespace AMDiS { } TEST_EXIT_DBG(firstRankDof >= 0)("No rank DOF found!\n"); - int firstMatIndex = dofToMatIndex.get(firstComponent, firstRankDof); int nRankRows = 0; for (int i = firstComponent; i < firstComponent + nComponents; i++) nRankRows += (*data)[i].nRankDofs; + int firstMatIndex = dofToMatIndex.get(firstComponent, firstRankDof); ISCreateStride(mpiComm, nRankRows, firstMatIndex, 1, &is); } +#endif void ParallelDofMapping::printInfo() @@ -565,7 +578,18 @@ namespace AMDiS { dofToMatIndex.getData(i).begin()->second, (dofToMatIndex.getData(i).end() - 1)->first, (dofToMatIndex.getData(i).end() - 1)->second); + + DofToMatIndex::MapType::iterator it; + + std::stringstream fn; + fn << "map_indices-p" << MPI::COMM_WORLD.Get_rank() << ".dat"; + std::ofstream out(fn.str().c_str(), ios::out); + for (it = dofToMatIndex.getData(i).begin(); it != dofToMatIndex.getData(i).end(); it++) { +// MSG(" dof-to-mat-index: (%d -> %d)\n", it->first, it->second); + out << it->first << " " << it->second << "\n"; + } + out.close(); } } } -} +} } diff --git a/AMDiS/src/parallel/ParallelDofMapping.h b/AMDiS/src/parallel/ParallelDofMapping.h index 176c03a6..f95a1aea 100644 --- a/AMDiS/src/parallel/ParallelDofMapping.h +++ b/AMDiS/src/parallel/ParallelDofMapping.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -27,18 +29,21 @@ #include #include #include -#include -#include #include #include +#ifndef HAVE_PARALLEL_MTL4 +#include +#include +#endif + #include "AMDiS_fwd.h" #include "parallel/DofComm.h" #include "parallel/MpiHelper.h" #include "parallel/ParallelTypes.h" #include "parallel/StdMpi.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -74,36 +79,48 @@ namespace AMDiS { /// Maps a global DOF index to the global matrix index for a specific /// system component number. - inline int get(int component, DegreeOfFreedom dof) + inline int get(int component, DegreeOfFreedom dof) const { - FUNCNAME("DofToMatIndex::get()"); - - TEST_EXIT_DBG(data.count(component)) + FUNCNAME_DBG("DofToMatIndex::get()"); + + map::const_iterator it_component = data.find(component); + TEST_EXIT_DBG(it_component != data.end()) ("No mapping data for component %d available!\n", component); - - TEST_EXIT_DBG(data[component].count(dof)) - ("Mapping for DOF %d in component %d does not exists!\n", + + MapType::const_iterator it_dof = (it_component->second).find(dof); + TEST_EXIT_DBG(it_dof != (it_component->second).end()) + ("Mapping for DOF %d in component %d does not exist!\n", dof, component); - return data[component][dof]; + return it_dof->second; } /// Returns the number of DOF mappings in one component - inline int getSize(int component) + inline int getSize(int component) const { - return data[component].size(); + FUNCNAME_DBG("DofToMatIndex::getSize()"); + + map::const_iterator it_component = data.find(component); + TEST_EXIT_DBG(it_component != data.end()) + ("No mapping data for component %d available!\n", component); + return (it_component->second).size(); } /// Returns the whole mapping for one component inline MapType& getData(int component) { - return data[component]; + FUNCNAME_DBG("DofToMatIndex::getData()"); + + map::iterator it_component = data.find(component); + TEST_EXIT_DBG(it_component != data.end()) + ("No mapping data for component %d available!\n", component); + return it_component->second; } /// Returns for a given matrix index the component and (local or global) DOF /// index. As the data structure is not made for this kind of reverse /// search, this is very slow and should be only used for debugging. - void getReverse(int rowIndex, int &component, int &dofIndex); + void getReverse(int rowIndex, int &component, int &dofIndex) const; private: /// The mapping data. For each system component there is a specific map that @@ -371,6 +388,7 @@ namespace AMDiS { ComponentDofMap& operator[](const FiniteElemSpace *feSpace) { ERROR_EXIT("FE Space access is not possible for component wise defined DOF mappings\n"); + return componentData.find(0)->second; } /// Return data iterator. @@ -411,12 +429,12 @@ namespace AMDiS { ComponentDofMap& operator*() { - (*data)[componentCounter]; + return (*data)[componentCounter]; } ComponentDofMap* operator->() { - &((*data)[componentCounter]); + return &((*data)[componentCounter]); } @@ -530,12 +548,12 @@ namespace AMDiS { ComponentDofMap& operator*() { - (*data)[*it]; + return (*data)[*it]; } ComponentDofMap* operator->() { - &((*data)[*it]); + return &((*data)[*it]); } bool end() @@ -569,12 +587,12 @@ namespace AMDiS { ComponentDofMap& operator*() { - (*data)[*it]; + return (*data)[*it]; } ComponentDofMap* operator->() { - &((*data)[*it]); + return &((*data)[*it]); } bool end() @@ -717,7 +735,7 @@ namespace AMDiS { } /// Returns \ref nRankDofs, thus the number of DOFs owned by the rank. - inline int getRankDofs() + inline int getRankDofs() const { TEST_EXIT_DBG(nRankDofs >= 0)("Should not happen!\n"); @@ -725,7 +743,7 @@ namespace AMDiS { } /// Returns \ref nLocalDofs, thus the number of DOFs in ranks subdomain. - inline int getLocalDofs() + inline int getLocalDofs() const { TEST_EXIT_DBG(nLocalDofs >= 0)("Should not happen!\n"); @@ -733,7 +751,7 @@ namespace AMDiS { } /// Returns \ref nOverallDofs, thus the number of all DOFs in this mapping. - inline int getOverallDofs() + inline int getOverallDofs() const { TEST_EXIT_DBG(nOverallDofs >= 0)("Should not happen!\n"); @@ -742,7 +760,7 @@ namespace AMDiS { /// Returns \ref rStartDofs, thus the smallest global index of a DOF that is /// owned by the rank. - inline int getStartDofs() + inline int getStartDofs() const { TEST_EXIT_DBG(rStartDofs >= 0)("Should not happen!\n"); @@ -757,21 +775,21 @@ namespace AMDiS { /// Returns the global matrix index of a given DOF for a given /// component number. - inline int getMatIndex(int ithComponent, DegreeOfFreedom d) + inline int getMatIndex(int ithComponent, DegreeOfFreedom d) const { return dofToMatIndex.get(ithComponent, d); } /// Returns the component number and local/global DOF index for a given /// matrix row index. Should be used for debugging only! - inline void getReverseMatIndex(int index, int &component, int &dofIndex) + inline void getReverseMatIndex(int index, int &component, int &dofIndex) const { dofToMatIndex.getReverse(index, component, dofIndex); } /// Returns the local matrix index of a given DOF for a given /// component number. - inline int getLocalMatIndex(int ithComponent, DegreeOfFreedom d) + inline int getLocalMatIndex(int ithComponent, DegreeOfFreedom d) const { return dofToMatIndex.get(ithComponent, d) - rStartDofs; } @@ -797,29 +815,11 @@ namespace AMDiS { /// Compute local and global matrix indices. void computeMatIndex(bool globalIndex); +#ifndef HAVE_PARALLEL_MTL4 void createIndexSet(IS &is, int firstComponent, int nComponents); - - /// Create a parallel distributed PETSc vector based on this mapping. - inline void createVec(Vec &vec) - { - VecCreateMPI(mpiComm, getRankDofs(), getOverallDofs(), &vec); - } - - /// Create a parallel distributed PETsc vector based on this mapping but - /// with a different (larger) global size. This is used in multi-level - /// method to embed a local vector into a subdomain spaned by several - /// ranks. - inline void createVec(Vec &vec, int nGlobalRows) - { - VecCreateMPI(mpiComm, getRankDofs(), nGlobalRows, &vec); - } - - inline void createLocalVec(Vec &vec) - { - VecCreateSeq(PETSC_COMM_SELF, getRankDofs(), &vec); - } +#endif /// Prints out some information about the mapping. May be used during /// debugging or parallel solver creation. @@ -855,7 +855,7 @@ namespace AMDiS { /// on global ones, otherwise on local DOF indices. /// In most scenarios the mapping stored on local DOF indices is what we /// want to have. Only when periodic boundary conditions are used together - /// with some global matrix approache, the matrix indices must be stored + /// with some global matrix approach, the matrix indices must be stored /// also for DOFs that are not part of the local subdomain. Thus, the /// mapping will be stored on global DOF indices. bool needMatIndexFromGlobal; @@ -889,6 +889,6 @@ namespace AMDiS { /// FE spaces or for component numbers. DofMappingMode mode; }; -} +} } #endif diff --git a/AMDiS/src/parallel/ParallelMapper.h b/AMDiS/src/parallel/ParallelMapper.h index a9fa1ec7..2c36e522 100644 --- a/AMDiS/src/parallel/ParallelMapper.h +++ b/AMDiS/src/parallel/ParallelMapper.h @@ -1,53 +1,99 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifndef PARALLEL_MAPPER_H #define PARALLEL_MAPPER_H #include "parallel/MeshDistributor.h" -namespace AMDiS { - //todo: request from a problem -> distributor mapper? - template< typename size_type > - class ParallelMapper_base { - MeshDistributor& md; - /// the current row in the problem system - size_type r; - /// the current column in the problem system - size_type c; - int nComponents; - +#include "solver/Mapper.h" +#include "MTL4Types.h" + +namespace AMDiS +{ + namespace Parallel + { + template< typename size_type > + class ParallelMapper_base : public MapperBase< size_type > + { + ParallelDofMapping& map; + + /// the current component row in the problem system + size_type rowComp; + + /// the current component column in the problem system + size_type colComp; + + unsigned int nComponents; + + MultiIndex rowMultiIndex; + MultiIndex colMultiIndex; + public: - - ParallelMapper_base(MeshDistributor& md, int nComponents): - md(md),r(0),c(0),nComponents(nComponents) + + ParallelMapper_base(ParallelDofMapping& map) + : map(map), + rowComp(0), + colComp(0), + nComponents(map.getNumberOfComponents()) + { FUNCNAME_DBG("ParallelMapper_base::_constructor()"); + + TEST_EXIT_DBG(nComponents > 0) + ("The system must have at least one component\n"); + } + + inline ParallelDofMapping& getMap() { - TEST_EXIT_DBG(nComponents > 0)("the system must have at least one component"); + return map; } - size_type row(size_type r_) + + size_type row(size_type r_) const { - // TODO: JUST TO COMPILE, mapLocalToGlobal is now FE space dependent! - size_type ret = 0; - // size_type ret = md.mapLocalToGlobal(r_)*nComponents+r; - return ret; +// if (map[rowComp].find(r_, rowMultiIndex) == false) +// throw std::runtime_error("row-index not found!\n"); +// int globalRowDof = rowMultiIndex.global; +// int rowIndex = map.getMatIndex(rowComp, globalRowDof); +// return rowIndex; + return map.getMatIndex(rowComp, r_); } - size_type col(size_type c_) + + size_type col(size_type c_) const { - // TODO: JUST TO COMPILE, mapLocalToGlobal is now FE space dependent! - size_type ret = 0; - // size_type ret = md.mapLocalToGlobal(c_)*nComponents+c; - return ret ; +// if (map[colComp].find(c_, colMultiIndex) == false) +// throw std::runtime_error("col-index not found!\n"); +// int globalColDof = colMultiIndex.global; +// int colIndex = map.getMatIndex(colComp, globalColDof); +// return colIndex; + return map.getMatIndex(colComp, c_); } - - inline MeshDistributor& meshDistributor() { return md; } - inline int getNumComponents() { return nComponents; } - - inline void setRow(size_type r_) { r = r_ ;} - inline void setCol(size_type c_) { c = c_; } - // TODO: JUST TO COMPILE, getNumberOverallDofs() is now FE space dependent! - inline size_type getNumRows() { return nComponents; } - inline size_type getNumCols() { return nComponents; } - -/* inline size_type getNumRows() { return md.getNumberOverallDofs() * nComponents; } */ -/* inline size_type getNumCols() { return md.getNumberOverallDofs() * nComponents; } */ - }; + + inline unsigned int getNumComponents() const { return nComponents; } + inline void setRow(size_type r_) { rowComp = r_ ;} + inline void setCol(size_type c_) { colComp = c_; } + + inline size_type getNumRows() const { return map.getOverallDofs(); } + inline size_type getNumCols() const { return map.getOverallDofs(); } + }; - typedef ParallelMapper_base< unsigned int > ParallelMapper; -} + } // end namespace Parallel + + typedef Parallel::ParallelMapper_base< MTLTypes::size_type > ParallelMapper; + +} // end namespace AMDiS + #endif diff --git a/AMDiS/src/parallel/ParallelProblemStat.cc b/AMDiS/src/parallel/ParallelProblemStat.cc new file mode 100644 index 00000000..396551d5 --- /dev/null +++ b/AMDiS/src/parallel/ParallelProblemStat.cc @@ -0,0 +1,217 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +#include "parallel/ParallelProblemStat.h" +#include "parallel/ParallelSolver.h" +#include "parallel/MeshDistributor.h" +#include "parallel/MpiHelper.h" + +#include "parallel/ParallelMapper.h" +#include "solver/LinearSolver.h" + +#ifdef HAVE_PARALLEL_MTL4 + #include "parallel/PITL_Solver.h" + #include "solver/KrylovPreconditioner.h" +#elif defined HAVE_PARALLEL_PETSC + #include "parallel/PetscSolverFeti.h" + #include "parallel/PetscSolverSchur.h" + #include "parallel/PetscSolverGlobalBlockMatrix.h" + #include "parallel/PetscSolverGlobalMatrix.h" + #include "parallel/PetscSolverNavierStokes.h" +#endif +#include "Global.h" + + +#if defined HAVE_PARALLEL_PETSC || defined HAVE_PETSC + #include "solver/PetscTypes.h" +#endif + +namespace AMDiS { namespace Parallel { + + double ParallelProblemStat::initTimeStamp = 0.0; + bool ParallelProblemStat::initialized = false; + + + ParallelProblemStat::ParallelProblemStat(std::string nameStr, + ProblemIterationInterface *problemIteration) + : ProblemStatSeq(nameStr, problemIteration), + meshDistributor(NULL) + { + initTimeStamp = MPI::Wtime(); + mpi::globalMin(initTimeStamp); + addSolvers(); + } + + + void ParallelProblemStat::initialize(Flag initFlag, + ProblemStatSeq *adoptProblem, + Flag adoptFlag) + { + FUNCNAME("ParallelProblemStat::initialize()"); + + MSG("Initialization phase 0 needed %.5f seconds\n", + MPI::Wtime() - initTimeStamp); + + ProblemStatSeq::initialize(initFlag, adoptProblem, adoptFlag); + + MeshDistributor::addProblemStatGlobal(this); + meshDistributor = MeshDistributor::globalMeshDistributor; + meshDistributor->addInterchangeVector(getSolution()); + + ParallelSolver *parallelSolver = dynamic_cast(solver); + TEST_EXIT(parallelSolver != NULL) + ("ParallelProblem loaded, but no ParallelSolver selected! This does not fit together.\n"); + + parallelSolver->setMeshDistributor(meshDistributor, 0); + parallelSolver->init(getComponentSpaces(), getFeSpaces()); + } + + + void ParallelProblemStat::buildAfterCoarsen(AdaptInfo *adaptInfo, Flag flag, + bool assembleMatrix, + bool assembleVector) + { + FUNCNAME("ParallelProblemStat::buildAfterCoarsen()"); + + TEST_EXIT(MeshDistributor::globalMeshDistributor != NULL) + ("No Meshdistributor! Should not happen!\n"); + + MeshDistributor::globalMeshDistributor->checkMeshChange(); + ProblemStatSeq::buildAfterCoarsen(adaptInfo, flag, + assembleMatrix, assembleVector); + } + + + void ParallelProblemStat::addPeriodicBC(BoundaryType type, int row, int col) + { + if (MeshDistributor::globalMeshDistributor->isInitialized()) + return; + + ProblemStatSeq::addPeriodicBC(type, row, col); + } + + + void ParallelProblemStat::addSolvers() + { + if (!initialized) { + initialized = true; + LinearSolverCreator *creator; + +#if defined HAVE_PARALLEL_MTL4 + creator = new P_CGSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_cg", creator); + + creator = new P_CGSSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_cgs", creator); + +// creator = new P_BiCGSolver::Creator; +// CreatorMap< LinearSolver >::addCreator("p_mtl_bicg", creator); + + creator = new P_BiCGStabSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_bicgstab", creator); + + creator = new P_BiCGStab2Solver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_bicgstab2", creator); + + creator = new P_BiCGStabEllSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_bicgstab_ell", creator); + + creator = new P_QMRSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_qmr", creator); + + creator = new P_TFQMRSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_tfqmr", creator); + + creator = new P_GMResSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_gmres", creator); + + creator = new P_FGMResSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_fgmres", creator); + + creator = new P_IDRsSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_idr_s", creator); + + creator = new P_MinResSolver::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_minres", creator); + + creator = new P_PreOnly::Creator; + CreatorMap< LinearSolver >::addCreator("p_mtl_preonly", creator); + CreatorMap< LinearSolver >::addCreator("p_mtl_richardson", creator); + +#elif defined HAVE_PARALLEL_PETSC + creator = new PetscSolverGlobalMatrix::Creator; + CreatorMap< LinearSolver >::addCreator("p_petsc_petsc", creator); // standard PETSc creator + + std::map::iterator it; + PetscParameters params; + for (it = params.solverMap.begin(); + it!= params.solverMap.end(); + it++) { + CreatorMap< LinearSolver >::addCreator("p_petsc_" + it->first, creator); + } + + creator = new PetscSolverSchur::Creator; + CreatorMap< LinearSolver >::addCreator("p_petsc_petsc-schur", creator); + + creator = new PetscSolverGlobalBlockMatrix::Creator; + CreatorMap< LinearSolver >::addCreator("p_petsc_petsc-block", creator); + + creator = new PetscSolverFeti::Creator; + CreatorMap< LinearSolver >::addCreator("p_petsc_petsc-feti", creator); + + creator = new PetscSolverNavierStokes::Creator; + CreatorMap< LinearSolver >::addCreator("p_petsc_petsc-navierstokes", creator); + +#elif defined HAVE_BDDC_ML + creator = new BddcMlSolver::Creator; + CreatorMap< LinearSolver >::addCreator("bddcml", creator); +#endif + } + } + +} // end namespace Parallel + + +#ifdef HAVE_PARALLEL_MTL4 + template< > + void CreatorMap::addDefaultCreators() + { + Parallel::ParallelPreconditionCreator *creator; + + creator = new Parallel::P_DiagonalPreconditioner::Creator; + addCreator("diag", creator); + + creator = new Parallel::P_ILUPreconditioner::Creator; + addCreator("ilu", creator); + + creator = new Parallel::P_ICPreconditioner::Creator; + addCreator("ic", creator); + + creator = new Parallel::P_IdentityPreconditioner::Creator; + addCreator("no", creator); + + creator = new KrylovPreconditionerParallel::Creator; + addCreator("krylov", creator); + addCreator("solver", creator); + } +#endif + +} // end namespace AMDiS diff --git a/AMDiS/src/parallel/ParallelProblemStat.h b/AMDiS/src/parallel/ParallelProblemStat.h new file mode 100644 index 00000000..aaee530f --- /dev/null +++ b/AMDiS/src/parallel/ParallelProblemStat.h @@ -0,0 +1,85 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file ParallelProblemStatBase.h */ + +#ifndef AMDIS_PARALLEL_PROBLEM_STAT_BASE_H +#define AMDIS_PARALLEL_PROBLEM_STAT_BASE_H + +#include "parallel/MeshDistributor.h" +#include "ProblemStat.h" + +namespace AMDiS +{ + namespace Parallel + { + + /** + * \ingroup Problem + * + * \brief + * This class defines the stationary problem definition in parallel + * computations. + **/ + class ParallelProblemStat : public ProblemStatSeq + { + public: + ParallelProblemStat(std::string nameStr, + ProblemIterationInterface *problemIteration = NULL); + + virtual ~ParallelProblemStat() {} + + void buildAfterCoarsen(AdaptInfo *adaptInfo, Flag flag, + bool assembleMatrix = true, + bool assembleVector = true); + + void initialize(Flag initFlag, + ProblemStatSeq *adoptProblem = NULL, + Flag adoptFlag = INIT_NOTHING); + + /// Must be called before Meshdistributor::initParallelization() + /// is called. + void addPeriodicBC(BoundaryType type, int row, int col); + + private: + /// add PETSc and PMTL solvers to CreatorMap + void addSolvers(); + + /// add parallel PMTL preconditioners to CreatorMap + void addPreconditioner(); + + protected: + MeshDistributor *meshDistributor; + + public: + static double initTimeStamp; + static bool initialized; + }; + + } // end namespace Parallel + +#ifdef HAVE_PARALLEL_DOMAIN_AMDIS + typedef Parallel::ParallelProblemStat ProblemStat; +#endif + +} // end namespace AMDiS + +#endif diff --git a/AMDiS/src/parallel/ParallelProblemStatBase.cc b/AMDiS/src/parallel/ParallelProblemStatBase.cc deleted file mode 100644 index 0960bb7d..00000000 --- a/AMDiS/src/parallel/ParallelProblemStatBase.cc +++ /dev/null @@ -1,73 +0,0 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - -#include "parallel/ParallelProblemStatBase.h" -#include "parallel/MeshDistributor.h" -#include "parallel/MpiHelper.h" -#include "Global.h" - -namespace AMDiS { - - double ParallelProblemStatBase::initTimeStamp = 0.0; - - - ParallelProblemStatBase::ParallelProblemStatBase(std::string nameStr, - ProblemIterationInterface *problemIteration) - : ProblemStatSeq(nameStr, problemIteration), - meshDistributor(NULL) - { - initTimeStamp = MPI::Wtime(); - mpi::globalMin(initTimeStamp); - } - - - void ParallelProblemStatBase::buildAfterCoarsen(AdaptInfo *adaptInfo, Flag flag, - bool assembleMatrix, - bool assembleVector) - { - FUNCNAME("ParallelProblemStatBase::buildAfterCoarsen()"); - - TEST_EXIT_DBG(MeshDistributor::globalMeshDistributor != NULL) - ("Should not happen!\n"); - - MeshDistributor::globalMeshDistributor->checkMeshChange(); - ProblemStatSeq::buildAfterCoarsen(adaptInfo, flag, - assembleMatrix, - assembleVector); - } - - - void ParallelProblemStatBase::initialize(Flag initFlag, - ProblemStatSeq *adoptProblem, - Flag adoptFlag) - { - MSG("Initialization phase 0 needed %.5f seconds\n", - MPI::Wtime() - initTimeStamp); - - ProblemStatSeq::initialize(initFlag, adoptProblem, adoptFlag); - - MeshDistributor::addProblemStatGlobal(this); - - meshDistributor = MeshDistributor::globalMeshDistributor; - } - - - void ParallelProblemStatBase::addPeriodicBC(BoundaryType type, int row, int col) - { - FUNCNAME("ParallelProblemStatBase::addPeriodicBC()"); - - if (MeshDistributor::globalMeshDistributor->isInitialized()) - return; - - ProblemStatSeq::addPeriodicBC(type, row, col); - } -} diff --git a/AMDiS/src/parallel/ParallelProblemStatBase.h b/AMDiS/src/parallel/ParallelProblemStatBase.h deleted file mode 100644 index aa6eca77..00000000 --- a/AMDiS/src/parallel/ParallelProblemStatBase.h +++ /dev/null @@ -1,58 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -/** \file ParallelProblemStatBase.h */ - -#ifndef AMDIS_PARALLEL_PROBLEM_STAT_BASE_H -#define AMDIS_PARALLEL_PROBLEM_STAT_BASE_H - -#include "parallel/MeshDistributor.h" -#include "ProblemStat.h" - -namespace AMDiS { - - class ParallelProblemStatBase : public ProblemStatSeq - { - public: - ParallelProblemStatBase(std::string nameStr, - ProblemIterationInterface *problemIteration = NULL); - - virtual ~ParallelProblemStatBase() {} - - void buildAfterCoarsen(AdaptInfo *adaptInfo, Flag flag, - bool assembleMatrix = true, - bool assembleVector = true); - - void initialize(Flag initFlag, - ProblemStatSeq *adoptProblem = NULL, - Flag adoptFlag = INIT_NOTHING); - - void addPeriodicBC(BoundaryType type, int row, int col); - - protected: - MeshDistributor *meshDistributor; - - public: - static double initTimeStamp; - }; - -} - -#endif diff --git a/AMDiS/src/parallel/ParallelSolver.cc b/AMDiS/src/parallel/ParallelSolver.cc new file mode 100644 index 00000000..d103a9b9 --- /dev/null +++ b/AMDiS/src/parallel/ParallelSolver.cc @@ -0,0 +1,70 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ +#include "parallel/ParallelSolver.h" +#include "parallel/ParallelDofMapping.h" +#include "parallel/MeshDistributor.h" + +namespace AMDiS { namespace Parallel { + + ParallelSolver::ParallelSolver(std::string name, bool globalIndices) + : LinearSolver(name), + interiorMap(NULL), + dofMap(FESPACE_WISE, globalIndices), + parallelDofMappingsRegistered(false), + meshDistributor(NULL), + meshLevel(0) + { + setDofMapping(&dofMap); + } + + + ParallelSolver::~ParallelSolver() + { + if (parallelDofMappingsRegistered) + meshDistributor->removeDofMap(dofMap); + } + + + void ParallelSolver::init(std::vector &fe0, + std::vector &fe1, + bool createGlobalMapping) + { + FUNCNAME("ParallelSolver::init()"); + + TEST_EXIT(meshDistributor)("No mesh distributor object defined!\n"); + TEST_EXIT(fe0.size())("No component spaces provided!\n"); + TEST_EXIT(fe1.size())("No FE spaces provided!\n"); + + componentSpaces = fe0; + feSpaces = fe1; + + MeshLevelData& levelData = meshDistributor->getMeshLevelData(); + if (createGlobalMapping) { + parallelDofMappingsRegistered = true; + + dofMap.init(componentSpaces, feSpaces); + dofMap.setMpiComm(levelData.getMpiComm(meshLevel)); + dofMap.setDofComm(meshDistributor->getDofComm(meshLevel)); + dofMap.clear(); + meshDistributor->registerDofMap(dofMap); + } + } + +} } // end namespaces diff --git a/AMDiS/src/parallel/ParallelSolver.h b/AMDiS/src/parallel/ParallelSolver.h new file mode 100644 index 00000000..22a7136f --- /dev/null +++ b/AMDiS/src/parallel/ParallelSolver.h @@ -0,0 +1,117 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file ParallelSolver.h */ + +#ifndef AMDIS_PARALLEL_SOLVER_H +#define AMDIS_PARALLEL_SOLVER_H + +#include +#include +#include "solver/LinearSolver.h" +#include "AMDiS_fwd.h" + +namespace AMDiS +{ + namespace Parallel + { + + /** \ingroup Solver + * + * \brief + * base class for all parallel solvers, e.g. \ref PetscSolver, or \ref PMTL4Solver + */ + class ParallelSolver : public LinearSolver + { + public: // methods + + /// Constructor. Parameter \param globalIndices should be true for most + /// \ref PetscSolver and false for \ref PMTL4Solver + ParallelSolver(std::string name, bool globalIndices); + + virtual ~ParallelSolver(); + + virtual void init(std::vector &componentSpaces, + std::vector &feSpaces, + bool createGlobalMapping = true); + + /// Set \ref ParallelDofMapping for the interior DOFs. + void setDofMapping(ParallelDofMapping *mapping) + { + interiorMap = mapping; + } + + /// Set \ref MeshDistributor object + void setMeshDistributor(MeshDistributor *m, int level = 0) + { + meshDistributor = m; + meshLevel = level; + } + + /// Returns the \ref ParallelDofMapping for the interior DOFs. + ParallelDofMapping* getDofMapping() + { + return interiorMap; + } + + ParallelDofMapping& getDofMap() + { + return dofMap; + } + + std::vector& getComponentSpaces() + { + return componentSpaces; + } + + protected: // members + + /// FE spaces of all components for the stationary problem the specific + /// solver object is registered to. + std::vector componentSpaces; + + /// Set of unique FE spaces in \ref componentSpaces. + std::vector feSpaces; + + /// Parallel DOF mapping for the interior. + ParallelDofMapping *interiorMap; + + /// ??? + ParallelDofMapping dofMap; + + /// If the parallel DOF mappaings of this solver are registered to the + /// mesh distributor object, this variable is set to true to remove them + /// in the destructor. + bool parallelDofMappingsRegistered; + + /// Pointer to a mesh distributor object. + MeshDistributor *meshDistributor; + + /// Level of subdomain/interior discretization. Is used for multi-level + /// methods only. + int meshLevel; + }; + + } // end namespace Parallel +} // end namespace AMDiS + +#endif // AMDIS_PARALLEL_SOLVER_H + diff --git a/AMDiS/src/parallel/ParallelTypes.h b/AMDiS/src/parallel/ParallelTypes.h index 9f246f29..16f98cb6 100644 --- a/AMDiS/src/parallel/ParallelTypes.h +++ b/AMDiS/src/parallel/ParallelTypes.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -31,7 +33,7 @@ #ifndef AMDIS_PARALLEL_TYPES_H #define AMDIS_PARALLEL_TYPES_H -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -78,6 +80,6 @@ namespace AMDiS { typedef vector MeshCodeVec; typedef map > RankToBoundMap; -} +} } // end namespaces #endif diff --git a/AMDiS/src/parallel/PeriodicMap.cc b/AMDiS/src/parallel/PeriodicMap.cc index 2199b75c..f0b45db3 100644 --- a/AMDiS/src/parallel/PeriodicMap.cc +++ b/AMDiS/src/parallel/PeriodicMap.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include @@ -17,15 +26,13 @@ #include "parallel/PeriodicMap.h" #include "parallel/ParallelTypes.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; void PeriodicMap::add(const FiniteElemSpace *feSpace, PeriodicDofMap &newMap) { - FUNCNAME("PeriodicMap::add()"); - for (PeriodicDofMap::iterator it = newMap.begin(); it != newMap.end(); ++it) { for (std::map::iterator dofIt = it->second.begin(); dofIt != it->second.end(); ++dofIt) @@ -54,8 +61,6 @@ namespace AMDiS { const std::set& perAsc, vector& mappedDofs) { - FUNCNAME("PeriodicMap::mapDof()"); - mappedDofs.clear(); mappedDofs.push_back(globalDofIndex); @@ -105,8 +110,6 @@ namespace AMDiS { void PeriodicMap::serialize(ostream &out, vector feSpaces) { - FUNCNAME("PeriodicMap::serialize()"); - int nFeSpace = static_cast(feSpaces.size()); for (int i = 0; i < nFeSpace; i++) @@ -119,9 +122,7 @@ namespace AMDiS { void PeriodicMap::deserialize(istream &in, vector feSpaces) - { - FUNCNAME("PeriodicMap::deserialize()"); - + { int nFeSpace = static_cast(feSpaces.size()); for (int i = 0; i < nFeSpace; i++) @@ -200,4 +201,4 @@ namespace AMDiS { } } -} +} } diff --git a/AMDiS/src/parallel/PeriodicMap.h b/AMDiS/src/parallel/PeriodicMap.h index 3442787a..151666ef 100644 --- a/AMDiS/src/parallel/PeriodicMap.h +++ b/AMDiS/src/parallel/PeriodicMap.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -31,7 +33,7 @@ #include "Boundary.h" #include "Serializer.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { /** \brief * This class stores information about the periodic DOFs in the (sub)domain. @@ -237,6 +239,6 @@ namespace AMDiS { friend class ParallelDebug; }; -} +} } #endif diff --git a/AMDiS/src/parallel/PetscHelper.cc b/AMDiS/src/parallel/PetscHelper.cc index b8195215..500f9393 100644 --- a/AMDiS/src/parallel/PetscHelper.cc +++ b/AMDiS/src/parallel/PetscHelper.cc @@ -1,308 +1,321 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/PetscHelper.h" #include "parallel/PetscSolver.h" #include "Global.h" -namespace AMDiS { - - namespace petsc_helper { - - using namespace std; - - void getMatLocalColumn(Mat mat, PetscMatCol &matCol) +namespace AMDiS +{ + namespace Parallel + { + namespace petsc_helper { - PetscInt firstIndex, lastIndex; - MatGetOwnershipRange(mat, &firstIndex, &lastIndex); - - PetscInt nCols; - const PetscInt *cols; - const PetscScalar *values; + + using namespace std; - for (int row = firstIndex; row < lastIndex; row++) { - MatGetRow(mat, row, &nCols, &cols, &values); + void getMatLocalColumn(Mat mat, PetscMatCol &matCol) + { + PetscInt firstIndex, lastIndex; + MatGetOwnershipRange(mat, &firstIndex, &lastIndex); + + PetscInt nCols; + const PetscInt *cols; + const PetscScalar *values; - for (int i = 0; i < nCols; i++) { - if (values[i] != 0.0) { - matCol[cols[i]].first.push_back(row - firstIndex); - matCol[cols[i]].second.push_back(values[i]); + for (int row = firstIndex; row < lastIndex; row++) { + MatGetRow(mat, row, &nCols, &cols, &values); + + for (int i = 0; i < nCols; i++) { + if (values[i] != 0.0) { + matCol[cols[i]].first.push_back(row - firstIndex); + matCol[cols[i]].second.push_back(values[i]); + } } - } - MatRestoreRow(mat, row, &nCols, &cols, &values); + MatRestoreRow(mat, row, &nCols, &cols, &values); + } } - } - void setMatLocalColumn(Mat mat, int column, Vec vec) - { - PetscInt firstIndex; - MatGetOwnershipRange(mat, &firstIndex, PETSC_NULL); + void setMatLocalColumn(Mat mat, int column, Vec vec) + { + PetscInt firstIndex; + MatGetOwnershipRange(mat, &firstIndex, PETSC_NULL); - PetscInt vecSize; - VecGetLocalSize(vec, &vecSize); + PetscInt vecSize; + VecGetLocalSize(vec, &vecSize); - PetscScalar *tmpValues; - VecGetArray(vec, &tmpValues); - for (int i = 0; i < vecSize; i++) - MatSetValue(mat, - firstIndex + i, - column, - tmpValues[i], - ADD_VALUES); - VecRestoreArray(vec, &tmpValues); - } + PetscScalar *tmpValues; + VecGetArray(vec, &tmpValues); + for (int i = 0; i < vecSize; i++) + MatSetValue(mat, + firstIndex + i, + column, + tmpValues[i], + ADD_VALUES); + VecRestoreArray(vec, &tmpValues); + } - void getColumnVec(const SparseCol &matCol, Vec vec) - { - VecSet(vec, 0.0); - VecSetValues(vec, matCol.first.size(), - &(matCol.first[0]), &(matCol.second[0]), INSERT_VALUES); - VecAssemblyBegin(vec); - VecAssemblyEnd(vec); - } + void getColumnVec(const SparseCol &matCol, Vec vec) + { + VecSet(vec, 0.0); + VecSetValues(vec, matCol.first.size(), + &(matCol.first[0]), &(matCol.second[0]), INSERT_VALUES); + VecAssemblyBegin(vec); + VecAssemblyEnd(vec); + } - void blockMatMatSolve(MPI::Intracomm mpiComm, KSP ksp, Mat mat0, Mat &mat1) - { - FUNCNAME("blockMatMatSolve()"); + void blockMatMatSolve(MPI::Intracomm mpiComm, KSP ksp, Mat mat0, Mat &mat1) + { + FUNCNAME("blockMatMatSolve()"); - // === We have to calculate mat1 = ksp mat0: === - // === - get all local column vectors from mat0 === - // === - solve with ksp for this column vector as the rhs vector === - // === - set the result to the corresponding column vector of === - // === matrix mat1 === - - // Transform matrix mat0 into a sparse column format. - PetscMatCol mat0_cols; - getMatLocalColumn(mat0, mat0_cols); - - int nFirstCol, nLastCol; - MatGetOwnershipRangeColumn(mat0, &nFirstCol, &nLastCol); - - int dnnz = 0; - int onnz = 0; - for (PetscMatCol::iterator it = mat0_cols.begin(); - it != mat0_cols.end(); ++it) { - if (it->first >= nFirstCol && it->first < nLastCol) - dnnz++; - else - onnz++; - } + // === We have to calculate mat1 = ksp mat0: === + // === - get all local column vectors from mat0 === + // === - solve with ksp for this column vector as the rhs vector === + // === - set the result to the corresponding column vector of === + // === matrix mat1 === + + // Transform matrix mat0 into a sparse column format. + PetscMatCol mat0_cols; + getMatLocalColumn(mat0, mat0_cols); + + int nFirstCol, nLastCol; + MatGetOwnershipRangeColumn(mat0, &nFirstCol, &nLastCol); + + int dnnz = 0; + int onnz = 0; + for (PetscMatCol::iterator it = mat0_cols.begin(); + it != mat0_cols.end(); ++it) { + if (it->first >= nFirstCol && it->first < nLastCol) + dnnz++; + else + onnz++; + } - PetscInt localRows, localCols, globalRows, globalCols; - MatGetLocalSize(mat0, &localRows, &localCols); - MatGetSize(mat0, &globalRows, &globalCols); + PetscInt localRows, localCols, globalRows, globalCols; + MatGetLocalSize(mat0, &localRows, &localCols); + MatGetSize(mat0, &globalRows, &globalCols); - MatCreateAIJ(mpiComm, - localRows, localCols, globalRows, globalCols, - dnnz, PETSC_NULL, onnz, PETSC_NULL, &mat1); - MatSetOption(mat1, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE); - - - Vec tmpVec; - VecCreateSeq(PETSC_COMM_SELF, localRows, &tmpVec); - - // Solve for all column vectors of mat A_BPi and create matrix matK - for (PetscMatCol::iterator it = mat0_cols.begin(); - it != mat0_cols.end(); ++it) { - getColumnVec(it->second, tmpVec); - KSPSolve(ksp, tmpVec, tmpVec); - setMatLocalColumn(mat1, it->first, tmpVec); - } - - VecDestroy(&tmpVec); + MatCreateAIJ(mpiComm, + localRows, localCols, globalRows, globalCols, + dnnz, PETSC_NULL, onnz, PETSC_NULL, &mat1); + MatSetOption(mat1, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE); + + + Vec tmpVec; + VecCreateSeq(PETSC_COMM_SELF, localRows, &tmpVec); + + // Solve for all column vectors of mat A_BPi and create matrix matK + for (PetscMatCol::iterator it = mat0_cols.begin(); + it != mat0_cols.end(); ++it) { + getColumnVec(it->second, tmpVec); + KSPSolve(ksp, tmpVec, tmpVec); + setMatLocalColumn(mat1, it->first, tmpVec); + } + + VecDestroy(&tmpVec); - MatAssemblyBegin(mat1, MAT_FINAL_ASSEMBLY); - MatAssemblyEnd(mat1, MAT_FINAL_ASSEMBLY); - } + MatAssemblyBegin(mat1, MAT_FINAL_ASSEMBLY); + MatAssemblyEnd(mat1, MAT_FINAL_ASSEMBLY); + } - void matNestConvert(Mat matNest, Mat &mat) - { - FUNCNAME("matNestConvert()"); + void matNestConvert(Mat matNest, Mat &mat) + { + FUNCNAME("matNestConvert()"); - PetscInt nestRows, nestCols; - MatNestGetSize(matNest, &nestRows, &nestCols); + PetscInt nestRows, nestCols; + MatNestGetSize(matNest, &nestRows, &nestCols); - TEST_EXIT(nestRows == 2 && nestCols == 2) - ("This funciton is only implemented for 2x2 nested matrices!\n"); + TEST_EXIT(nestRows == 2 && nestCols == 2) + ("This funciton is only implemented for 2x2 nested matrices!\n"); - Mat mat00, mat01, mat10, mat11; - MatNestGetSubMat(matNest, 0, 0, &mat00); - MatNestGetSubMat(matNest, 0, 1, &mat01); - MatNestGetSubMat(matNest, 1, 0, &mat10); - MatNestGetSubMat(matNest, 1, 1, &mat11); + Mat mat00, mat01, mat10, mat11; + MatNestGetSubMat(matNest, 0, 0, &mat00); + MatNestGetSubMat(matNest, 0, 1, &mat01); + MatNestGetSubMat(matNest, 1, 0, &mat10); + MatNestGetSubMat(matNest, 1, 1, &mat11); - int nRankRows0, nOverallRows0; - MatGetLocalSize(mat00, &nRankRows0, PETSC_NULL); - MatGetSize(mat00, &nOverallRows0, PETSC_NULL); + int nRankRows0, nOverallRows0; + MatGetLocalSize(mat00, &nRankRows0, PETSC_NULL); + MatGetSize(mat00, &nOverallRows0, PETSC_NULL); - int nRankRows1, nOverallRows1; - MatGetLocalSize(mat11, &nRankRows1, PETSC_NULL); - MatGetSize(mat11, &nOverallRows1, PETSC_NULL); + int nRankRows1, nOverallRows1; + MatGetLocalSize(mat11, &nRankRows1, PETSC_NULL); + MatGetSize(mat11, &nOverallRows1, PETSC_NULL); - int firstRow0; - MatGetOwnershipRange(mat00, &firstRow0, PETSC_NULL); + int firstRow0; + MatGetOwnershipRange(mat00, &firstRow0, PETSC_NULL); - int firstRow1; - MatGetOwnershipRange(mat11, &firstRow1, PETSC_NULL); + int firstRow1; + MatGetOwnershipRange(mat11, &firstRow1, PETSC_NULL); - int nRankRows = nRankRows0 + nRankRows1; - int nOverallRows = nOverallRows0 + nOverallRows1; - int firstRow = firstRow0 + firstRow1; + int nRankRows = nRankRows0 + nRankRows1; + int nOverallRows = nOverallRows0 + nOverallRows1; + int firstRow = firstRow0 + firstRow1; - int mpiSize = MPI::COMM_WORLD.Get_size(); - int mpiRank = MPI::COMM_WORLD.Get_rank(); - vector allFirstRow0(mpiSize + 1, 0); - vector allFirstRow1(mpiSize + 1, 0); - MPI::COMM_WORLD.Allgather(&nRankRows0, 1, MPI_INT, &(allFirstRow0[1]), 1, MPI_INT); - MPI::COMM_WORLD.Allgather(&nRankRows1, 1, MPI_INT, &(allFirstRow1[1]), 1, MPI_INT); + int mpiSize = MPI::COMM_WORLD.Get_size(); + int mpiRank = MPI::COMM_WORLD.Get_rank(); + vector allFirstRow0(mpiSize + 1, 0); + vector allFirstRow1(mpiSize + 1, 0); + MPI::COMM_WORLD.Allgather(&nRankRows0, 1, MPI_INT, &(allFirstRow0[1]), 1, MPI_INT); + MPI::COMM_WORLD.Allgather(&nRankRows1, 1, MPI_INT, &(allFirstRow1[1]), 1, MPI_INT); - for (int i = 1; i < mpiSize + 1; i++) { - allFirstRow0[i] += allFirstRow0[i - 1]; - allFirstRow1[i] += allFirstRow1[i - 1]; - } + for (int i = 1; i < mpiSize + 1; i++) { + allFirstRow0[i] += allFirstRow0[i - 1]; + allFirstRow1[i] += allFirstRow1[i - 1]; + } - TEST_EXIT_DBG(allFirstRow0[mpiRank] == firstRow0)("Should not happen!\n"); - TEST_EXIT_DBG(allFirstRow1[mpiRank] == firstRow1)("Should not happen!\n"); - - MatCreateAIJ(PETSC_COMM_WORLD, - nRankRows, nRankRows, - nOverallRows, nOverallRows, - 25, PETSC_NULL, 25, PETSC_NULL, &mat); - MatSetOption(mat, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE); - - PetscInt nCols; - const PetscInt *cols; - const PetscScalar *vals; - - for (int i = 0; i < nRankRows0; i++) { - PetscInt newRowIndex = firstRow + i; - - MatGetRow(mat00, firstRow0 + i, &nCols, &cols, &vals); - for (int j = 0; j < nCols; j++) { - int rank = -1; - for (int k = 0; k < mpiSize; k++) { - if (cols[j] >= allFirstRow0[k] && cols[j] < allFirstRow0[k + 1]) { - rank = k; - break; + TEST_EXIT_DBG(allFirstRow0[mpiRank] == firstRow0)("Should not happen!\n"); + TEST_EXIT_DBG(allFirstRow1[mpiRank] == firstRow1)("Should not happen!\n"); + + MatCreateAIJ(PETSC_COMM_WORLD, + nRankRows, nRankRows, + nOverallRows, nOverallRows, + 25, PETSC_NULL, 25, PETSC_NULL, &mat); + MatSetOption(mat, MAT_NEW_NONZERO_ALLOCATION_ERR, PETSC_FALSE); + + PetscInt nCols; + const PetscInt *cols; + const PetscScalar *vals; + + for (int i = 0; i < nRankRows0; i++) { + PetscInt newRowIndex = firstRow + i; + + MatGetRow(mat00, firstRow0 + i, &nCols, &cols, &vals); + for (int j = 0; j < nCols; j++) { + int rank = -1; + for (int k = 0; k < mpiSize; k++) { + if (cols[j] >= allFirstRow0[k] && cols[j] < allFirstRow0[k + 1]) { + rank = k; + break; + } } - } - TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); + TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); - PetscInt newColIndex = cols[j] + allFirstRow1[rank]; - MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); - } - MatRestoreRow(mat00, firstRow0 + i, &nCols, &cols, &vals); - - MatGetRow(mat01, firstRow0 + i, &nCols, &cols, &vals); - for (int j = 0; j < nCols; j++) { - int rank = -1; - for (int k = 0; k < mpiSize; k++) { - if (cols[j] >= allFirstRow1[k] && cols[j] < allFirstRow1[k + 1]) { - rank = k; - break; - } + PetscInt newColIndex = cols[j] + allFirstRow1[rank]; + MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); } - TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); + MatRestoreRow(mat00, firstRow0 + i, &nCols, &cols, &vals); + + MatGetRow(mat01, firstRow0 + i, &nCols, &cols, &vals); + for (int j = 0; j < nCols; j++) { + int rank = -1; + for (int k = 0; k < mpiSize; k++) { + if (cols[j] >= allFirstRow1[k] && cols[j] < allFirstRow1[k + 1]) { + rank = k; + break; + } + } + TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); - PetscInt newColIndex = cols[j] + allFirstRow0[rank + 1]; - MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); + PetscInt newColIndex = cols[j] + allFirstRow0[rank + 1]; + MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); + } + MatRestoreRow(mat01, firstRow0 + i, &nCols, &cols, &vals); } - MatRestoreRow(mat01, firstRow0 + i, &nCols, &cols, &vals); - } - - for (int i = 0; i < nRankRows1; i++) { - PetscInt newRowIndex = firstRow + nRankRows0 + i; - MatGetRow(mat10, firstRow1 + i, &nCols, &cols, &vals); - for (int j = 0; j < nCols; j++) { - int rank = -1; - for (int k = 0; k < mpiSize; k++) { - if (cols[j] >= allFirstRow0[k] && cols[j] < allFirstRow0[k + 1]) { - rank = k; - break; + for (int i = 0; i < nRankRows1; i++) { + PetscInt newRowIndex = firstRow + nRankRows0 + i; + + MatGetRow(mat10, firstRow1 + i, &nCols, &cols, &vals); + for (int j = 0; j < nCols; j++) { + int rank = -1; + for (int k = 0; k < mpiSize; k++) { + if (cols[j] >= allFirstRow0[k] && cols[j] < allFirstRow0[k + 1]) { + rank = k; + break; + } } - } - TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); + TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); - PetscInt newColIndex = cols[j] + allFirstRow1[rank]; - MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); - } - MatRestoreRow(mat10, firstRow1 + i, &nCols, &cols, &vals); - - MatGetRow(mat11, firstRow1 + i, &nCols, &cols, &vals); - for (int j = 0; j < nCols; j++) { - int rank = -1; - for (int k = 0; k < mpiSize; k++) { - if (cols[j] >= allFirstRow1[k] && cols[j] < allFirstRow1[k + 1]) { - rank = k; - break; - } + PetscInt newColIndex = cols[j] + allFirstRow1[rank]; + MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); } - TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); + MatRestoreRow(mat10, firstRow1 + i, &nCols, &cols, &vals); + + MatGetRow(mat11, firstRow1 + i, &nCols, &cols, &vals); + for (int j = 0; j < nCols; j++) { + int rank = -1; + for (int k = 0; k < mpiSize; k++) { + if (cols[j] >= allFirstRow1[k] && cols[j] < allFirstRow1[k + 1]) { + rank = k; + break; + } + } + TEST_EXIT_DBG(rank != -1)("Should not happen!\n"); - PetscInt newColIndex = cols[j] + allFirstRow0[rank + 1]; - MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); + PetscInt newColIndex = cols[j] + allFirstRow0[rank + 1]; + MatSetValue(mat, newRowIndex, newColIndex, vals[j], INSERT_VALUES); + } + MatRestoreRow(mat11, firstRow1 + i, &nCols, &cols, &vals); } - MatRestoreRow(mat11, firstRow1 + i, &nCols, &cols, &vals); + + MatAssemblyBegin(mat, MAT_FINAL_ASSEMBLY); + MatAssemblyEnd(mat, MAT_FINAL_ASSEMBLY); } - MatAssemblyBegin(mat, MAT_FINAL_ASSEMBLY); - MatAssemblyEnd(mat, MAT_FINAL_ASSEMBLY); - } + void setSolverWithLu(KSP ksp, + const char* kspPrefix, + KSPType kspType, + PCType pcType, + const MatSolverPackage matSolverPackage, + PetscReal rtol, + PetscReal atol, + PetscInt maxIt) + { + KSPSetType(ksp, kspType); + KSPSetTolerances(ksp, rtol, atol, PETSC_DEFAULT, maxIt); + //if (kspPrefix != "") + if (strcmp(kspPrefix, "") != 0) + KSPSetOptionsPrefix(ksp, kspPrefix); + KSPSetFromOptions(ksp); + + PC pc; + KSPGetPC(ksp, &pc); + PCSetType(pc, pcType); + if (matSolverPackage != PETSC_NULL) + PCFactorSetMatSolverPackage(pc, matSolverPackage); + PCSetFromOptions(pc); + } - void setSolverWithLu(KSP ksp, - const char* kspPrefix, - KSPType kspType, - PCType pcType, - const MatSolverPackage matSolverPackage, - PetscReal rtol, - PetscReal atol, - PetscInt maxIt) - { - KSPSetType(ksp, kspType); - KSPSetTolerances(ksp, rtol, atol, PETSC_DEFAULT, maxIt); - //if (kspPrefix != "") - if (strcmp(kspPrefix, "") != 0) - KSPSetOptionsPrefix(ksp, kspPrefix); - KSPSetFromOptions(ksp); - - PC pc; - KSPGetPC(ksp, &pc); - PCSetType(pc, pcType); - if (matSolverPackage != PETSC_NULL) - PCFactorSetMatSolverPackage(pc, matSolverPackage); - PCSetFromOptions(pc); - } - - - void setSolver(KSP ksp, - const char* kspPrefix, - KSPType kspType, - PCType pcType, - PetscReal rtol, - PetscReal atol, - PetscInt maxIt) - { - setSolverWithLu(ksp, kspPrefix, kspType, pcType, PETSC_NULL, - rtol, atol, maxIt); - } - } + void setSolver(KSP ksp, + const char* kspPrefix, + KSPType kspType, + PCType pcType, + PetscReal rtol, + PetscReal atol, + PetscInt maxIt) + { -} + setSolverWithLu(ksp, kspPrefix, kspType, pcType, PETSC_NULL, + rtol, atol, maxIt); + } + + } // end namespace petsc_helper + } // end namespace Parallel +} // end namespace AMDiS diff --git a/AMDiS/src/parallel/PetscHelper.h b/AMDiS/src/parallel/PetscHelper.h index db1ae080..5c35ed7e 100644 --- a/AMDiS/src/parallel/PetscHelper.h +++ b/AMDiS/src/parallel/PetscHelper.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -29,90 +31,95 @@ #include #include "AMDiS_fwd.h" -namespace AMDiS { +namespace AMDiS +{ + namespace Parallel + { - using namespace std; - - /** \brief - * In this namespace, we collect several auxiliary functions for using - * PETSc in AMDiS. Many of these function may be replaced by new PETSc - * function in upcoming versions. - */ - namespace petsc_helper { - - /// Defines a PETSc matrix column wise - typedef pair, vector > SparseCol; - typedef map PetscMatCol; - - /** \brief - * Returns for a distributed matrix on each rank the local matrix in a - * sparce column format. - * - * \param[in] mat PETSc distributerd matrix. - * \param[out] matCol The sparse column represenation of the local matrix. - */ - void getMatLocalColumn(Mat mat, PetscMatCol &matCol); - - /** \brief - * Set a local column vector in a distributed matrix. - * - * \param[out] mat Distributed matrix. - * \param[in] column Column index. - * \param[in] vec Column vector. - */ - void setMatLocalColumn(Mat mat, int column, Vec vec); - - /** \brief - * Create a local PETSc vector representing the column of a matrix - * stored in \ref PetscMatCol type format. - * - * \param[in] column Sparse column representation. - * \param[out] vec Vector representing one column of the matrix. - */ - void getColumnVec(const SparseCol &matCol, Vec vec); - - /** \brief - * Computes the matrix matrix product inv(A) B = C. Matrices B and C - * are distributed matrices. Matrix A is a local matrix on each MPI - * task. The overall number of rows of local matrices A must be the - * number of distriubted rows in B. - * - * \param[in] mpiComm MPI Communicator object (must fit with ksp) - * \param[in] ksp inv(A) matrix given by a PETSc solver object. - * \param[in] mat0 matrix B - * \param[out] mat1 resulting matrix C, is created inside the function - */ - void blockMatMatSolve(MPI::Intracomm mpiComm, - KSP ksp, - Mat mat0, - Mat &mat1); + using namespace std; /** \brief - * Converts a 2x2 nested matrix to a MATAIJ matrix (thus not nested). - * - * \param[in] matNest nested input matrix - * \param[out] mat matrix of type MATAIJ, created inside this function. - */ - void matNestConvert(Mat matNest, Mat &mat); - - void setSolverWithLu(KSP ksp, - const char* kspPrefix, - KSPType kspType, - PCType pcType, - const MatSolverPackage matSolverPackage, - PetscReal rtol = PETSC_DEFAULT, - PetscReal atol = PETSC_DEFAULT, - PetscInt maxIt = PETSC_DEFAULT); - - void setSolver(KSP ksp, - const char* kspPrefix, - KSPType kspType, - PCType pcType, - PetscReal rtol = PETSC_DEFAULT, - PetscReal atol = PETSC_DEFAULT, - PetscInt maxIt = PETSC_DEFAULT); - } - -} + * In this namespace, we collect several auxiliary functions for using + * PETSc in AMDiS. Many of these function may be replaced by new PETSc + * function in upcoming versions. + */ + namespace petsc_helper + { + + /// Defines a PETSc matrix column wise + typedef pair, vector > SparseCol; + typedef map PetscMatCol; + + /** \brief + * Returns for a distributed matrix on each rank the local matrix in a + * sparce column format. + * + * \param[in] mat PETSc distributerd matrix. + * \param[out] matCol The sparse column represenation of the local matrix. + */ + void getMatLocalColumn(Mat mat, PetscMatCol &matCol); + + /** \brief + * Set a local column vector in a distributed matrix. + * + * \param[out] mat Distributed matrix. + * \param[in] column Column index. + * \param[in] vec Column vector. + */ + void setMatLocalColumn(Mat mat, int column, Vec vec); + + /** \brief + * Create a local PETSc vector representing the column of a matrix + * stored in \ref PetscMatCol type format. + * + * \param[in] column Sparse column representation. + * \param[out] vec Vector representing one column of the matrix. + */ + void getColumnVec(const SparseCol &matCol, Vec vec); + + /** \brief + * Computes the matrix matrix product inv(A) B = C. Matrices B and C + * are distributed matrices. Matrix A is a local matrix on each MPI + * task. The overall number of rows of local matrices A must be the + * number of distriubted rows in B. + * + * \param[in] mpiComm MPI Communicator object (must fit with ksp) + * \param[in] ksp inv(A) matrix given by a PETSc solver object. + * \param[in] mat0 matrix B + * \param[out] mat1 resulting matrix C, is created inside the function + */ + void blockMatMatSolve(MPI::Intracomm mpiComm, + KSP ksp, + Mat mat0, + Mat &mat1); + + /** \brief + * Converts a 2x2 nested matrix to a MATAIJ matrix (thus not nested). + * + * \param[in] matNest nested input matrix + * \param[out] mat matrix of type MATAIJ, created inside this function. + */ + void matNestConvert(Mat matNest, Mat &mat); + + void setSolverWithLu(KSP ksp, + const char* kspPrefix, + KSPType kspType, + PCType pcType, + const MatSolverPackage matSolverPackage, + PetscReal rtol = PETSC_DEFAULT, + PetscReal atol = PETSC_DEFAULT, + PetscInt maxIt = PETSC_DEFAULT); + + void setSolver(KSP ksp, + const char* kspPrefix, + KSPType kspType, + PCType pcType, + PetscReal rtol = PETSC_DEFAULT, + PetscReal atol = PETSC_DEFAULT, + PetscInt maxIt = PETSC_DEFAULT); + + } // end namespace petsc_helper + } // end namespace Parallel +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/PetscProblemStat.cc b/AMDiS/src/parallel/PetscProblemStat.cc deleted file mode 100644 index 353cb1a8..00000000 --- a/AMDiS/src/parallel/PetscProblemStat.cc +++ /dev/null @@ -1,105 +0,0 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - -#include -#include - -#include "io/VtkWriter.h" -#include "parallel/PetscProblemStat.h" -#include "parallel/PetscSolver.h" -#include "parallel/MpiHelper.h" -#include "parallel/BddcMlSolver.h" -#include "parallel/PetscSolverNavierStokes.h" - -namespace AMDiS { - - using namespace std; - - - PetscProblemStat::PetscProblemStat(string nameStr, - ProblemIterationInterface *problemIteration) - : ParallelProblemStatBase(nameStr, problemIteration), - deleteSolver(true), - petscSolver(NULL) - { - FUNCNAME("PetscProblemStat::PetscProblemStat()"); - - } - - - PetscProblemStat::PetscProblemStat(string nameStr, - PetscSolver *solver) - : ParallelProblemStatBase(nameStr, NULL), - petscSolver(solver), - deleteSolver(false) - {} - - - void PetscProblemStat::initialize(Flag initFlag, - ProblemStatSeq* adoptProblem, - Flag adoptFlag) - { - ParallelProblemStatBase::initialize(initFlag, adoptProblem, adoptFlag); - TEST_EXIT(petscSolver != NULL)("petsc parallelization does not work without petsc solver\n"); - string tmp(""); - Parameters::get(getName() + "->solver->petsc prefix", tmp); - petscSolver->setKspPrefix(tmp); - - meshDistributor->setBoundaryDofRequirement(petscSolver->getBoundaryDofRequirement()); - - petscSolver->setMeshDistributor(meshDistributor, 0); - petscSolver->init(this->getComponentSpaces(), this->getFeSpaces()); - } - - - void PetscProblemStat::createSolver() - { - FUNCNAME("createSolver()"); - ParallelProblemStatBase::createSolver(); - - petscSolver = dynamic_cast(solver); - TEST_EXIT(petscSolver)("wrong petsc-solver type\n"); - } - - - void PetscProblemStat::solve(AdaptInfo *adaptInfo, - bool createMatrixData, - bool storeMatrixData) - { - FUNCNAME("PetscProblemStat::solve()"); - - TEST_EXIT(meshDistributor)("Should not happen!\n"); - - MPI::COMM_WORLD.Barrier(); - double wtime = MPI::Wtime(); - - if (createMatrixData) - petscSolver->fillPetscMatrix(systemMatrix); - - petscSolver->fillPetscRhs(rhs); - - INFO(info, 8)("creation of parallel data structures needed %.5f seconds\n", - MPI::Wtime() - wtime); - wtime = MPI::Wtime(); - - petscSolver->solvePetscMatrix(*solution, adaptInfo); - - INFO(info, 8)("solution of discrete system needed %.5f seconds\n", - MPI::Wtime() - wtime); - - petscSolver->destroyVectorData(); - - if (!storeMatrixData) - petscSolver->destroyMatrixData(); - } - -} diff --git a/AMDiS/src/parallel/PetscProblemStat.h b/AMDiS/src/parallel/PetscProblemStat.h deleted file mode 100644 index 57e97ac6..00000000 --- a/AMDiS/src/parallel/PetscProblemStat.h +++ /dev/null @@ -1,81 +0,0 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -/** \file PetscProblemStat.h */ - -#ifndef AMDIS_PETSC_PROBLEM_STAT_H -#define AMDIS_PETSC_PROBLEM_STAT_H - -#include "AMDiS_fwd.h" -#include "Global.h" -#include "parallel/ParallelProblemStatBase.h" -#include "parallel/PetscSolver.h" -#include "parallel/PetscSolverFeti.h" -#include "parallel/PetscSolverGlobalMatrix.h" -#include "parallel/PetscSolverGlobalBlockMatrix.h" -#include "parallel/PetscSolverSchur.h" - -namespace AMDiS { - - class PetscProblemStat : public ParallelProblemStatBase - { - public: - PetscProblemStat(std::string nameStr, - ProblemIterationInterface *problemIteration = NULL); - - PetscProblemStat(std::string nameStr, - PetscSolver *solver); - - ~PetscProblemStat() - { - if (deleteSolver) - delete petscSolver; - } - - void initialize(Flag initFlag, - ProblemStatSeq *adoptProblem = NULL, - Flag adoptFlag = INIT_NOTHING); - - virtual void createSolver(); - - void solve(AdaptInfo *adaptInfo, - bool createMatrixData = true, - bool storeMatrixData = false); - - PetscSolver* getPetscSolver() - { - return petscSolver; - } - - protected: - PetscSolver *petscSolver; - - bool deleteSolver; - }; - - typedef PetscProblemStat ParallelProblemStat; - -#ifdef HAVE_PARALLEL_DOMAIN_AMDIS - typedef PetscProblemStat ProblemStat; -#endif - -} // namespace AMDiS - -#endif diff --git a/AMDiS/src/parallel/PetscSolver.cc b/AMDiS/src/parallel/PetscSolver.cc index 6a6fbff2..57eb4036 100644 --- a/AMDiS/src/parallel/PetscSolver.cc +++ b/AMDiS/src/parallel/PetscSolver.cc @@ -1,40 +1,53 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "AMDiS.h" -#include "parallel/PetscSolver.h" -#include "parallel/StdMpi.h" +#include "DOFMatrix.h" +#include "Global.h" +#include "Initfile.h" +#include "parallel/MeshDistributor.h" #include "parallel/MpiHelper.h" #include "parallel/ParallelDofMapping.h" +#include "parallel/PetscSolver.h" +#include "parallel/StdMpi.h" -namespace AMDiS { - - using namespace std; +namespace AMDiS { namespace Parallel { - PetscSolver::PetscSolver(string name) - : ParallelCoarseSpaceSolver(name), - dofMap(FESPACE_WISE, true), - dofMapSubDomain(FESPACE_WISE, true), - parallelDofMappingsRegistered(false), + PetscSolver::PetscSolver(std::string name) + : super(name), kspPrefix(""), removeRhsNullspace(false), hasConstantNullspace(false), isSymmetric(false), handleDirichletRows(true) { - setDofMapping(&dofMap); - - string kspStr = ""; + std::string tmp(""); + Parameters::get(name + "->solver->petsc prefix", tmp); + setKspPrefix(tmp); + + std::string kspStr = ""; Parameters::get("parallel->solver->petsc->ksp", kspStr); + if (!kspStr.size()) + Parameters::get(name + "->ksp", kspStr); + if (kspStr != "") PetscOptionsInsertString(kspStr.c_str()); @@ -46,77 +59,50 @@ namespace AMDiS { PetscSolver::~PetscSolver() - { - if (parallelDofMappingsRegistered) - meshDistributor->removeDofMap(dofMap); - } + {} - void PetscSolver::init(vector &fe0, - vector &fe1, + void PetscSolver::init(std::vector &fe0, + std::vector &fe1, bool createGlobalMapping) { FUNCNAME("PetscSolver::init()"); TEST_EXIT(meshDistributor)("No mesh distributor object defined!\n"); - TEST_EXIT(fe0.size())("No component spaces in PETSc solver object!\n"); - TEST_EXIT(fe1.size())("No FE spaces in PETSc solver object!\n"); - - componentSpaces = fe0; - feSpaces = fe1; - - MeshLevelData& levelData = meshDistributor->getMeshLevelData(); - int nLevels = levelData.getNumberOfLevels(); - TEST_EXIT_DBG(nLevels >= 1)("Should not happen!\n"); - - if (createGlobalMapping) { - parallelDofMappingsRegistered = true; - - dofMap.init(componentSpaces, feSpaces); - dofMap.setMpiComm(levelData.getMpiComm(meshLevel)); - dofMap.setDofComm(meshDistributor->getDofComm(meshLevel)); - dofMap.clear(); - meshDistributor->registerDofMap(dofMap); - - if (meshLevel + 1 < nLevels && - levelData.getMpiComm(meshLevel + 1) != MPI::COMM_SELF) { - dofMapSubDomain.init(componentSpaces, feSpaces); - dofMapSubDomain.setMpiComm(levelData.getMpiComm(meshLevel + 1)); - dofMapSubDomain.setDofComm(meshDistributor->getDofComm(meshLevel + 1)); - dofMapSubDomain.clear(); - meshDistributor->registerDofMap(dofMapSubDomain); - } - } + meshDistributor->setBoundaryDofRequirement(getBoundaryDofRequirement()); + + super::init(fe0, fe1, createGlobalMapping); } - int PetscSolver::solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - bool createMatrixData, - bool storeMatrixData) + int PetscSolver::solveLinearSystem(const SolverMatrix >& A, + SystemVector& x, + SystemVector& b, + bool createMatrixData, + bool storeMatrixData) { - MPI::COMM_WORLD.Barrier(); - double wtime = MPI::Wtime(); - - if (createMatrixData) - fillPetscMatrix(const_cast< Matrix< DOFMatrix* >* >(A.getOriginalMat())); + FUNCNAME("PetscSolver::solveLinearSystem()"); + + TEST_EXIT(meshDistributor)("No meshDistributor provided. Should not happen!\n"); - fillPetscRhs(&b); + MPI::COMM_WORLD.Barrier(); + double wtime = MPI::Wtime(); - INFO(info, 8)("creation of parallel data structures needed %.5f seconds\n", - MPI::Wtime() - wtime); - wtime = MPI::Wtime(); + if (createMatrixData) + fillPetscMatrix(const_cast< Matrix< DOFMatrix* >* >(A.getOriginalMat())); - solvePetscMatrix(x, NULL); + fillPetscRhs(&b); - INFO(info, 8)("solution of discrete system needed %.5f seconds\n", - MPI::Wtime() - wtime); + INFO(info, 8)("creation of parallel data structures needed %.5f seconds\n", + MPI::Wtime() - wtime); - destroyVectorData(); + solvePetscMatrix(x, NULL); - if (!storeMatrixData) - destroyMatrixData(); - return 0; + if (!storeMatrixData) { + destroyVectorData(); + destroyMatrixData(); + } + + return 0; } void PetscSolver::fillPetscMatrix(DOFMatrix* mat) @@ -129,13 +115,28 @@ namespace AMDiS { void PetscSolver::solve(Vec &rhs, Vec &sol) { - FUNCNAME("PetscSolver::solve()"); - PetscErrorCode solverError = KSPSolve(kspInterior, rhs, sol); - if (solverError != 0) { - AMDiS::finalize(); - exit(-1); + + PetscInt nIter = 0; + KSPGetIterationNumber(kspInterior, &nIter); + PetscReal residual_norm = 0.0; + KSPGetResidualNorm(kspInterior, &residual_norm); + + if (residual_norm == 0.0) { + Vec r; + createVec(*interiorMap, r); + KSPBuildResidual(kspInterior, PETSC_NULL, PETSC_NULL, &r); + VecNorm(r, NORM_2, &residual_norm); } + + setErrorCode(solverError); + setIterations(nIter); + setResidual(residual_norm); + +// if (solverError != 0) { +// AMDiS::finalize(); +// exit(-1); +// } } @@ -154,10 +155,8 @@ namespace AMDiS { void PetscSolver::copyVec(Vec& originVec, Vec& destVec, - vector& originIndex, vector& destIndex) + std::vector& originIndex, std::vector& destIndex) { - FUNCNAME("PetscSolver::copyVec()"); - IS originIs, destIs; ISCreateGeneral(domainComm, originIndex.size(), @@ -249,4 +248,4 @@ namespace AMDiS { return (isSym && norm1 < 1e-10 && norm2 < 1e-10); } -} +} } // end namespaces diff --git a/AMDiS/src/parallel/PetscSolver.h b/AMDiS/src/parallel/PetscSolver.h index 137cf753..5cc58465 100644 --- a/AMDiS/src/parallel/PetscSolver.h +++ b/AMDiS/src/parallel/PetscSolver.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -23,8 +25,6 @@ #ifndef AMDIS_PETSC_SOLVER_H #define AMDIS_PETSC_SOLVER_H -#include -#include #include #include #include @@ -32,201 +32,177 @@ #include #include "AMDiS_fwd.h" -#include "Global.h" -#include "Initfile.h" -#include "DOFMatrix.h" -#include "parallel/MeshDistributor.h" #include "parallel/ParallelCoarseSpaceSolver.h" -namespace AMDiS { - - using namespace std; - - /** - * Create an abstract interface to an arbitrary PETSc solver. This class is - * based on \ref ParallelCoarseSpaceSolver to support for solvers which make - * use of a coarse grid problem. - */ - class PetscSolver : public ParallelCoarseSpaceSolver +namespace AMDiS +{ + namespace Parallel { - public: - PetscSolver(string name); - - virtual ~PetscSolver(); - - void init(vector &componentSpaces, - vector &feSpaces, - bool createGlobalMapping = true); - - ///consistent interface to sequentiel solvers - int solveSystem(const SolverMatrix >& A, - SystemVector& x, - SystemVector& b, - bool createMatrixData, - bool storeMatrixData); - - /** \brief - * Create a PETSc matrix. The given DOF matrices are used to create the nnz - * structure of the PETSc matrix and the values are transfered to it. - * - * \param[in] mat - */ - virtual void fillPetscMatrix(Matrix *mat) = 0; - - /// This function is just a small wrapper that creates a 1x1 matrix that - /// contains exactly one DOFMatrix and than calls \ref fillPetscMatrix - void fillPetscMatrix(DOFMatrix* mat); - - /** \brief - * Create a PETSc vector and fills it with the rhs values of the system. - * - * \param[in] vec - */ - virtual void fillPetscRhs(SystemVector *vec) = 0; - - /// Use PETSc to solve the linear system of equations - virtual void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo) = 0; - - virtual void solve(Vec &rhs, Vec &sol); - - virtual void solveGlobal(Vec &rhs, Vec &sol); - - /// Destroys all matrix data structures. - virtual void destroyMatrixData() = 0; - - /// Detroys all vector data structures. - virtual void destroyVectorData() = 0; - - virtual Flag getBoundaryDofRequirement() - { - return 0; - } - - KSP getSolver() - { - return kspInterior; - } - - PC getPc() - { - return pcInterior; - } - - void setKspPrefix(std::string s) - { - kspPrefix = s; - } - - void setRemoveRhsNullspace(bool b) - { - removeRhsNullspace = b; - } - - void setSymmetric(bool b) - { - isSymmetric = b; - } - - /// Adds a new vector to the basis of the operator's nullspace. - void addNullspaceVector(SystemVector *vec) - { - nullspace.push_back(vec); - } - - /// Sets the nullspace to be constant for some specific components. - void setConstantNullspace(vector &components) - { - constNullspaceComponent = components; - } - - /// Sets the nullspace to be constant for a specific component. - void setConstantNullspace(int component) - { - constNullspaceComponent.clear(); - constNullspaceComponent.push_back(component); - } - - /// Informs the solver whether is has to handle dirichlet rows or not. - void setHandleDirichletRows(bool b) - { - handleDirichletRows = b; - } - - ParallelDofMapping& getDofMap() - { - return dofMap; - } - vector& getComponentSpaces() + /** \ingroup Solver + * + * \brief + * Create an abstract interface to an arbitrary PETSc solver. This class is + * based on \ref ParallelCoarseSpaceSolver to support for solvers which make + * use of a coarse grid problem. + */ + class PetscSolver : public ParallelCoarseSpaceSolver { - return componentSpaces; - } - - protected: - /** \brief - * Copies between to PETSc vectors by using different index sets for the - * origin and the destination vectors. - * - * \param[in] originVec The PETSc vector from which we copy from. - * \param[out] destVec The PETSc vector we copy too. - * \param[in] originIndex Set of global indices referring to the - * origin vector. - * \param[in] destIndex Set of global indices referring to the - * destination vector. - */ - void copyVec(Vec& originVec, Vec& destVec, - vector& originIndex, vector& destIndex); - - /// Run test, if matrix is symmetric. - bool testMatrixSymmetric(Mat mat, bool advancedTest = false); - protected: - /// FE spaces of all components for the stationary problem the specific - /// solver object is registered to. - vector componentSpaces; - - /// Set of unique FE spaces in \ref componentSpaces. - vector feSpaces; - - /// - ParallelDofMapping dofMap; - - /// - ParallelDofMapping dofMapSubDomain; - - /// If the parallel DOF mappaings of this solver are registered to the - /// mesh distributor object, this variable is set to true to remove them - /// in the destructor. - bool parallelDofMappingsRegistered; - - /// PETSc solver object - KSP kspInterior; - - /// PETSc preconditioner object - PC pcInterior; - - /// A set of vectors that span the null space of the operator. - vector nullspace; - - /// KSP database prefix - string kspPrefix; - - /// If true, the constant null space is projected out of the RHS vector. It - /// depends on the specific PETSc solver if it considers this value. - bool removeRhsNullspace; - - bool hasConstantNullspace; - - bool isSymmetric; - - /// If true, dirichlet rows are handled by the solver correspondently. To - /// set this value to false makes only sense, of this solver is just used - /// as a subsolver and the main solver above alread handles dirichlet rows - /// in some way. - bool handleDirichletRows; - - vector constNullspaceComponent; - }; - -} // namespace AMDiS + public: // typedefs + typedef ParallelCoarseSpaceSolver super; + + public: // methods + PetscSolver(string name); + + virtual ~PetscSolver(); + + /// calls super::init() and sets boundaryDofRequirement for meshdistributor + virtual void init(std::vector &componentSpaces, + std::vector &feSpaces, + bool createGlobalMapping = true); + + /** \brief + * Create a PETSc matrix. The given DOF matrices are used to create the nnz + * structure of the PETSc matrix and the values are transfered to it. + * + * \param[in] mat + */ + virtual void fillPetscMatrix(Matrix *mat) = 0; + + /// This function is just a small wrapper that creates a 1x1 matrix that + /// contains exactly one DOFMatrix and than calls \ref fillPetscMatrix + void fillPetscMatrix(DOFMatrix* mat); + + /** \brief + * Create a PETSc vector and fills it with the rhs values of the system. + * + * \param[in] vec + */ + virtual void fillPetscRhs(SystemVector *vec) = 0; + + /// Use PETSc to solve the linear system of equations + virtual void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo) = 0; + + virtual void solve(Vec &rhs, Vec &sol); + + virtual void solveGlobal(Vec &rhs, Vec &sol); + + /// Destroys all matrix data structures. + virtual void destroyMatrixData() = 0; + + /// Detroys all vector data structures. + virtual void destroyVectorData() = 0; + + virtual Flag getBoundaryDofRequirement() + { + return 0; + } + + KSP getSolver() + { + return kspInterior; + } + + PC getPc() + { + return pcInterior; + } + + void setKspPrefix(std::string s) + { + kspPrefix = s; + } + + void setRemoveRhsNullspace(bool b) + { + removeRhsNullspace = b; + } + + void setSymmetric(bool b) + { + isSymmetric = b; + } + + /// Adds a new vector to the basis of the operator's nullspace. + void addNullspaceVector(SystemVector *vec) + { + nullspace.push_back(vec); + } + + /// Sets the nullspace to be constant for some specific components. + void setConstantNullspace(vector &components) + { + constNullspaceComponent = components; + } + + /// Sets the nullspace to be constant for a specific component. + void setConstantNullspace(int component) + { + constNullspaceComponent.clear(); + constNullspaceComponent.push_back(component); + } + + /// Informs the solver whether is has to handle dirichlet rows or not. + void setHandleDirichletRows(bool b) + { + handleDirichletRows = b; + } + + protected: + /// Implementation of \ref LinearSolver::solveLinearSystem() + int solveLinearSystem(const SolverMatrix >& A, + SystemVector& x, + SystemVector& b, + bool createMatrixData, + bool storeMatrixData); + + /** \brief + * Copies between to PETSc vectors by using different index sets for the + * origin and the destination vectors. + * + * \param[in] originVec The PETSc vector from which we copy from. + * \param[out] destVec The PETSc vector we copy too. + * \param[in] originIndex Set of global indices referring to the + * origin vector. + * \param[in] destIndex Set of global indices referring to the + * destination vector. + */ + void copyVec(Vec& originVec, Vec& destVec, + std::vector& originIndex, std::vector& destIndex); + + /// Run test, if matrix is symmetric. + bool testMatrixSymmetric(Mat mat, bool advancedTest = false); + + protected: + /// PETSc solver object + KSP kspInterior; + + /// PETSc preconditioner object + PC pcInterior; + + /// A set of vectors that span the null space of the operator. + std::vector nullspace; + + /// KSP database prefix + std::string kspPrefix; + + /// If true, the constant null space is projected out of the RHS vector. It + /// depends on the specific PETSc solver if it considers this value. + bool removeRhsNullspace; + + bool hasConstantNullspace; + + bool isSymmetric; + + /// If true, dirichlet rows are handled by the solver correspondently. To + /// set this value to false makes only sense, of this solver is just used + /// as a subsolver and the main solver above alread handles dirichlet rows + /// in some way. + bool handleDirichletRows; + + std::vector constNullspaceComponent; + }; + } // end namespace Parallel +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/PetscSolverCahnHilliard.cc b/AMDiS/src/parallel/PetscSolverCahnHilliard.cc index 3b3e0c80..afae5aba 100644 --- a/AMDiS/src/parallel/PetscSolverCahnHilliard.cc +++ b/AMDiS/src/parallel/PetscSolverCahnHilliard.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -15,7 +24,7 @@ #include "parallel/PetscHelper.h" #include "parallel/PetscSolverGlobalMatrix.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { class Multiplier: public AbstractFunction { @@ -273,4 +282,4 @@ namespace AMDiS { } -} +} } diff --git a/AMDiS/src/parallel/PetscSolverCahnHilliard.h b/AMDiS/src/parallel/PetscSolverCahnHilliard.h index 2ebcf8be..c0c93c0e 100644 --- a/AMDiS/src/parallel/PetscSolverCahnHilliard.h +++ b/AMDiS/src/parallel/PetscSolverCahnHilliard.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -25,7 +27,7 @@ #include "parallel/PetscSolverGlobalBlockMatrix.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -42,13 +44,13 @@ namespace AMDiS { { public: /// Creator class - class Creator : public OEMSolverCreator + class Creator : public LinearSolverCreator { public: virtual ~Creator() {} /// Returns a new PetscSolver object. - OEMSolver* create() + LinearSolver* create() { return new PetscSolverCahnHilliard(this->name); } @@ -90,6 +92,7 @@ namespace AMDiS { double *eps, *delta; }; -} +} } #endif // AMDIS_PETSC_SOLVER_CAHN_HILLIARD_H + diff --git a/AMDiS/src/parallel/PetscSolverCahnHilliard2.cc b/AMDiS/src/parallel/PetscSolverCahnHilliard2.cc index ae421783..2e132d87 100644 --- a/AMDiS/src/parallel/PetscSolverCahnHilliard2.cc +++ b/AMDiS/src/parallel/PetscSolverCahnHilliard2.cc @@ -1,21 +1,30 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - - - -#include "PetscSolverCahnHilliard2.h" +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + + +#include "parallel/PetscSolverCahnHilliard2.h" #include "parallel/PetscHelper.h" #include "TransformDOF.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -241,4 +250,4 @@ namespace AMDiS { deltaKMatrixSolver = NULL; } -} +} } diff --git a/AMDiS/src/parallel/PetscSolverCahnHilliard2.h b/AMDiS/src/parallel/PetscSolverCahnHilliard2.h index 1c4b924c..8bd40547 100644 --- a/AMDiS/src/parallel/PetscSolverCahnHilliard2.h +++ b/AMDiS/src/parallel/PetscSolverCahnHilliard2.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -25,7 +27,7 @@ #include "parallel/PetscSolverGlobalMatrix.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -40,13 +42,13 @@ namespace AMDiS { { public: /// Creator class - class Creator : public OEMSolverCreator + class Creator : public LinearSolverCreator { public: virtual ~Creator() {} /// Returns a new PetscSolver object. - OEMSolver* create() + LinearSolver* create() { return new PetscSolverCahnHilliard2(this->name); } @@ -108,6 +110,6 @@ namespace AMDiS { }; -} +} } #endif diff --git a/AMDiS/src/parallel/PetscSolverFeti.cc b/AMDiS/src/parallel/PetscSolverFeti.cc index 0e698b69..e51a9819 100644 --- a/AMDiS/src/parallel/PetscSolverFeti.cc +++ b/AMDiS/src/parallel/PetscSolverFeti.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "MatrixVector.h" @@ -23,13 +32,14 @@ #include "parallel/PetscSolverGlobalMatrix.h" #include "io/VtkWriter.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; PetscSolverFeti::PetscSolverFeti(string name) : PetscSolver(name), fetiSolverType(EXACT), + dofMapSubDomain(FESPACE_WISE, true), primalDofMap(COMPONENT_WISE), dualDofMap(COMPONENT_WISE), interfaceDofMap(COMPONENT_WISE), @@ -37,19 +47,22 @@ namespace AMDiS { lagrangeMap(COMPONENT_WISE), interiorDofMap(COMPONENT_WISE), schurPrimalSolver(0), + levelMode(1), subDomainIsLocal(true), - subdomain(NULL), - massMatrixSolver(NULL), printTimings(false), + augmentedLagrange(false), + nRankEdges(0), + nOverallEdges(0), dirichletMode(0), stokesMode(false), - augmentedLagrange(false), - pressureComponent(-1) + pressureComponent(-1), + subdomain(NULL), + massMatrixSolver(NULL) { FUNCNAME("PetscSolverFeti::PetscSolverFeti()"); string preconditionerName = ""; - Parameters::get(initFileStr + "->left precon", preconditionerName); + Parameters::get(name + "->left precon", preconditionerName); if (preconditionerName == "" || preconditionerName == "no") { MSG("Create FETI-DP solver with no preconditioner!\n"); fetiPreconditioner = FETI_NONE; @@ -65,27 +78,27 @@ namespace AMDiS { } preconditionerName = ""; - Parameters::get(initFileStr + "->right precon", preconditionerName); + Parameters::get(name + "->right precon", preconditionerName); if (preconditionerName != "" && preconditionerName != "no") { ERROR_EXIT("FETI-DP does not support right preconditioning! (parameter \"%s->right precon\" has value \"%s\")\n", - initFileStr.c_str(), preconditionerName.c_str()); + name.c_str(), preconditionerName.c_str()); } - Parameters::get(initFileStr + "->feti->schur primal solver", schurPrimalSolver); + Parameters::get(name + "->feti->schur primal solver", schurPrimalSolver); TEST_EXIT(schurPrimalSolver == 0 || schurPrimalSolver == 1) ("Wrong solver \"%d\"for the Schur primal complement!\n", schurPrimalSolver); - Parameters::get(initFileStr + "->feti->stokes mode", stokesMode); + Parameters::get(name + "->feti->stokes mode", stokesMode); if (stokesMode) { - Parameters::get(initFileStr + "->feti->pressure component", pressureComponent); + Parameters::get(name + "->feti->pressure component", pressureComponent); TEST_EXIT(pressureComponent >= 0) ("FETI-DP in Stokes mode, no pressure component defined!\n"); } - Parameters::get(initFileStr + "->feti->augmented lagrange", augmentedLagrange); + Parameters::get(name + "->feti->augmented lagrange", augmentedLagrange); - Parameters::get(initFileStr + "->feti->symmetric", isSymmetric); + Parameters::get(name + "->feti->symmetric", isSymmetric); { MSG("WARNING: CHECK THIS HERE BEFORE GOING INTO RUNNING MULTILEVEL FETI-DP!\n"); @@ -94,7 +107,7 @@ namespace AMDiS { { int tmp = 0; - Parameters::get(initFileStr + "->feti->inexact", tmp); + Parameters::get(name + "->feti->inexact", tmp); if (tmp == 1) fetiSolverType = INEXACT; if (tmp == 2) @@ -103,6 +116,31 @@ namespace AMDiS { Parameters::get("parallel->print timings", printTimings); } + + + void PetscSolverFeti::init(vector &fe0, + vector &fe1, + bool createGlobalMapping) + { + FUNCNAME_DBG("PetscSolverFeti::init()"); + + super::init(fe0, fe1, createGlobalMapping); + + MeshLevelData& levelData = meshDistributor->getMeshLevelData(); + int nLevels = levelData.getNumberOfLevels(); + TEST_EXIT_DBG(nLevels >= 1)("nLevels < 1! Should not happen!\n"); + + if (createGlobalMapping) { + if (meshLevel + 1 < nLevels && + levelData.getMpiComm(meshLevel + 1) != MPI::COMM_SELF) { + dofMapSubDomain.init(componentSpaces, feSpaces); + dofMapSubDomain.setMpiComm(levelData.getMpiComm(meshLevel + 1)); + dofMapSubDomain.setDofComm(meshDistributor->getDofComm(meshLevel + 1)); + dofMapSubDomain.clear(); + meshDistributor->registerDofMap(dofMapSubDomain); + } + } + } void PetscSolverFeti::initialize() @@ -120,17 +158,17 @@ namespace AMDiS { subDomainIsLocal = (levelData.getMpiComm(meshLevel + 1) == MPI::COMM_SELF); if (subdomain == NULL) { - string subSolverInitStr = initFileStr + "->subsolver"; + string subSolverInitStr = name + "->subsolver"; string solverType = "petsc"; Parameters::get(subSolverInitStr, solverType); - OEMSolverCreator *solverCreator = - dynamic_cast(CreatorMap::getCreator(solverType, initFileStr)); + solverType = "p_" + solverType; + LinearSolverCreator *solverCreator = + dynamic_cast(CreatorMap::getCreator(solverType, name)); TEST_EXIT(solverCreator) ("No valid solver type found in parameter \"%s\"\n", - initFileStr.c_str()); + name.c_str()); solverCreator->setName(subSolverInitStr); subdomain = dynamic_cast(solverCreator->create()); - subdomain->initParameters(); subdomain->setSymmetric(isSymmetric); subdomain->setHandleDirichletRows(dirichletMode == 0); subdomain->setMeshDistributor(meshDistributor, meshLevel + 1); @@ -647,7 +685,7 @@ namespace AMDiS { Vec vec_scale_lagrange; - lagrangeMap.createVec(vec_scale_lagrange); + createVec(lagrangeMap, vec_scale_lagrange); // === Create for all duals the corresponding Lagrange constraints. On === @@ -972,7 +1010,7 @@ namespace AMDiS { localDofMap.getRankDofs(), nGlobalOverallInterior, &(schurPrimalData.tmp_vec_b)); - primalDofMap.createVec(schurPrimalData.tmp_vec_primal); + createVec(primalDofMap, schurPrimalData.tmp_vec_primal); MatCreateShell(domainComm, @@ -988,10 +1026,10 @@ namespace AMDiS { schurPrimalAugmentedData.subSolver = subdomain; schurPrimalAugmentedData.nestedVec = true; - localDofMap.createVec(schurPrimalAugmentedData.tmp_vec_b0, nGlobalOverallInterior); - localDofMap.createVec(schurPrimalAugmentedData.tmp_vec_b1, nGlobalOverallInterior); - primalDofMap.createVec(schurPrimalAugmentedData.tmp_vec_primal); - lagrangeMap.createVec(schurPrimalAugmentedData.tmp_vec_lagrange); + createVec(localDofMap, schurPrimalAugmentedData.tmp_vec_b0, nGlobalOverallInterior); + createVec(localDofMap, schurPrimalAugmentedData.tmp_vec_b1, nGlobalOverallInterior); + createVec(primalDofMap, schurPrimalAugmentedData.tmp_vec_primal); + createVec(lagrangeMap, schurPrimalAugmentedData.tmp_vec_lagrange); schurPrimalAugmentedData.mat_lagrange = &mat_lagrange; schurPrimalAugmentedData.mat_augmented_lagrange = &mat_augmented_lagrange; @@ -1066,7 +1104,7 @@ namespace AMDiS { FUNCNAME("PetscSolverFeti::createMatExplicitSchurPrimal()"); int creationMode = 0; - Parameters::get(initFileStr + "->feti->schur primal creation mode", creationMode); + Parameters::get(name + "->feti->schur primal creation mode", creationMode); if (creationMode == 0) { // matK = inv(A_BB) A_BPi Mat matK; @@ -1085,8 +1123,8 @@ namespace AMDiS { } else { schurPrimalData.subSolver = subdomain; - localDofMap.createVec(schurPrimalData.tmp_vec_b, nGlobalOverallInterior); - primalDofMap.createVec(schurPrimalData.tmp_vec_primal); + createVec(localDofMap, schurPrimalData.tmp_vec_b, nGlobalOverallInterior); + createVec(primalDofMap, schurPrimalData.tmp_vec_primal); Mat tmp; MatCreateShell(domainComm, primalDofMap.getRankDofs(), @@ -1185,10 +1223,10 @@ namespace AMDiS { schurPrimalAugmentedData.subSolver = subdomain; schurPrimalAugmentedData.nestedVec = false; - localDofMap.createVec(schurPrimalAugmentedData.tmp_vec_b0, nGlobalOverallInterior); - localDofMap.createVec(schurPrimalAugmentedData.tmp_vec_b1, nGlobalOverallInterior); - primalDofMap.createVec(schurPrimalAugmentedData.tmp_vec_primal); - lagrangeMap.createVec(schurPrimalAugmentedData.tmp_vec_lagrange); + createVec(localDofMap, schurPrimalAugmentedData.tmp_vec_b0, nGlobalOverallInterior); + createVec(localDofMap, schurPrimalAugmentedData.tmp_vec_b1, nGlobalOverallInterior); + createVec(primalDofMap, schurPrimalAugmentedData.tmp_vec_primal); + createVec(lagrangeMap, schurPrimalAugmentedData.tmp_vec_lagrange); schurPrimalAugmentedData.mat_lagrange = &mat_lagrange; schurPrimalAugmentedData.mat_augmented_lagrange = &mat_augmented_lagrange; @@ -1278,8 +1316,8 @@ namespace AMDiS { localDofMap.getRankDofs(), nGlobalOverallInterior, &(fetiData.tmp_vec_b0)); - lagrangeMap.createVec(fetiData.tmp_vec_lagrange); - primalDofMap.createVec(fetiData.tmp_vec_primal0); + createVec(lagrangeMap, fetiData.tmp_vec_lagrange); + createVec(primalDofMap, fetiData.tmp_vec_primal0); if (stokesMode == false) { MatCreateShell(domainComm, @@ -1293,16 +1331,16 @@ namespace AMDiS { (void(*)(void))petscMultMatFeti); } else { fetiData.mat_augmented_lagrange = &mat_augmented_lagrange; - primalDofMap.createVec(fetiData.tmp_vec_primal1); + createVec(primalDofMap, fetiData.tmp_vec_primal1); MatShellSetOperation(mat_feti, MATOP_MULT, (void(*)(void))petscMultMatFetiAugmented); } } else { TEST_EXIT_DBG(!augmentedLagrange)("Not yet implemented!\n"); - localDofMap.createVec(fetiData.tmp_vec_b1, nGlobalOverallInterior); - primalDofMap.createVec(fetiData.tmp_vec_primal1); - interfaceDofMap.createVec(fetiData.tmp_vec_interface); + createVec(localDofMap, fetiData.tmp_vec_b1, nGlobalOverallInterior); + createVec(primalDofMap, fetiData.tmp_vec_primal1); + createVec(interfaceDofMap, fetiData.tmp_vec_interface); MatCreateShell(domainComm, interfaceDofMap.getRankDofs() + lagrangeMap.getRankDofs(), @@ -1325,7 +1363,7 @@ namespace AMDiS { // === Set KSP monitor. === bool monitor = false; - Parameters::get(initFileStr + "->feti->monitor", monitor); + Parameters::get(name + "->feti->monitor", monitor); if (monitor) { if (stokesMode) KSPMonitorSet(ksp_feti, KSPMonitorFetiStokes, &fetiKspData, PETSC_NULL); @@ -1378,8 +1416,8 @@ namespace AMDiS { fetiInexactData.matPiPi = &(subdomain->getMatCoarse()); fetiInexactData.mat_lagrange = &mat_lagrange; - localDofMap.createVec(fetiInexactData.tmp_vec_b0); - localDofMap.createVec(fetiInexactData.tmp_vec_b1); + createVec(localDofMap, fetiInexactData.tmp_vec_b0); + createVec(localDofMap, fetiInexactData.tmp_vec_b1); MatCreateShell(domainComm, localSize, localSize, globalSize, globalSize, @@ -1403,7 +1441,7 @@ namespace AMDiS { fetiInexactPreconData.matPiB = &(subdomain->getMatCoarseInterior()); fetiInexactPreconData.matBPi = &(subdomain->getMatInteriorCoarse()); fetiInexactPreconData.mat_lagrange = &mat_lagrange; - localDofMap.createVec(fetiInexactPreconData.tmp_vec_b0); + createVec(localDofMap, fetiInexactPreconData.tmp_vec_b0); KSPCreate(domainComm, &(fetiInexactPreconData.ksp_pc_feti)); KSPSetOperators(fetiInexactPreconData.ksp_pc_feti, @@ -1511,8 +1549,8 @@ namespace AMDiS { // === Create tmp vectors === - localDofMap.createVec(fetiInterfaceLumpedPreconData.tmp_vec_b1); - primalDofMap.createVec(fetiInterfaceLumpedPreconData.tmp_primal); + createVec(localDofMap, fetiInterfaceLumpedPreconData.tmp_vec_b1); + createVec(primalDofMap, fetiInterfaceLumpedPreconData.tmp_primal); fetiInterfaceLumpedPreconData.subSolver = subdomain; } @@ -1720,8 +1758,8 @@ namespace AMDiS { const FiniteElemSpace *pressureFeSpace = componentSpaces[pressureComponent]; Vec ktest0, ktest1; - localDofMap.createLocalVec(ktest0); - localDofMap.createLocalVec(ktest1); + createLocalVec(localDofMap, ktest0); + createLocalVec(localDofMap, ktest1); DofMap& m = localDofMap[pressureComponent].getMap(); for (DofMap::iterator it = m.begin(); it != m.end(); ++it) { if (dofMap[pressureFeSpace].isRankDof(it->first)) { @@ -1739,11 +1777,11 @@ namespace AMDiS { VecCreateMPIWithArray(PETSC_COMM_WORLD, 1, localDofMap.getRankDofs(), nGlobalOverallInterior, valarray, &ktest2); - localDofMap.createVec(ktest3, nGlobalOverallInterior); + createVec(localDofMap, ktest3, nGlobalOverallInterior); Vec vecArray[2]; - interfaceDofMap.createVec(vecArray[0]); - lagrangeMap.createVec(vecArray[1]); + createVec(interfaceDofMap, vecArray[0]); + createVec(lagrangeMap, vecArray[1]); VecSet(vecArray[0], 1.0); MatMult(subdomain->getMatInteriorCoarse(1), vecArray[0], ktest3); @@ -2100,7 +2138,6 @@ namespace AMDiS { if (meshLevel == 1) { MSG("START MAT TRICK!\n"); mlSubdomain = new PetscSolverGlobalMatrix(""); - mlSubdomain->initParameters(); mlSubdomain->setSymmetric(isSymmetric); mlSubdomain->setHandleDirichletRows(dirichletMode == 0); mlSubdomain->setMeshDistributor(meshDistributor, meshLevel); @@ -2250,10 +2287,10 @@ namespace AMDiS { for (cursor_type cursor = begin(dofMat->getBaseMatrix()), cend = end(dofMat->getBaseMatrix()); cursor != cend; ++cursor) { - if (dirichletRows[rowComponent].count(*cursor)) + if (dirichletRows[rowComponent].count(cursor.value())) continue; - if (isPrimal(rowComponent, *cursor)) + if (isPrimal(rowComponent, cursor.value())) continue; if (fetiPreconditioner == FETI_DIRICHLET) { @@ -2272,7 +2309,7 @@ namespace AMDiS { if (isPrimal(colComponent, col(*icursor))) continue; - if (!isDual(rowComponent, *cursor)) { + if (!isDual(rowComponent, cursor.value())) { if (!isDual(colComponent, col(*icursor))) { int colIndex = interiorDofMap.getLocalMatIndex(colComponent, col(*icursor)); @@ -2299,9 +2336,9 @@ namespace AMDiS { } } // for each nnz in row - if (!isDual(rowComponent, *cursor)) { + if (!isDual(rowComponent, cursor.value())) { int rowIndex = - interiorDofMap.getLocalMatIndex(rowComponent, *cursor); + interiorDofMap.getLocalMatIndex(rowComponent, cursor.value()); MatSetValues(mat_interior_interior, 1, &rowIndex, colsLocal.size(), &(colsLocal[0]), &(valuesLocal[0]), INSERT_VALUES); @@ -2310,7 +2347,7 @@ namespace AMDiS { &(colsLocalOther[0]), &(valuesLocalOther[0]), INSERT_VALUES); } else { int rowIndex = - dualDofMap.getLocalMatIndex(rowComponent, *cursor); + dualDofMap.getLocalMatIndex(rowComponent, cursor.value()); MatSetValues(mat_duals_duals, 1, &rowIndex, colsLocal.size(), &(colsLocal[0]), &(valuesLocal[0]), INSERT_VALUES); if (colsLocalOther.size()) @@ -2320,7 +2357,7 @@ namespace AMDiS { } if (fetiPreconditioner == FETI_LUMPED || fetiSolverType == INEXACT) { - if (!isDual(rowComponent, *cursor)) + if (!isDual(rowComponent, cursor.value())) continue; colsLocal.clear(); @@ -2341,7 +2378,7 @@ namespace AMDiS { valuesLocal.push_back(value(*icursor)); } - int rowIndex = dualDofMap.getLocalMatIndex(rowComponent, *cursor); + int rowIndex = dualDofMap.getLocalMatIndex(rowComponent, cursor.value()); MatSetValues(mat_duals_duals, 1, &rowIndex, colsLocal.size(), &(colsLocal[0]), &(valuesLocal[0]), INSERT_VALUES); } @@ -2412,7 +2449,7 @@ namespace AMDiS { nGlobalOverallInterior, &tmp_b1); Vec tmp_primal1; - primalDofMap.createVec(tmp_primal1); + createVec(primalDofMap, tmp_primal1); Vec tmp_lagrange; MatGetVecs(mat_lagrange, PETSC_NULL, &tmp_lagrange); @@ -2525,8 +2562,8 @@ namespace AMDiS { FUNCNAME("PetscSolverFeti::solveFetiInexact()"); Vec tmpLagrange0, tmpLagrange1; - lagrangeMap.createVec(tmpLagrange0); - lagrangeMap.createVec(tmpLagrange1); + createVec(lagrangeMap, tmpLagrange0); + createVec(lagrangeMap, tmpLagrange1); VecSet(tmpLagrange0, 0.0); VecSet(tmpLagrange1, 0.0); @@ -2609,7 +2646,7 @@ namespace AMDiS { &solInterior); Vec solCoarse; - primalDofMap.createVec(solCoarse); + createVec(primalDofMap, solCoarse); solveFeti(subdomain->getVecRhsInterior(), subdomain->getVecRhsCoarse(), @@ -2636,7 +2673,7 @@ namespace AMDiS { localDofMap.getRankDofs(), nGlobalOverallInterior, &rhsInterior); - primalDofMap.createVec(rhsCoarse); + createVec(primalDofMap, rhsCoarse); VecDuplicate(rhsInterior, &solInterior); VecDuplicate(rhsCoarse, &solCoarse); @@ -2699,4 +2736,4 @@ namespace AMDiS { VecDestroy(&solInterior); VecDestroy(&solCoarse); } -} +} } // end namespaces diff --git a/AMDiS/src/parallel/PetscSolverFeti.h b/AMDiS/src/parallel/PetscSolverFeti.h index 3ade93c8..2feac8b0 100644 --- a/AMDiS/src/parallel/PetscSolverFeti.h +++ b/AMDiS/src/parallel/PetscSolverFeti.h @@ -1,21 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /** \file PetscSolverFeti.h */ @@ -31,386 +32,400 @@ #ifndef AMDIS_PETSC_SOLVER_FETI_H #define AMDIS_PETSC_SOLVER_FETI_H -namespace AMDiS { - - using namespace std; - - /** \brief - * FETI-DP implementation based on PETSc. - */ - class PetscSolverFeti : public PetscSolver +namespace AMDiS +{ + namespace Parallel { - public: - /// Creator class - class Creator : public OEMSolverCreator - { - public: - virtual ~Creator() {} - - /// Returns a new PetscSolver object. - OEMSolver* create() - { - return new PetscSolverFeti(this->name); - } - }; - - /// Constructor of FETI-DP solver class. - PetscSolverFeti(string name); - - /// After mesh changes, or if the solver is called the first time, this - /// function creates all information about primal nodes, dual nodes and - /// lagrange constraints. - void createFetiData(); - - /// Assemble the sequentially created matrices to the global matrices - /// required by the FETI-DP method. - void fillPetscMatrix(Matrix *mat); - - /// Assembles the global rhs vectors from the sequentially created ones. - void fillPetscRhs(SystemVector *vec); - - /// Solve the system using FETI-DP method. - void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); - - /// Just for the super trick - void solveGlobal(Vec &rhs, Vec &sol); - /// Destroys all matrix data structures. - void destroyMatrixData(); + using namespace std; - /// Detroys all vector data structures. - void destroyVectorData(); - - /// Returns flags to denote which information of the boundary DOFs are - /// required by the FETI-DP solver. - Flag getBoundaryDofRequirement() - { - return - MeshDistributor::BOUNDARY_SUBOBJ_SORTED | - MeshDistributor::BOUNDARY_FILL_INFO_SEND_DOFS | - MeshDistributor::BOUNDARY_FILL_INFO_RECV_DOFS; - } - - /// Initialization of the FETI-DPdata structures. - void initialize(); - - int getNumberOfPrimals() - { - return primalDofMap.getOverallDofs(); - } - - int getNumberOfRankPrimals() - { - return primalDofMap.getRankDofs(); - } - - int getNumberOfDuals() - { - return dualDofMap.getOverallDofs(); - } - - int getNumberOfRankDuals() - { - return dualDofMap.getRankDofs(); - } - - int getNumberOfLagrange() + /** \ingroup Solver + * + * \brief + * FETI-DP implementation based on PETSc. + */ + class PetscSolverFeti : public PetscSolver { - return lagrangeMap.getOverallDofs(); - } - - protected: - /// - void createDirichletData(Matrix &mat); - - /// Defines which boundary nodes are primal. Creates global index of - /// the primal variables. - void createPrimals(int component); - - /// Defines the set of dual variables and creates the global index of - /// dual variables. - void createDuals(int component); + public: + typedef PetscSolver super; + + /// Creator class + class Creator : public LinearSolverCreator + { + public: + virtual ~Creator() {} + + /// Returns a new PetscSolver object. + LinearSolver* create() + { + return new PetscSolverFeti(this->name); + } + }; + + /// Constructor of FETI-DP solver class. + PetscSolverFeti(string name); - /// - void createInterfaceNodes(int component); + virtual void init(vector &componentSpaces, + vector &feSpaces, + bool createGlobalMapping = true); - /// Create Lagrange multiplier variables corresponding to the dual - /// variables. - void createLagrange(int component); + /// After mesh changes, or if the solver is called the first time, this + /// function creates all information about primal nodes, dual nodes and + /// lagrange constraints. + void createFetiData(); - void createAugmentedLagrange(int component); + /// Assemble the sequentially created matrices to the global matrices + /// required by the FETI-DP method. + void fillPetscMatrix(Matrix *mat); - /// Creates a global index of the B variables. - void createIndexB(int component); + /// Assembles the global rhs vectors from the sequentially created ones. + void fillPetscRhs(SystemVector *vec); - /// Creates the Lagrange multiplier constraints and assembles them - /// to \ref mat_lagrange. - void createMatLagrange(); + /// Solve the system using FETI-DP method. + void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); - vector > getCoarseEdges(); + /// Just for the super trick + void solveGlobal(Vec &rhs, Vec &sol); - vector > getCoarseFaces(); + /// Destroys all matrix data structures. + void destroyMatrixData(); - void createMatAugmentedLagrange(); + /// Detroys all vector data structures. + void destroyVectorData(); - bool testWirebasketEdge(BoundaryObject &edge, - const FiniteElemSpace *feSpace); + /// Returns flags to denote which information of the boundary DOFs are + /// required by the FETI-DP solver. + Flag getBoundaryDofRequirement() + { + return + MeshDistributor::BOUNDARY_SUBOBJ_SORTED | + MeshDistributor::BOUNDARY_FILL_INFO_SEND_DOFS | + MeshDistributor::BOUNDARY_FILL_INFO_RECV_DOFS; + } - /// - void createPreconditionerMatrix(Matrix *mat); + /// Initialization of the FETI-DPdata structures. + void initialize(); - /// Creates PETSc KSP solver object for solving the Schur complement - /// system on the primal variables, \ref ksp_schur_primal - void createSchurPrimalKsp(); + int getNumberOfPrimals() + { + return primalDofMap.getOverallDofs(); + } - /// - void createMatExplicitSchurPrimal(); - - /// - void createMatExplicitAugmentedSchurPrimal(); + int getNumberOfRankPrimals() + { + return primalDofMap.getRankDofs(); + } - /// Destroys PETSc KSP solver object \ref ksp_schur_primal - void destroySchurPrimalKsp(); + int getNumberOfDuals() + { + return dualDofMap.getOverallDofs(); + } - /// Creates PETSc KSP solver object for the FETI-DP operator, \ref ksp_feti - void createFetiKsp(); + int getNumberOfRankDuals() + { + return dualDofMap.getRankDofs(); + } - /// - void createFetiExactKsp(); + int getNumberOfLagrange() + { + return lagrangeMap.getOverallDofs(); + } - /// - void createFetiInexactKsp(); + protected: + /// + void createDirichletData(Matrix &mat); - /// - void createFetiInexactReducedKsp(); + /// Defines which boundary nodes are primal. Creates global index of + /// the primal variables. + void createPrimals(int component); - /// - void createFetiPreconLumped(PC pc); + /// Defines the set of dual variables and creates the global index of + /// dual variables. + void createDuals(int component); - /// - void createFetiPreconDirichlet(PC pc); + /// + void createInterfaceNodes(int component); - /// Destroys FETI-DP operator, \ref ksp_feti - void destroyFetiKsp(); + /// Create Lagrange multiplier variables corresponding to the dual + /// variables. + void createLagrange(int component); - /// - void destroyFetiExactKsp(); + void createAugmentedLagrange(int component); - /// - void destroyFetiInexactKsp(); + /// Creates a global index of the B variables. + void createIndexB(int component); - /// - void destroyFetiInexactReducedKsp(); + /// Creates the Lagrange multiplier constraints and assembles them + /// to \ref mat_lagrange. + void createMatLagrange(); - /// Create the null space of the FETI-DP operator (if there is one) and - /// attachets it to the corresponding matrices and KSP objects. - void createNullSpace(); + vector > getCoarseEdges(); - /// In debug modes, this function runs some debug tests on the FETI - /// matrices. In optimized mode, nothing is done here. - void dbgMatrix(Matrix *mat); + vector > getCoarseFaces(); - /** \brief - * Recovers AMDiS solution vector from PETSc's solution vectors of the - * FETI-DP system. First, the B variables can locally be copied to the - * corresponding entries in the DOF vectors. The primal variable must - * be communicated such that all ranks sharing a primal get a copy of - * the corresponding value. - * - * \param[in] vec_sol_b Global PETSc vector of the solution of - * the B variables. - * \param[in] vec_sol_primal Global PETSc vector of the solution of - * the primal variables. - * \param[out] vec SystemVector containing all solution - * DOF vectors. - */ - void recoverSolution(Vec &vec_sol_b, - Vec &vec_sol_primal, - SystemVector &vec); + void createMatAugmentedLagrange(); - /// - void recoverInterfaceSolution(Vec& vecInterface, - SystemVector &vec); + bool testWirebasketEdge(BoundaryObject &edge, + const FiniteElemSpace *feSpace); - /// - void solveFeti(Vec &rhsInterior, Vec &rhsCoarse, - Vec &solInterior, Vec &solCoarse); + /// + void createPreconditionerMatrix(Matrix *mat); - /// - void solveFetiExact(Vec &rhsInterior, Vec &rhsCoarse, - Vec &solInterior, Vec &solCoarse); + /// Creates PETSc KSP solver object for solving the Schur complement + /// system on the primal variables, \ref ksp_schur_primal + void createSchurPrimalKsp(); - /// - void solveFetiInexact(Vec &rhsInterior, Vec &rhsCoarse, + /// + void createMatExplicitSchurPrimal(); + + /// + void createMatExplicitAugmentedSchurPrimal(); + + /// Destroys PETSc KSP solver object \ref ksp_schur_primal + void destroySchurPrimalKsp(); + + /// Creates PETSc KSP solver object for the FETI-DP operator, \ref ksp_feti + void createFetiKsp(); + + /// + void createFetiExactKsp(); + + /// + void createFetiInexactKsp(); + + /// + void createFetiInexactReducedKsp(); + + /// + void createFetiPreconLumped(PC pc); + + /// + void createFetiPreconDirichlet(PC pc); + + /// Destroys FETI-DP operator, \ref ksp_feti + void destroyFetiKsp(); + + /// + void destroyFetiExactKsp(); + + /// + void destroyFetiInexactKsp(); + + /// + void destroyFetiInexactReducedKsp(); + + /// Create the null space of the FETI-DP operator (if there is one) and + /// attachets it to the corresponding matrices and KSP objects. + void createNullSpace(); + + /// In debug modes, this function runs some debug tests on the FETI + /// matrices. In optimized mode, nothing is done here. + void dbgMatrix(Matrix *mat); + + /** \brief + * Recovers AMDiS solution vector from PETSc's solution vectors of the + * FETI-DP system. First, the B variables can locally be copied to the + * corresponding entries in the DOF vectors. The primal variable must + * be communicated such that all ranks sharing a primal get a copy of + * the corresponding value. + * + * \param[in] vec_sol_b Global PETSc vector of the solution of + * the B variables. + * \param[in] vec_sol_primal Global PETSc vector of the solution of + * the primal variables. + * \param[out] vec SystemVector containing all solution + * DOF vectors. + */ + void recoverSolution(Vec &vec_sol_b, + Vec &vec_sol_primal, + SystemVector &vec); + + /// + void recoverInterfaceSolution(Vec& vecInterface, + SystemVector &vec); + + /// + void solveFeti(Vec &rhsInterior, Vec &rhsCoarse, + Vec &solInterior, Vec &solCoarse); + + /// + void solveFetiExact(Vec &rhsInterior, Vec &rhsCoarse, Vec &solInterior, Vec &solCoarse); - /// - void solveFetiInexactReduced(Vec &rhsInterior, Vec &rhsCoarse, - Vec &solInterior, Vec &solCoarse); + /// + void solveFetiInexact(Vec &rhsInterior, Vec &rhsCoarse, + Vec &solInterior, Vec &solCoarse); - /// - void resetStatistics(); + /// + void solveFetiInexactReduced(Vec &rhsInterior, Vec &rhsCoarse, + Vec &solInterior, Vec &solCoarse); - /// - void printStatistics(); + /// + void resetStatistics(); - /// Checks whether a given DOF is a primal DOF in a given component. - inline bool isPrimal(int component, DegreeOfFreedom dof) - { - return primalDofMap[component].isSet(dof); - } + /// + void printStatistics(); - /// Checks whether a given DOF is a dual DOF in a given component. - inline bool isDual(int component, DegreeOfFreedom dof) - { - return dualDofMap[component].isSet(dof); - } + /// Checks whether a given DOF is a primal DOF in a given component. + inline bool isPrimal(int component, DegreeOfFreedom dof) + { + return primalDofMap[component].isSet(dof); + } - /// Checks whether a given DOF is an interface DOF in a given component. - inline bool isInterface(int component, DegreeOfFreedom dof) - { - if (component == pressureComponent) - return interfaceDofMap[component].isSet(dof); - - return false; - } + /// Checks whether a given DOF is a dual DOF in a given component. + inline bool isDual(int component, DegreeOfFreedom dof) + { + return dualDofMap[component].isSet(dof); + } - protected: - /// Type of FETI-DP solver, i.e., exact or some inexact version - FetiSolverType fetiSolverType; + /// Checks whether a given DOF is an interface DOF in a given component. + inline bool isInterface(int component, DegreeOfFreedom dof) + { + if (component == pressureComponent) + return interfaceDofMap[component].isSet(dof); + + return false; + } - /// Mapping from primal DOF indices to a global index of primals. - ParallelDofMapping primalDofMap; + protected: + /// Type of FETI-DP solver, i.e., exact or some inexact version + FetiSolverType fetiSolverType; - /// Mapping from dual DOF indices to a global index of duals. - ParallelDofMapping dualDofMap; + /// + ParallelDofMapping dofMapSubDomain; + + /// Mapping from primal DOF indices to a global index of primals. + ParallelDofMapping primalDofMap; - /// Mapping from interface DOF indices to a global index of interface - /// nodes. This is mainly used for Stokes-like solvers, where the pressure - /// interface nodes are neither primal nor dual. - ParallelDofMapping interfaceDofMap; + /// Mapping from dual DOF indices to a global index of duals. + ParallelDofMapping dualDofMap; - /// Index for each non primal DOF to the global index of B variables (thus, - /// all pure local variables). - ParallelDofMapping localDofMap; + /// Mapping from interface DOF indices to a global index of interface + /// nodes. This is mainly used for Stokes-like solvers, where the pressure + /// interface nodes are neither primal nor dual. + ParallelDofMapping interfaceDofMap; - /// Stores to each dual DOF index the index of the first Lagrange - /// constraint that is assigned to this DOF. - ParallelDofMapping lagrangeMap; - - /// Mapping of pure local DOF indices, thus no primal and no dual DOFs are - /// in this map. Is used for the Dirichlet preconditioner only. - ParallelDofMapping interiorDofMap; + /// Index for each non primal DOF to the global index of B variables (thus, + /// all pure local variables). + ParallelDofMapping localDofMap; - /// Stores to all dual boundary DOFs in each FE space the set of - /// ranks which contain this global DOF. - map boundaryDofRanks; + /// Stores to each dual DOF index the index of the first Lagrange + /// constraint that is assigned to this DOF. + ParallelDofMapping lagrangeMap; + + /// Mapping of pure local DOF indices, thus no primal and no dual DOFs are + /// in this map. Is used for the Dirichlet preconditioner only. + ParallelDofMapping interiorDofMap; - /// Global PETSc matrix of Lagrange variables. - Mat mat_lagrange; + /// Stores to all dual boundary DOFs in each FE space the set of + /// ranks which contain this global DOF. + map boundaryDofRanks; - /// - Mat mat_augmented_lagrange; + /// Global PETSc matrix of Lagrange variables. + Mat mat_lagrange; - /// 0: Solve the Schur complement on primal variables with iterative solver. - /// 1: Create the Schur complement matrix explicitly and solve it with a - /// direct solver. - int schurPrimalSolver; + /// + Mat mat_augmented_lagrange; - /// PETSc solver object to solve the Schur complement on the - /// primal variables. - KSP ksp_schur_primal; + /// 0: Solve the Schur complement on primal variables with iterative solver. + /// 1: Create the Schur complement matrix explicitly and solve it with a + /// direct solver. + int schurPrimalSolver; - /// Matrix object that defines a matrix-free implementation for the action - /// of the Schur complement on the primal variables. - Mat mat_schur_primal; + /// PETSc solver object to solve the Schur complement on the + /// primal variables. + KSP ksp_schur_primal; - /// Data for MatMult operation in matrix \ref mat_schur_primal - SchurPrimalData schurPrimalData; + /// Matrix object that defines a matrix-free implementation for the action + /// of the Schur complement on the primal variables. + Mat mat_schur_primal; - /// - SchurPrimalAugmentedData schurPrimalAugmentedData; + /// Data for MatMult operation in matrix \ref mat_schur_primal + SchurPrimalData schurPrimalData; - /// PETSc solver object to solve a system with FETI-DP. - KSP ksp_feti; + /// + SchurPrimalAugmentedData schurPrimalAugmentedData; - /// Matrix object that defines a matrix-free implementation for the action - /// of the FETI-DP operator. - Mat mat_feti; + /// PETSc solver object to solve a system with FETI-DP. + KSP ksp_feti; - /// Data for MatMult operation in matrix \ref mat_feti - FetiData fetiData; + /// Matrix object that defines a matrix-free implementation for the action + /// of the FETI-DP operator. + Mat mat_feti; - /// - FetiInexactData fetiInexactData; + /// Data for MatMult operation in matrix \ref mat_feti + FetiData fetiData; - /// - FetiInexactPreconData fetiInexactPreconData; + /// + FetiInexactData fetiInexactData; - /// Defines which preconditioner should be used to solve the reduced - /// FETI-DP system. - FetiPreconditioner fetiPreconditioner; + /// + FetiInexactPreconData fetiInexactPreconData; - /// Preconditioner object for the reduced FETI-DP system. - PC precon_feti; + /// Defines which preconditioner should be used to solve the reduced + /// FETI-DP system. + FetiPreconditioner fetiPreconditioner; - Mat mat_lagrange_scaled; - - FetiDirichletPreconData fetiDirichletPreconData; + /// Preconditioner object for the reduced FETI-DP system. + PC precon_feti; - FetiLumpedPreconData fetiLumpedPreconData; + Mat mat_lagrange_scaled; + + FetiDirichletPreconData fetiDirichletPreconData; - FetiInterfaceLumpedPreconData fetiInterfaceLumpedPreconData; + FetiLumpedPreconData fetiLumpedPreconData; - FetiKspData fetiKspData; + FetiInterfaceLumpedPreconData fetiInterfaceLumpedPreconData; - /// Matrices for Dirichlet preconditioner. - Mat mat_interior_interior, mat_duals_duals, mat_interior_duals, mat_duals_interior; + FetiKspData fetiKspData; - KSP ksp_interior; + /// Matrices for Dirichlet preconditioner. + Mat mat_interior_interior, mat_duals_duals, mat_interior_duals, mat_duals_interior; - int levelMode; + KSP ksp_interior; - // If true, FETI-DP subdomains are on MPI::COMM_SELF - bool subDomainIsLocal; + int levelMode; - PetscSolver *subdomain; + // If true, FETI-DP subdomains are on MPI::COMM_SELF + bool subDomainIsLocal; - // Just a trick for multi level things, should be removed and generalized! - PetscSolver *mlSubdomain; + PetscSolver *subdomain; - PetscSolver *massMatrixSolver; + // Just a trick for multi level things, should be removed and generalized! + PetscSolver *mlSubdomain; - bool printTimings; + PetscSolver *massMatrixSolver; - bool augmentedLagrange; + bool printTimings; - int nRankEdges; + bool augmentedLagrange; - int nOverallEdges; + int nRankEdges; - /// There are two different dirichlet modes: - /// 0: dirichlet rows are zeroed and a diagonal element is set to one. - /// 1: dirichlet rows are removed (this mode does not work correctly, but - /// many function are prepered to make use of it) - int dirichletMode; + int nOverallEdges; - /// If true, the FETI-DP solver is applied to a Stokes like problem. Thus, - /// there is a pressure variable which is not part of the coarse grid - /// problem. - bool stokesMode; + /// There are two different dirichlet modes: + /// 0: dirichlet rows are zeroed and a diagonal element is set to one. + /// 1: dirichlet rows are removed (this mode does not work correctly, but + /// many function are prepered to make use of it) + int dirichletMode; - /// Only used if \ref stokesMode is enabled. In this case, this variable - /// defines the component number of the pressure variable. - int pressureComponent; + /// If true, the FETI-DP solver is applied to a Stokes like problem. Thus, + /// there is a pressure variable which is not part of the coarse grid + /// problem. + bool stokesMode; - /// Maps from component number to set of DOFs which are Dirichlet DOfs in - /// this component. - map > dirichletRows; + /// Only used if \ref stokesMode is enabled. In this case, this variable + /// defines the component number of the pressure variable. + int pressureComponent; - friend class PetscSolverFetiDebug; - }; + /// Maps from component number to set of DOFs which are Dirichlet DOfs in + /// this component. + map > dirichletRows; -} + friend class PetscSolverFetiDebug; + }; + } // end namespace Parallel +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/PetscSolverFetiDebug.cc b/AMDiS/src/parallel/PetscSolverFetiDebug.cc index 24b427da..7c2682e2 100644 --- a/AMDiS/src/parallel/PetscSolverFetiDebug.cc +++ b/AMDiS/src/parallel/PetscSolverFetiDebug.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include #include @@ -15,7 +24,7 @@ #include "parallel/PetscSolverFeti.h" #include "parallel/PetscSolverFetiDebug.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -69,9 +78,9 @@ namespace AMDiS { Vec ktest0, ktest1, ktest2; ParallelDofMapping &localDofMap = feti.localDofMap; - localDofMap.createLocalVec(ktest0); - localDofMap.createLocalVec(ktest1); - localDofMap.createVec(ktest2, feti.nGlobalOverallInterior); + feti.createLocalVec(localDofMap, ktest0); + feti.createLocalVec(localDofMap, ktest1); + feti.createVec(localDofMap, ktest2, feti.nGlobalOverallInterior); const FiniteElemSpace* pressureFeSpace = feti.componentSpaces[feti.pressureComponent]; @@ -98,13 +107,13 @@ namespace AMDiS { localDofMap.getRankDofs(), feti.nGlobalOverallInterior, valarray, &ktest3); - feti.primalDofMap.createVec(vecArray[1]); + feti.createVec(feti.primalDofMap, vecArray[1]); VecSet(vecArray[1], 0.0); - feti.interfaceDofMap.createVec(vecArray[2]); + feti.createVec(feti.interfaceDofMap, vecArray[2]); VecSet(vecArray[2], 1.0); - feti.lagrangeMap.createVec(vecArray[3]); + feti.createVec(feti.lagrangeMap, vecArray[3]); MatMult(feti.subdomain->getMatInteriorCoarse(1), vecArray[2], ktest2); VecAXPY(ktest2, 1.0, ktest3); MatMult(feti.mat_lagrange_scaled, ktest2, vecArray[3]); @@ -263,8 +272,8 @@ namespace AMDiS { Vec unitVector; Vec resultVector; - lagrangeMap.createVec(unitVector); - lagrangeMap.createVec(resultVector); + feti.createVec(lagrangeMap, unitVector); + feti.createVec(lagrangeMap, resultVector); PetscInt low, high; VecGetOwnershipRange(unitVector, &low, &high); @@ -312,10 +321,10 @@ namespace AMDiS { Vec unitVector[2]; Vec resultVector[2]; - interfaceDofMap.createVec(unitVector[0]); - interfaceDofMap.createVec(resultVector[0]); - lagrangeMap.createVec(unitVector[1]); - lagrangeMap.createVec(resultVector[1]); + feti.createVec(interfaceDofMap, unitVector[0]); + feti.createVec(interfaceDofMap, resultVector[0]); + feti.createVec(lagrangeMap, unitVector[1]); + feti.createVec(lagrangeMap, resultVector[1]); Vec unitNestVec, resultNestVec; VecCreateNest(feti.domainComm, 2, PETSC_NULL, unitVector, &unitNestVec); @@ -764,4 +773,4 @@ namespace AMDiS { } -} +} } diff --git a/AMDiS/src/parallel/PetscSolverFetiDebug.h b/AMDiS/src/parallel/PetscSolverFetiDebug.h index 145e2d21..23597f96 100644 --- a/AMDiS/src/parallel/PetscSolverFetiDebug.h +++ b/AMDiS/src/parallel/PetscSolverFetiDebug.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -23,125 +25,128 @@ #ifndef AMDIS_PETSC_SOLVER_FETI_DEBUG_H #define AMDIS_PETSC_SOLVER_FETI_DEBUG_H -namespace AMDiS { - - using namespace std; - - /** \brief - * This class collects several static functions which may be used to debug - * FETI-DP solver. All functions should be used only in debug mode and - * never in productive runs as they may be arbitrarly slow. - * - * This class must be a friend class of \ref PetscSolverFeti as it must have - * access to all internal data. - */ - class PetscSolverFetiDebug +namespace AMDiS +{ + namespace Parallel { - public: - /** \brief - * Is used to test the null space in stokes mode. The function reads the - * null space basis from FETI mat object and test by simple matrix - * multiplication, whether the vector is a member of the null space. - * Furthermore, the function creates the null space on the non reduced - * form of the FETI-DP system and make there the same test. The resulting - * test vector is also written to "nullspace.vtu" file. - * - * - * \param[in] feti FETI-DP solver - * \param[in] vec Is just used as a temporary template vector. - */ - static void debugNullSpace(PetscSolverFeti &feti, SystemVector &vec); - - /** \brief - * Creates a parallel distributed matrix of the local (B-index) matrices. - * Note that the matrix is still a block matrix and there are no off - * diagonal values. - * - * \param[in] feti FETI-DP solver - * \param[out] mat The parallel distributed matrix will be created - * on this variable. - */ - static void createInteriorMat(PetscSolverFeti &feti, Mat &mat); - - /** \brief - * Creates the non reduced FETI-DP system (also in stokes mode) as a - * nested matrix. - * - * \param[in] feti FETI-DP solver - * \param[out] mat The resulting nested matrix. - */ - static void createNestedFetiMat(PetscSolverFeti &feti, Mat &mat); - /** \brief - * Creates the reduced FETI-DP operator in an explicitly given matrix - * form (also in stokes mode). The resulting matrix is dense. - * - * \param[in] feti FETI-DP solver - * \param[in] fetiMat Matrix object representing the implicit - * FETI-DP operator - * \param[out] explicitMat Explicit matrix formulation - * \param[out] nnzCounter Stores the number of non zero elements in the - * explicit matrix formulation - */ - static void createExplicitFetiMat(PetscSolverFeti &feti, - Mat fetiMat, - Mat &explicitmat, - int &nnzCounter); + using namespace std; /** \brief - * Create a non nested parallel distributed vector from a nested vector of - * two parallel distributed vectors. Is used to change the structure of - * solution vectors in stokes mode, which always have two components. - * - * \param[in] feti FETI-DP solver - * \param[in] nestedVec Nested PETSc vector with two sub vectors. - * \param[out] explicitVec The output vector. - */ - static void createExplicitVec(PetscSolverFeti &feti, - Vec nestedVec, - Vec &explicitVec); - - /** \brief - * Checks for the init file parameter "parallel->debug->write fety system" - * and if it is true, writes the null space basis vector to the PETSc binary - * file "nullspace.vec". - * - * \param[in] feti FETI-DP solver - * \param[in] nullSpaceBasis Vector representing the basis of the null - * space of the FETI-DP system. - */ - static void writeNullSpace(PetscSolverFeti &feti, - Vec nullSpaceBasis); - - /** \brief - * Checks for the init file parameter "parallel->debug->write fety system" - * and if it is true, some debug test of the FETI-DP system are made: - * - symmetry test of the FETI-DP operator (by assembling it in an - * explicit formulation) - * - write explicit FETI-DP operator to "feti.mat" - * - write rhs to "feti_rhs.vec" - * - * \param[in] feti FETI-DP solver - * \param[in] dbgRhsVec Vector representing the rhs vector of the - * FETI-DP system. - */ - static void debugFeti(PetscSolverFeti &feti, - Vec dbgRhsVec); - - /** \brief - * This functions check a PETSc matrix for zero rows. Each zero row index - * is printed to the screen. - * - * \param[in] mat PETSc matrix which should be checked for zero rows. - * - * \return int Number of zero rows in matrix; - */ - static int testZeroRows(Mat mat); - - /// Write files with information about the primal coarner nodes. - static void writePrimalFiles(PetscSolverFeti &feti); - }; - + * This class collects several static functions which may be used to debug + * FETI-DP solver. All functions should be used only in debug mode and + * never in productive runs as they may be arbitrarly slow. + * + * This class must be a friend class of \ref PetscSolverFeti as it must have + * access to all internal data. + */ + class PetscSolverFetiDebug + { + public: + /** \brief + * Is used to test the null space in stokes mode. The function reads the + * null space basis from FETI mat object and test by simple matrix + * multiplication, whether the vector is a member of the null space. + * Furthermore, the function creates the null space on the non reduced + * form of the FETI-DP system and make there the same test. The resulting + * test vector is also written to "nullspace.vtu" file. + * + * + * \param[in] feti FETI-DP solver + * \param[in] vec Is just used as a temporary template vector. + */ + static void debugNullSpace(PetscSolverFeti &feti, SystemVector &vec); + + /** \brief + * Creates a parallel distributed matrix of the local (B-index) matrices. + * Note that the matrix is still a block matrix and there are no off + * diagonal values. + * + * \param[in] feti FETI-DP solver + * \param[out] mat The parallel distributed matrix will be created + * on this variable. + */ + static void createInteriorMat(PetscSolverFeti &feti, Mat &mat); + + /** \brief + * Creates the non reduced FETI-DP system (also in stokes mode) as a + * nested matrix. + * + * \param[in] feti FETI-DP solver + * \param[out] mat The resulting nested matrix. + */ + static void createNestedFetiMat(PetscSolverFeti &feti, Mat &mat); + + /** \brief + * Creates the reduced FETI-DP operator in an explicitly given matrix + * form (also in stokes mode). The resulting matrix is dense. + * + * \param[in] feti FETI-DP solver + * \param[in] fetiMat Matrix object representing the implicit + * FETI-DP operator + * \param[out] explicitMat Explicit matrix formulation + * \param[out] nnzCounter Stores the number of non zero elements in the + * explicit matrix formulation + */ + static void createExplicitFetiMat(PetscSolverFeti &feti, + Mat fetiMat, + Mat &explicitmat, + int &nnzCounter); + + /** \brief + * Create a non nested parallel distributed vector from a nested vector of + * two parallel distributed vectors. Is used to change the structure of + * solution vectors in stokes mode, which always have two components. + * + * \param[in] feti FETI-DP solver + * \param[in] nestedVec Nested PETSc vector with two sub vectors. + * \param[out] explicitVec The output vector. + */ + static void createExplicitVec(PetscSolverFeti &feti, + Vec nestedVec, + Vec &explicitVec); + + /** \brief + * Checks for the init file parameter "parallel->debug->write fety system" + * and if it is true, writes the null space basis vector to the PETSc binary + * file "nullspace.vec". + * + * \param[in] feti FETI-DP solver + * \param[in] nullSpaceBasis Vector representing the basis of the null + * space of the FETI-DP system. + */ + static void writeNullSpace(PetscSolverFeti &feti, + Vec nullSpaceBasis); + + /** \brief + * Checks for the init file parameter "parallel->debug->write fety system" + * and if it is true, some debug test of the FETI-DP system are made: + * - symmetry test of the FETI-DP operator (by assembling it in an + * explicit formulation) + * - write explicit FETI-DP operator to "feti.mat" + * - write rhs to "feti_rhs.vec" + * + * \param[in] feti FETI-DP solver + * \param[in] dbgRhsVec Vector representing the rhs vector of the + * FETI-DP system. + */ + static void debugFeti(PetscSolverFeti &feti, + Vec dbgRhsVec); + + /** \brief + * This functions check a PETSc matrix for zero rows. Each zero row index + * is printed to the screen. + * + * \param[in] mat PETSc matrix which should be checked for zero rows. + * + * \return int Number of zero rows in matrix; + */ + static int testZeroRows(Mat mat); + + /// Write files with information about the primal coarner nodes. + static void writePrimalFiles(PetscSolverFeti &feti); + }; + } } #endif diff --git a/AMDiS/src/parallel/PetscSolverFetiMonitor.cc b/AMDiS/src/parallel/PetscSolverFetiMonitor.cc index 07ee4d7f..85333e6f 100644 --- a/AMDiS/src/parallel/PetscSolverFetiMonitor.cc +++ b/AMDiS/src/parallel/PetscSolverFetiMonitor.cc @@ -1,19 +1,28 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/PetscSolverFetiMonitor.h" #include "parallel/PetscSolverFetiStructs.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { PetscErrorCode KSPMonitorFetiStokes(KSP ksp, PetscInt n, PetscReal rnorm, void *data) { @@ -41,4 +50,4 @@ namespace AMDiS { return 0; } -} +} } diff --git a/AMDiS/src/parallel/PetscSolverFetiMonitor.h b/AMDiS/src/parallel/PetscSolverFetiMonitor.h index d3bb65aa..d32fab6e 100644 --- a/AMDiS/src/parallel/PetscSolverFetiMonitor.h +++ b/AMDiS/src/parallel/PetscSolverFetiMonitor.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -26,10 +28,10 @@ #include #include -namespace AMDiS { +namespace AMDiS { namespace Parallel { PetscErrorCode KSPMonitorFetiStokes(KSP ksp, PetscInt n, PetscReal rnorm, void *data); -} +} } #endif diff --git a/AMDiS/src/parallel/PetscSolverFetiOperators.cc b/AMDiS/src/parallel/PetscSolverFetiOperators.cc index e25f3e94..7afcb85b 100644 --- a/AMDiS/src/parallel/PetscSolverFetiOperators.cc +++ b/AMDiS/src/parallel/PetscSolverFetiOperators.cc @@ -1,19 +1,28 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/PetscSolverFetiOperators.h" #include "parallel/PetscSolverFetiStructs.h" #include "parallel/PetscSolverFetiTimings.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { void copyGlobalLocal(Vec globalB, Vec localB) { @@ -701,5 +710,4 @@ namespace AMDiS { return 0; } - -} +} } diff --git a/AMDiS/src/parallel/PetscSolverFetiOperators.h b/AMDiS/src/parallel/PetscSolverFetiOperators.h index d0932832..9cdf5267 100644 --- a/AMDiS/src/parallel/PetscSolverFetiOperators.h +++ b/AMDiS/src/parallel/PetscSolverFetiOperators.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -26,38 +28,41 @@ #include #include -namespace AMDiS { +namespace AMDiS +{ + namespace Parallel + { + void copyGlobalLocal(Vec globalB, Vec localB); - void copyGlobalLocal(Vec globalB, Vec localB); + /// + int petscMultMatSchurPrimal(Mat mat, Vec x, Vec y); - /// - int petscMultMatSchurPrimal(Mat mat, Vec x, Vec y); + /// + int petscMultMatSchurPrimalAugmented(Mat mat, Vec x, Vec y); - /// - int petscMultMatSchurPrimalAugmented(Mat mat, Vec x, Vec y); + /// FETI-DP operator + int petscMultMatFeti(Mat mat, Vec x, Vec y); - /// FETI-DP operator - int petscMultMatFeti(Mat mat, Vec x, Vec y); + /// Inexact FETI-DP operator + int petscMultMatFetiInexact(Mat mat, Vec x, Vec y); + + /// Inexact FETI-DP preconditioner + PetscErrorCode pcInexactFetiShell(PC pc, Vec x, Vec y); - /// Inexact FETI-DP operator - int petscMultMatFetiInexact(Mat mat, Vec x, Vec y); - - /// Inexact FETI-DP preconditioner - PetscErrorCode pcInexactFetiShell(PC pc, Vec x, Vec y); + /// FETI-DP operator with augmented Lagrange constraints + int petscMultMatFetiAugmented(Mat mat, Vec x, Vec y); - /// FETI-DP operator with augmented Lagrange constraints - int petscMultMatFetiAugmented(Mat mat, Vec x, Vec y); + /// FETI-DP operator used for Stokes like problems. + int petscMultMatFetiInterface(Mat mat, Vec x, Vec y); - /// FETI-DP operator used for Stokes like problems. - int petscMultMatFetiInterface(Mat mat, Vec x, Vec y); + /// y = PC * x + PetscErrorCode petscApplyFetiDirichletPrecon(PC pc, Vec x, Vec y); - /// y = PC * x - PetscErrorCode petscApplyFetiDirichletPrecon(PC pc, Vec x, Vec y); + /// y = PC * x + PetscErrorCode petscApplyFetiLumpedPrecon(PC pc, Vec x, Vec y); - /// y = PC * x - PetscErrorCode petscApplyFetiLumpedPrecon(PC pc, Vec x, Vec y); - - PetscErrorCode petscApplyFetiInterfaceLumpedPrecon(PC pc, Vec x, Vec y); + PetscErrorCode petscApplyFetiInterfaceLumpedPrecon(PC pc, Vec x, Vec y); + } } #endif diff --git a/AMDiS/src/parallel/PetscSolverFetiStructs.h b/AMDiS/src/parallel/PetscSolverFetiStructs.h index 811547f1..bffac62f 100644 --- a/AMDiS/src/parallel/PetscSolverFetiStructs.h +++ b/AMDiS/src/parallel/PetscSolverFetiStructs.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -26,176 +28,179 @@ #include #include "parallel/PetscSolver.h" -namespace AMDiS { +namespace AMDiS +{ + namespace Parallel + { - using namespace std; + using namespace std; - class PetscSolverFeti; + class PetscSolverFeti; - enum FetiSolverType { - // Standard exakt FETI-DP system - EXACT, - // Inexact FETI-DP - INEXACT, - // Inexact reduced FETI-DP - INEXACT_REDUCED - }; + enum FetiSolverType { + // Standard exakt FETI-DP system + EXACT, + // Inexact FETI-DP + INEXACT, + // Inexact reduced FETI-DP + INEXACT_REDUCED + }; - /** \brief - * This structure is used when defining the MatShell operation for solving - * primal schur complement. \ref petscMultMatSchurPrimal - */ - struct SchurPrimalData { - /// Temporal vector on the B variables. - Vec tmp_vec_b; + /** \brief + * This structure is used when defining the MatShell operation for solving + * primal schur complement. \ref petscMultMatSchurPrimal + */ + struct SchurPrimalData { + /// Temporal vector on the B variables. + Vec tmp_vec_b; - /// Temporal vecor in the primal variables. - Vec tmp_vec_primal; + /// Temporal vecor in the primal variables. + Vec tmp_vec_primal; - PetscSolver* subSolver; - }; + PetscSolver* subSolver; + }; - /** \brief - * - */ - struct SchurPrimalAugmentedData { - /// Temporal vectors on the B variables. - Vec tmp_vec_b0, tmp_vec_b1; + /** \brief + * + */ + struct SchurPrimalAugmentedData { + /// Temporal vectors on the B variables. + Vec tmp_vec_b0, tmp_vec_b1; - Vec tmp_vec_primal; + Vec tmp_vec_primal; - Vec tmp_vec_lagrange; + Vec tmp_vec_lagrange; - Mat *mat_lagrange; + Mat *mat_lagrange; - Mat *mat_augmented_lagrange; + Mat *mat_augmented_lagrange; - PetscSolver* subSolver; + PetscSolver* subSolver; - bool nestedVec; - }; + bool nestedVec; + }; - /** \brief - * This structure is used when defining the FETI-DP operator for solving - * the system matrix reduced to the Lagrange multipliers. - * \ref petscMultMatFeti - */ - struct FetiData { - /// Matrix of Lagrange variables. - Mat *mat_lagrange; + /** \brief + * This structure is used when defining the FETI-DP operator for solving + * the system matrix reduced to the Lagrange multipliers. + * \ref petscMultMatFeti + */ + struct FetiData { + /// Matrix of Lagrange variables. + Mat *mat_lagrange; - /// - Mat *mat_augmented_lagrange; + /// + Mat *mat_augmented_lagrange; - /// Temporal vectors on the B variables. - Vec tmp_vec_b0, tmp_vec_b1; + /// Temporal vectors on the B variables. + Vec tmp_vec_b0, tmp_vec_b1; - /// Temporal vector on the primal variables. - Vec tmp_vec_primal0, tmp_vec_primal1; + /// Temporal vector on the primal variables. + Vec tmp_vec_primal0, tmp_vec_primal1; - /// Temporal vector on the lagrange variables. - Vec tmp_vec_lagrange; + /// Temporal vector on the lagrange variables. + Vec tmp_vec_lagrange; - Vec tmp_vec_interface; + Vec tmp_vec_interface; - PetscSolver* subSolver; + PetscSolver* subSolver; - /// Pointer to the solver of the schur complement on the primal variables. - KSP *ksp_schur_primal; - }; + /// Pointer to the solver of the schur complement on the primal variables. + KSP *ksp_schur_primal; + }; - struct FetiInexactData { - Mat *matBB, *matBPi, *matPiB, *matPiPi; + struct FetiInexactData { + Mat *matBB, *matBPi, *matPiB, *matPiPi; - Mat *mat_lagrange; + Mat *mat_lagrange; - Vec tmp_vec_b0, tmp_vec_b1; - }; + Vec tmp_vec_b0, tmp_vec_b1; + }; - struct FetiInexactPreconData { - KSP ksp_schur; + struct FetiInexactPreconData { + KSP ksp_schur; - KSP ksp_interior; + KSP ksp_interior; - KSP ksp_pc_feti; + KSP ksp_pc_feti; - PC pc_feti; + PC pc_feti; - Mat *matPiB, *matBPi; + Mat *matPiB, *matBPi; - Mat *mat_lagrange; + Mat *mat_lagrange; - Vec tmp_vec_b0; - }; + Vec tmp_vec_b0; + }; - struct FetiDirichletPreconData { - /// Matrix of scaled Lagrange variables. - Mat *mat_lagrange_scaled; + struct FetiDirichletPreconData { + /// Matrix of scaled Lagrange variables. + Mat *mat_lagrange_scaled; - Mat *mat_interior_interior, *mat_duals_duals; + Mat *mat_interior_interior, *mat_duals_duals; - Mat *mat_interior_duals, *mat_duals_interior; + Mat *mat_interior_duals, *mat_duals_interior; - /// Pointer to the solver for \ref PetscSolverFeti::mat_bb. - KSP *ksp_interior; + /// Pointer to the solver for \ref PetscSolverFeti::mat_bb. + KSP *ksp_interior; - /// Temporal vector on the B variables. - Vec tmp_vec_b; + /// Temporal vector on the B variables. + Vec tmp_vec_b; - /// Temporal vector on the dual variables. - Vec tmp_vec_duals0, tmp_vec_duals1; - - /// Temporal vector on the interior variables. - Vec tmp_vec_interior; + /// Temporal vector on the dual variables. + Vec tmp_vec_duals0, tmp_vec_duals1; + + /// Temporal vector on the interior variables. + Vec tmp_vec_interior; - map localToDualMap; - }; + map localToDualMap; + }; - struct FetiLumpedPreconData { - /// Matrix of scaled Lagrange variables. - Mat *mat_lagrange_scaled; + struct FetiLumpedPreconData { + /// Matrix of scaled Lagrange variables. + Mat *mat_lagrange_scaled; - Mat *mat_duals_duals; + Mat *mat_duals_duals; - /// Temporal vector on the B variables. - Vec tmp_vec_b0; + /// Temporal vector on the B variables. + Vec tmp_vec_b0; - /// Temporal vector on the dual variables. - Vec tmp_vec_duals0, tmp_vec_duals1; + /// Temporal vector on the dual variables. + Vec tmp_vec_duals0, tmp_vec_duals1; - map localToDualMap; - }; + map localToDualMap; + }; - struct FetiInterfaceLumpedPreconData : public FetiLumpedPreconData { - /// Temporal vectors on the B variables. - Vec tmp_vec_b1; + struct FetiInterfaceLumpedPreconData : public FetiLumpedPreconData { + /// Temporal vectors on the B variables. + Vec tmp_vec_b1; - PetscSolver* subSolver; + PetscSolver* subSolver; - Vec tmp_primal; + Vec tmp_primal; - KSP ksp_mass; - }; + KSP ksp_mass; + }; - struct FetiKspData { - Vec draft; - }; - - typedef enum { - FETI_NONE = 0, - FETI_DIRICHLET = 1, - FETI_LUMPED = 2 - } FetiPreconditioner; + struct FetiKspData { + Vec draft; + }; + typedef enum { + FETI_NONE = 0, + FETI_DIRICHLET = 1, + FETI_LUMPED = 2 + } FetiPreconditioner; + } } #endif diff --git a/AMDiS/src/parallel/PetscSolverFetiTimings.cc b/AMDiS/src/parallel/PetscSolverFetiTimings.cc index 5e1496c0..0489d8e6 100644 --- a/AMDiS/src/parallel/PetscSolverFetiTimings.cc +++ b/AMDiS/src/parallel/PetscSolverFetiTimings.cc @@ -1,18 +1,27 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/PetscSolverFetiTimings.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { double FetiTimings::fetiSolve = 0.0; double FetiTimings::fetiSolve01 = 0.0; @@ -28,4 +37,4 @@ namespace AMDiS { fetiPreconditioner = 0.0; } -} +} } diff --git a/AMDiS/src/parallel/PetscSolverFetiTimings.h b/AMDiS/src/parallel/PetscSolverFetiTimings.h index 8f1b339d..79966558 100644 --- a/AMDiS/src/parallel/PetscSolverFetiTimings.h +++ b/AMDiS/src/parallel/PetscSolverFetiTimings.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -24,23 +26,27 @@ #ifndef AMDIS_PETSC_SOLVER_FETI_TIMINGS_H #define AMDIS_PETSC_SOLVER_FETI_TIMINGS_H -namespace AMDiS { +namespace AMDiS +{ + namespace Parallel + { - class FetiTimings { - private: - FetiTimings() {} + class FetiTimings { + private: + FetiTimings() {} - public: - static void reset(); + public: + static void reset(); - public: - static double fetiSolve; - static double fetiSolve01; - static double fetiSolve02; + public: + static double fetiSolve; + static double fetiSolve01; + static double fetiSolve02; - static double fetiPreconditioner; - }; - -} + static double fetiPreconditioner; + }; + + } // end namespace Parallel +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.cc b/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.cc index bdc6cd52..81bdf891 100644 --- a/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.cc +++ b/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.cc @@ -1,20 +1,29 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/PetscSolverGlobalBlockMatrix.h" #include "parallel/StdMpi.h" #include "parallel/MpiHelper.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { void PetscSolverGlobalBlockMatrix::fillPetscMatrix(Matrix *seqMat) { @@ -279,7 +288,7 @@ namespace AMDiS { cend = end(seqMat->getBaseMatrix()); cursor != cend; ++cursor) { // Global index of the current row DOF. - int rowIndex = (*interiorMap)[feSpace][*cursor].global + dispRowIndex; + int rowIndex = (*interiorMap)[feSpace][cursor.value()].global + dispRowIndex; cols.clear(); values.clear(); @@ -321,4 +330,4 @@ namespace AMDiS { } } -} +} } // end namespace Parallel, AMDiS diff --git a/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.h b/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.h index 08267089..28fc2f04 100644 --- a/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.h +++ b/AMDiS/src/parallel/PetscSolverGlobalBlockMatrix.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -26,78 +28,86 @@ #include "AMDiS_fwd.h" #include "parallel/PetscSolver.h" -namespace AMDiS { - - using namespace std; +namespace AMDiS +{ + namespace Parallel + { + using namespace std; - class PetscSolverGlobalBlockMatrix : public PetscSolver - { - public: - /// Creator class - class Creator : public OEMSolverCreator + /** \ingroup Solver + * + * \brief + * PETSc solver which creates a globally distributed (nested) matrix. + */ + class PetscSolverGlobalBlockMatrix : public PetscSolver { public: - virtual ~Creator() {} + /// Creator class + class Creator : public LinearSolverCreator + { + public: + virtual ~Creator() {} - /// Returns a new PetscSolver object. - OEMSolver* create() - { - return new PetscSolverGlobalBlockMatrix(this->name); - } - }; - - PetscSolverGlobalBlockMatrix(string name) - : PetscSolver(name), - nComponents(0), - nBlocks(-1) - {} + /// Returns a new PetscSolver object. + LinearSolver* create() + { + return new PetscSolverGlobalBlockMatrix(this->name); + } + }; + + PetscSolverGlobalBlockMatrix(string name) + : PetscSolver(name), + nComponents(0), + nBlocks(-1) + {} - void fillPetscMatrix(Matrix *mat); + void fillPetscMatrix(Matrix *mat); - void fillPetscRhs(SystemVector *vec); + void fillPetscRhs(SystemVector *vec); - void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); + void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); - void destroyMatrixData(); + void destroyMatrixData(); - void destroyVectorData(); + void destroyVectorData(); - protected: - /// Takes a DOF matrix and sends the values to the global PETSc matrix. - void setDofMatrix(Mat& petscMat, DOFMatrix* mat, - int dispRowBlock, int dispColBlock); + protected: + /// Takes a DOF matrix and sends the values to the global PETSc matrix. + void setDofMatrix(Mat& petscMat, DOFMatrix* mat, + int dispRowBlock, int dispColBlock); - /// Takes a DOF vector and sends its values to a given PETSc vector. - void setDofVector(Vec& petscVec, DOFVector* vec); + /// Takes a DOF vector and sends its values to a given PETSc vector. + void setDofVector(Vec& petscVec, DOFVector* vec); - virtual void initSolver(KSP &ksp); - - virtual void exitSolver(KSP ksp); + virtual void initSolver(KSP &ksp); + + virtual void exitSolver(KSP ksp); - virtual void initPreconditioner(PC pc); + virtual void initPreconditioner(PC pc); - virtual void exitPreconditioner(PC pc); - - protected: - vector nestMat; + virtual void exitPreconditioner(PC pc); + + protected: + vector nestMat; - vector nestVec; + vector nestVec; - Vec petscSolVec; + Vec petscSolVec; - /// Number of components (= number of unknowns in the PDE) - int nComponents; + /// Number of components (= number of unknowns in the PDE) + int nComponents; - /// Number of blocks for the solver, must be 1 <= nBlocks <= nComponents - int nBlocks; + /// Number of blocks for the solver, must be 1 <= nBlocks <= nComponents + int nBlocks; - /// Maps to each component number the block number the component is in. - map componentInBlock; - }; + /// Maps to each component number the block number the component is in. + map componentInBlock; + }; + } // end namespace Parallel -} +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/PetscSolverGlobalMatrix.cc b/AMDiS/src/parallel/PetscSolverGlobalMatrix.cc index 18245634..92216eb5 100644 --- a/AMDiS/src/parallel/PetscSolverGlobalMatrix.cc +++ b/AMDiS/src/parallel/PetscSolverGlobalMatrix.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include #include "DirichletBC.h" @@ -15,16 +24,62 @@ #include "parallel/PetscSolverGlobalMatrix.h" #include "parallel/StdMpi.h" #include "parallel/MpiHelper.h" +#include "solver/PetscTypes.h" -namespace AMDiS { - +namespace AMDiS { namespace Parallel { PetscSolverGlobalMatrix::PetscSolverGlobalMatrix(string name) : PetscSolver(name), zeroStartVector(false), printMatInfo(false) { - Parameters::get("parallel->use zero start vector", zeroStartVector); + PetscParameters params; + bool matSolverPackage = false; + + // set the solver + std::string solverName = "petsc"; + Parameters::get(name, solverName); + if (solverName == "petsc") + Parameters::get(name + "->ksp_type", solverName); + + std::string kspSolver = params.solverMap[solverName]; + + if (params.matSolverPackage[kspSolver]) { + // direct solvers + PetscOptionsInsertString(("-" + kspPrefix + "ksp_type preonly").c_str()); + PetscOptionsInsertString(("-" + kspPrefix + "pc_type lu").c_str()); + PetscOptionsInsertString(("-" + kspPrefix + "pc_factor_mat_solver_package " + (kspSolver != "direct" ? kspSolver : "mumps")).c_str()); + setMaxIterations(1); + zeroStartVector = true; + matSolverPackage = true; + } else if (!params.emptyParam[kspSolver]) { + // other solvers + PetscOptionsInsertString(("-" + kspPrefix + "ksp_type " + kspSolver).c_str()); + } + + + // set the preconditioner + string precon = ""; + Parameters::get(name + "->pc_type", precon); + if (!precon.size()) + Parameters::get(name + "->left precon", precon); + if (!matSolverPackage && !params.emptyParam[precon]) { + precon = (params.preconMap.find(precon) != params.preconMap.end() ? params.preconMap[precon] : precon); + PetscOptionsInsertString(("-" + kspPrefix + "pc_type " + precon).c_str()); + } + + PetscOptionsInsertString(("-" + kspPrefix + "ksp_max_it " + boost::lexical_cast(getMaxIterations())).c_str()); + PetscOptionsInsertString(("-" + kspPrefix + "ksp_rtol " + boost::lexical_cast(getRelative())).c_str()); + PetscOptionsInsertString(("-" + kspPrefix + "ksp_atol " + boost::lexical_cast(getTolerance())).c_str()); + + if (getInfo() >= 20) + PetscOptionsInsertString(("-" + kspPrefix + "ksp_monitor_true_residual").c_str()); + else if (getInfo() >= 10) + PetscOptionsInsertString(("-" + kspPrefix + "ksp_monitor").c_str()); + + if (!matSolverPackage) { + Parameters::get("parallel->use zero start vector", zeroStartVector); + } Parameters::get("parallel->print matrix info", printMatInfo); } @@ -154,13 +209,13 @@ namespace AMDiS { for (cursor_type cursor = begin(dofMat->getBaseMatrix()), cend = end(dofMat->getBaseMatrix()); cursor != cend; ++cursor) { - bool isRowCoarse = isCoarseSpace(rowComponent, *cursor); + bool isRowCoarse = isCoarseSpace(rowComponent, cursor.value()); // For the case, this is a dirichlet row we have to check whether the // rank is also owner of this row DOF. - if (dirichletRows.count(*cursor)) { - if ((!isRowCoarse && !(*interiorMap)[rowComponent].isRankDof(*cursor)) || - (isRowCoarse && !(*rowCoarseSpace)[rowComponent].isRankDof(*cursor))) + if (dirichletRows.count(cursor.value())) { + if ((!isRowCoarse && !(*interiorMap)[rowComponent].isRankDof(cursor.value())) || + (isRowCoarse && !(*rowCoarseSpace)[rowComponent].isRankDof(cursor.value()))) continue; } @@ -195,7 +250,7 @@ namespace AMDiS { for (unsigned int i = 0; i < cols.size(); i++) cols[i] = colCoarseSpace->getMatIndex(colComponent, cols[i]); - int rowIndex = rowCoarseSpace->getMatIndex(rowComponent, *cursor); + int rowIndex = rowCoarseSpace->getMatIndex(rowComponent, cursor.value()); MatSetValues(getMatCoarseByComponent(rowComponent, colComponent), 1, &rowIndex, cols.size(), &(cols[0]), &(values[0]), ADD_VALUES); @@ -211,13 +266,13 @@ namespace AMDiS { &(colsOther[0]), &(valuesOther[0]), ADD_VALUES); } } else { - if ((*interiorMap)[rowComponent].isSet(*cursor) == false) + if ((*interiorMap)[rowComponent].isSet(cursor.value()) == false) continue; int localRowIndex = (localMatrix ? - interiorMap->getLocalMatIndex(rowComponent, *cursor) : - interiorMap->getMatIndex(rowComponent, *cursor)); + interiorMap->getLocalMatIndex(rowComponent, cursor.value()) : + interiorMap->getMatIndex(rowComponent, cursor.value())); for (unsigned int i = 0; i < cols.size(); i++) { if (localMatrix) @@ -231,7 +286,7 @@ namespace AMDiS { if (colsOther.size()) { int globalRowIndex = - interiorMap->getMatIndex(rowComponent, *cursor) + rStartInterior; + interiorMap->getMatIndex(rowComponent, cursor.value()) + rStartInterior; for (unsigned int i = 0; i < colsOther.size(); i++) colsOther[i] = @@ -416,9 +471,9 @@ namespace AMDiS { Vec tmp; if (domainComm.Get_size() == 1) - interiorMap->createLocalVec(tmp); + createLocalVec(*interiorMap, tmp); else - interiorMap->createVec(tmp); + createVec(*interiorMap, tmp); PetscScalar *tmpValues, *rhsValues; VecGetArray(tmp, &tmpValues); @@ -611,7 +666,7 @@ namespace AMDiS { cend = end(seqMat->getBaseMatrix()); cursor != cend; ++cursor) { // Global index of the current row DOF. MultiIndex rowMultiIndex; - if ((*interiorMap)[rowComp].find(*cursor, rowMultiIndex) == false) + if ((*interiorMap)[rowComp].find(cursor.value(), rowMultiIndex) == false) continue; int globalRowDof = rowMultiIndex.global; @@ -620,7 +675,7 @@ namespace AMDiS { bool periodicRow = perMap.isPeriodic(rowFe, globalRowDof); // Dirichlet rows can be set only be the owner ranks. - if (dirichletRows.count(*cursor) && !((*interiorMap)[rowComp].isRankDof(*cursor))) + if (dirichletRows.count(cursor.value()) && !((*interiorMap)[rowComp].isRankDof(cursor.value()))) continue; if (!periodicRow) { @@ -896,4 +951,4 @@ namespace AMDiS { MatNullSpaceDestroy(&matNullSpace); } -} +} } // end namespace Parallel, AMDiS diff --git a/AMDiS/src/parallel/PetscSolverGlobalMatrix.h b/AMDiS/src/parallel/PetscSolverGlobalMatrix.h index dfde6305..e9b6c86b 100644 --- a/AMDiS/src/parallel/PetscSolverGlobalMatrix.h +++ b/AMDiS/src/parallel/PetscSolverGlobalMatrix.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -27,132 +29,138 @@ #include "AMDiS_fwd.h" #include "parallel/PetscSolver.h" -namespace AMDiS { - - using namespace std; - - /** - * PETSc solver which creates a globally distributed matrix. Supports also - * coarse space assembling. - */ - class PetscSolverGlobalMatrix : public PetscSolver +namespace AMDiS +{ + namespace Parallel { - public: - /// Creator class - class Creator : public OEMSolverCreator - { - public: - virtual ~Creator() {} - - /// Returns a new PetscSolver object. - OEMSolver* create() - { - return new PetscSolverGlobalMatrix(this->name); - } - }; - - PetscSolverGlobalMatrix(string name); - - void fillPetscMatrix(Matrix *mat); - - void fillPetscMatrixWithCoarseSpace(Matrix *mat); - - void fillPetscRhs(SystemVector *vec); - - void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); - - void solveGlobal(Vec &rhs, Vec &sol); - - void extractVectorComponent(Vec input, int i, Vec *output, int numberOfComponents=1); - - void extractMatrixComponent(Mat input, int startRow, int numberOfRows, int startCol, int numberOfCols, Mat *output); - - void destroyMatrixData(); - void destroyVectorData(); + using namespace std; - protected: - void removeDirichletRows(Matrix *seqMat); - - void removeDirichletRows(SystemVector *seqVec); - - /// Reads field split information and creats a splitting based on - /// component numbers. - void createFieldSplit(PC pc); - - /** \brief - * Creates a new field split for a preconditioner object. - * - * \param[in] pc PETSc preconditioner object, must be of - * type PCFIELDSPLIT - * \param[in] splitName Name of the field split, can be used to set other - * parameters of the PCFIELDSPLIT preconditioner on - * the command line. - * \param[in] components System component numbers of the field split. At - * the moment only continuous splits are allowed. + /** \ingroup Solver + * + * \brief + * PETSc solver which creates a globally distributed matrix. Supports also + * coarse space assembling. */ - void createFieldSplit(PC pc, const char* splitName, vector &components); - - /// Wrapper to create field split from only one component. - void createFieldSplit(PC pc, const char* splitName, int component) + class PetscSolverGlobalMatrix : public PetscSolver { - vector components; - components.push_back(component); - createFieldSplit(pc, splitName, components); - } - - - - virtual void initSolver(KSP &ksp); + public: + /// Creator class + class Creator : public LinearSolverCreator + { + public: + virtual ~Creator() {} + + /// Returns a new PetscSolver object. + LinearSolver* create() + { + return new PetscSolverGlobalMatrix(this->name); + } + }; + + PetscSolverGlobalMatrix(string name); + + void fillPetscMatrix(Matrix *mat); + + void fillPetscMatrixWithCoarseSpace(Matrix *mat); + + void fillPetscRhs(SystemVector *vec); + + void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); + + void solveGlobal(Vec &rhs, Vec &sol); + + void extractVectorComponent(Vec input, int i, Vec *output, int numberOfComponents=1); + + void extractMatrixComponent(Mat input, int startRow, int numberOfRows, int startCol, int numberOfCols, Mat *output); + + void destroyMatrixData(); + + void destroyVectorData(); + + protected: + void removeDirichletRows(Matrix *seqMat); + + void removeDirichletRows(SystemVector *seqVec); + + /// Reads field split information and creats a splitting based on + /// component numbers. + void createFieldSplit(PC pc); + + /** \brief + * Creates a new field split for a preconditioner object. + * + * \param[in] pc PETSc preconditioner object, must be of + * type PCFIELDSPLIT + * \param[in] splitName Name of the field split, can be used to set other + * parameters of the PCFIELDSPLIT preconditioner on + * the command line. + * \param[in] components System component numbers of the field split. At + * the moment only continuous splits are allowed. + */ + void createFieldSplit(PC pc, const char* splitName, vector &components); + + /// Wrapper to create field split from only one component. + void createFieldSplit(PC pc, const char* splitName, int component) + { + vector components; + components.push_back(component); + createFieldSplit(pc, splitName, components); + } + + - virtual void exitSolver(KSP &ksp); + virtual void initSolver(KSP &ksp); - virtual void initPreconditioner(PC pc); + virtual void exitSolver(KSP &ksp); - virtual void exitPreconditioner(PC pc); + virtual void initPreconditioner(PC pc); - /// Takes a DOF matrix and sends the values to the global PETSc matrix. - void setDofMatrix(DOFMatrix* mat, int rowComp = 0, int colComp = 0); + virtual void exitPreconditioner(PC pc); - /// Takes a DOF vector and sends its values to a given PETSc vector. - void setDofVector(Vec vecInterior, - Vec vecCoarse, - DOFVector* vec, - int rowCompxo, - bool rankOnly = false); + /// Takes a DOF matrix and sends the values to the global PETSc matrix. + void setDofMatrix(DOFMatrix* mat, int rowComp = 0, int colComp = 0); - inline void setDofVector(Vec vecInterior, - DOFVector* vec, - int rowComp, - bool rankOnly = false) - { - setDofVector(vecInterior, PETSC_NULL, vec, rowComp, rankOnly); - } + /// Takes a DOF vector and sends its values to a given PETSc vector. + void setDofVector(Vec vecInterior, + Vec vecCoarse, + DOFVector* vec, + int rowCompxo, + bool rankOnly = false); - inline void setDofVector(Vec vecInterior, - SystemVector &vec, - bool rankOnly = false) - { - for (int i = 0; i < vec.getSize(); i++) - setDofVector(vecInterior, PETSC_NULL, vec.getDOFVector(i), i, rankOnly); - } + inline void setDofVector(Vec vecInterior, + DOFVector* vec, + int rowComp, + bool rankOnly = false) + { + setDofVector(vecInterior, PETSC_NULL, vec, rowComp, rankOnly); + } - PetscSolver* createSubSolver(int component, string kspPrefix); + inline void setDofVector(Vec vecInterior, + SystemVector &vec, + bool rankOnly = false) + { + for (int i = 0; i < vec.getSize(); i++) + setDofVector(vecInterior, PETSC_NULL, vec.getDOFVector(i), i, rankOnly); + } - void setConstantNullSpace(KSP ksp, int constFeSpace, bool test = false); + PetscSolver* createSubSolver(int component, string kspPrefix); - void setConstantNullSpace(KSP ksp); + void setConstantNullSpace(KSP ksp, int constFeSpace, bool test = false); - protected: - bool zeroStartVector; + void setConstantNullSpace(KSP ksp); - /// If true, after parallel assembling, information about the matrix - /// are printed. - bool printMatInfo; - }; + protected: + bool zeroStartVector; + /// If true, after parallel assembling, information about the matrix + /// are printed. + bool printMatInfo; + }; -} + } // end namespace Parallel + +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/PetscSolverNSCH.cc b/AMDiS/src/parallel/PetscSolverNSCH.cc index 607b24e0..b3549fa3 100644 --- a/AMDiS/src/parallel/PetscSolverNSCH.cc +++ b/AMDiS/src/parallel/PetscSolverNSCH.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -18,7 +27,7 @@ -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -441,5 +450,5 @@ namespace AMDiS { delete densityFunctionTau; delete viscosityFunction; } - } + } } diff --git a/AMDiS/src/parallel/PetscSolverNSCH.h b/AMDiS/src/parallel/PetscSolverNSCH.h index 31187869..109b884d 100644 --- a/AMDiS/src/parallel/PetscSolverNSCH.h +++ b/AMDiS/src/parallel/PetscSolverNSCH.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -22,7 +24,7 @@ #include "parallel/PetscSolverGlobalMatrix.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -146,13 +148,13 @@ namespace AMDiS { - class Creator : public OEMSolverCreator + class Creator : public LinearSolverCreator { public: virtual ~Creator() {} /// Returns a new PetscSolver object. - OEMSolver* create() + LinearSolver* create() { return new PetscSolverNSCH(this->name); } @@ -240,5 +242,5 @@ namespace AMDiS { }; -} +} } diff --git a/AMDiS/src/parallel/PetscSolverNavierStokes.cc b/AMDiS/src/parallel/PetscSolverNavierStokes.cc index 904fcef9..16c9459c 100644 --- a/AMDiS/src/parallel/PetscSolverNavierStokes.cc +++ b/AMDiS/src/parallel/PetscSolverNavierStokes.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -15,7 +24,7 @@ #include "parallel/PetscHelper.h" #include "TransformDOF.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -371,4 +380,4 @@ namespace AMDiS { delete conDifMatrixSolver; conDifMatrixSolver = NULL; } -} +} } diff --git a/AMDiS/src/parallel/PetscSolverNavierStokes.h b/AMDiS/src/parallel/PetscSolverNavierStokes.h index a43c9732..c5dcb174 100644 --- a/AMDiS/src/parallel/PetscSolverNavierStokes.h +++ b/AMDiS/src/parallel/PetscSolverNavierStokes.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -25,7 +27,7 @@ #include "parallel/PetscSolverGlobalMatrix.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -146,13 +148,13 @@ namespace AMDiS { public: /// Creator class - class Creator : public OEMSolverCreator + class Creator : public LinearSolverCreator { public: virtual ~Creator() {} /// Returns a new PetscSolver object. - OEMSolver* create() + LinearSolver* create() { return new PetscSolverNavierStokes(this->name); } @@ -224,6 +226,6 @@ namespace AMDiS { IdFct idFct; }; -} +} } #endif diff --git a/AMDiS/src/parallel/PetscSolverSchur.cc b/AMDiS/src/parallel/PetscSolverSchur.cc index 260179b6..ff16d084 100644 --- a/AMDiS/src/parallel/PetscSolverSchur.cc +++ b/AMDiS/src/parallel/PetscSolverSchur.cc @@ -1,20 +1,29 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "parallel/PetscSolverSchur.h" #include "parallel/StdMpi.h" #include "parallel/MpiHelper.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -367,7 +376,7 @@ namespace AMDiS { cend = end(seqMat->getBaseMatrix()); cursor != cend; ++cursor) { // Global index of the current row DOF. - int globalRowDof = (*interiorMap)[feSpace][*cursor].global; + int globalRowDof = (*interiorMap)[feSpace][cursor.value()].global; colsBoundary.clear(); colsInterior.clear(); @@ -464,4 +473,4 @@ namespace AMDiS { } } -} +} } // end namespace Parallel, AMDiS diff --git a/AMDiS/src/parallel/PetscSolverSchur.h b/AMDiS/src/parallel/PetscSolverSchur.h index 61a1c52c..673c43fc 100644 --- a/AMDiS/src/parallel/PetscSolverSchur.h +++ b/AMDiS/src/parallel/PetscSolverSchur.h @@ -1,21 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. - +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ /** \file PetscSolverSchur.h */ @@ -25,89 +26,99 @@ #ifndef AMDIS_PETSC_SOLVER_SCHUR_H #define AMDIS_PETSC_SOLVER_SCHUR_H -namespace AMDiS { +namespace AMDiS +{ + namespace Parallel + { - using namespace std; + using namespace std; - class PetscSolverSchur : public PetscSolver - { - public: - /// Creator class - class Creator : public OEMSolverCreator + /** \ingroup Solver + * + * \brief + * PETSc solver using fieldsplit + */ + class PetscSolverSchur : public PetscSolver { public: - virtual ~Creator() {} - - /// Returns a new PetscSolver object. - OEMSolver* create() - { - return new PetscSolverSchur(this->name); + /// Creator class + class Creator : public LinearSolverCreator + { + public: + virtual ~Creator() {} + + /// Returns a new PetscSolver object. + LinearSolver* create() + { + return new PetscSolverSchur(this->name); + } + }; + + PetscSolverSchur(string name) + : PetscSolver(name) + {} + + void fillPetscMatrix(Matrix *mat); + + void fillPetscRhs(SystemVector *vec); + + void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); + + void destroyMatrixData() + {} + + void destroyVectorData() + {} + + Flag getBoundaryDofRequirement() + { + return + MeshDistributor::BOUNDARY_SUBOBJ_SORTED | + MeshDistributor::BOUNDARY_FILL_INFO_SEND_DOFS; } - }; - - PetscSolverSchur(string name) - : PetscSolver(name) - {} - - void fillPetscMatrix(Matrix *mat); - - void fillPetscRhs(SystemVector *vec); + + protected: + void updateDofData(int nComponents); - void solvePetscMatrix(SystemVector &vec, AdaptInfo *adaptInfo); + /// Takes a DOF matrix and sends the values to the global PETSc matrix. + void setDofMatrix(DOFMatrix* mat, int dispMult = 1, + int dispAddRow = 0, int dispAddCol = 0); - void destroyMatrixData() - {} + /// Takes a DOF vector and sends its values to a given PETSc vector. + void setDofVector(Vec& petscVec, DOFVector* vec, + int disMult = 1, int dispAdd = 0, bool rankOnly = false); - void destroyVectorData() - {} + protected: + int nBoundaryDofs; - Flag getBoundaryDofRequirement() - { - return - MeshDistributor::BOUNDARY_SUBOBJ_SORTED | - MeshDistributor::BOUNDARY_FILL_INFO_SEND_DOFS; - } - - protected: - void updateDofData(int nComponents); - - /// Takes a DOF matrix and sends the values to the global PETSc matrix. - void setDofMatrix(DOFMatrix* mat, int dispMult = 1, - int dispAddRow = 0, int dispAddCol = 0); - - /// Takes a DOF vector and sends its values to a given PETSc vector. - void setDofVector(Vec& petscVec, DOFVector* vec, - int disMult = 1, int dispAdd = 0, bool rankOnly = false); + int rStartBoundaryDofs; - protected: - int nBoundaryDofs; + int nOverallBoundaryDofs; - int rStartBoundaryDofs; + std::set boundaryDofs; - int nOverallBoundaryDofs; + map mapGlobalBoundaryDof; - std::set boundaryDofs; + int nInteriorDofs; - map mapGlobalBoundaryDof; + int rStartInteriorDofs; - int nInteriorDofs; + int nOverallInteriorDofs; - int rStartInteriorDofs; + std::set interiorDofs; - int nOverallInteriorDofs; + map mapGlobalInteriorDof; - std::set interiorDofs; + Mat matA11, matA12, matA21, matA22; - map mapGlobalInteriorDof; + IS interiorIs, boundaryIs; - Mat matA11, matA12, matA21, matA22; - - IS interiorIs, boundaryIs; - - Vec petscSolVec; - }; + Vec petscSolVec; + }; + + } // end namespace Parallel -} +} // end namespace AMDiS #endif diff --git a/AMDiS/src/parallel/SimplePartitioner.h b/AMDiS/src/parallel/SimplePartitioner.h index 43387178..c610c242 100644 --- a/AMDiS/src/parallel/SimplePartitioner.h +++ b/AMDiS/src/parallel/SimplePartitioner.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -27,7 +29,7 @@ #include "Global.h" #include "parallel/MeshPartitioner.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { /** * The "Simple partitioner" does not change the initial partitioning which is more @@ -57,6 +59,6 @@ namespace AMDiS { pMap = partitionMap; } }; -} +} } #endif diff --git a/AMDiS/src/parallel/StdMpi.cc b/AMDiS/src/parallel/StdMpi.cc index 97d13fb4..b721fac0 100644 --- a/AMDiS/src/parallel/StdMpi.cc +++ b/AMDiS/src/parallel/StdMpi.cc @@ -1,18 +1,27 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "StdMpi.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { MPI_Datatype StdMpiHelper::mpiDataType = MPI_INT; MPI_Datatype StdMpiHelper >::mpiDataType = MPI_INT; @@ -26,6 +35,7 @@ namespace AMDiS { MPI_Datatype StdMpiHelper > >::mpiDataType = MPI_INT; MPI_Datatype StdMpiHelper > >::mpiDataType = MPI_DOUBLE; MPI_Datatype StdMpiHelper, int> >::mpiDataType = MPI_DOUBLE; + MPI_Datatype StdMpiHelper > >::mpiDataType = MPI_DOUBLE; MPI_Datatype StdMpiHelper > > >::mpiDataType = MPI_DOUBLE; // T = int @@ -465,6 +475,44 @@ namespace AMDiS { } } + // T = map, int> + + int StdMpiHelper > >::getBufferSize(map > &data) + { + return data.size() * (Global::getGeo(WORLD) + 1); + } + + void StdMpiHelper > >::createBuffer(map > &data, double* buf) + { + int i = 0; + for (map >::iterator it = data.begin(); + it != data.end(); ++it) { + for (int j = 0; j < Global::getGeo(WORLD); j++) + buf[i++] = it->second[j]; + buf[i++] = static_cast(it->first); + } + } + + void StdMpiHelper > >::makeFromBuffer(map > &data, double* buf, int bufSize) + { + if (bufSize == 0) + return; + + int oneEntrySize = Global::getGeo(WORLD) + 1; + int nEntry = bufSize / oneEntrySize; + + TEST_EXIT(bufSize % oneEntrySize == 0)("This should not happen!\n"); + + data.clear(); + int i = 0; + WorldVector coords; + + for (int j = 0; j < nEntry; j++) { + for (int k = 0; k < Global::getGeo(WORLD); k++) + coords[k] = buf[i++]; + data[static_cast(buf[i++])] = coords; + } + } // T = vector > > @@ -509,4 +557,4 @@ namespace AMDiS { TEST_EXIT_DBG(counter == bufSize)("There is something very wrong!\n"); } -} +} } diff --git a/AMDiS/src/parallel/StdMpi.h b/AMDiS/src/parallel/StdMpi.h index 0a48e987..dcce5317 100644 --- a/AMDiS/src/parallel/StdMpi.h +++ b/AMDiS/src/parallel/StdMpi.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -29,7 +31,7 @@ #include "MeshStructure.h" #include "parallel/InteriorBoundary.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -226,6 +228,18 @@ namespace AMDiS { static void makeFromBuffer(map, int> &data, double* buf, int bufSize); }; + template<> + struct StdMpiHelper > > { + static MPI_Datatype mpiDataType; + + typedef double cppDataType; + + static int getBufferSize(map > &data); + + static void createBuffer(map > &data, double* buf); + + static void makeFromBuffer(map > &data, double* buf, int bufSize); + }; @@ -560,6 +574,6 @@ namespace AMDiS { static int ccc; }; -} +} } #endif diff --git a/AMDiS/src/parallel/ZoltanPartitioner.cc b/AMDiS/src/parallel/ZoltanPartitioner.cc index 214780fc..e57a07dd 100644 --- a/AMDiS/src/parallel/ZoltanPartitioner.cc +++ b/AMDiS/src/parallel/ZoltanPartitioner.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #ifdef HAVE_ZOLTAN @@ -16,7 +25,7 @@ #include "Traverse.h" #include "ElInfo.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { ZoltanPartitioner::ZoltanPartitioner(string name, MPI::Intracomm *comm) @@ -544,6 +553,6 @@ namespace AMDiS { } -} +} } #endif diff --git a/AMDiS/src/parallel/ZoltanPartitioner.h b/AMDiS/src/parallel/ZoltanPartitioner.h index fa1ecbff..cd23171c 100644 --- a/AMDiS/src/parallel/ZoltanPartitioner.h +++ b/AMDiS/src/parallel/ZoltanPartitioner.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ @@ -30,7 +32,7 @@ #include "AMDiS_fwd.h" #include "parallel/MeshPartitioner.h" -namespace AMDiS { +namespace AMDiS { namespace Parallel { using namespace std; @@ -163,7 +165,7 @@ namespace AMDiS { }; -} +} } #endif // HAVE_ZOLTAN diff --git a/AMDiS/src/reinit/BoundaryElementDist.cc b/AMDiS/src/reinit/BoundaryElementDist.cc index 719a5d1e..19d2b128 100644 --- a/AMDiS/src/reinit/BoundaryElementDist.cc +++ b/AMDiS/src/reinit/BoundaryElementDist.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BoundaryElementDist.h" diff --git a/AMDiS/src/reinit/BoundaryElementDist.h b/AMDiS/src/reinit/BoundaryElementDist.h index 1ffa2d7b..14adc18a 100644 --- a/AMDiS/src/reinit/BoundaryElementDist.h +++ b/AMDiS/src/reinit/BoundaryElementDist.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/BoundaryElementEdgeDist.cc b/AMDiS/src/reinit/BoundaryElementEdgeDist.cc index e3715ac9..a37fd813 100644 --- a/AMDiS/src/reinit/BoundaryElementEdgeDist.cc +++ b/AMDiS/src/reinit/BoundaryElementEdgeDist.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BoundaryElementEdgeDist.h" diff --git a/AMDiS/src/reinit/BoundaryElementEdgeDist.h b/AMDiS/src/reinit/BoundaryElementEdgeDist.h index d5ae1274..21dda47b 100644 --- a/AMDiS/src/reinit/BoundaryElementEdgeDist.h +++ b/AMDiS/src/reinit/BoundaryElementEdgeDist.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/BoundaryElementLevelSetDist.cc b/AMDiS/src/reinit/BoundaryElementLevelSetDist.cc index 454c0e1f..a7ffca89 100644 --- a/AMDiS/src/reinit/BoundaryElementLevelSetDist.cc +++ b/AMDiS/src/reinit/BoundaryElementLevelSetDist.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BoundaryElementLevelSetDist.h" diff --git a/AMDiS/src/reinit/BoundaryElementLevelSetDist.h b/AMDiS/src/reinit/BoundaryElementLevelSetDist.h index 4a957de6..20e0c10f 100644 --- a/AMDiS/src/reinit/BoundaryElementLevelSetDist.h +++ b/AMDiS/src/reinit/BoundaryElementLevelSetDist.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/BoundaryElementNormalDist.cc b/AMDiS/src/reinit/BoundaryElementNormalDist.cc index 6269c02b..1c0b0e4f 100644 --- a/AMDiS/src/reinit/BoundaryElementNormalDist.cc +++ b/AMDiS/src/reinit/BoundaryElementNormalDist.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BoundaryElementNormalDist.h" diff --git a/AMDiS/src/reinit/BoundaryElementNormalDist.h b/AMDiS/src/reinit/BoundaryElementNormalDist.h index 416ad04a..4cca4f5c 100644 --- a/AMDiS/src/reinit/BoundaryElementNormalDist.h +++ b/AMDiS/src/reinit/BoundaryElementNormalDist.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/BoundaryElementTopDist.cc b/AMDiS/src/reinit/BoundaryElementTopDist.cc index 12f9aba8..f4828de3 100644 --- a/AMDiS/src/reinit/BoundaryElementTopDist.cc +++ b/AMDiS/src/reinit/BoundaryElementTopDist.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "BoundaryElementTopDist.h" diff --git a/AMDiS/src/reinit/BoundaryElementTopDist.h b/AMDiS/src/reinit/BoundaryElementTopDist.h index f75370fb..6bf4dd6d 100644 --- a/AMDiS/src/reinit/BoundaryElementTopDist.h +++ b/AMDiS/src/reinit/BoundaryElementTopDist.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/ElementLevelSet.cc b/AMDiS/src/reinit/ElementLevelSet.cc index 967379ac..2256d0df 100644 --- a/AMDiS/src/reinit/ElementLevelSet.cc +++ b/AMDiS/src/reinit/ElementLevelSet.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElementLevelSet.h" diff --git a/AMDiS/src/reinit/ElementLevelSet.h b/AMDiS/src/reinit/ElementLevelSet.h index 6f5aff63..1b3b21e6 100644 --- a/AMDiS/src/reinit/ElementLevelSet.h +++ b/AMDiS/src/reinit/ElementLevelSet.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/ElementUpdate.h b/AMDiS/src/reinit/ElementUpdate.h index bdd9e074..ad46b38b 100644 --- a/AMDiS/src/reinit/ElementUpdate.h +++ b/AMDiS/src/reinit/ElementUpdate.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/ElementUpdate_2d.cc b/AMDiS/src/reinit/ElementUpdate_2d.cc index b3696210..a0c95284 100644 --- a/AMDiS/src/reinit/ElementUpdate_2d.cc +++ b/AMDiS/src/reinit/ElementUpdate_2d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElementUpdate_2d.h" diff --git a/AMDiS/src/reinit/ElementUpdate_2d.h b/AMDiS/src/reinit/ElementUpdate_2d.h index 8fe6f349..6b16e201 100644 --- a/AMDiS/src/reinit/ElementUpdate_2d.h +++ b/AMDiS/src/reinit/ElementUpdate_2d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/ElementUpdate_3d.cc b/AMDiS/src/reinit/ElementUpdate_3d.cc index e8369647..ee513d66 100644 --- a/AMDiS/src/reinit/ElementUpdate_3d.cc +++ b/AMDiS/src/reinit/ElementUpdate_3d.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "ElementUpdate_3d.h" diff --git a/AMDiS/src/reinit/ElementUpdate_3d.h b/AMDiS/src/reinit/ElementUpdate_3d.h index eb768f69..15ae39e2 100644 --- a/AMDiS/src/reinit/ElementUpdate_3d.h +++ b/AMDiS/src/reinit/ElementUpdate_3d.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/HL_SignedDist.cc b/AMDiS/src/reinit/HL_SignedDist.cc index 01574eb1..2e863c8a 100644 --- a/AMDiS/src/reinit/HL_SignedDist.cc +++ b/AMDiS/src/reinit/HL_SignedDist.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "HL_SignedDist.h" diff --git a/AMDiS/src/reinit/HL_SignedDist.h b/AMDiS/src/reinit/HL_SignedDist.h index 014c1db9..9f402423 100644 --- a/AMDiS/src/reinit/HL_SignedDist.h +++ b/AMDiS/src/reinit/HL_SignedDist.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/HL_SignedDistBornemann.h b/AMDiS/src/reinit/HL_SignedDistBornemann.h index 43f5eabb..a801064c 100644 --- a/AMDiS/src/reinit/HL_SignedDistBornemann.h +++ b/AMDiS/src/reinit/HL_SignedDistBornemann.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/HL_SignedDistTraverse.cc b/AMDiS/src/reinit/HL_SignedDistTraverse.cc index ce9d7130..52c556ca 100644 --- a/AMDiS/src/reinit/HL_SignedDistTraverse.cc +++ b/AMDiS/src/reinit/HL_SignedDistTraverse.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "HL_SignedDistTraverse.h" diff --git a/AMDiS/src/reinit/HL_SignedDistTraverse.h b/AMDiS/src/reinit/HL_SignedDistTraverse.h index 8cad3f24..534fad70 100644 --- a/AMDiS/src/reinit/HL_SignedDistTraverse.h +++ b/AMDiS/src/reinit/HL_SignedDistTraverse.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/NormEps.cc b/AMDiS/src/reinit/NormEps.cc index fae6369d..a79b0001 100644 --- a/AMDiS/src/reinit/NormEps.cc +++ b/AMDiS/src/reinit/NormEps.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "NormEps.h" diff --git a/AMDiS/src/reinit/NormEps.h b/AMDiS/src/reinit/NormEps.h index dd03fbd5..2952e5d4 100644 --- a/AMDiS/src/reinit/NormEps.h +++ b/AMDiS/src/reinit/NormEps.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/VelocityExt.cc b/AMDiS/src/reinit/VelocityExt.cc index 451e6921..750619a9 100644 --- a/AMDiS/src/reinit/VelocityExt.cc +++ b/AMDiS/src/reinit/VelocityExt.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "VelocityExt.h" diff --git a/AMDiS/src/reinit/VelocityExt.h b/AMDiS/src/reinit/VelocityExt.h index 6996b869..7b83115c 100644 --- a/AMDiS/src/reinit/VelocityExt.h +++ b/AMDiS/src/reinit/VelocityExt.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/reinit/VelocityExtFromVelocityField.cc b/AMDiS/src/reinit/VelocityExtFromVelocityField.cc index 1d8000b0..7a094bb3 100644 --- a/AMDiS/src/reinit/VelocityExtFromVelocityField.cc +++ b/AMDiS/src/reinit/VelocityExtFromVelocityField.cc @@ -1,13 +1,22 @@ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ #include "VelocityExtFromVelocityField.h" diff --git a/AMDiS/src/reinit/VelocityExtFromVelocityField.h b/AMDiS/src/reinit/VelocityExtFromVelocityField.h index 7a3aeb6d..6f9f21af 100644 --- a/AMDiS/src/reinit/VelocityExtFromVelocityField.h +++ b/AMDiS/src/reinit/VelocityExtFromVelocityField.h @@ -1,20 +1,22 @@ -// ============================================================================ -// == == -// == AMDiS - Adaptive multidimensional simulations == -// == == -// == http://www.amdis-fem.org == -// == == -// ============================================================================ -// -// Software License for AMDiS -// -// Copyright (c) 2010 Dresden University of Technology -// All rights reserved. -// Authors: Simon Vey, Thomas Witkowski et al. -// -// This file is part of AMDiS -// -// See also license.opensource.txt in the distribution. +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ diff --git a/AMDiS/src/solver/HypreSolver.h b/AMDiS/src/solver/HypreSolver.h new file mode 100644 index 00000000..fb0c5134 --- /dev/null +++ b/AMDiS/src/solver/HypreSolver.h @@ -0,0 +1,107 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file HypreSolver.h */ + + +#ifndef AMDIS_HYPRE_SOLVER_H +#define AMDIS_HYPRE_SOLVER_H + +#ifdef MTL_HAS_HYPRE + +#include "solver/MTL4Solver.h" +#include "solver/ITL_Preconditioner.h" +#include "MTL4Types.h" +#include "solver/itl/hypre.hpp" + +#include +#include + +namespace AMDiS { + + struct Hypre_Runner : MTL4Runner< MTLTypes::MTLMatrix, MTLTypes::MTLVector > + { + typedef MTLTypes::MTLMatrix MatrixType; + typedef MTLTypes::MTLVector VectorType; + typedef MTL4Runner< MatrixType, VectorType > super; + + Hypre_Runner(LinearSolver* oemPtr) + : oem(*oemPtr), + solver(NULL) + { + int cycleMode = 1, interpolation = 0; + Parameters::get(oem.getName() + "->cycle mode", cycleMode); + Parameters::get(oem.getName() + "->interpolation type", interpolation); + + config.maxIter(oem.getMaxIterations()); + config.interpolation(interpolation); + config.cycle(cycleMode); + config.tolerance(oem.getTolerance()); + config.printLevel(oem.getInfo()); + } + + ~Hypre_Runner() + { + if (solver) { + delete solver; + solver = NULL; + } + } + + virtual void init(const typename super::BlockMatrix& A, const MatrixType& fullMatrix) + { + solver = new mtl::HypreSolverWrapper(fullMatrix); + } + + virtual int solve(const MatrixType& A , VectorType& x, const VectorType& b) + { + int error = (*solver)(x, b, config); + return error; + } + + virtual void exit() + { + if (solver) { + delete solver; + solver = NULL; + } + } + + protected: + LinearSolver& oem; + mtl::HypreSolverWrapper *solver; + mtl::AMGConfigurator config; + }; + + + /** + * \ingroup Solver + * \class AMDiS::HypreSolver + * \brief + * Wrapper for the external HYPRE-AMG solver + */ + typedef MTL4Solver< MTLTypes::MTLMatrix, MTLTypes::MTLVector, Hypre_Runner > HypreSolver; + +} // namespace AMDiS + +#endif // MTL_HAS_HYPRE + +#endif // AMDIS_HYPRE_SOLVER_H diff --git a/AMDiS/src/solver/ITL_Preconditioner.h b/AMDiS/src/solver/ITL_Preconditioner.h new file mode 100644 index 00000000..992af0a4 --- /dev/null +++ b/AMDiS/src/solver/ITL_Preconditioner.h @@ -0,0 +1,188 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file ITL_Preconditioner.h */ + +#ifndef AMDIS_ITL_PRECONDITIONER_H +#define AMDIS_ITL_PRECONDITIONER_H + +#include "solver/LinearSolver.h" +#include "MTL4Types.h" +#include "DOFMatrix.h" +#include "CreatorInterface.h" + +#include +#include +#include +#include + +namespace AMDiS { + + /** + * \ingroup Solver + * + * \brief Common base class for wrappers to use ITL preconditioners in AMDiS. + */ + template< class MatrixT, class VectorT > + struct ITL_BasePreconditioner : public OEMPreconditioner + { + typedef MatrixT MatrixType; + typedef VectorT VectorType; + + virtual ~ITL_BasePreconditioner() {} + + typedef SolverMatrix > BlockMatrix; + virtual void init(const BlockMatrix& A, const MatrixType& fullMatrix) = 0; + virtual void solve(const VectorType& x, VectorType& y) const = 0; + virtual void adjoint_solve(const VectorType& x, VectorType& y) const = 0; + }; + + template< typename MatrixType, typename VectorType > + inline //VectorType + itl::pc::solver, VectorType, false> + solve(const ITL_BasePreconditioner< MatrixType, VectorType >& P, const VectorType& vin) + { + return itl::pc::solver, VectorType, false>(P, vin); + } + + template< typename MatrixType, typename VectorType > + inline //VectorType + itl::pc::solver, VectorType, true> + adjoint_solve(const ITL_BasePreconditioner< MatrixType, VectorType >& P, const VectorType& vin) + { + return itl::pc::solver, VectorType, true>(P, vin); + } + + /** + * \ingroup Solver + * + * \brief Wrapper for using ITL preconditioners in AMDiS. + */ + template < typename Preconditioner, typename MatrixType, typename VectorType > + class ITL_Preconditioner : public ITL_BasePreconditioner< MatrixType, VectorType > + { + public: + + /// Creator class + class Creator : public CreatorInterfaceName< ITL_BasePreconditioner< MatrixType, VectorType > > + { + public: + virtual ~Creator() {} + + /** \brief + * Creates an ITL preconditioner + */ + ITL_BasePreconditioner< MatrixType, VectorType >* create() { + return new ITL_Preconditioner(); + } + }; + + ITL_Preconditioner() : precon(NULL) {} + + ~ITL_Preconditioner() + { + if (precon) { + delete precon; + precon = NULL; + } + } + + typedef SolverMatrix > BlockMatrix; + void init(const BlockMatrix& A, const MatrixType& fullMatrix) + { + if (precon) + delete precon; + precon = new Preconditioner(fullMatrix); + } + + void exit() + { + if (precon) { + delete precon; + precon = NULL; + } + } + + void solve(const VectorType& vin, VectorType& vout) const + { + assert(precon != NULL); + precon->solve(vin, vout); + } + + void adjoint_solve(const VectorType& vin, VectorType& vout) const + { + assert(precon != NULL); + precon->adjoint_solve(vin, vout); + } + + private: + Preconditioner* precon; + }; + + typedef ITL_BasePreconditioner< MTLTypes::MTLMatrix, MTLTypes::MTLVector > BasePreconditioner; + typedef CreatorInterfaceName< BasePreconditioner > PreconditionCreator; + + + /** + * \ingroup Solver + * \class AMDiS::DiagonalPreconditioner + * \brief ITL_Preconditioner implementation of diagonal (jacobi) preconditioner \implements ITL_Preconditioner + * + * Diagonal preconditioner \f$ M^{-1} \f$ for the system \f$ Ax=b \f$ is defined as: \f$ M=diag(A) \f$. + */ + typedef ITL_Preconditioner, MTLTypes::MTLMatrix, MTLTypes::MTLVector > DiagonalPreconditioner; + + + /** + * \ingroup Solver + * \class AMDiS::IdentityPreconditioner + * \brief ITL_Preconditioner implementation of identity preconditioner \implements ITL_Preconditioner + * + * Identity preconditioner. Behaves like no preconditioning. + */ + typedef ITL_Preconditioner, MTLTypes::MTLMatrix, MTLTypes::MTLVector > IdentityPreconditioner; + + + /** + * \ingroup Solver + * \class AMDiS::ILUPreconditioner + * \brief ITL_Preconditioner implementation of ILU (Incomplete LU factorization) preconditioner. \implements ITL_Preconditioner + * + * The preconditioner is used from ITL. It corresponds for instance to + * "Iterative Methods for Sparce Linear Systems", second edition, Yousef Saad. + * The preconditioner is described in chapter 10.3 (algorithm 10.4). + */ + typedef ITL_Preconditioner< itl::pc::ilu_0, MTLTypes::MTLMatrix, MTLTypes::MTLVector > ILUPreconditioner; + + + /** + * \ingroup Solver + * \class AMDiS::ICPreconditioner + * \brief ITL_Preconditioner implementation of IC (Incomplete Cholesky factorization) preconditioner. \implements ITL_Preconditioner + * + * IC (Incomplete Cholesky factorization) preconditioner. + */ + typedef ITL_Preconditioner< itl::pc::ic_0, MTLTypes::MTLMatrix, MTLTypes::MTLVector > ICPreconditioner; + + +} // namespace AMDiS + +#endif // AMDIS_ITL_PRECONDITIONER_H diff --git a/AMDiS/src/solver/ITL_Runner.h b/AMDiS/src/solver/ITL_Runner.h new file mode 100644 index 00000000..d02631f7 --- /dev/null +++ b/AMDiS/src/solver/ITL_Runner.h @@ -0,0 +1,209 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file ITL_Runner.h */ + + +#ifndef AMDIS_ITL_RUNNER_H +#define AMDIS_ITL_RUNNER_H + +#include "solver/MTL4Solver.h" +#include "solver/ITL_Preconditioner.h" + +#include +#include + +namespace AMDiS { + + template< typename MatrixType, typename VectorType > + struct PreconPair + { + /// Pointer to the left preconditioner + ITL_BasePreconditioner< MatrixType, VectorType >* l; + + /// Pointer to the right preconditioner + ITL_BasePreconditioner< MatrixType, VectorType >* r; + + PreconPair() : l(NULL), r(NULL) {} + }; + + + template< typename ITLSolver, typename MatrixType, typename VectorType > + struct ITL_Runner : MTL4Runner< MatrixType, VectorType > + { + typedef MTL4Runner< MatrixType, VectorType > super; + + ITL_Runner(LinearSolver* oemPtr) + : oem(*oemPtr), + solver(oem.getName()) + { + setPrecon(preconPair); + } + + + ~ITL_Runner() + { + if (preconPair.l != NULL) { + preconPair.l->exit(); + delete preconPair.l; + preconPair.l = NULL; + } + + if (preconPair.r != NULL) { + preconPair.r->exit(); + delete preconPair.r; + preconPair.r = NULL; + } + } + + + virtual void init(const typename super::BlockMatrix& A, const MatrixType& fullMatrix) + { + preconPair.l->init(A, fullMatrix); + preconPair.r->init(A, fullMatrix); + } + + + /// Implementation of \ref MTL4Runner::solve() + virtual int solve(const MatrixType& A , VectorType& x, const VectorType& b) + { FUNCNAME("ITL_Runner::solve()"); + + TEST_EXIT(preconPair.l != NULL)("there is no left preconditioner\n"); + TEST_EXIT(preconPair.r != NULL)("there is no right preconditioner\n"); + + VectorType r(A * x - b); + int error = 0; + if (oem.getInfo() == 0) { + itl::basic_iteration + iter(r, oem.getMaxIterations(), oem.getRelative(), oem.getTolerance()); + + error = solver(A, x, b, *(preconPair.l), *(preconPair.r), iter); + oem.setErrorCode(error); + oem.setIterations(iter.iterations()); + oem.setResidual(iter.resid()); + } else { + itl::cyclic_iteration + iter(r, oem.getMaxIterations(), oem.getRelative(), oem.getTolerance(), + oem.getPrint_cycle()); + + error = solver(A, x, b, *(preconPair.l), *(preconPair.r), iter); + oem.setErrorCode(error); + oem.setIterations(iter.iterations()); + oem.setResidual(iter.resid()); + } + + return error; + } + + + /// Implementation of \ref MTL4Runner::adjoint_solve() + virtual int adjoint_solve(const MatrixType& A , VectorType& x, const VectorType& b) + { FUNCNAME("ITL_Runner::adjoint_solve()"); + + TEST_EXIT(preconPair.l != NULL)("there is no left preconditioner\n"); + TEST_EXIT(preconPair.r != NULL)("there is no right preconditioner\n"); + + mtl::matrix::transposed_view B(A); + VectorType r(B * x - b); + int error = 0; + if (oem.getInfo() == 0) { + itl::basic_iteration + iter(r, oem.getMaxIterations(), oem.getRelative(), oem.getTolerance()); + + error = solver(B, x, b, *(preconPair.l), *(preconPair.r), iter); + oem.setErrorCode(error); + oem.setIterations(iter.iterations()); + oem.setResidual(iter.resid()); + } else { + itl::cyclic_iteration + iter(r, oem.getMaxIterations(), oem.getRelative(), oem.getTolerance(), + oem.getPrint_cycle()); + + error = solver(B, x, b, *(preconPair.l), *(preconPair.r), iter); + oem.setErrorCode(error); + oem.setIterations(iter.iterations()); + oem.setResidual(iter.resid()); + } + + return error; + } + + + virtual void exit() + { + preconPair.l->exit(); + preconPair.r->exit(); + } + + + virtual OEMPreconditioner* getLeftPrecon() + { + return preconPair.l; + } + + + virtual OEMPreconditioner* getRightPrecon() + { + return preconPair.r; + } + + protected: + LinearSolver& oem; + ITLSolver solver; + + void setPrecon(PreconPair& pair) + { FUNCNAME("ITL_Runner::setPrecon()"); + + /// Creator for the left preconditioner + CreatorInterfaceName< ITL_BasePreconditioner >* leftCreator(NULL); + + /// Creator for the right preconditioner + CreatorInterfaceName< ITL_BasePreconditioner >* rightCreator(NULL); + + std::string preconType("no"); + std::string initFileStr = oem.getName() + "->left precon"; + Parameters::get(initFileStr, preconType); + leftCreator = dynamic_cast >*>( + CreatorMap >::getCreator(preconType, initFileStr) ); + TEST_EXIT(leftCreator != NULL) + ("there is no creator for the given left preconditioner\n"); + leftCreator->setName(initFileStr); + + preconType = "no"; + initFileStr = oem.getName() + "->right precon"; + Parameters::get(initFileStr, preconType); + rightCreator = dynamic_cast >*>( + CreatorMap >::getCreator(preconType, initFileStr) ); + TEST_EXIT(rightCreator != NULL) + ("there is no creator for the given right preconditioner\n"); + rightCreator->setName(initFileStr); + + pair.l = leftCreator->create(); + pair.r = rightCreator->create(); + } + + private: + PreconPair preconPair; + }; + +} // namespace AMDiS + +#endif // AMDIS_ITL_RUNNER_H diff --git a/AMDiS/src/solver/ITL_Solver.h b/AMDiS/src/solver/ITL_Solver.h new file mode 100644 index 00000000..5282dacc --- /dev/null +++ b/AMDiS/src/solver/ITL_Solver.h @@ -0,0 +1,409 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file ITL_Solver.h */ + +#ifndef AMDIS_ITL_SOLVER_H +#define AMDIS_ITL_SOLVER_H + +#include "solver/MTL4Solver.h" +#include "solver/ITL_Runner.h" +#include "MTL4Types.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "solver/itl/minres.hpp" +#include "solver/itl/gcr.hpp" +#include "solver/itl/fgmres.hpp" +#include "solver/itl/gmres2.hpp" +#include "solver/itl/preonly.hpp" + + +namespace AMDiS { + using namespace MTLTypes; + + /** + * \ingroup Solver + * + * \brief + * Wrapper for MTL4 itl-solvers. + * + * One of the following solvers can be chosen: + * - @ref CGSolver "cg" (conjugate gradient method) + * - @ref CGSSolver "cgs" (squared conjugate gradient method) + * - @ref BiCGSolver "bicg" (biconjugate gradient method) + * - @ref BiCGStabSolver "bicgstab" (stabilized BiCG method) + * - @ref BiCGStab2Solver "bicgstab2" (stabilized BiCG(l) method with l=2) + * - @ref QMRSolver "qmr" (Quasi-Minimal Residual method) + * - @ref TFQMRSolver "tfqmr" (Transposed-Free Quasi-Minimal Residual method) + * - @ref BiCGStabEllSolver "bicgstab_ell" (stabilized BiCG(l) method) + * - @ref GMResSolver "gmres" (generalized minimal residual method) + * - @ref IDRsSolver "idr_s" (Induced Dimension Reduction method) + * - @ref MinResSolver "minres" (minimal residual method) + * - @ref GcrSolver "gcr" (generalized conjugate residual method) + * - @ref FGMResSolver "fgmres" (flexible GMRes method) + * - @ref PreOnly "preonly" (solver that implements pure preconditioning applied to the rhs) + */ + template< typename SolverType > + struct ITL_Solver : MTL4Solver< MTLMatrix, MTLVector, ITL_Runner< SolverType, MTLMatrix, MTLVector > > + { + ITL_Solver(std::string name) + : MTL4Solver< MTLMatrix, MTLVector, ITL_Runner< SolverType, MTLMatrix, MTLVector > >(name) {} + }; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::CGSolver + * \brief ITL_Solver <\ref cg_solver_type> implementation of conjugate gradient method \implements ITL_Solver + * + * Solves a linear system \f$ Ax=b \f$ by the conjugate gradient method (CG) and can be used for + * symmetric positive definite system matrices. + * Right preconditioner is ignored. + */ + + class cg_solver_type + { + public: + cg_solver_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::cg(A, x, b, l, r, iter); } + }; + typedef ITL_Solver< cg_solver_type > CGSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::CGSSolver + * \brief ITL_Solver <\ref cgs_solver_type> implementation of squared conjugate gradient method \implements ITL_Solver + * + * Solves a linear system \f$ Ax=b \f$ by the squared conjugate gradient method (CGS). + * Right preconditioner is ignored. + */ + + class cgs_solver_type + { + public: + cgs_solver_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) + { return itl::cgs(A, x, b, l, iter); } + }; + typedef ITL_Solver< cgs_solver_type > CGSSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::BiCGSolver + * \brief ITL_Solver <\ref bicg_solver_type> implementation of bi-conjugate gradient method \implements ITL_Solver + * + * Solves a linear system \f$ Ax=b \f$ by a BiCG method and can be used for + * system matrices. + */ + + class bicg_solver_type + { + public: + bicg_solver_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) + { return itl::bicg(A, x, b, l, iter); } + }; + typedef ITL_Solver< bicg_solver_type > BiCGSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::BiCGStabSolver + * \brief ITL_Solver <\ref bicgstab_type> implementation of stabilized bi-conjugate gradient method \implements ITL_Solver + * + * Solves a linear system \f$ Ax=b \f$ by a stabilized BiCG method and can be used for + * system matrices. + */ + + class bicgstab_type + { + public: + bicgstab_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) + { return itl::bicgstab(A, x, b, l, iter); } + }; + typedef ITL_Solver< bicgstab_type > BiCGStabSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::BiCGStab2Solver + * \brief ITL_Solver <\ref bicgstab2_type> implementation of BiCGStab(l) method with l=2 \implements ITL_Solver + * + * Solves a linear system \f$ Ax=b \f$ by a stabilized BiCG(2) method and can be used for + * system matrices. + */ + + class bicgstab2_type + { + public: + bicgstab2_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R&, I& iter) + { return itl::bicgstab_2(A, x, b, l, iter); } + }; + typedef ITL_Solver< bicgstab2_type > BiCGStab2Solver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::QMRSolver + * \brief ITL_Solver <\ref qmr_solver_type> implementation of Quasi-Minimal Residual method \implements ITL_Solver + * + * Solves a linear system \f$ Ax=b \f$ by the Quasi-Minimal Residual method (QMR). + */ + + class qmr_solver_type + { + public: + qmr_solver_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::qmr(A, x, b, l, r, iter); } + }; + typedef ITL_Solver< qmr_solver_type > QMRSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::TFQMRSolver + * \brief ITL_Solver <\ref tfqmr_solver_type> implementation of Transposed-Free Quasi-Minimal Residual method \implements ITL_Solver + * + * Solves a linear system by the Transposed-Free Quasi-Minimal Residual method (TFQMR). + * Does not use preconditioning currently. + */ + + class tfqmr_solver_type + { + public: + tfqmr_solver_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { + return itl::tfqmr(A, x, b, l, r, iter); + } + }; + typedef ITL_Solver< tfqmr_solver_type > TFQMRSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::BiCGStabEllSolver + * \brief ITL_Solver <\ref bicgstab_ell_type> implementation of stabilized BiCG(ell) method \implements ITL_Solver + * + * Solves a linear system by a stabilized BiCG(ell) method and can be used for + * system matrices. + * The parameter ell [3] can be specified. + */ + + class bicgstab_ell_type + { + int ell; + public: + bicgstab_ell_type(std::string name) : ell(3) + { + Parameters::get(name + "->ell", ell); + } + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::bicgstab_ell(A, x, b, l, r, iter, ell); } + }; + typedef ITL_Solver< bicgstab_ell_type > BiCGStabEllSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::GMResSolver + * \brief ITL_Solver <\ref gmres_type> implementation of generalized minimal residual method \implements ITL_Solver + * + * Solves a linear system by the GMRES method. + * The parameter restart [30] is the maximal number of orthogonalized vectors. + * The method is not preconditioned + */ + + class gmres_type + { + int restart; + public: + gmres_type(std::string name) : restart(30) + { + Parameters::get(name + "->restart", restart); + } + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::gmres2(A, x, b, l, r, iter, restart); } + }; + typedef ITL_Solver< gmres_type > GMResSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::IDRsSolver + * \brief ITL_Solver <\ref idr_s_type> implementation of Induced Dimension Reduction method \implements ITL_Solver + * + * Solves a linear system by an Induced Dimension Reduction method and can be used for + * system matrices. + * The parameter s [30] can be specified. + * Peter Sonneveld and Martin B. van Gijzen, IDR(s): a family of simple and fast algorithms for solving large nonsymmetric linear systems. + * SIAM J. Sci. Comput. Vol. 31, No. 2, pp. 1035-1062 (2008). (copyright SIAM) + */ + + class idr_s_type + { + int s; + public: + idr_s_type(std::string name) : s(30) + { + Parameters::get(name + "->s", s); + } + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::idr_s(A, x, b, l, r, iter, s); } + }; + typedef ITL_Solver< idr_s_type > IDRsSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::MinResSolver + * \brief ITL_Solver <\ref minres_solver_type> implementation of minimal residual method \implements ITL_Solver + * + * Solves a linear system by the Minres method. Can be used for symmetric + * indefinite systems. + */ + + class minres_solver_type + { + public: + minres_solver_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { + return itl::minres(A, x, b, l, r, iter); + } + }; + typedef ITL_Solver< minres_solver_type > MinResSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::GcrSolver + * \brief ITL_Solver <\ref gcr_type> implementation of generalized conjugate residual method \implements ITL_Solver + * + * Solves a linear system by the GCR method - generalized conjugate residual method. + * The parameter restart [30] is the maximal number of orthogonalized vectors. + */ + + class gcr_type + { + int restart; + public: + gcr_type(std::string name) : restart(30) + { + Parameters::get(name + "->restart", restart); + } + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::gcr(A, x, b, l, r, iter, restart); } + }; + typedef ITL_Solver< gcr_type > GcrSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::FGMResSolver + * \brief ITL_Solver <\ref fgmres_type> implementation of flexible GMRes method \implements ITL_Solver + * + * Solves a linear system by the FGMRES method. + * The parameter restart [30] is the maximal number of orthogonalized vectors. + * See reference "A Flexible Inner-Outer Preconditiones GMRES Algorithm", Youcef Saad, (1993) + */ + + class fgmres_type + { + int restart; + public: + fgmres_type(std::string name) : restart(30) + { + Parameters::get(name + "->restart", restart); + } + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::fgmres(A, x, b, l, r, iter, restart); } + }; + typedef ITL_Solver< fgmres_type > FGMResSolver; + + // =================================================================================== + + /** + * \ingroup Solver + * \class AMDiS::PreOnly + * \brief ITL_Solver <\ref preonly_type> implementation of preconditioner as \implements ITL_Solver + * + * Solves a linear system by applying a preconditioner only. + */ + class preonly_type + { + public: + preonly_type(std::string name) {} + template < class LinOp, class X, class B, class L, class R, class I > + int operator()(const LinOp& A, X& x, const B& b, const L& l, const R& r, I& iter) + { return itl::preonly(A, x, b, l, iter); } + }; + typedef ITL_Solver< preonly_type > PreOnly; + + // =================================================================================== + + + +} // namespace AMDiS + +#endif // AMDIS_ITL_SOLVER + diff --git a/AMDiS/src/solver/KrylovPreconditioner.h b/AMDiS/src/solver/KrylovPreconditioner.h new file mode 100644 index 00000000..5275d53a --- /dev/null +++ b/AMDiS/src/solver/KrylovPreconditioner.h @@ -0,0 +1,166 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file KrylovPreconditioner.h */ + +#ifndef AMDIS_KRYLOV_PRECONDITIONER_H +#define AMDIS_KRYLOV_PRECONDITIONER_H + +#include "solver/ITL_Preconditioner.h" +#ifdef HAVE_PARALLEL_MTL4 +#include "parallel/PITL_Solver.h" +#endif + +namespace AMDiS { + + /** + * \ingroup Solver + * + * \brief Implements an inner solver for (flexible) krylov subspace solvers + * + * Any AMDiS solver can be used as preconditioner for any other AMDiS solver. + * Initfile-syntax:
+ * [...]->solver: any-krylov-solver
+ * [...]->solver->left precon: [krylov|solver]
+ * [...]->solver->left precon->solver: any-amdis-solver
+ * [...]->solver->left precon->solver->parameter1: ...
+ * [...]->solver->left precon->solver->parameter2: ...
+ * [...]->solver->left precon->solver->parameter3: ... + * + * This Krylov-Preconditioner can also be used as preconditioner for the inner solver, so + * that a sequence of iner-inner-solver can be loaded. + **/ + + template< typename MatrixType, typename VectorType > + struct KrylovPreconditioner : ITL_BasePreconditioner< MatrixType, VectorType > + { + typedef ITL_BasePreconditioner< MatrixType, VectorType > super; + + class Creator : public CreatorInterfaceName< super > + { + public: + virtual ~Creator() {} + + super* create() { + return new KrylovPreconditioner(this->name); + } + }; + + KrylovPreconditioner(std::string name) : fullMatrix(NULL), solver(NULL), runner(NULL) + { + + #if defined HAVE_PARALLEL_PETSC + string backend("p_petsc"); + #elif defined HAVE_PARALLEL_MTL + string backend("p_mtl"); + #elif defined HAVE_PETSC + string backend("petsc"); + #else + string backend("mtl"); + #endif + + // === read backend-name === + string initFileStr = name + "->solver"; + Parameters::get(initFileStr + "->backend", backend); + + // === read solver-name === + string solverType("0"); + Parameters::get(initFileStr, solverType); + + if (backend != "0" && backend != "no" && backend != "") + solverType = backend + "_" + solverType; + + LinearSolverCreator *solverCreator = + dynamic_cast(CreatorMap::getCreator(solverType, initFileStr)); + TEST_EXIT(solverCreator) + ("No valid solver type found in parameter \"%s\"\n", initFileStr.c_str()); + solverCreator->setName(initFileStr); + solver = solverCreator->create(); + + runner = dynamic_cast*>(solver->getRunner()); + } + + virtual ~KrylovPreconditioner() + { + delete solver; + } + + virtual void init(const typename super::BlockMatrix& A, const MatrixType& fullMatrix_) + { + fullMatrix = &fullMatrix_; + runner->init(A, fullMatrix_); + } + + virtual void exit() + { + runner->exit(); + } + + virtual void solve(const VectorType& b, VectorType& x) const + { + initVector(x); + runner->solve(*fullMatrix, x, b); + } + + virtual void adjoint_solve(const VectorType& b, VectorType& x) const + { + initVector(x); + runner->adjoint_solve(*fullMatrix, x, b); + } + + protected: // methods + + template + typename boost::enable_if< mtl::traits::is_distributed, void >::type + initVector(VectorT& x) const + { +#ifdef HAVE_PARALLEL_MTL4 + x.init_distribution(col_distribution(*fullMatrix), num_cols(*fullMatrix)); +#endif + set_to_zero(x); + } + + template + typename boost::disable_if< mtl::traits::is_distributed, void >::type + initVector(VectorT& x) const + { + x.change_dim(num_cols(*fullMatrix)); + set_to_zero(x); + } + + protected: // member variables + + const MatrixType* fullMatrix; + + LinearSolver* solver; + MTL4Runner< MatrixType, VectorType >* runner; + }; + + +#ifdef HAVE_PARALLEL_MTL4 + typedef KrylovPreconditioner KrylovPreconditionerParallel; +#endif + typedef KrylovPreconditioner KrylovPreconditionerSeq; + + +} // end namespace AMDiS + +#endif // AMDIS_KRYLOV_PRECONDITIONER_H diff --git a/AMDiS/src/solver/LinearSolver.h b/AMDiS/src/solver/LinearSolver.h new file mode 100644 index 00000000..2c3b5060 --- /dev/null +++ b/AMDiS/src/solver/LinearSolver.h @@ -0,0 +1,320 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file LinearSolver.h */ + +/** + * \defgroup Solver Solver module + * @{ @} + * + * \brief + * Contains all classes needed for solving linear and non linear equation + * systems. + */ + +#ifndef AMDIS_OEM_SOLVER_H +#define AMDIS_OEM_SOLVER_H + +#include "Global.h" +#include "AMDiS_fwd.h" +#include "Initfile.h" +#include "solver/SolverMatrix.h" +#include "DOFVector.h" +#include "SystemVector.h" +#include "DOFMatrix.h" +#include "Mapper.h" +#include "Timer.h" + +#ifdef HAVE_PARALLEL_DOMAIN_AMDIS +#include "parallel/ParallelMapper.h" +#endif + +namespace AMDiS { + + /// Base-Class for Preconditioner types + struct OEMPreconditioner + { + virtual void exit() {} + }; + + /// Base-Class for Runner / Worker types + struct OEMRunner + { + virtual void exit() {} + + virtual OEMPreconditioner* getLeftPrecon() + { + return NULL; + } + + virtual OEMPreconditioner* getRightPrecon() + { + return NULL; + } + }; + + /** + * \ingroup Solver + * + *\brief + * Solver for linear equation systems. + */ + class LinearSolver + { + public: + + typedef DOFMatrix::base_matrix_type matrix_type; + typedef DOFMatrix::value_type value_type; + + /// The constructor reads needed parameters and sets solvers \ref name. + LinearSolver(std::string str) + : name(str), + tolerance(DBL_TOL), + relative(0), + max_iter(1000), + info(0), + residual(-1.0), + print_cycle(100), + iterations(-1), + error(-1), + breakTolNotReached(false), + calculateResidual(false) + { + Parameters::get(name + "->tolerance", tolerance); + Parameters::get(name + "->relative tolerance", relative); + Parameters::get(name + "->max iteration", max_iter); + Parameters::get(name + "->print cycle", print_cycle); + Parameters::get(name + "->info", info); + Parameters::get(name + "->break if tolerance not reached", breakTolNotReached); + Parameters::get(name + "->calculate residual", calculateResidual); + } + + /// destructor + virtual ~LinearSolver() + {} + + + int solveSystem(const SolverMatrix >& A, + SystemVector& x, + SystemVector& b, + bool createMatrixData, + bool storeMatrixData) + { FUNCNAME("LinearSolver::solveSystem()"); + MSG("LinearSolver::solveSystem()\n"); + + residual = -1.0; + int error_code = solveLinearSystem(A, x, b, createMatrixData, storeMatrixData); + + // calculate and print resiual + if (info > 0) { +#ifndef HAVE_PARALLEL_DOMAIN_AMDIS + if (residual < 0 || calculateResidual) { + SystemVector r(b); + mv(*A.getOriginalMat(), x, r); + r -= b; + residual = norm(&r); + } +#endif + + MSG("Residual norm: ||b-Ax|| = %e\n", residual); + + TEST_EXIT(residual <= tolerance || !breakTolNotReached) + ("Tolerance tol = %e could not be reached!\n Set tolerance by '->solver->tolerance:' \n", tolerance); + } + return error_code; + } + + /** \name getting methods + * \{ + */ + + /// Returns solvers \ref name. + inline std::string getName() const + { + return name; + } + + /// Returns \ref tolerance + inline double getTolerance() const + { + return tolerance; + } + + /// Returns \ref max_iter + inline int getMaxIterations() const + { + return max_iter; + } + + /// Returns number of iterations in last run of an iterative solver + inline int getIterations() + { + return iterations; + } + + /// Returns error code in last run of an iterative solver + inline int getErrorCode() + { + return error; + } + + /// Returns info + inline int getInfo() + { + return info; + } + + /// Returns \ref print_cycle + inline int getPrint_cycle() const + { + return print_cycle; + } + + /// Returns \ref residual + inline double getResidual() const + { + return residual; + } + + /// Returns \ref relative + inline double getRelative() const + { + return relative; + } + + + virtual OEMPreconditioner* getLeftPrecon() + { + FUNCNAME("LinearSolver::getLeftPrecon()"); + ERROR_EXIT("no left preconditioner provided!\n"); + return NULL; + } + + virtual OEMPreconditioner* getRightPrecon() + { + FUNCNAME("LinearSolver::getRightPrecon()"); + ERROR_EXIT("no right preconditioner provided!\n"); + return NULL; + } + + virtual OEMRunner* getRunner() + { + FUNCNAME("LinearSolver::getRunner()"); + ERROR_EXIT("no runner provided!\n"); + return NULL; + } + + /** \} */ + + /** \name setting methods + * \{ + */ + + /// Sets \ref tolerance + inline void setTolerance(double tol) + { + tolerance = tol; + } + + inline void setResidual(double r) + { + residual = r; + } + + /// Sets \ref relative + inline void setRelative(double rel) + { + relative = rel; + } + + /// Sets \ref max_iter + inline void setMaxIterations(int i) + { + max_iter = i; + } + + inline void setIterations(int i) + { + iterations=i; + } + + /// set the \ref error + inline void setErrorCode(int code) + { + error=code; + } + + /// Sets \ref info + inline void setInfo(int i) + { + info = i; + } + + /** \} */ + + protected: + /// main methods that all solvers must implement + virtual int solveLinearSystem(const SolverMatrix >& A, + SystemVector& x, + SystemVector& b, + bool createMatrixData, + bool storeMatrixData) = 0; + + protected: + /// solvers name. + std::string name; + + /// Solver tolerance |r|. Set in LinearSolver's constructor. + double tolerance; + + /// Relative solver tolerance |r|/|r0|. Set in LinearSolver's constructor. + double relative; + + /// maximal number of iterations. Set in LinearSolver's constructor. + int max_iter; + + /// info level during solving the system. Set in LinearSolver's constructor. + int info; + + /// current residual. + double residual; + + /// Print cycle, after how many iterations the residuum norm is logged. + int print_cycle; + + /// How many iterations were performed in last solver (not set by UmfPack) + int iterations; + + /// Error code in last solver (not set by UmfPack) + int error; + + // break if residual norm > prescribed tolerance + bool breakTolNotReached; + + // calculate residual ||b-Ax|| directly + bool calculateResidual; + }; + + + typedef CreatorInterfaceName LinearSolverCreator; +} + +#endif // AMDIS_OEM_SOLVER_H diff --git a/AMDiS/src/solver/MTL4Solver.h b/AMDiS/src/solver/MTL4Solver.h new file mode 100644 index 00000000..067b6817 --- /dev/null +++ b/AMDiS/src/solver/MTL4Solver.h @@ -0,0 +1,126 @@ +/****************************************************************************** + * + * AMDiS - Adaptive multidimensional simulations + * + * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved. + * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis + * + * Authors: + * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * + * This file is part of AMDiS + * + * See also license.opensource.txt in the distribution. + * + ******************************************************************************/ + + +/** \file MTL4Solver.h */ + +#ifndef AMDIS_MTL4SOLVER_H +#define AMDIS_MTL4SOLVER_H + +#include "solver/LinearSolver.h" +#include "solver/MTL4SolverBase.h" +#include "Timer.h" +#include +#include +#include + +#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) && defined(HAVE_PARALLEL_MTL4) +#include +#endif + +namespace AMDiS { + + template< typename MatrixType, typename VectorType > + struct MTL4Runner : public OEMRunner + { + typedef SolverMatrix > BlockMatrix; + + virtual void init(const BlockMatrix& A, const MatrixType& fullMatrix) = 0; + virtual int solve(const MatrixType& A, VectorType& x, const VectorType& b) = 0; + virtual int adjoint_solve(const MatrixType& A, VectorType& x, const VectorType& b) { + FUNCNAME("MTL4Runner::adjoint_solve()"); + ERROR_EXIT("Must be implemented in derived class!\n"); + return 0; + }; + }; + + + /** \ingroup Solver + * + * \brief + * Wrapper class for different MTL4 solvers. These solvers + * are parametrized by Matrix- and VectorType. The different + * algorithms, like krylov subspace methods or other external + * solvers where MTL4 provides an interface, can be assigned + * by different Runner objects. + **/ + template< typename MatrixType, typename VectorType, typename Runner > + class MTL4Solver : public LinearSolver, protected MTL4SolverBase + { + + public: + typedef MTL4Solver self; + typedef MTL4SolverBase details; + + /// Creator class used in the LinearSolverMap. + class Creator : public LinearSolverCreator + { + public: + virtual ~Creator() {} + + /// Returns a new MTL4Solver object. + LinearSolver* create() + { + return new self(this->name); + } + }; + + /// Constructor + MTL4Solver(std::string n) + : LinearSolver(n), + details(this) + {} + + + /// Implementation of \ref LinearSolver::getRunner() + virtual OEMRunner* getRunner() + { + return details::getRunner(); + } + + + /// Implementation of \ref LinearSolver::getLeftPrecon() + virtual OEMPreconditioner* getLeftPrecon() + { + return details::getLeftPrecon(); + } + + + /// Implementation of \ref LinearSolver::getRightPrecon() + virtual OEMPreconditioner* getRightPrecon() + { + return details::getRightPrecon(); + } + + protected: + /// Implementation of \ref LinearSolver::solveLinearSystem() + virtual int solveLinearSystem(const SolverMatrix >& A, + SystemVector& x, + SystemVector& b, + bool createMatrixData, + bool storeMatrixData) + { + VectorialMapper mapper(A); + return details::solve(A, x, b, mapper, createMatrixData, storeMatrixData); + } + }; +} + +#endif // AMDIS_MTL4SOLVER_H diff --git a/AMDiS/src/solver/MTL4SolverBase.h b/AMDiS/src/solver/MTL4SolverBase.h new f