fix some doxy issues
This commit is contained in:
@@ -42,8 +42,9 @@ public:
|
||||
//! \param[out] EM The element matrix to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] U Advecting field
|
||||
//! \param[in] dUdX Field gradient
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] form Which form of the convective form to use
|
||||
//! \param[in] basis Basis to use
|
||||
static void Convection(std::vector<Matrix>& EM, const FiniteElement& fe,
|
||||
const Vec3& U, const Tensor& dUdX, double scale,
|
||||
WeakOperators::ConvectionForm form=WeakOperators::CONVECTIVE);
|
||||
@@ -81,7 +82,6 @@ public:
|
||||
//! \brief Compute a vector-source term.
|
||||
//! \param[out] EV The element vectors to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] f Vector with contributions
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
static void Source(Vectors& EV, const FiniteElement& fe, double scale=1.0);
|
||||
|
||||
@@ -106,7 +106,6 @@ public:
|
||||
//! \param[in] UC Advecting field
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] form Which form of the convective form to use
|
||||
//! \param[in] basis Basis to use
|
||||
static void Convection(Vectors& EV, const FiniteElement& fe,
|
||||
const Vec3& U, const Tensor& dUdX, const Vec3& UC, double scale,
|
||||
WeakOperators::ConvectionForm form=WeakOperators::CONVECTIVE);
|
||||
|
||||
@@ -52,7 +52,9 @@ public:
|
||||
//! \brief Compute a (nonlinear) convection term.
|
||||
//! \param[out] EM The element matrix to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] U Advecting field
|
||||
//! \param[in] U Advecting field
|
||||
//! \param[in] dUdX Gradient of advected field
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] form Which form of the convective term to use
|
||||
//! \param[in] basis Basis to use
|
||||
static void Convection(Matrix& EM, const FiniteElement& fe,
|
||||
@@ -91,7 +93,7 @@ public:
|
||||
//! \param[out] EV The element vector to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] tbasis Test function basis
|
||||
//! \param[in] basis Basis to use
|
||||
static void Gradient(Vector& EV, const FiniteElement& fe,
|
||||
double scale=1.0, int basis=1);
|
||||
|
||||
@@ -109,6 +111,7 @@ public:
|
||||
//! \param[out] K The coefficient matrix
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] basis Basis to use
|
||||
static void LaplacianCoeff(Matrix& EM, const Matrix& K, const FiniteElement& fe,
|
||||
double scale=1.0, int basis=1);
|
||||
|
||||
@@ -132,7 +135,7 @@ public:
|
||||
//! \brief Compute a vector-source term.
|
||||
//! \param[out] EV The element vector to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] scale Vector with contributions
|
||||
//! \param[in] f Vector with contributions
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] basis Basis to use
|
||||
static void Source(Vector& EV, const FiniteElement& fe,
|
||||
@@ -143,9 +146,10 @@ public:
|
||||
class Residual {
|
||||
public:
|
||||
//! \brief Compute an advection term.
|
||||
//! \param[out] EM The element vector to add contribution to
|
||||
//! \param[out] EV The element vector to add contribution to
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] AC Advecting field
|
||||
//! \param[in] g Advected field gradient
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] basis Basis to use
|
||||
static void Advection(Vector& EV, const FiniteElement& fe,
|
||||
@@ -182,7 +186,6 @@ public:
|
||||
//! \param[in] fe The finite element to evaluate for
|
||||
//! \param[in] dUdX Current solution gradient
|
||||
//! \param[in] scale Scaling factor for contribution
|
||||
//! \param[in] stress Whether to add extra stress formulation terms
|
||||
//! \param[in] basis Basis to use
|
||||
static void Laplacian(Vector& EV, const FiniteElement& fe,
|
||||
const Vec3& dUdX, double scale=1.0,
|
||||
|
||||
@@ -117,7 +117,7 @@ class MultiPatchModelGenerator3D : public ModelGenerator
|
||||
{
|
||||
public:
|
||||
//! \brief The constructor initializes common members.
|
||||
//! \param[in] elem XML element to parse
|
||||
//! \param[in] geo XML element to parse
|
||||
MultiPatchModelGenerator3D(const TiXmlElement* geo);
|
||||
//! \brief Empty destructor.
|
||||
virtual ~MultiPatchModelGenerator3D() {}
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include "IFEM.h"
|
||||
|
||||
|
||||
//! \brief Template specialization for 1D.
|
||||
//! \param[in] geo XML element containing geometry definition
|
||||
template<>
|
||||
ModelGenerator* SIMMultiPatchModelGen<SIM1D>::getModelGenerator(const TiXmlElement* geo) const
|
||||
{
|
||||
@@ -28,6 +30,8 @@ ModelGenerator* SIMMultiPatchModelGen<SIM1D>::getModelGenerator(const TiXmlEleme
|
||||
}
|
||||
|
||||
|
||||
//! \brief Template specialization for 2D.
|
||||
//! \param[in] geo XML element containing geometry definition
|
||||
template<>
|
||||
ModelGenerator* SIMMultiPatchModelGen<SIM2D>::getModelGenerator(const TiXmlElement* geo) const
|
||||
{
|
||||
@@ -36,6 +40,8 @@ ModelGenerator* SIMMultiPatchModelGen<SIM2D>::getModelGenerator(const TiXmlEleme
|
||||
}
|
||||
|
||||
|
||||
//! \brief Template specialization for 3D.
|
||||
//! \param[in] geo XML element containing geometry definition
|
||||
template<>
|
||||
ModelGenerator* SIMMultiPatchModelGen<SIM3D>::getModelGenerator(const TiXmlElement* geo) const
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ protected:
|
||||
class NodalConstraintASMs1DHelper : public NodalConstraintASMHelper {
|
||||
public:
|
||||
//! \brief Constructor
|
||||
//! \param pch The associated ASM class
|
||||
//! \param spch The associated ASM class
|
||||
NodalConstraintASMs1DHelper(ASMs1D* spch) :
|
||||
NodalConstraintASMHelper(spch), pch(spch) {}
|
||||
|
||||
@@ -117,11 +117,11 @@ protected:
|
||||
class NodalConstraintASMs2DHelper : public NodalConstraintASMHelper {
|
||||
public:
|
||||
//! \brief Constructor
|
||||
//! \param pch The associated ASM class
|
||||
//! \param spch The associated ASM class
|
||||
NodalConstraintASMs2DHelper(ASMs2D* spch) :
|
||||
NodalConstraintASMHelper(spch), pch(spch) {}
|
||||
|
||||
//! \copydoc NodalConstrainASM2DHelper::getCorner
|
||||
//! \copydoc NodalConstraintASMHelper::getCorner
|
||||
int getCorner(int vertex, int basis)
|
||||
{
|
||||
int n1, n2;
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
return pch->getNodeID(idxs[vertex-1]+ofs);
|
||||
}
|
||||
|
||||
//! \copydoc NodalConstrainASM2DHelper::constrainEdge
|
||||
//! \copydoc NodalConstraintASMHelper::constrainEdge
|
||||
void constrainEdge(int item, int comp, int basis, int idx)
|
||||
{
|
||||
size_t ofs = getStartNode(basis);
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
return pch->getNodeID(idxs[vertex-1]+ofs);
|
||||
}
|
||||
|
||||
//! \copydoc NodalConstrainASMHelper::constrainEdge
|
||||
//! \copydoc NodalConstraintASMHelper::constrainEdge
|
||||
void constrainEdge(int item, int comp, int basis, int idx)
|
||||
{
|
||||
size_t node = getStartNode(basis)+1;
|
||||
@@ -346,6 +346,7 @@ static NodalConstraintASMHelper* get2DHelper(ASMbase* pch)
|
||||
}
|
||||
|
||||
|
||||
//! \brief Template specialization for 1D.
|
||||
template<> bool SIMNodalConstraint<SIM1D>::applyConstraint()
|
||||
{
|
||||
for (const auto& it3 : vertConstraints) {
|
||||
@@ -372,6 +373,7 @@ template<> bool SIMNodalConstraint<SIM1D>::applyConstraint()
|
||||
}
|
||||
|
||||
|
||||
//! \brief Template specialization for 2D.
|
||||
template<> bool SIMNodalConstraint<SIM2D>::applyConstraint()
|
||||
{
|
||||
for (const auto& it3 : vertConstraints) {
|
||||
@@ -394,6 +396,7 @@ template<> bool SIMNodalConstraint<SIM2D>::applyConstraint()
|
||||
}
|
||||
|
||||
|
||||
//! \brief Template specialization for 3D.
|
||||
template<> bool SIMNodalConstraint<SIM3D>::applyConstraint()
|
||||
{
|
||||
for (const auto& it3 : vertConstraints) {
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
namespace StabilizationUtils {
|
||||
//! \brief Returns characteristic element size
|
||||
//! \param XC The element corner coordinates
|
||||
//! \param nsd Number of spatial dimensions
|
||||
//! \details The size is taken as the shortest edge length
|
||||
double getElementSize(const std::vector<Vec3>& XC, int nsd);
|
||||
|
||||
@@ -54,6 +55,8 @@ namespace StabilizationUtils {
|
||||
//! \param[in] G The G matrix
|
||||
//! \param[out] tauM Stabilization parameter for momentum
|
||||
//! \param[out] tauC Stabilization parameter for continuity
|
||||
//! \param[in] Ct VMS parameter
|
||||
//! \param[in] Cl VMS parameter
|
||||
//! \details Stabilization parameters in integration point
|
||||
bool getTauNSALEPt(double dt, double mu, const Vector& U, const Matrix& G,
|
||||
double& tauM, double& tauC, const double Ct=2.0, const double Cl=36.0);
|
||||
|
||||
@@ -199,6 +199,7 @@ public:
|
||||
//! \param[in] oldVars Control point variables associated with \a oldBasis
|
||||
//! \param[out] newVars Gauss point variables associated with this patch.
|
||||
//! \param[in] nGauss Number of Gauss points along a knot-span
|
||||
//! \param[in] nf Number of fields to transfer
|
||||
bool transferCntrlPtVars(LR::LRSpline* oldBasis,
|
||||
const RealArray& oldVars, RealArray& newVars,
|
||||
int nGauss, int nf = 1) const;
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
return A.midx < B.midx;
|
||||
}
|
||||
protected:
|
||||
const DomainDecomposition& dd;
|
||||
const DomainDecomposition& dd; //!< Domain decomposition holding patch owner data
|
||||
};
|
||||
|
||||
std::set<ASM::Interface, SlaveOrder> ghostConnections; //!< Connections to other processes.
|
||||
@@ -164,7 +164,7 @@ private:
|
||||
//! \brief Calculates 3D subdomains with a given overlap.
|
||||
//! \param[in] nel1 Number of knot-spans in first parameter direction.
|
||||
//! \param[in] nel2 Number of knot-spans in second parameter direction.
|
||||
//! \param[in] nel2 Number of knot-spans in third parameter direction.
|
||||
//! \param[in] nel3 Number of knot-spans in third parameter direction.
|
||||
//! \param[in] g1 Number of subdomains in first parameter direction.
|
||||
//! \param[in] g2 Number of subdomains in second parameter direction.
|
||||
//! \param[in] g3 Number of subdomains in third parameter direction.
|
||||
@@ -178,6 +178,7 @@ private:
|
||||
//! \param pidx Patch index
|
||||
//! \param lidx Boundary index on patch
|
||||
//! \param cbasis If non-empty, bases to connect
|
||||
//! \param dim Dimension of boundary
|
||||
//! \param thick Thickness of connection (subdivisions)
|
||||
//! \param orient Orientation of boundary (needed for unstructured)
|
||||
std::vector<int> setupEquationNumbers(const SIMbase& sim,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define _IMMERSED_BOUNDARIES_H
|
||||
|
||||
#ifndef Real
|
||||
#define Real double
|
||||
#define Real double //!< The floating point type to use
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -61,9 +61,10 @@ public:
|
||||
protected:
|
||||
const ASMu2D& myPatch; //!< Reference to the patch being integrated
|
||||
|
||||
//! \brief Struct describing an intersection of mesh lines.
|
||||
struct Intersection {
|
||||
int continuity;
|
||||
std::vector<double> pts;
|
||||
int continuity; //!< Continuity across intersection
|
||||
std::vector<double> pts; //!< Intersection points
|
||||
};
|
||||
|
||||
//! \brief Intersections for elements. Key: element << 4 + edge (1..4)
|
||||
|
||||
@@ -199,7 +199,14 @@ private:
|
||||
bool symm; //!< Flags whether the matrix is symmetric or not
|
||||
};
|
||||
|
||||
//! \brief Multiply a matrix with a scalar.
|
||||
//! \param[in] alpha Scalar value
|
||||
//! \param[in] A The matrix to scale
|
||||
DenseMatrix operator*(Real alpha, const DenseMatrix& A);
|
||||
|
||||
//! \brief Multiply a matrix with a scalar.
|
||||
//! \param[in] A The matrix to scale
|
||||
//! \param[in] alpha Scalar value
|
||||
DenseMatrix operator*(const DenseMatrix& A, Real alpha);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -137,10 +137,10 @@ ISTLMatrix::~ISTLMatrix ()
|
||||
}
|
||||
|
||||
|
||||
void ISTLMatrix::initAssembly (const SAM& sam, bool b)
|
||||
void ISTLMatrix::initAssembly (const SAM& sam, bool delayLocking)
|
||||
{
|
||||
SparseMatrix::initAssembly(sam, b);
|
||||
SparseMatrix::preAssemble(sam, b);
|
||||
SparseMatrix::initAssembly(sam, delayLocking);
|
||||
SparseMatrix::preAssemble(sam, delayLocking);
|
||||
|
||||
std::vector<std::set<int>> dofc;
|
||||
sam.getDofCouplings(dofc);
|
||||
|
||||
@@ -77,9 +77,12 @@ public:
|
||||
|
||||
//! \brief Return associated process administrator
|
||||
const ProcessAdm& getAdm() const { return adm; }
|
||||
typedef Dune::BlockVector<Dune::FieldVector<double,1>> Vec;
|
||||
|
||||
typedef Dune::BlockVector<Dune::FieldVector<double,1>> Vec; //!< Convenice typedef
|
||||
|
||||
//! \brief Obtain a reference to the dune vector.
|
||||
Vec& getVector() { return x; }
|
||||
//! \brief Obtain a const reference to the dune vector.
|
||||
const Vec& getVector() const { return x; }
|
||||
|
||||
protected:
|
||||
@@ -117,7 +120,8 @@ public:
|
||||
//! The PETSc data structures are initialized and the all symbolic operations
|
||||
//! that are needed before the actual assembly can start are performed.
|
||||
//! \param[in] sam Auxiliary data describing the FE model topology, etc.
|
||||
virtual void initAssembly(const SAM& sam, bool);
|
||||
//! \param[in] delayLocking If \e true, do not lock the sparsity pattern yet
|
||||
virtual void initAssembly(const SAM& sam, bool delayLocking);
|
||||
|
||||
//! \brief Initializes the matrix to zero assuming it is properly dimensioned.
|
||||
virtual void init();
|
||||
|
||||
@@ -31,6 +31,8 @@ class LinSolParams;
|
||||
class ProcessAdm;
|
||||
|
||||
|
||||
namespace ISTL {
|
||||
|
||||
/*! This implements a Schur-decomposition based preconditioner for the
|
||||
* block system
|
||||
* [A B]
|
||||
@@ -43,8 +45,6 @@ class ProcessAdm;
|
||||
* S = D - C*diag(A)^-1*B. The B block may be dropped.
|
||||
!*/
|
||||
|
||||
namespace ISTL {
|
||||
|
||||
class BlockPreconditioner : public Preconditioner {
|
||||
public:
|
||||
// define the category
|
||||
@@ -55,7 +55,8 @@ public:
|
||||
|
||||
//! \brief Constructor
|
||||
//! \param[in] A The system matrix
|
||||
//! \param[in] dd Domain decomposition
|
||||
//! \param[in] dd_ Domain decomposition
|
||||
//! \param[in] schurType Type of schur decomposition to use
|
||||
BlockPreconditioner(const ISTL::Mat& A, const DomainDecomposition& dd_,
|
||||
const std::string& schurType);
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ bool LinSolParams::BlockParams::read(const TiXmlElement* elem, const std::string
|
||||
if (utl::getAttribute(child, "max_coarse_size", v))
|
||||
addValue("multigrid_max_coarse_size", v);
|
||||
} else if (!strcasecmp(child->Value(),"dirsmoother")) {
|
||||
size_t order;
|
||||
int order;
|
||||
std::string type;
|
||||
|
||||
if (!utl::getAttribute(child,"type",type))
|
||||
@@ -119,7 +119,7 @@ bool LinSolParams::BlockParams::read(const TiXmlElement* elem, const std::string
|
||||
if (!utl::getAttribute(child,"order",order))
|
||||
return false;
|
||||
|
||||
dirSmoother.push_back(DirSmoother(order, type));
|
||||
dirSmoother.push_back(DirSmoother{order, type});
|
||||
} else if (!strcasecmp(child->Value(), "asm")) {
|
||||
std::string v;
|
||||
if (utl::getAttribute(child, "nx", v))
|
||||
|
||||
@@ -22,17 +22,34 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/*!
|
||||
\brief A key-value store for settings.
|
||||
*/
|
||||
|
||||
class SettingMap {
|
||||
public:
|
||||
//! \brief Add a value to the store.
|
||||
//! \param[in] key The key
|
||||
//! \param[in] value The value
|
||||
void addValue(const std::string& key, const std::string& value);
|
||||
|
||||
//! \brief Obtain a value as a string.
|
||||
//! \param[in] key The key
|
||||
std::string getStringValue(const std::string& key) const;
|
||||
|
||||
//! \brief Obtain a value as an integer.
|
||||
//! \param[in] key The key
|
||||
int getIntValue(const std::string& key) const;
|
||||
|
||||
//! \brief Obtain a value as an double.
|
||||
//! \param[in] key The key
|
||||
double getDoubleValue(const std::string& key) const;
|
||||
|
||||
//! \brief Checks if the store holds a value for a key.
|
||||
//! \param[in] key The key
|
||||
bool hasValue(const std::string& key) const;
|
||||
private:
|
||||
std::map<std::string, std::string> values;
|
||||
std::map<std::string, std::string> values; //!< Map of key-value pairs
|
||||
};
|
||||
|
||||
class TiXmlElement;
|
||||
@@ -64,17 +81,16 @@ public:
|
||||
public:
|
||||
int order; //!< Ordering of DOFs
|
||||
std::string type; //!< Directional smoother types
|
||||
|
||||
DirSmoother(int o, const std::string& t) : order(o), type(t) {}
|
||||
};
|
||||
|
||||
//! \brief Read settings from XML block
|
||||
//! \param[in] child XML block
|
||||
//! \param[in] prefix Prefix to add to read data
|
||||
bool read(const TiXmlElement* child, const std::string& prefix="");
|
||||
|
||||
size_t basis; //!< Basis for block
|
||||
size_t comps; //!< Components from basis (1, 2, 3, 12, 13, 23, 123, ..., 0 = all)
|
||||
std::vector<DirSmoother> dirSmoother;
|
||||
std::vector<DirSmoother> dirSmoother; //!< Directional smoother data
|
||||
};
|
||||
|
||||
//! \brief Number of blocks in matrix system
|
||||
|
||||
@@ -178,10 +178,10 @@ PETScMatrix::~PETScMatrix ()
|
||||
}
|
||||
|
||||
|
||||
void PETScMatrix::initAssembly (const SAM& sam, bool b)
|
||||
void PETScMatrix::initAssembly (const SAM& sam, bool delayLocking)
|
||||
{
|
||||
SparseMatrix::initAssembly(sam, b);
|
||||
SparseMatrix::preAssemble(sam, b);
|
||||
SparseMatrix::initAssembly(sam, delayLocking);
|
||||
SparseMatrix::preAssemble(sam, delayLocking);
|
||||
|
||||
const SAMpatchPETSc* samp = dynamic_cast<const SAMpatchPETSc*>(&sam);
|
||||
if (!samp)
|
||||
|
||||
@@ -116,7 +116,8 @@ public:
|
||||
//! The PETSc data structures are initialized and the all symbolic operations
|
||||
//! that are needed before the actual assembly can start are performed.
|
||||
//! \param[in] sam Auxiliary data describing the FE model topology, etc.
|
||||
virtual void initAssembly(const SAM& sam, bool);
|
||||
//! \param[in] delayLocking If \e true, do not lock the sparsity pattern yet
|
||||
virtual void initAssembly(const SAM& sam, bool delayLocking);
|
||||
|
||||
//! \brief Initializes the matrix to zero assuming it is properly dimensioned.
|
||||
virtual void init();
|
||||
@@ -208,10 +209,10 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
//! \brief Matrix-vector product
|
||||
//! \brief Matrix-vector product.
|
||||
PETScVector operator*(const SystemMatrix& A, const PETScVector& b);
|
||||
|
||||
//! \brief Solve linear system
|
||||
PETScVector operator/(const SystemMatrix& A, const PETScVector& b);
|
||||
//! \brief Solve linear system.
|
||||
PETScVector operator/(SystemMatrix& A, const PETScVector& b);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,21 +1,49 @@
|
||||
// $Id
|
||||
//==============================================================================
|
||||
//!
|
||||
//! \file PETScPCPerm.C
|
||||
//!
|
||||
//! \date Jan 15 2010
|
||||
//!
|
||||
//! \author Runar Holdahl / SINTEF
|
||||
//!
|
||||
//! \brief Permutation for PETSc preconditioners
|
||||
//!
|
||||
//==============================================================================
|
||||
|
||||
#ifndef PCPERM_H_IS_INCLUDED
|
||||
#define PCPERM_H_IS_INCLUDED
|
||||
|
||||
#include "petscksp.h"
|
||||
|
||||
|
||||
/* Define context for user-defined preconditioner */
|
||||
//! \brief Define context for user-defined preconditioner
|
||||
typedef struct {
|
||||
IS *order;
|
||||
Mat Aperm;
|
||||
PC pc;
|
||||
PetscBool identity;
|
||||
IS *order; //!< The index set describing the ordering
|
||||
Mat Aperm; //!< Permutated matrix
|
||||
PC pc; //!< Preconditioner definition
|
||||
PetscBool identity; //!< \e true if the permutation is identity matrix
|
||||
} PCPerm;
|
||||
|
||||
/* Declare routines for user-defined preconditioner */
|
||||
//! \brief Create the permutated preconditioner.
|
||||
//! \param[out] pc Pointer to the preconditioner to create.
|
||||
extern PetscErrorCode PCPermCreate(PCPerm** pc);
|
||||
|
||||
//! \brief Configure the permutated preconditioner.
|
||||
//! \param[out] pc Preconditioner to create
|
||||
//! \param perm The index set describing the ordering
|
||||
//! \param A The matrix to permutate
|
||||
//! \param type type for preconditioner to create
|
||||
extern PetscErrorCode PCPermSetUp(PC pc, IS *perm, Mat A, const char* type);
|
||||
|
||||
//! \brief Apply the permutated preconditioner.
|
||||
//! \param pc Preconditioner to apply
|
||||
//! \param[in] x Vector to apply preconditioner to
|
||||
//! \param[out] y The evaluate preconditioner value
|
||||
extern PetscErrorCode PCPermApply(PC pc, Vec x, Vec y);
|
||||
|
||||
//! \brief Destroy a permutated preconditioner.
|
||||
//! \param pc Preconditioner to destroy
|
||||
extern PetscErrorCode PCPermDestroy(PC pc);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -119,6 +119,11 @@ static std::string AddPrefix(const std::string& prefix, const std::string& data)
|
||||
}
|
||||
|
||||
|
||||
//! \brief Conditionally add a setting from map to PETsc.
|
||||
//! \param[in] prefix Prefix for petsc setting
|
||||
//! \param[in] petsc_option Name of option in PETsc
|
||||
//! \param[in] map_option Name of option in setting map
|
||||
//! \param[in] map The setting map
|
||||
static void condSetup(const std::string& prefix, const std::string& petsc_option,
|
||||
const std::string& map_option, const SettingMap& map)
|
||||
{
|
||||
|
||||
@@ -49,10 +49,14 @@ enum SchurPrec { SIMPLE, MSIMPLER, PCD };
|
||||
class PETScSolParams
|
||||
{
|
||||
public:
|
||||
//! \brief Default constructor.
|
||||
//! \param[in] spar The base linear solver parameters
|
||||
//! \param[in] padm The process administrator
|
||||
PETScSolParams(const LinSolParams& spar, const ProcessAdm& padm) :
|
||||
params(spar), adm(padm)
|
||||
{}
|
||||
|
||||
//! \brief Destructor.
|
||||
~PETScSolParams()
|
||||
{
|
||||
if (SPsetup)
|
||||
@@ -92,9 +96,8 @@ public:
|
||||
|
||||
protected:
|
||||
//! \brief Set directional smoother
|
||||
//! \param[in] PC The preconditioner to add smoother for
|
||||
//! \param[in] pc The preconditioner to add smoother for
|
||||
//! \param[in] P The preconditioner matrix
|
||||
//! \param[in] params The block parameters
|
||||
//! \param[in] iBlock The index of the block to add smoother to
|
||||
//! \param[in] dirIndexSet The index set for the smoother
|
||||
bool addDirSmoother(PC pc, const Mat& P,
|
||||
@@ -107,7 +110,7 @@ protected:
|
||||
|
||||
//! \brief Set GAMG options
|
||||
//! \param[in] prefix The prefix of the block to set parameters for
|
||||
//! \param[in] block The index of the block to set parameters for
|
||||
//! \param[in] map The map of settings to use
|
||||
void setGAMGOptions(const std::string& prefix, const SettingMap& map);
|
||||
|
||||
//! \brief Set Hypre options
|
||||
@@ -116,14 +119,13 @@ protected:
|
||||
void setHypreOptions(const std::string& prefix, const SettingMap& map);
|
||||
|
||||
//! \brief Setup the coarse solver in a multigrid
|
||||
//! \param[in] PC The preconditioner to set coarse solver for
|
||||
//! \param[in] pc The preconditioner to set coarse solver for
|
||||
//! \param[in] prefix The prefix of the block to set parameters for
|
||||
//! \param[in] map The settings to apply
|
||||
void setupCoarseSolver(PC& pc, const std::string& prefix, const SettingMap& map);
|
||||
|
||||
//! \brief Setup the smoothers in a multigrid
|
||||
//! \param[in] PC The preconditioner to set coarse solver for
|
||||
//! \param[in] params The linear solver parameters
|
||||
//! \param[in] pc The preconditioner to set coarse solver for
|
||||
//! \param[in] iBlock The index of the block to set parameters for
|
||||
//! \param[in] dirIndexSet The index set for direction smoothers
|
||||
//! \param blockEqs The local equations belonging to block
|
||||
@@ -133,7 +135,7 @@ protected:
|
||||
|
||||
//! \brief Setup an additive Schwarz preconditioner
|
||||
//! \param pc The preconditioner to set coarse solver for
|
||||
//! param[in] block The block the preconditioner belongs to
|
||||
//! \param[in] block The block the preconditioner belongs to
|
||||
//! \param[in] asmlu True to use LU subdomain solvers
|
||||
//! \param[in] smoother True if this is a smoother in multigrid
|
||||
//! \param blockEqs The local equations belonging to block
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
const std::string& getName() const { return m_name; }
|
||||
|
||||
//! \brief Write restart data.
|
||||
//! \param[in] step Level to write restart data at
|
||||
//! \param[in] level Level to write restart data at
|
||||
//! \param[in] data Data to write
|
||||
virtual bool writeRestartData(int level, const DataExporter::SerializeData& data) = 0;
|
||||
|
||||
|
||||
@@ -823,9 +823,10 @@ bool HDF5Writer::writeRestartData(int level, const DataExporter::SerializeData&
|
||||
}
|
||||
|
||||
|
||||
//! \brief A struct holding the context for a restart.
|
||||
struct read_restart_ctx {
|
||||
HDF5Writer* w;
|
||||
DataExporter::SerializeData* data;
|
||||
HDF5Writer* w; //!< HDF5 reader/writer to use
|
||||
DataExporter::SerializeData* data; //!< The serialized data
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ class HDF5Writer : public DataWriter
|
||||
public:
|
||||
//! \brief The constructor opens a named HDF5-file.
|
||||
//! \param[in] name The name (filename without extension) of data file
|
||||
//! \param[in] adm The process administrator
|
||||
//! \param[in] append Whether to append to or overwrite an existing file
|
||||
//! \param[in] keepopen Whether to always keep the HDF5 open
|
||||
HDF5Writer(const std::string& name, const ProcessAdm& adm, bool append = false,
|
||||
|
||||
@@ -19,5 +19,8 @@
|
||||
std::string& replaceAll(std::string& context,
|
||||
const std::string& from, const std::string& to);
|
||||
|
||||
//! \brief Split a string on a given delimiter
|
||||
//! \param[in] str The string to split
|
||||
//! \param[in] delimiter Function callback for the delimiter to use
|
||||
std::vector<std::string> splitString(const std::string& str,
|
||||
int delimiter(int) = ::isspace);
|
||||
|
||||
@@ -57,7 +57,7 @@ void XMLWriter::openFile(int level)
|
||||
}
|
||||
|
||||
|
||||
void XMLWriter::closeFile(int level, bool force)
|
||||
void XMLWriter::closeFile(int level, bool)
|
||||
{
|
||||
if (!m_doc || m_rank != 0)
|
||||
return;
|
||||
|
||||
@@ -46,6 +46,7 @@ public:
|
||||
|
||||
//! \brief The constructor assigns the file name storing this field.
|
||||
//! \param[in] name The name (file name without extension) of data file
|
||||
//! \param[in] adm The process administrator
|
||||
XMLWriter(const std::string& name, const ProcessAdm& adm);
|
||||
|
||||
//! \brief Empty destructor.
|
||||
|
||||
Reference in New Issue
Block a user