v0.15.0
Loading...
Searching...
No Matches
eigen_elastic.cpp
Go to the documentation of this file.
1/**
2 * \file eigen_elastic.cpp
3 * \example eigen_elastic.cpp
4 *
5 * Calculate natural frequencies in 2d and 3d problems.
6 *
7 */
8
9#include <MoFEM.hpp>
10#undef EPS
11#include <slepceps.h>
12
13using namespace MoFEM;
14
15template <int DIM> struct ElementsAndOps {};
16
17template <> struct ElementsAndOps<2> {
19};
20
21template <> struct ElementsAndOps<3> {
23};
24
25constexpr int SPACE_DIM =
26 EXECUTABLE_DIMENSION; //< Space dimension of problem, mesh
27
30using DomainEleOp = DomainEle::UserDataOperator;
32
34 GAUSS>::OpGradSymTensorGrad<1, SPACE_DIM, SPACE_DIM, 0>;
37
38double rho = 7829e-12;
39double young_modulus = 207e3;
40double poisson_ratio = 0.33;
41
42double bulk_modulus_K = young_modulus / (3 * (1 - 2 * poisson_ratio));
44
45int order = 1;
46
47struct Example {
48
49 Example(MoFEM::Interface &m_field) : mField(m_field) {}
50
52
53private:
55
64
65 boost::shared_ptr<MatrixDouble> matDPtr;
66
70
71 std::array<SmartPetscObj<Vec>, 6> rigidBodyMotion;
72};
73
74//! [Create common data]
77
78 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-rho", &rho, PETSC_NULLPTR);
79 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-young_modulus", &young_modulus,
80 PETSC_NULLPTR);
81 CHKERR PetscOptionsGetScalar(PETSC_NULLPTR, "", "-poisson_ratio", &poisson_ratio,
82 PETSC_NULLPTR);
83
84 auto set_matrial_stiffens = [&]() {
92
93 const double A = (SPACE_DIM == 2)
94 ? 2 * shear_modulus_G /
95 (bulk_modulus_K + (4. / 3.) * shear_modulus_G)
96 : 1;
97 t_D(i, j, k, l) = 2 * shear_modulus_G * ((t_kd(i, k) ^ t_kd(j, l)) / 4.) +
98 A * (bulk_modulus_K - (2. / 3.) * shear_modulus_G) *
99 t_kd(i, j) * t_kd(k, l);
100
102 };
103
104 matDPtr = boost::make_shared<MatrixDouble>();
105
106 constexpr auto size_symm = (SPACE_DIM * (SPACE_DIM + 1)) / 2;
107 matDPtr->resize(size_symm * size_symm, 1);
108
109 CHKERR set_matrial_stiffens();
110
112}
113//! [Create common data]
114
115//! [Run problem]
127}
128//! [Run problem]
129
130//! [Read mesh]
134
135 MOFEM_LOG("EXAMPLE", Sev::inform)
136 << "Read mesh for problem in " << EXECUTABLE_DIMENSION;
138 CHKERR simple->loadFile();
140}
141//! [Read mesh]
142
143//! [Set up problem]
145 auto *simple = mField.getInterface<Simple>();
147 // Add field
149 SPACE_DIM);
150 CHKERR PetscOptionsGetInt(PETSC_NULLPTR, "", "-order", &order, PETSC_NULLPTR);
151 CHKERR simple->setFieldOrder("U", order);
152 CHKERR simple->setUp();
154}
155//! [Set up problem]
156
157//! [Boundary condition]
159 auto *simple = mField.getInterface<Simple>();
161
163 for (int n = 1; n != 6; ++n)
165
166 // Create space of vectors or rigid motion
167 auto problem_ptr = mField.get_problem(simple->getProblemName());
168 auto dofs = problem_ptr->getNumeredRowDofsPtr();
169
170 // Get all vertices
171 auto lo_uid =
173
174 auto hi = dofs->upper_bound(lo_uid);
175 std::array<double, 3> coords;
176
177 for (auto lo = dofs->lower_bound(lo_uid); lo != hi; ++lo) {
178
179 if ((*lo)->getPart() == mField.get_comm_rank()) {
180
181 auto ent = (*lo)->getEnt();
182 CHKERR mField.get_moab().get_coords(&ent, 1, coords.data());
183
184 if ((*lo)->getDofCoeffIdx() == 0) {
185 CHKERR VecSetValue(rigidBodyMotion[0], (*lo)->getPetscGlobalDofIdx(), 1,
186 INSERT_VALUES);
187 CHKERR VecSetValue(rigidBodyMotion[3], (*lo)->getPetscGlobalDofIdx(),
188 -coords[1], INSERT_VALUES);
189 if (SPACE_DIM == 3)
190 CHKERR VecSetValue(rigidBodyMotion[4], (*lo)->getPetscGlobalDofIdx(),
191 -coords[2], INSERT_VALUES);
192
193 } else if ((*lo)->getDofCoeffIdx() == 1) {
194 CHKERR VecSetValue(rigidBodyMotion[1], (*lo)->getPetscGlobalDofIdx(), 1,
195 INSERT_VALUES);
196 CHKERR VecSetValue(rigidBodyMotion[3], (*lo)->getPetscGlobalDofIdx(),
197 coords[0], INSERT_VALUES);
198 if (SPACE_DIM == 3)
199 CHKERR VecSetValue(rigidBodyMotion[5], (*lo)->getPetscGlobalDofIdx(),
200 -coords[2], INSERT_VALUES);
201
202 } else if ((*lo)->getDofCoeffIdx() == 2) {
203 if (SPACE_DIM == 3) {
204 CHKERR VecSetValue(rigidBodyMotion[2], (*lo)->getPetscGlobalDofIdx(),
205 1, INSERT_VALUES);
206 CHKERR VecSetValue(rigidBodyMotion[4], (*lo)->getPetscGlobalDofIdx(),
207 coords[0], INSERT_VALUES);
208 CHKERR VecSetValue(rigidBodyMotion[5], (*lo)->getPetscGlobalDofIdx(),
209 coords[1], INSERT_VALUES);
210 }
211 }
212 }
213 }
214
215 for (int n = 0; n != rigidBodyMotion.size(); ++n) {
216 CHKERR VecAssemblyBegin(rigidBodyMotion[n]);
217 CHKERR VecAssemblyEnd(rigidBodyMotion[n]);
218 CHKERR VecGhostUpdateBegin(rigidBodyMotion[n], INSERT_VALUES,
219 SCATTER_FORWARD);
220 CHKERR VecGhostUpdateEnd(rigidBodyMotion[n], INSERT_VALUES,
221 SCATTER_FORWARD);
222 }
223
225}
226//! [Boundary condition]
227
228//! [Push operators to pipeline]
231 auto *simple = mField.getInterface<Simple>();
232 auto *pipeline_mng = mField.getInterface<PipelineManager>();
233
234 auto dm = simple->getDM();
236 M = matDuplicate(K, MAT_SHARE_NONZERO_PATTERN);
237
238 auto calculate_stiffness_matrix = [&]() {
240 pipeline_mng->getDomainLhsFE().reset();
241
242 auto det_ptr = boost::make_shared<VectorDouble>();
243 auto jac_ptr = boost::make_shared<MatrixDouble>();
244 auto inv_jac_ptr = boost::make_shared<MatrixDouble>();
245 pipeline_mng->getOpDomainLhsPipeline().push_back(
246 new OpCalculateHOJac<SPACE_DIM>(jac_ptr));
247 pipeline_mng->getOpDomainLhsPipeline().push_back(
248 new OpInvertMatrix<SPACE_DIM>(jac_ptr, det_ptr, inv_jac_ptr));
249 pipeline_mng->getOpDomainLhsPipeline().push_back(
250 new OpSetHOInvJacToScalarBases<SPACE_DIM>(H1, inv_jac_ptr));
251 pipeline_mng->getOpDomainLhsPipeline().push_back(
252 new OpSetHOWeights(det_ptr));
253
254 pipeline_mng->getOpDomainLhsPipeline().push_back(
255 new OpK("U", "U", matDPtr));
256 auto integration_rule = [](int, int, int approx_order) {
257 return 2 * (approx_order - 1);
258 };
259
260 CHKERR pipeline_mng->setDomainLhsIntegrationRule(integration_rule);
261 pipeline_mng->getDomainLhsFE()->B = K;
262 CHKERR MatZeroEntries(K);
263 CHKERR pipeline_mng->loopFiniteElements();
264 CHKERR MatAssemblyBegin(K, MAT_FINAL_ASSEMBLY);
265 CHKERR MatAssemblyEnd(K, MAT_FINAL_ASSEMBLY);
267 };
268
269 auto calculate_mass_matrix = [&]() {
271 pipeline_mng->getDomainLhsFE().reset();
272
273 auto det_ptr = boost::make_shared<VectorDouble>();
274 auto jac_ptr = boost::make_shared<MatrixDouble>();
275 auto inv_jac_ptr = boost::make_shared<MatrixDouble>();
276 pipeline_mng->getOpDomainLhsPipeline().push_back(
277 new OpCalculateHOJac<SPACE_DIM>(jac_ptr));
278 pipeline_mng->getOpDomainLhsPipeline().push_back(
279 new OpInvertMatrix<SPACE_DIM>(jac_ptr, det_ptr, inv_jac_ptr));
280 pipeline_mng->getOpDomainLhsPipeline().push_back(
281 new OpSetHOWeights(det_ptr));
282
283 auto get_rho = [](const double, const double, const double) { return rho; };
284 pipeline_mng->getOpDomainLhsPipeline().push_back(
285 new OpMass("U", "U", get_rho));
286 auto integration_rule = [](int, int, int approx_order) {
287 return 2 * approx_order;
288 };
289 CHKERR pipeline_mng->setDomainLhsIntegrationRule(integration_rule);
290 CHKERR MatZeroEntries(M);
291 pipeline_mng->getDomainLhsFE()->B = M;
292 CHKERR pipeline_mng->loopFiniteElements();
293 CHKERR MatAssemblyBegin(M, MAT_FINAL_ASSEMBLY);
294 CHKERR MatAssemblyEnd(M, MAT_FINAL_ASSEMBLY);
296 };
297
298 CHKERR calculate_stiffness_matrix();
299 CHKERR calculate_mass_matrix();
300
302}
303//! [Push operators to pipeline]
304
305//! [Solve]
308
309 auto create_eps = [](MPI_Comm comm) {
310 EPS eps;
311 CHKERR EPSCreate(comm, &eps);
312 return SmartPetscObj<EPS>(eps);
313 };
314
315 auto deflate_vectors = [&]() {
317 // Deflate vectors
318 std::array<Vec, 6> deflate_vectors;
319 for (int n = 0; n != 6; ++n) {
320 deflate_vectors[n] = rigidBodyMotion[n];
321 }
322 CHKERR EPSSetDeflationSpace(ePS, 6, &deflate_vectors[0]);
324 };
325
326 auto print_info = [&]() {
328 ST st;
329 EPSType type;
330 PetscReal tol;
331 PetscInt nev, maxit, its;
332 // Optional: Get some information from the solver and display it
333 CHKERR EPSGetIterationNumber(ePS, &its);
334 MOFEM_LOG_C("EXAMPLE", Sev::inform,
335 " Number of iterations of the method: %d", its);
336 CHKERR EPSGetST(ePS, &st);
337 CHKERR EPSGetType(ePS, &type);
338 MOFEM_LOG_C("EXAMPLE", Sev::inform, " Solution method: %s", type);
339 CHKERR EPSGetDimensions(ePS, &nev, NULL, NULL);
340 MOFEM_LOG_C("EXAMPLE", Sev::inform, " Number of requested eigenvalues: %d",
341 nev);
342 CHKERR EPSGetTolerances(ePS, &tol, &maxit);
343 MOFEM_LOG_C("EXAMPLE", Sev::inform,
344 " Stopping condition: tol=%.4g, maxit=%d", (double)tol, maxit);
345
346 PetscScalar eigr, eigi;
347 for (int nn = 0; nn < nev; nn++) {
348 CHKERR EPSGetEigenpair(ePS, nn, &eigr, &eigi, PETSC_NULLPTR, PETSC_NULLPTR);
349 MOFEM_LOG_C("EXAMPLE", Sev::inform,
350 " ncov = %d eigr = %.4g eigi = %.4g (inv eigr = %.4g)", nn,
351 eigr, eigi, 1. / eigr);
352 }
353
355 };
356
357 auto setup_eps = [&]() {
359 CHKERR EPSSetProblemType(ePS, EPS_GHEP);
360 CHKERR EPSSetWhichEigenpairs(ePS, EPS_SMALLEST_MAGNITUDE);
361 CHKERR EPSSetFromOptions(ePS);
363 };
364
365 // Create eigensolver context
366 ePS = create_eps(mField.get_comm());
367 CHKERR EPSSetOperators(ePS, K, M);
368
369 // Setup eps
370 CHKERR setup_eps();
371
372 // Deflate vectors
373 CHKERR deflate_vectors();
374
375 // Solve problem
376 CHKERR EPSSolve(ePS);
377
378 // Print info
379 CHKERR print_info();
380
382}
383//! [Solve]
384
385//! [Postprocess results]
388 auto *pipeline_mng = mField.getInterface<PipelineManager>();
389 auto *simple = mField.getInterface<Simple>();
390
391 pipeline_mng->getDomainLhsFE().reset();
392 auto post_proc_fe = boost::make_shared<PostProcEle>(mField);
393
394 auto det_ptr = boost::make_shared<VectorDouble>();
395 auto jac_ptr = boost::make_shared<MatrixDouble>();
396 auto inv_jac_ptr = boost::make_shared<MatrixDouble>();
397 post_proc_fe->getOpPtrVector().push_back(
398 new OpCalculateHOJac<SPACE_DIM>(jac_ptr));
399 post_proc_fe->getOpPtrVector().push_back(
400 new OpInvertMatrix<SPACE_DIM>(jac_ptr, det_ptr, inv_jac_ptr));
401 post_proc_fe->getOpPtrVector().push_back(
402 new OpSetHOInvJacToScalarBases<SPACE_DIM>(H1, inv_jac_ptr));
403
404 auto u_ptr = boost::make_shared<MatrixDouble>();
405 auto grad_ptr = boost::make_shared<MatrixDouble>();
406 auto strain_ptr = boost::make_shared<MatrixDouble>();
407 auto stress_ptr = boost::make_shared<MatrixDouble>();
408
409 post_proc_fe->getOpPtrVector().push_back(
411 post_proc_fe->getOpPtrVector().push_back(
413 post_proc_fe->getOpPtrVector().push_back(
414 new OpSymmetrizeTensor<SPACE_DIM>(grad_ptr, strain_ptr));
415 post_proc_fe->getOpPtrVector().push_back(
417 strain_ptr, stress_ptr, matDPtr));
418
420
421 post_proc_fe->getOpPtrVector().push_back(
422
423 new OpPPMap(
424 post_proc_fe->getPostProcMesh(), post_proc_fe->getMapGaussPts(),
425
427
428 OpPPMap::DataMapMat{{"U", u_ptr}},
429
431
432 OpPPMap::DataMapMat{{"STRAIN", strain_ptr}, {"STRESS", stress_ptr}}
433
434 )
435
436 );
437
438 pipeline_mng->getDomainRhsFE() = post_proc_fe;
439
440 auto dm = simple->getDM();
441 auto D = createDMVector(dm);
442
443 PetscInt nev;
444 CHKERR EPSGetDimensions(ePS, &nev, NULL, NULL);
445 PetscScalar eigr, eigi, nrm2r;
446 for (int nn = 0; nn < nev; nn++) {
447 CHKERR EPSGetEigenpair(ePS, nn, &eigr, &eigi, D, PETSC_NULLPTR);
448 CHKERR VecGhostUpdateBegin(D, INSERT_VALUES, SCATTER_FORWARD);
449 CHKERR VecGhostUpdateEnd(D, INSERT_VALUES, SCATTER_FORWARD);
450 CHKERR VecNorm(D, NORM_2, &nrm2r);
451 MOFEM_LOG_C("EXAMPLE", Sev::inform,
452 " ncov = %d omega2 = %.8g omega = %.8g frequency = %.8g", nn,
453 eigr, std::sqrt(std::abs(eigr)),
454 std::sqrt(std::abs(eigr)) / (2 * M_PI));
455 CHKERR DMoFEMMeshToLocalVector(dm, D, INSERT_VALUES, SCATTER_REVERSE);
456 CHKERR pipeline_mng->loopFiniteElements();
457 post_proc_fe->writeFile("out_eig_" + boost::lexical_cast<std::string>(nn) +
458 ".h5m");
459 }
460
462}
463//! [Postprocess results]
464
465//! [Check]
468 PetscBool test_flg = PETSC_FALSE;
469 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "", "-test", &test_flg, PETSC_NULLPTR);
470 if (test_flg) {
471 PetscScalar eigr, eigi;
472 CHKERR EPSGetEigenpair(ePS, 0, &eigr, &eigi, PETSC_NULLPTR, PETSC_NULLPTR);
473 constexpr double regression_value = 12579658;
474 if (fabs(eigr - regression_value) > 1)
475 SETERRQ(PETSC_COMM_WORLD, MOFEM_ATOM_TEST_INVALID,
476 "Regression test faileed; wrong eigen value.");
477 }
479}
480//! [Check]
481
482static char help[] = "...\n\n";
483
484int main(int argc, char *argv[]) {
485
486 // Initialisation of MoFEM/PETSc and MOAB data structures
487 const char param_file[] = "param_file.petsc";
488 SlepcInitialize(&argc, &argv, param_file, help);
489 MoFEM::Core::Initialize(&argc, &argv, param_file, help);
490
491 // Add logging channel for example
492 auto core_log = logging::core::get();
493 core_log->add_sink(
495 LogManager::setLog("EXAMPLE");
496 MOFEM_LOG_TAG("EXAMPLE", "example");
497
498 try {
499
500 //! [Register MoFEM discrete manager in PETSc]
501 DMType dm_name = "DMMOFEM";
502 CHKERR DMRegister_MoFEM(dm_name);
503 //! [Register MoFEM discrete manager in PETSc
504
505 //! [Create MoAB]
506 moab::Core mb_instance; ///< mesh database
507 moab::Interface &moab = mb_instance; ///< mesh database interface
508 //! [Create MoAB]
509
510 //! [Create MoFEM]
511 MoFEM::Core core(moab); ///< finite element database
512 MoFEM::Interface &m_field = core; ///< finite element database insterface
513 //! [Create MoFEM]
514
515 //! [Example]
516 Example ex(m_field);
517 CHKERR ex.runProblem();
518 //! [Example]
519 }
521
522 SlepcFinalize();
524}
#define MOFEM_LOG_C(channel, severity, format,...)
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
constexpr int SPACE_DIM
[Define dimension]
Definition adjoint.cpp:22
constexpr double poisson_ratio
Definition adjoint.cpp:74
constexpr double shear_modulus_G
Definition adjoint.cpp:76
constexpr double bulk_modulus_K
Definition adjoint.cpp:75
constexpr double young_modulus
Definition adjoint.cpp:73
int main()
static const double eps
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
[Define dimension]
Kronecker Delta class symmetric.
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_BERNSTEIN_BEZIER_BASE
Definition definitions.h:64
@ H1
continuous field
Definition definitions.h:85
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_ATOM_TEST_INVALID
Definition definitions.h:40
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
constexpr int order
double young_modulus
static char help[]
[Check]
double rho
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpGradSymTensorGrad< 1, SPACE_DIM, SPACE_DIM, 0 > OpK
constexpr int SPACE_DIM
double poisson_ratio
int order
double bulk_modulus_K
double shear_modulus_G
auto integration_rule
constexpr auto t_kd
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
set local (or ghosted) vector values on mesh for partition only
Definition DMMoFEM.cpp:514
PetscErrorCode DMCreateMatrix_MoFEM(DM dm, Mat *M)
Definition DMMoFEM.cpp:1187
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
Definition DMMoFEM.cpp:43
auto createDMVector(DM dm)
Get smart vector from DM.
Definition DMMoFEM.hpp:1102
virtual const Problem * get_problem(const std::string problem_name) const =0
Get the problem object.
static LoggerType & setLog(const std::string channel)
Set ans resset chanel logger.
#define MOFEM_LOG(channel, severity)
Log.
#define MOFEM_LOG_TAG(channel, tag)
Tag channel.
FTensor::Index< 'i', SPACE_DIM > i
double D
const double n
refractive index of diffusive medium
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
double tol
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
EntityHandle get_id_for_min_type()
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
SmartPetscObj< Vec > vectorDuplicate(Vec vec)
Create duplicate vector of smart vector.
static FTensor::Ddg< FTensor::PackPtr< T *, 1 >, Tensor_Dim01, Tensor_Dim23 > getFTensor4DdgFromMat(ublas::matrix< T, L, A > &data)
Get symmetric tensor rank 4 on first two and last indices from form data matrix.
SmartPetscObj< Mat > matDuplicate(Mat mat, MatDuplicateOption op)
OpPostProcMapInMoab< SPACE_DIM, SPACE_DIM > OpPPMap
double rho
Definition plastic.cpp:144
#define EXECUTABLE_DIMENSION
Definition plastic.cpp:13
constexpr auto size_symm
Definition plastic.cpp:42
static constexpr int approx_order
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, SPACE_DIM > OpMass
[Only used with Hooke equation (linear material model)]
Definition seepage.cpp:55
[Example]
Definition plastic.cpp:216
MoFEMErrorCode boundaryCondition()
MoFEMErrorCode assembleSystem()
MoFEMErrorCode readMesh()
MoFEMErrorCode checkResults()
MoFEMErrorCode solveSystem()
MoFEMErrorCode createCommonData()
boost::shared_ptr< MatrixDouble > matDPtr
std::array< SmartPetscObj< Vec >, 6 > rigidBodyMotion
Example(MoFEM::Interface &m_field)
SmartPetscObj< Mat > M
MoFEMErrorCode runProblem()
SmartPetscObj< EPS > ePS
SmartPetscObj< Mat > K
MoFEM::Interface & mField
Definition plastic.cpp:226
MoFEMErrorCode setupProblem()
MoFEMErrorCode outputResults()
virtual moab::Interface & get_moab()=0
virtual MPI_Comm & get_comm() const =0
virtual int get_comm_rank() const =0
Core (interface) class.
Definition Core.hpp:82
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
Definition Core.cpp:72
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Definition Core.cpp:118
Deprecated interface functions.
static UId getUniqueIdCalculate(const DofIdx dof, UId ent_uid)
Data on single entity (This is passed as argument to DataOperator::doWork)
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.
Get field gradients at integration pts for scalar field rank 0, i.e. vector field.
Get values at integration pts for tensor field rank 1, i.e. vector field.
Post post-proc data at points from hash maps.
std::map< std::string, boost::shared_ptr< MatrixDouble > > DataMapMat
std::map< std::string, boost::shared_ptr< VectorDouble > > DataMapVec
Set inverse jacobian to base functions.
Set inverse jacobian to base functions.
PipelineManager interface.
auto & getNumeredRowDofsPtr() const
get access to numeredRowDofsPtr storing DOFs on rows
Simple interface for fast problem set-up.
Definition Simple.hpp:27
MoFEMErrorCode addDomainField(const std::string name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1)
Add field on domain.
Definition Simple.cpp:261
MoFEMErrorCode getOptions()
get options
Definition Simple.cpp:180
intrusive_ptr for managing petsc objects
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.