v0.16.3
Loading...
Searching...
No Matches
ClosestPointProjection.cpp
Go to the documentation of this file.
1/**
2 * \file ClosestPointProjection.cpp
3 * \ingroup adoc_plasticity
4 *
5 * \brief Implementation of nested integration algorithm for plasticity
6 *
7 */
8
9#include <MoFEM.hpp>
10using namespace MoFEM;
11
12#include <ADOLCPlasticity.hpp>
13namespace ADOLCPlasticity {
14
16
17 if (!LogManager::checkIfChannelExist("ADOLCPlasticityWold")) {
18 auto core_log = logging::core::get();
19
21 "ADOLCPlasticityWold"));
23 "ADOLCPlasticitySync"));
25 "ADOLCPlasticitySelf"));
26
27 LogManager::setLog("ADOLCPlasticityWold");
28 LogManager::setLog("ADOLCPlasticitySync");
29 LogManager::setLog("ADOLCPlasticitySelf");
30
31 MOFEM_LOG_TAG("ADOLCPlasticityWold", "ADOL-C Plasticity");
32 MOFEM_LOG_TAG("ADOLCPlasticitySync", "ADOL-C Plasticity");
33 MOFEM_LOG_TAG("ADOLCPlasticitySelf", "ADOL-C Plasticity");
34 }
35
36 tapesTags = {0, 1, 2}; //< set tapes default tags
37
38 implHessianW = PETSC_FALSE;
39 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "-impl_hessianW", &implHessianW, 0);
40}
41
44
45 auto plastic_strain = getPlasticStrain();
46 auto total_strain = getTotalStrain();
47 auto internal_variables = getInternalVariables();
48
50 {
51 // active variables
52 a_plasticStrain.resize(6, false);
53 for (int ii = 0; ii < 6; ii++) {
54 a_plasticStrain[ii] <<= plastic_strain[ii];
55 }
56 a_sTrain.resize(6, false);
57 for (int ii = 0; ii < 6; ii++) {
58 a_sTrain[ii] <<= total_strain[ii];
59 }
61 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
62 a_internalVariables[ii] <<= internal_variables[ii];
63 }
64 // evaluete functions
66 a_w >>= w;
67 }
68 trace_off();
70}
71
74
75 auto stress = getStress();
76 auto internal_fluxes = getInternalFluxes();
77
79 {
80 // active variables
81 a_sTress.resize(6, false);
82 for (int ii = 0; ii < 6; ii++) {
83 a_sTress[ii] <<= stress[ii];
84 }
86 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
87 a_internalFluxes[ii] <<= internal_fluxes[ii];
88 }
89 // evaluete functions
91 // return variables
92 a_y >>= y;
93 }
94 trace_off();
96}
97
100
101 auto stress = getStress();
102 auto internal_fluxes = getInternalFluxes();
103
105 {
106 // active variables
107 a_sTress.resize(6, false);
108 for (int ii = 0; ii < 6; ii++) {
109 a_sTress[ii] <<= stress[ii];
110 }
112 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
113 a_internalFluxes[ii] <<= internal_fluxes[ii];
114 }
115 // evaluete functions
117 // return variables
118 a_h >>= h;
119 }
120 trace_off();
122}
123
126 int r;
127 int adloc_return_value = 0;
128 r = ::function(tapesTags[ClosestPointProjection::W], 1,
129 activeVariablesW.size(), &activeVariablesW[0], &w);
130 if (r < adloc_return_value) {
131 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
132 "ADOL-C function evaluation with error");
133 }
135 &activeVariablesW[0], &gradientW[0]);
136 if (r < adloc_return_value) {
137 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
138 "ADOL-C function evaluation with error");
139 }
140
141 hessianW.resize(activeVariablesW.size(), activeVariablesW.size(), false);
142 hessianW.clear();
143 vector<double *> hessian_w(activeVariablesW.size());
144 for (unsigned int dd = 0; dd < activeVariablesW.size(); dd++) {
145 hessian_w[dd] = &hessianW(dd, 0);
146 }
147 if (!implHessianW) {
148 // call adolc hessian (energy, active variables)
150 &activeVariablesW[0], &hessian_w[0]);
151 if (r < adloc_return_value) {
152 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
153 "ADOL-C function evaluation with error");
154 }
155 } else {
156 // call hard coded hessian depending on material model
157 CHKERR codedHessianW(hessian_w);
158 }
159
160 partialWStrainPlasticStrain.resize(6, 6, false);
161 for (int ii = 0; ii < 6; ii++) {
162 for (int jj = 0; jj < 6; jj++) {
163 partialWStrainPlasticStrain(ii, jj) = hessianW(6 + ii, jj);
164 }
165 }
166 C.resize(6, 6, false);
167 for (int ii = 0; ii < 6; ii++) {
168 for (int jj = 0; jj <= ii; jj++) {
169 C(ii, jj) = hessianW(6 + ii, 6 + jj);
170 }
171 }
173 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
174 for (unsigned int jj = 0; jj <= ii; jj++) {
175 D(ii, jj) = hessianW(12 + ii, 12 + jj);
176 }
177 }
179}
180
183 int r;
184 int adloc_return_value = 0;
185 r = ::function(tapesTags[ClosestPointProjection::W], 1,
186 activeVariablesW.size(), &activeVariablesW[0], &w);
187 if (r < adloc_return_value) {
188 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
189 "ADOL-C function evaluation with error");
190 }
192 &activeVariablesW[0], &gradientW[0]);
193 if (r < adloc_return_value) {
194 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
195 "ADOL-C function evaluation with error");
196 }
198}
199
202 auto active_variables_yh = getActiveVariablesYH();
203 int r;
204 int adloc_return_value = 0;
205 r = ::function(tapesTags[ClosestPointProjection::Y], 1,
206 active_variables_yh.size(), &active_variables_yh[0], &y);
207 if (r < adloc_return_value) {
208 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
209 "ADOL-C function evaluation with error");
210 }
211 gradientY.resize(active_variables_yh.size());
212 r = gradient(tapesTags[ClosestPointProjection::Y], active_variables_yh.size(),
213 &active_variables_yh[0], &gradientY[0]);
214 if (r < adloc_return_value) {
215 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
216 "ADOL-C function evaluation with error");
217 }
219 VectorAdaptor(6, ublas::shallow_array_adaptor<double>(6, &gradientY[0]));
222 ublas::shallow_array_adaptor<double>(nbInternalVariables, &gradientY[6]));
224}
227 auto active_variables_yh = getActiveVariablesYH();
228 int r;
229 int adloc_return_value = 0;
230 r = ::function(tapesTags[ClosestPointProjection::Y], 1,
231 active_variables_yh.size(), &active_variables_yh[0], &y);
232 if (r < adloc_return_value) {
233 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
234 "ADOL-C function evaluation with error");
235 }
237}
240 auto active_variables_yh = getActiveVariablesYH();
241 int r;
242 int adloc_return_value = 0;
243 r = ::function(tapesTags[ClosestPointProjection::H], 1,
244 active_variables_yh.size(), &active_variables_yh[0], &h);
245 if (r < adloc_return_value) {
246 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
247 "ADOL-C function evaluation with error");
248 }
249 gradientH.resize(active_variables_yh.size());
250 r = gradient(tapesTags[ClosestPointProjection::H], active_variables_yh.size(),
251 &active_variables_yh[0], &gradientH[0]);
252 if (r < adloc_return_value) {
253 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
254 "ADOL-C function evaluation with error");
255 }
256 hessianH.resize(6 + nbInternalVariables, 6 + nbInternalVariables, false);
257 hessianH.clear();
258 vector<double *> hessian_h(active_variables_yh.size());
259 for (int dd = 0; dd < active_variables_yh.size(); dd++) {
260 hessian_h[dd] = &hessianH(dd, 0);
261 }
262 r = hessian(tapesTags[ClosestPointProjection::H], active_variables_yh.size(),
263 &active_variables_yh[0], &hessian_h[0]);
264 if (r < adloc_return_value) {
265 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
266 "ADOL-C function evaluation with error");
267 }
269 VectorAdaptor(6, ublas::shallow_array_adaptor<double>(6, &gradientH[0]));
272 ublas::shallow_array_adaptor<double>(nbInternalVariables, &gradientH[6]));
273 partialHFlux *= -1;
274 partial2HSigma.resize(6, 6, false);
275 for (int ii = 0; ii < 6; ii++) {
276 for (int jj = 0; jj <= ii; jj++) {
277 partial2HSigma(ii, jj) = hessianH(ii, jj);
278 }
279 }
281 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
282 for (unsigned int jj = 0; jj <= ii; jj++) {
283 partial2HFlux(ii, jj) = -hessianH(6 + ii, 6 + jj);
284 }
285 }
286 partial2HSigmaFlux.resize(6, nbInternalVariables, false);
287 partial2HSigmaFlux.clear();
288 for (int ii = 0; ii < 6; ii++) {
289 for (unsigned int jj = 0; jj < nbInternalVariables; jj++) {
290 partial2HSigmaFlux(ii, jj) = -hessianH(6 + jj, ii);
291 }
292 }
294}
297 auto active_variables_yh = getActiveVariablesYH();
298 int r;
299 int adloc_return_value = 0;
300 r = ::function(tapesTags[ClosestPointProjection::H], 1,
301 active_variables_yh.size(), &active_variables_yh[0], &h);
302 if (r < adloc_return_value) {
303 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
304 "ADOL-C function evaluation with error");
305 }
306 gradientH.resize(active_variables_yh.size());
307 r = gradient(tapesTags[ClosestPointProjection::H], active_variables_yh.size(),
308 &active_variables_yh[0], &gradientH[0]);
309 if (r < adloc_return_value) {
310 SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
311 "ADOL-C function evaluation with error");
312 }
314 VectorAdaptor(6, ublas::shallow_array_adaptor<double>(6, &gradientH[0]));
317 ublas::shallow_array_adaptor<double>(nbInternalVariables, &gradientH[6]));
318 partialHFlux *= -1;
320}
321
324 PetscInt n;
325 n = 1 + 6 + nbInternalVariables;
326 dataA.resize(n, n, false);
327 Mat A_tmp;
328 Vec R_tmp, Chi_tmp, dChi_tmp;
329 CHKERR MatCreateSeqDense(PETSC_COMM_SELF, n, n, &dataA(0, 0), &A_tmp);
330 CHKERR VecCreateSeq(PETSC_COMM_SELF, n, &R_tmp);
331 CHKERR VecCreateSeq(PETSC_COMM_SELF, n, &Chi_tmp);
332 CHKERR VecCreateSeq(PETSC_COMM_SELF, n, &dChi_tmp);
333
334 A = SmartPetscObj<Mat>(A_tmp);
335 R = SmartPetscObj<Vec>(R_tmp);
336 Chi = SmartPetscObj<Vec>(Chi_tmp);
337 dChi = SmartPetscObj<Vec>(dChi_tmp);
338
340}
341
349
357
365
368
369 auto plastic_strain = getPlasticStrain();
370 auto internal_variables = getInternalVariables();
371
372 // Residual
373 double *array;
374 CHKERR VecGetArray(R, &array);
375 for (int ii = 0; ii < 6; ii++) {
376 array[ii] = -plastic_strain[ii] + plasticStrain0[ii] +
378 }
379 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
380 array[6 + ii] = -internal_variables[ii] + internalVariables0[ii] +
382 }
383 array[6 + nbInternalVariables] = y;
384 CHKERR VecRestoreArray(R, &array);
386}
387
390 // matrix A
391 CHKERR MatZeroEntries(A);
392 // row 0 (Strain)
394 MatrixDouble a01 = prod(partial2HSigmaFlux, D);
395 for (int ii = 0; ii < 6; ii++) {
396 for (int jj = 0; jj < 6; jj++) {
397 dataA(ii, jj) = deltaGamma * a00(ii, jj);
398 }
399 for (unsigned int jj = 0; jj < nbInternalVariables; jj++) {
400 dataA(ii, 6 + jj) = deltaGamma * a01(ii, jj);
401 }
402 dataA(ii, ii) -= 1;
403 }
404 for (int ii = 0; ii < 6; ii++) {
406 }
407 // row 1 (Fluxes)
408 MatrixDouble a11 = prod(partial2HFlux, D);
409 MatrixDouble a10 =
411 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
412 for (int jj = 0; jj < 6; jj++) {
413 dataA(6 + ii, jj) += deltaGamma * a10(ii, jj);
414 }
415 for (unsigned int jj = 0; jj < nbInternalVariables; jj++) {
416 dataA(6 + ii, 6 + jj) += deltaGamma * a11(ii, jj);
417 }
418 dataA(6 + ii, 6 + ii) -= 1;
419 }
420 for (unsigned int ii = 0; ii < nbInternalVariables; ii++) {
421 dataA(6 + ii, 6 + nbInternalVariables) = partialHFlux[ii];
422 }
423 // row 3 (Plastic multiplier)
424 VectorDouble partial_y_sigma_c =
426 VectorDouble partial_y_flux_d = prod(trans(D), partialYFlux);
427 for (unsigned int dd = 0; dd < partial_y_sigma_c.size(); dd++) {
428 dataA(6 + nbInternalVariables, dd) = partial_y_sigma_c[dd];
429 }
430 for (unsigned int dd = 0; dd < partial_y_flux_d.size(); dd++) {
431 dataA(6 + nbInternalVariables, 6 + dd) = partial_y_flux_d[dd];
432 }
434 CHKERR MatAssemblyBegin(A, MAT_FINAL_ASSEMBLY);
435 CHKERR MatAssemblyEnd(A, MAT_FINAL_ASSEMBLY);
437}
438
441 sNes = createSNES(PETSC_COMM_SELF);
442 CHKERR SNESSetFunction(sNes, R, ADOLCPlasticityRes, (void *)this);
443 CHKERR SNESSetJacobian(sNes, A, A, ADOLCPlasticityJac, (void *)this);
444
445 KSP ksp;
446 PC pc;
447 SNESLineSearch line_search;
448 CHKERR SNESGetKSP(sNes, &ksp);
449 CHKERR KSPGetPC(ksp, &pc);
450 CHKERR KSPSetType(ksp, KSPPREONLY);
451 CHKERR PCSetType(pc, PCLU);
452 CHKERR SNESSetTolerances(sNes, 1e-8, 1e-6, 1e-12, 20, 1000);
453 CHKERR SNESGetLineSearch(sNes, &line_search);
454 // CHKERR SNESLineSearchSetType(line_search, SNESLINESEARCHBASIC);
455 CHKERR SNESLineSearchSetType(line_search, SNESLINESEARCHBT);
456 // CHKERR SNESLineSearchSetType(line_search, SNESLINESEARCHL2);
457
458 CHKERR SNESAppendOptionsPrefix(sNes, "cp_");
459 CHKERR SNESSetFromOptions(sNes);
460
462}
463
466
467 auto plastic_strain = getPlasticStrain();
468 auto internal_variables = getInternalVariables();
469
470 {
471 double *array;
472 CHKERR VecGetArray(Chi, &array);
473 for (int ii = 0; ii < 6; ii++) {
474 array[ii] = plastic_strain[ii];
475 }
476 int nb_internal_variables = nbInternalVariables;
477 for (unsigned int ii = 0; ii < nb_internal_variables; ii++) {
478 array[6 + ii] = internal_variables[ii];
479 }
480 deltaGamma = 0;
481 CHKERR VecRestoreArray(Chi, &array);
482 }
483
484 CHKERR SNESSolve(sNes, PETSC_NULLPTR, Chi);
485 SNESConvergedReason reason;
486 CHKERR SNESGetConvergedReason(sNes, &reason);
487 if (reason < 0) {
488 int its;
489 CHKERR SNESGetIterationNumber(sNes, &its);
490 MOFEM_LOG_C("ADOLCPlasticitySelf", Sev::warning,
491 "Plasticity Closest Point Projection - number of Newton "
492 "iterations = %d",
493 its);
494 plastic_strain = plasticStrain0;
495 internal_variables = internalVariables0;
496 deltaGamma = 0;
497 } else {
498 double *array;
499 CHKERR VecGetArray(Chi, &array);
500 for (int ii = 0; ii < 6; ii++) {
501 plastic_strain[ii] = array[ii];
502 }
503 int nb_internal_variables = nbInternalVariables;
504 for (unsigned int ii = 0; ii < nb_internal_variables; ii++) {
505 internal_variables[ii] = array[6 + ii];
506 }
507 deltaGamma = array[6 + nb_internal_variables];
508 CHKERR VecRestoreArray(Chi, &array);
509 }
511}
512
517 Ep.resize(6, 6, false);
518 MatrixDouble ep_row; // inrement internal varaibles as result of incremen of
519 // total strain
520 ep_row = deltaGamma * prod(partial2HSigma, C);
521 MatrixDouble alpha_row;
522 alpha_row = deltaGamma * prod(trans(partial2HSigmaFlux), C);
523 VectorDouble y_row;
524 y_row = prod(C, partialYSigma);
525 const int n = 6 + nbInternalVariables;
526 // Iterate strains
527 for (int dd = 0; dd < 6; dd++) {
528 CHKERR VecZeroEntries(R);
529 double *array;
530 CHKERR VecGetArray(R, &array);
531 {
532 for (auto ii = 0; ii < 6; ii++) {
533 array[ii] = ep_row(ii, dd);
534 }
535 for (auto ii = 0; ii < nbInternalVariables; ii++) {
536 array[6 + ii] = alpha_row(ii, dd);
537 }
538 array[n] = y_row[dd];
539 }
540 CHKERR VecRestoreArray(R, &array);
541 CHKERR VecAssemblyBegin(R);
542 CHKERR VecAssemblyEnd(R);
543
544 KSP ksp;
545 CHKERR SNESGetKSP(sNes, &ksp);
546 CHKERR KSPSolve(ksp, R, dChi);
547 CHKERR VecGetArray(dChi, &array);
548 {
549 for (auto ii = 0; ii < 6; ii++) {
550 Ep(ii, dd) = array[ii];
551 }
552 }
553 CHKERR VecRestoreArray(dChi, &array);
554 }
555 Cp.resize(6, 6, false);
556 noalias(Cp) = prod(C, Ep);
557 Cep.resize(6, 6, false);
558 noalias(Cep) = C + Cp;
560}
561
562MoFEMErrorCode ADOLCPlasticityRes(SNES snes, Vec chi, Vec r, void *ctx) {
565 cp = (ClosestPointProjection *)ctx;
566
567 auto plastic_strain = cp->getPlasticStrain();
568 auto internal_variables = cp->getInternalVariables();
569
570 {
571 const double *array;
572 CHKERR VecGetArrayRead(chi, &array);
573 for (auto ii = 0; ii < 6; ii++) {
574 plastic_strain[ii] = array[ii];
575 }
576 for (auto ii = 0; ii < cp->nbInternalVariables; ii++) {
577 internal_variables[ii] = array[6 + ii];
578 }
579 cp->deltaGamma = array[6 + cp->nbInternalVariables];
580 CHKERR VecRestoreArrayRead(chi, &array);
581 }
583 CHKERR cp->calculateR(r);
584
586}
587
588MoFEMErrorCode ADOLCPlasticityJac(SNES snes, Vec chi, Mat A, Mat, void *ctx) {
591 cp = (ClosestPointProjection *)ctx;
592
593 auto plastic_strain = cp->getPlasticStrain();
594 auto internal_variables = cp->getInternalVariables();
595
596 {
597 const double *array;
598 CHKERR VecGetArrayRead(chi, &array);
599 for (auto ii = 0; ii < 6; ii++) {
600 plastic_strain[ii] = array[ii];
601 }
602 for (auto ii = 0; ii < cp->nbInternalVariables; ii++) {
603 internal_variables[ii] = array[6 + ii];
604 }
605 cp->deltaGamma = array[6 + cp->nbInternalVariables];
606 CHKERR VecRestoreArrayRead(chi, &array);
607 }
609 CHKERR cp->calculateA();
611}
612
625
626} // namespace ADOLCPlasticity
bool active
SmartPetscObj< KSP > ksp
#define MOFEM_LOG_C(channel, severity, format,...)
SmartPetscObj< Vec > gradient
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_OPERATION_UNSUCCESSFUL
Definition definitions.h:34
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
@ R
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
MoFEMErrorCode ADOLCPlasticityJac(SNES, Vec, Mat, Mat, void *ctx)
Internal SNES function used at integration points to calulate tangent matrix.
MoFEMErrorCode ADOLCPlasticityRes(SNES snes, Vec chi, Vec r, void *ctx)
Internal SNES function used at integration points to calulate stress.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition Types.hpp:115
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
auto getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
Definition Templates.hpp:49
auto createSNES(MPI_Comm comm)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
Closest point projection algorithm.
friend MoFEMErrorCode ADOLCPlasticityJac(SNES, Vec, Mat, Mat, void *ctx)
Function executed by nested SENES at evaluationg tangent matrix.
std::array< int, LAST_TAPE > tapesTags
MoFEMErrorCode solveClosestProjection()
Solve nonlinear system of equations to find stress, internal fluxes, and Lagrange plastic multiplier.
MoFEMErrorCode recordH()
Record flow potential.
MoFEMErrorCode recordY()
Record yield function.
virtual MoFEMErrorCode flowPotential()=0
Set flow potential.
ublas::symmetric_matrix< double, ublas::lower > partial2HFlux
MoFEMErrorCode recordW()
Record strain energy.
ublas::symmetric_matrix< double, ublas::lower > D
friend MoFEMErrorCode ADOLCPlasticityRes(SNES, Vec, Vec, void *ctx)
Function executed by nested SENES at evaluationg residual.
ublas::symmetric_matrix< double, ublas::lower > C
virtual MoFEMErrorCode codedHessianW(vector< double * >)
virtual MoFEMErrorCode yieldFunction()=0
Set yield function.
MoFEMErrorCode consistentTangent()
Calculate consistent tangent matrix.
ublas::symmetric_matrix< double, ublas::lower > partial2HSigma
ublas::matrix< double, ublas::column_major > dataA
virtual MoFEMErrorCode freeHemholtzEnergy()=0
Set Hemholtz energy.
MoFEMErrorCode snesCreate()
Create nested snes.
static boost::shared_ptr< SinkType > createSink(boost::shared_ptr< std::ostream > stream_ptr, std::string comm_filter)
Create a sink object.
static boost::shared_ptr< std::ostream > getStrmWorld()
Get the strm world object.
static boost::shared_ptr< std::ostream > getStrmSync()
Get the strm sync object.
static bool checkIfChannelExist(const std::string channel)
Check if channel exist.
static boost::shared_ptr< std::ostream > getStrmSelf()
Get the strm self object.
intrusive_ptr for managing petsc objects