v0.16.0
Loading...
Searching...
No Matches
BasicBoundaryConditionsInterface.hpp
Go to the documentation of this file.
1/** \file BasicBoundaryConditionsInterface.hpp
2 \brief Header file for BasicBoundaryConditionsInterface element implementation
3*/
4
5
6
7// TODO: This is still work in progress !!!
8
9// FIX and ROTATE Boundary conditions
10// include SurfacePressureComplexForLazy for following load
11
12
13#ifndef __BASICBOUNDARYCONDIONSINTERFACE_HPP__
14#define __BASICBOUNDARYCONDIONSINTERFACE_HPP__
15
16
17/** \brief Set of functions declaring elements and setting operators
18 * for basic boundary conditions interface
19 */
21
22 using DomainEle = VolumeElementForcesAndSourcesCore;
23 using DomainEleOp = DomainEle::UserDataOperator;
25 using BoundaryEleOp = BoundaryEle::UserDataOperator;
26
27 using OpBodyForce = FormsIntegrators<DomainEleOp>::Assembly<
30 NaturalBC<DomainEleOp>::Assembly<PETSC>::LinearForm<GAUSS>;
33
34 using OpMass = FormsIntegrators<DomainEleOp>::Assembly<PETSC>::BiLinearForm<
35 GAUSS>::OpMass<1, 3>;
36 using OpInertiaForce = FormsIntegrators<DomainEleOp>::Assembly<
38
42
44 FTensor::Index<'i', 3> i;
45 tForce(i) *= sCale;
46 return tForce;
47 }
48
49 private:
50 double sCale;
52 };
53
55 double sCale;
56 BasicBCVectorScale(double scale, std::string file_name)
57 : sCale(scale), TimeScaleVector3(file_name, false) {}
58
61 auto vec2 = MoFEM::TimeScaleVector3::getVector(time);
62 FTensor::Index<'i', 3> i;
63 vec(i) = sCale * vec2(i);
64 return vec;
65 }
66 };
67
69 SmartPetscObj<DM> dM;
70
72
74 double *lAmbda;
75 LoadScale(double *my_lambda) : lAmbda(my_lambda){};
76 MoFEMErrorCode scaleNf(const FEMethod *fe, VectorDouble &nf) {
78 nf *= *lAmbda;
80 }
81 };
82
87
88 BitRefLevel bIt;
89
92
93 boost::ptr_map<std::string, NeumannForcesSurface> neumann_forces;
94 boost::ptr_map<std::string, NodalForce> nodal_forces;
95 boost::ptr_map<std::string, EdgeForce> edge_forces;
96
97 boost::shared_ptr<FluidPressure> fluidPressureElementPtr;
98
99 boost::shared_ptr<FaceElementForcesAndSourcesCore> springRhsPtr;
100 boost::shared_ptr<FaceElementForcesAndSourcesCore> springLhsPtr;
101
102 boost::shared_ptr<VolumeElementForcesAndSourcesCore> bodyForceRhsPtr;
103 boost::shared_ptr<VolumeElementForcesAndSourcesCore> bodyForceLhsPtr;
104 // boost::shared_ptr<FEMethod> dirichletBcPtr;
105
106 boost::shared_ptr<DirichletDisplacementBc> dirichletBcPtr;
107 boost::shared_ptr<KelvinVoigtDamper> damperElementPtr;
108
109 const string domainProblemName;
110 const string domainElementName;
111
112
114 MoFEM::Interface &m_field, string postion_field,
115 string mesh_pos_field_name = "MESH_NODE_POSITIONS",
116 string problem_name = "ELASTIC",
117 string domain_element_name = "ELASTIC_FE",
118 bool is_displacement_field = true, bool is_quasi_static = true,
119 double *snes_load_factor = nullptr, bool is_partitioned = true)
120 : mField(m_field), positionField(postion_field),
121 meshNodeField(mesh_pos_field_name), domainProblemName(problem_name),
122 domainElementName(domain_element_name),
123 isDisplacementField(is_displacement_field),
125 snesLambdaLoadFactorPtr(snes_load_factor),
126 isPartitioned(is_partitioned), isLinear(PETSC_FALSE) {}
127
129
130 MoFEMErrorCode getCommandLineParameters() override {
132
133 PetscBool quasi_static = PETSC_FALSE;
134 PetscBool is_linear = PETSC_FALSE;
135 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "-is_quasi_static", &quasi_static,
136 PETSC_NULLPTR);
137 CHKERR PetscOptionsGetBool(PETSC_NULLPTR, "-is_linear", &is_linear,
138 PETSC_NULLPTR);
139
140 isQuasiStatic = quasi_static;
141 isLinear = is_linear;
142
144 };
145
146 MoFEMErrorCode addElementFields() override { return 0;};
147
148 MoFEMErrorCode createElements() override {
150
156
158 dirichletBcPtr = boost::make_shared<DirichletSpatialRemoveDofsBc>(
160 "DISPLACEMENT", isPartitioned);
161 else
162 dirichletBcPtr = boost::make_shared<DirichletDisplacementRemoveDofsBc>(
163 mField, positionField, domainProblemName, "DISPLACEMENT",
165 // CHKERR dynamic_cast<DirichletDisplacementRemoveDofsBc &>(
166 // *dirichletBcPtr).iNitialize();
167
177
178 // CHKERR mField.add_finite_element(domainElementName, "FLUID_PRESSURE_FE");
179
180 fluidPressureElementPtr = boost::make_shared<FluidPressure>(mField);
181 fluidPressureElementPtr->addNeumannFluidPressureBCElements(positionField);
183 fluidPressureElementPtr->getLoopFe().getOpPtrVector(), {},
185
186 damperElementPtr = boost::make_shared<KelvinVoigtDamper>(mField);
187 damperElementPtr->commonData.meshNodePositionName = meshNodeField;
188
189 auto &common_data = damperElementPtr->commonData;
190
191 common_data.spatialPositionName = positionField;
192 common_data.spatialPositionNameDot = "DOT_" + positionField;
193 damperElementPtr->setBlockDataMap(); FIXME:
194
195 for (auto &[id, data] : damperElementPtr->blockMaterialDataMap) {
196 data.lInear = isLinear;
197 int cid = id;
198 damperElementPtr->constitutiveEquationMap.insert(
201 "DAMPER_FE");
202 }
203
205 };
206
207 MoFEMErrorCode setOperators() override {
213
215 mField, neumann_forces, PETSC_NULLPTR, positionField);
216 springLhsPtr = boost::make_shared<FaceElementForcesAndSourcesCore>(mField);
217 springRhsPtr = boost::make_shared<FaceElementForcesAndSourcesCore>(mField);
219 boost::make_shared<VolumeElementForcesAndSourcesCore>(mField);
221 boost::make_shared<VolumeElementForcesAndSourcesCore>(mField);
222
226
227
228 fluidPressureElementPtr->setNeumannFluidPressureFiniteElementOperators(
229 positionField, PETSC_NULLPTR, true, true);
230
231 // KelvinVoigtDamper::CommonData &common_data =
232 // damperElementPtr->commonData;
233 CHKERR damperElementPtr->setOperators(3);
234
235 // auto dm = mField.getInterface<Simple>()->getDM();
236
237 auto get_id_block_param = [&](string base_name, int id) {
238 char load_hist_file[255] = "hist.in";
239 PetscBool ctg_flag = PETSC_FALSE;
240 string param_name_with_id = "-" + base_name + "_" + to_string(id);
241 CHKERR PetscOptionsGetString(PETSC_NULLPTR, PETSC_NULLPTR,
242 param_name_with_id.c_str(), load_hist_file,
243 255, &ctg_flag);
244 if (ctg_flag)
245 return param_name_with_id;
246
247 param_name_with_id = "-" + base_name;
248 CHKERR PetscOptionsGetString(PETSC_NULLPTR, PETSC_NULLPTR,
249 param_name_with_id.c_str(), load_hist_file,
250 255, &ctg_flag);
251 if (ctg_flag) {
252 MOFEM_LOG("WORLD", Sev::verbose)
253 << "Setting one accelerogram for all blocks!";
254 return param_name_with_id;
255 }
256
257 return string("");
258 };
259
260 auto get_adj_ents = [&](const Range &ents) {
261 Range verts;
262 CHKERR mField.get_moab().get_connectivity(ents, verts, true);
263 for (size_t d = 1; d < 3; ++d)
264 CHKERR mField.get_moab().get_adjacencies(ents, d, false, verts,
265 moab::Interface::UNION);
266 verts.merge(ents);
267 CHKERR mField.getInterface<CommInterface>()->synchroniseEntities(verts);
268 return verts;
269 };
270
272 const std::string block_name = "BODY_FORCE";
273 if (it->getName().compare(0, block_name.size(), block_name) == 0) {
274 std::vector<double> attr;
275 CHKERR it->getAttributes(attr);
276 if (attr.size() > 3) {
277
278 const int id = it->getMeshsetId();
279
280 Range bc_ents;
281 CHKERR it->getMeshsetIdEntitiesByDimension(mField.get_moab(), 3,
282 bc_ents, true);
283 auto bc_ents_ptr = boost::make_shared<Range>(get_adj_ents(bc_ents));
284
285 // the first parameter is density!!! FIXME:
286
287 VectorDouble acc({attr[1], attr[2], attr[3]});
288 double density = attr[0];
289 bool inertia_flag =
290 attr.size() > 4 ? bool(std::floor(attr[4])) : true;
291 // if accelerogram is provided then change the acceleration,
292 // otherwise use whatever is in that block TODO:
293 std::vector<boost::shared_ptr<TimeScaleVector3>> methods_for_scaling;
294 std::string param_name_for_scaling =
295 get_id_block_param("accelerogram", id);
296
297 if (!param_name_for_scaling.empty())
298 methods_for_scaling.push_back(
299 boost::make_shared<BasicBCVectorScale>(density,
300 param_name_for_scaling));
301 else
302 methods_for_scaling.push_back(
303 boost::make_shared<BasicBCVectorConst>(
304 density,
305 FTensor::Tensor1<double, 3>({acc(0), acc(1), acc(2)})));
306
307 // FIXME: this require correction for large strains, multiply by det_F
308 auto get_rho = [&](double, double, double) {
309 auto &fe_domain_lhs = bodyForceLhsPtr;
310 return density * fe_domain_lhs->ts_aa;
311 };
312
313 auto &pipeline_rhs = bodyForceRhsPtr->getOpPtrVector();
314 auto &pipeline_lhs = bodyForceLhsPtr->getOpPtrVector();
315
317 bodyForceRhsPtr->getOpPtrVector(), {H1}, meshNodeField);
319 bodyForceLhsPtr->getOpPtrVector(), {H1}, meshNodeField);
320
321 //FIXME: fix for large strains
322 pipeline_rhs.push_back(
323 new OpSetBc(positionField, true, mBoundaryMarker));
324
325 // using new way of adding BCs
326 CHKERR
328 pipeline_rhs, mField, "U", {}, methods_for_scaling,
329 it->getName(), Sev::inform);
330
331 if (!isQuasiStatic && inertia_flag) {
332 pipeline_lhs.push_back(
333 new OpSetBc(positionField, true, mBoundaryMarker));
334 pipeline_lhs.push_back(
335 new OpMass(positionField, positionField, get_rho, bc_ents_ptr));
336 auto mat_acceleration = boost::make_shared<MatrixDouble>();
337 pipeline_rhs.push_back(new OpCalculateVectorFieldValuesDotDot<3>(
338 positionField, mat_acceleration));
339 pipeline_rhs.push_back(new OpInertiaForce(
340 positionField, mat_acceleration,
341 [&](double, double, double) { return density; }, bc_ents_ptr));
342 pipeline_lhs.push_back(new OpUnSetBc(positionField));
343 }
344 pipeline_rhs.push_back(new OpUnSetBc(positionField));
345
346 } else {
347 SETERRQ(
348 PETSC_COMM_SELF, MOFEM_INVALID_DATA,
349 "There should be (1 density + 3 accelerations ) attributes in "
350 "BODY_FORCE blockset, but is %ld. Optionally, you can set 5th "
351 "parameter to inertia flag.",
352 attr.size());
353 }
354 }
355 }
356
357 auto integration_rule_vol = [](int, int, int approx_order) {
358 return 2 * approx_order + 1;
359 };
360 auto integration_rule_boundary = [](int, int, int approx_order) {
361 return 2 * approx_order + 1;
362 };
363
364 springLhsPtr->getRuleHook = integration_rule_boundary;
365 springRhsPtr->getRuleHook = integration_rule_boundary;
366 bodyForceLhsPtr->getRuleHook = integration_rule_vol;
367 bodyForceRhsPtr->getRuleHook = integration_rule_vol;
368
369 // set other boundary conditions
370 auto bc_mng = mField.getInterface<BcManager>();
371 auto *pipeline_mng = mField.getInterface<PipelineManager>();
372
373 CHKERR bc_mng->removeBlockDOFsOnEntities(domainProblemName, "REMOVE_X",
374 positionField, 0, 0, true,
376 CHKERR bc_mng->removeBlockDOFsOnEntities(domainProblemName, "REMOVE_Y",
377 positionField, 1, 1, true,
379 CHKERR bc_mng->removeBlockDOFsOnEntities(domainProblemName, "REMOVE_Z",
380 positionField, 2, 2, true,
382 CHKERR bc_mng->removeBlockDOFsOnEntities(domainProblemName, "REMOVE_ALL",
383 positionField, 0, 2, true,
385
386 CHKERR bc_mng->pushMarkDOFsOnEntities(domainProblemName, "FIX_X",
387 positionField, 0, 0);
388 CHKERR bc_mng->pushMarkDOFsOnEntities(domainProblemName, "FIX_Y",
389 positionField, 1, 1);
390 CHKERR bc_mng->pushMarkDOFsOnEntities(domainProblemName, "FIX_Z",
391 positionField, 2, 2);
392 CHKERR bc_mng->pushMarkDOFsOnEntities(domainProblemName, "FIX_ALL",
393 positionField, 0, 2);
394 CHKERR bc_mng->pushMarkDOFsOnEntities(domainProblemName, "ROTATE",
395 positionField, 0, 2);
396
398 bc_mng->getMergedBlocksMarker(vector<string>{"FIX_", "ROTATE"});
399
401 };
402
403 MoFEMErrorCode addElementsToDM(SmartPetscObj<DM> dm) override {
405 this->dM = dm;
406 auto simple = mField.getInterface<Simple>();
407 vector<const char *> element_list{"FORCE_FE", "PRESSURE_FE",
408 "FLUID_PRESSURE_FE",
409 "SPRING",
410 "DAMPER_FE"};
411 for (auto &el : element_list) {
412 CHKERR DMMoFEMAddElement(dM, el);
413 simple->getOtherFiniteElements().push_back(el);
414 }
415 // if (!fluidPressureElementPtr->setOfFluids.empty())
416 // FIXME:
417 // CHKERR mField.modify_problem_add_finite_element(domainProblemName,
418 // "FLUID_PRESSURE_FE");
419 // CHKERR dynamic_cast<DirichletDisplacementRemoveDofsBc &>(
420 // *dirichletBcPtr).iNitialize();
422 };
423
424 MoFEMErrorCode updateElementVariables() override { return 0; };
425 MoFEMErrorCode postProcessElement(int step) override { return 0; };
426
427 string getHistoryParam(string prefix) {
428 char load_hist_file[255] = "hist.in";
429 PetscBool ctg_flag = PETSC_FALSE;
430 string new_param_file = string("-") + prefix + string("_history");
431 CHKERR PetscOptionsGetString(PETSC_NULLPTR, PETSC_NULLPTR, new_param_file.c_str(),
432 load_hist_file, 255, &ctg_flag);
433 if (ctg_flag)
434 return new_param_file;
435 return string("-load_history");
436 };
437
438 template <typename T>
439 MoFEMErrorCode setupSolverFunction(const TSType type = IM) {
440 CHKERR setupSolverImpl<T, true>(type);
442 }
443
444 template <typename T>
445 MoFEMErrorCode setupSolverJacobian(const TSType type = IM) {
446 CHKERR setupSolverImpl<T, false>(type);
448 }
449
450 template <typename T, bool RHS>
451 MoFEMErrorCode setupSolverImpl(const TSType type = IM) {
453 // auto dm = dM;
454 // boost::shared_ptr<FEMethod> null;
455
456 auto set_solver_pipelines =
457 [&](PetscErrorCode (*function)(DM, const char fe_name[], MoFEM::FEMethod *,
460 PetscErrorCode (*jacobian)(DM, const char fe_name[], MoFEM::FEMethod *,
463
465 if (RHS) {
466 if (std::is_same_v<T, TS>)
467 dirichletBcPtr->methodsOp.push_back(
468 new TimeForceScale(getHistoryParam("dirichlet"), false));
469
470 CHKERR DMoFEMPreProcessFiniteElements(dM, dirichletBcPtr.get());
471
472 // auto push_fmethods = [&](auto method, string element_name) {
473 // CHKERR function(dm, element_name.c_str(), method, method, method);
474 // };
475
476 auto set_neumann_methods = [&](auto &neumann_el, string hist_name,
477 int dim) {
479 for (auto &&mit : neumann_el) {
480 if constexpr (std::is_same_v<T, SNES>)
481 mit->second->methodsOp.push_back(
483 if constexpr (std::is_same_v<T, TS>)
484 mit->second->methodsOp.push_back(
485 new TimeForceScale(getHistoryParam(hist_name), false));
486 string element_name = mit->first;
487 switch (dim) {
488 case 2:
490 mit->second->getLoopFe().getOpPtrVector(), {},
492 break;
493 case 1:
495 mit->second->getLoopFe().getOpPtrVector(), {},
497 break;
498 case 0:
499 break;
500 default:
501 break;
502 }
503 // CHKERR push_fmethods(&mit->second->getLoopFe(),
504 // element_name);
505 CHKERR function(dM, element_name.c_str(),
506 &mit->second->getLoopFe(), NULL, NULL);
507 }
509 };
510
511 CHKERR set_neumann_methods(neumann_forces, "force", 2);
512 CHKERR set_neumann_methods(nodal_forces, "force", 0);
513 CHKERR set_neumann_methods(edge_forces, "force", 1);
514
515 CHKERR function(dM, domainElementName.c_str(), dirichletBcPtr.get(),
516 dirichletBcPtr.get(), dirichletBcPtr.get());
517 CHKERR function(dM, domainElementName.c_str(),
518 bodyForceRhsPtr.get(), NULL, NULL);
519 CHKERR function(dM, "SPRING", springRhsPtr.get(), NULL, NULL);
520 CHKERR function(dM, "DAMPER_FE", &damperElementPtr->feRhs, NULL,
521 NULL);
522 CHKERR function(dM, "FLUID_PRESSURE_FE",
523 &fluidPressureElementPtr->getLoopFe(), NULL, NULL);
524 } else {
525
526 CHKERR jacobian(dM, domainElementName.c_str(), dirichletBcPtr.get(),
527 dirichletBcPtr.get(), dirichletBcPtr.get());
528 CHKERR jacobian(dM, domainElementName.c_str(),
529 bodyForceLhsPtr.get(), NULL, NULL);
530 CHKERR jacobian(dM, "SPRING", springLhsPtr.get(), NULL, NULL);
531
532 CHKERR jacobian(dM, "DAMPER_FE", &damperElementPtr->feLhs, NULL,
533 NULL);
534 }
535
537 };
538
539 if constexpr (std::is_same_v<T, SNES>) {
540
542 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
543 "SNES lambda factor pointer not set in the module constructor");
544
545 CHKERR set_solver_pipelines(&DMMoFEMSNESSetFunction,
546 &DMMoFEMSNESSetJacobian);
547
548 } else if constexpr (std::is_same_v<T, TS>) {
549
550 switch (type) {
551 case IM:
552 CHKERR set_solver_pipelines(&DMMoFEMTSSetIFunction,
553 &DMMoFEMTSSetIJacobian);
554 break;
555 case IM2:
556 CHKERR set_solver_pipelines(&DMMoFEMTSSetI2Function,
557 &DMMoFEMTSSetI2Jacobian);
558 break;
559 case EX:
560 CHKERR set_solver_pipelines(&DMMoFEMTSSetRHSFunction,
561 &DMMoFEMTSSetRHSJacobian);
562 break;
563 default:
564 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
565 "This TS is not yet implemented for basic BCs");
566 break;
567 }
568
569 } else
570 static_assert(!std::is_same_v<T, KSP>,
571 "this solver has not been implemented for basic BCs yet");
572
573
575 }
576
577 MoFEMErrorCode setupSolverFunctionSNES() override {
579 CHKERR this->setupSolverFunction<SNES>();
581 }
582 MoFEMErrorCode setupSolverJacobianSNES() override {
584 CHKERR this->setupSolverJacobian<SNES>();
586 }
587 MoFEMErrorCode
590 CHKERR this->setupSolverFunction<TS>(type);
592 }
593 MoFEMErrorCode
596 CHKERR this->setupSolverJacobian<TS>(type);
598 }
599
600};
601
602#endif //__BASICBOUNDARYCONDIONSINTERFACE_HPP__
std::string type
void simple(double P1[], double P2[], double P3[], double c[], const int N)
Definition acoustic.cpp:69
@ MF_ZERO
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ BLOCKSET
@ MOFEM_INVALID_DATA
Definition definitions.h:36
@ MOFEM_NOT_IMPLEMENTED
Definition definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string name_row)=0
set field col which finite element use
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string name, const bool recursive=true)=0
add entities to finite element
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_field)=0
set finite element field data
#define MOFEM_LOG(channel, severity)
Log.
#define _IT_CUBITMESHSETS_BY_SET_TYPE_FOR_LOOP_(MESHSET_MANAGER, CUBITBCTYPE, IT)
Iterator that loops over a specific Cubit MeshSet having a particular BC meshset in a moFEM field.
FTensor::Index< 'i', SPACE_DIM > i
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:56
FTensor::Tensor1< double, 3 > getVector(const double time)
BasicBCVectorConst(double scale, FTensor::Tensor1< double, 3 > t_vec)
FTensor::Tensor1< double, 3 > getVector(const double time)
MoFEMErrorCode scaleNf(const FEMethod *fe, VectorDouble &nf)
Set of functions declaring elements and setting operators for basic boundary conditions interface.
BasicBoundaryConditionsInterface(MoFEM::Interface &m_field, string postion_field, string mesh_pos_field_name="MESH_NODE_POSITIONS", string problem_name="ELASTIC", string domain_element_name="ELASTIC_FE", bool is_displacement_field=true, bool is_quasi_static=true, double *snes_load_factor=nullptr, bool is_partitioned=true)
boost::shared_ptr< FaceElementForcesAndSourcesCore > springLhsPtr
MoFEMErrorCode setupSolverFunction(const TSType type=IM)
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpBaseTimesVector< 1, 3, 3 > OpInertiaForce
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS >::OpSource< 1, 3 > OpBodyForce
MoFEMErrorCode setupSolverJacobianTS(const TSType type) override
boost::shared_ptr< VolumeElementForcesAndSourcesCore > bodyForceLhsPtr
boost::shared_ptr< FluidPressure > fluidPressureElementPtr
boost::shared_ptr< FaceElementForcesAndSourcesCore > springRhsPtr
boost::ptr_map< std::string, EdgeForce > edge_forces
MoFEMErrorCode setupSolverImpl(const TSType type=IM)
boost::ptr_map< std::string, NodalForce > nodal_forces
boost::ptr_map< std::string, NeumannForcesSurface > neumann_forces
MoFEMErrorCode setupSolverFunctionTS(const TSType type) override
NaturalBC< DomainEleOp >::Assembly< PETSC >::LinearForm< GAUSS > DomainNaturalBC
FormsIntegrators< DomainEleOp >::Assembly< PETSC >::BiLinearForm< GAUSS >::OpMass< 1, 3 > OpMass
boost::shared_ptr< VolumeElementForcesAndSourcesCore > bodyForceRhsPtr
MoFEMErrorCode addElementsToDM(SmartPetscObj< DM > dm) override
MoFEMErrorCode setupSolverJacobian(const TSType type=IM)
boost::shared_ptr< KelvinVoigtDamper > damperElementPtr
boost::shared_ptr< DirichletDisplacementBc > dirichletBcPtr
MoFEMErrorCode postProcessElement(int step) override
Set of functions declaring elements and setting operators for generic element interface.
static MoFEMErrorCode setOperators(MoFEM::Interface &m_field, boost::ptr_map< std::string, EdgeForce > &edge_forces, Vec F, const std::string field_name, std::string mesh_node_positions="MESH_NODE_POSITIONS")
Set integration point operators.
Definition EdgeForce.hpp:97
static MoFEMErrorCode addElement(MoFEM::Interface &m_field, const std::string field_name, Range *intersect_ptr=NULL)
Add element taking information from NODESET.
Definition EdgeForce.hpp:62
static MoFEMErrorCode addNeumannBCElements(MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS", Range *intersect_ptr=NULL)
Declare finite element.
static MoFEMErrorCode setMomentumFluxOperators(MoFEM::Interface &m_field, boost::ptr_map< std::string, NeumannForcesSurface > &neumann_forces, Vec F, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
Set operators to finite elements calculating right hand side vector.
static MoFEMErrorCode setOperators(MoFEM::Interface &m_field, boost::ptr_map< std::string, NodalForce > &nodal_forces, Vec F, const std::string field_name)
Set integration point operators.
static MoFEMErrorCode addElement(MoFEM::Interface &m_field, const std::string field_name, Range *intersect_ptr=NULL)
Add element taking information from NODESET.
static MoFEMErrorCode setSpringOperators(MoFEM::Interface &m_field, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_lhs_ptr, boost::shared_ptr< FaceElementForcesAndSourcesCore > fe_spring_rhs_ptr, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS", double stiffness_scale=1.)
Implementation of spring element. Set operators to calculate LHS and RHS.
static MoFEMErrorCode addSpringElements(MoFEM::Interface &m_field, const std::string field_name, const std::string mesh_nodals_positions="MESH_NODE_POSITIONS")
Declare spring element.
Class used to scale loads, f.e. in arc-length control.
Data structure to exchange data between MoFEM and User Loop Methods.
virtual moab::Interface & get_moab()=0
Deprecated interface functions.
Structure for user loop methods on finite elements.
Force scale operator for reading four columns (time and vector)
virtual FTensor::Tensor1< double, SPACE_DIM > getVector(const double time)
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Force scale operator for reading two columns.
PetscBool is_quasi_static
Definition plastic.cpp:144
double scale
Definition plastic.cpp:124