本文整理汇总了C++中AssemblyOptions::verbosityLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ AssemblyOptions::verbosityLevel方法的具体用法?C++ AssemblyOptions::verbosityLevel怎么用?C++ AssemblyOptions::verbosityLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssemblyOptions
的用法示例。
在下文中一共展示了AssemblyOptions::verbosityLevel方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
std::unique_ptr<typename ElementaryLocalOperator<BasisFunctionType,
ResultType>::LocalAssembler>
ElementaryLocalOperator<BasisFunctionType, ResultType>::makeAssembler(
const QuadratureStrategy &quadStrategy,
const AssemblyOptions &options) const {
typedef Fiber::RawGridGeometry<CoordinateType> RawGridGeometry;
typedef std::vector<const Fiber::Shapeset<BasisFunctionType> *>
ShapesetPtrVector;
const bool verbose = (options.verbosityLevel() >= VerbosityLevel::DEFAULT);
shared_ptr<RawGridGeometry> testRawGeometry, trialRawGeometry;
shared_ptr<GeometryFactory> testGeometryFactory, trialGeometryFactory;
shared_ptr<Fiber::OpenClHandler> openClHandler;
shared_ptr<ShapesetPtrVector> testShapesets, trialShapesets;
bool cacheSingularIntegrals;
if (verbose)
std::cout << "Collecting data for assembler construction..." << std::endl;
this->collectDataForAssemblerConstruction(
options, testRawGeometry, trialRawGeometry, testGeometryFactory,
trialGeometryFactory, testShapesets, trialShapesets, openClHandler,
cacheSingularIntegrals);
if (verbose)
std::cout << "Data collection finished." << std::endl;
assert(testRawGeometry == trialRawGeometry);
assert(testGeometryFactory == trialGeometryFactory);
return quadStrategy.makeAssemblerForLocalOperators(
testGeometryFactory, testRawGeometry, testShapesets, trialShapesets,
make_shared_from_ref(testTransformations()),
make_shared_from_ref(trialTransformations()),
make_shared_from_ref(integral()), openClHandler);
}
示例2: reallyMakeAssemblers
std::pair<
shared_ptr<typename HypersingularIntegralOperator<
BasisFunctionType, KernelType, ResultType>::LocalAssembler>,
shared_ptr<typename HypersingularIntegralOperator<
BasisFunctionType, KernelType, ResultType>::LocalAssembler>
>
HypersingularIntegralOperator<BasisFunctionType, KernelType, ResultType>::makeAssemblers(
const QuadratureStrategy& quadStrategy,
const AssemblyOptions& options) const
{
typedef Fiber::RawGridGeometry<CoordinateType> RawGridGeometry;
typedef std::vector<const Fiber::Shapeset<BasisFunctionType>*> ShapesetPtrVector;
const bool verbose = (options.verbosityLevel() >= VerbosityLevel::DEFAULT);
shared_ptr<RawGridGeometry> testRawGeometry, trialRawGeometry;
shared_ptr<GeometryFactory> testGeometryFactory, trialGeometryFactory;
shared_ptr<Fiber::OpenClHandler> openClHandler;
shared_ptr<ShapesetPtrVector> testShapesets, trialShapesets;
bool cacheSingularIntegrals;
if (verbose)
std::cout << "Collecting data for assembler construction..." << std::endl;
this->collectDataForAssemblerConstruction(options,
testRawGeometry, trialRawGeometry,
testGeometryFactory, trialGeometryFactory,
testShapesets, trialShapesets,
openClHandler, cacheSingularIntegrals);
if (verbose)
std::cout << "Data collection finished." << std::endl;
bool makeSeparateOffDiagonalAssembler =
options.assemblyMode() == AssemblyOptions::ACA &&
options.acaOptions().mode == AcaOptions::HYBRID_ASSEMBLY;
return reallyMakeAssemblers(quadStrategy,
testGeometryFactory, trialGeometryFactory,
testRawGeometry, trialRawGeometry,
testShapesets, trialShapesets, openClHandler,
options.parallelizationOptions(),
options.verbosityLevel(),
cacheSingularIntegrals,
makeSeparateOffDiagonalAssembler);
}
示例3: runtime_error
std::auto_ptr<DiscreteBoundaryOperator<ResultType> >
AcaGlobalAssembler<BasisFunctionType, ResultType>::assembleDetachedWeakForm(
const Space<BasisFunctionType>& testSpace,
const Space<BasisFunctionType>& trialSpace,
const std::vector<LocalAssembler*>& localAssemblers,
const std::vector<const DiscreteBndOp*>& sparseTermsToAdd,
const std::vector<ResultType>& denseTermsMultipliers,
const std::vector<ResultType>& sparseTermsMultipliers,
const AssemblyOptions& options,
int symmetry)
{
#ifdef WITH_AHMED
typedef AhmedDofWrapper<CoordinateType> AhmedDofType;
typedef ExtendedBemCluster<AhmedDofType> AhmedBemCluster;
typedef bemblcluster<AhmedDofType, AhmedDofType> AhmedBemBlcluster;
typedef DiscreteAcaBoundaryOperator<ResultType> DiscreteAcaLinOp;
const AcaOptions& acaOptions = options.acaOptions();
const bool indexWithGlobalDofs = acaOptions.globalAssemblyBeforeCompression;
const bool verbosityAtLeastDefault =
(options.verbosityLevel() >= VerbosityLevel::DEFAULT);
const bool verbosityAtLeastHigh =
(options.verbosityLevel() >= VerbosityLevel::HIGH);
// Currently we don't support Hermitian ACA operators. This is because we
// don't have the means to really test them -- we would need complex-valued
// basis functions for that. (Assembly of such a matrix would be very easy
// -- just change complex_sym from true to false in the call to apprx_sym()
// in AcaWeakFormAssemblerLoopBody::operator() -- but operations on
// symmetric/Hermitian matrices are not always trivial and we do need to be
// able to test them properly.)
bool symmetric = symmetry & SYMMETRIC;
if (symmetry & HERMITIAN && !(symmetry & SYMMETRIC) &&
verbosityAtLeastDefault)
std::cout << "Warning: assembly of non-symmetric Hermitian H-matrices "
"is not supported yet. A general H-matrix will be assembled"
<< std::endl;
#ifndef WITH_TRILINOS
if (!indexWithGlobalDofs)
throw std::runtime_error("AcaGlobalAssembler::assembleDetachedWeakForm(): "
"ACA assembly with globalAssemblyBeforeCompression "
"set to false requires BEM++ to be linked with "
"Trilinos");
#endif // WITH_TRILINOS
const size_t testDofCount = indexWithGlobalDofs ?
testSpace.globalDofCount() : testSpace.flatLocalDofCount();
const size_t trialDofCount = indexWithGlobalDofs ?
trialSpace.globalDofCount() : trialSpace.flatLocalDofCount();
if (symmetric && testDofCount != trialDofCount)
throw std::invalid_argument("AcaGlobalAssembler::assembleDetachedWeakForm(): "
"you cannot generate a symmetric weak form "
"using test and trial spaces with different "
"numbers of DOFs");
// o2p: map of original indices to permuted indices
// p2o: map of permuted indices to original indices
typedef ClusterConstructionHelper<BasisFunctionType> CCH;
shared_ptr<AhmedBemCluster> testClusterTree;
shared_ptr<IndexPermutation> test_o2pPermutation, test_p2oPermutation;
CCH::constructBemCluster(testSpace, indexWithGlobalDofs, acaOptions,
testClusterTree,
test_o2pPermutation, test_p2oPermutation);
shared_ptr<AhmedBemCluster> trialClusterTree;
shared_ptr<IndexPermutation> trial_o2pPermutation, trial_p2oPermutation;
if (symmetric || &testSpace == &trialSpace) {
trialClusterTree = testClusterTree;
trial_o2pPermutation = test_o2pPermutation;
trial_p2oPermutation = test_p2oPermutation;
} else
CCH::constructBemCluster(trialSpace, indexWithGlobalDofs, acaOptions,
trialClusterTree,
trial_o2pPermutation, trial_p2oPermutation);
// // Export VTK plots showing the disctribution of leaf cluster ids
// std::vector<unsigned int> testClusterIds;
// getClusterIds(*testClusterTree, test_p2oPermutation->permutedIndices(), testClusterIds);
// testSpace.dumpClusterIds("testClusterIds", testClusterIds,
// indexWithGlobalDofs ? GLOBAL_DOFS : FLAT_LOCAL_DOFS);
// std::vector<unsigned int> trialClusterIds;
// getClusterIds(*trialClusterTree, trial_p2oPermutation->permutedIndices(), trialClusterIds);
// trialSpace.dumpClusterIds("trialClusterIds", trialClusterIds,
// indexWithGlobalDofs ? GLOBAL_DOFS : FLAT_LOCAL_DOFS);
if (verbosityAtLeastHigh)
std::cout << "Test cluster count: " << testClusterTree->getncl()
<< "\nTrial cluster count: " << trialClusterTree->getncl()
<< std::endl;
unsigned int blockCount = 0;
shared_ptr<AhmedBemBlcluster> bemBlclusterTree(
CCH::constructBemBlockCluster(acaOptions, symmetric,
*testClusterTree, *trialClusterTree,
blockCount).release());
if (verbosityAtLeastHigh)
std::cout << "Mblock count: " << blockCount << std::endl;
//.........这里部分代码省略.........