|
| v0.14.0
|
Implementation of bone remodeling finite element.
More...
#include <users_modules/bone_remodelling/src/Remodeling.hpp>
Implementation of bone remodeling finite element.
Implementation base on paper [75] http://biomechanics.stanford.edu/paper/IJSS12.pdf
- Examples
- bone_adaptation.cpp.
Definition at line 36 of file Remodeling.hpp.
◆ Remodeling()
◆ addElements()
Set and add finite elements.
- Returns
- Error code
- Examples
- bone_adaptation.cpp, and Remodeling.hpp.
Definition at line 1694 of file Remodeling.cpp.
1706 "MESH_NODE_POSITIONS");
1718 "MESH_NODE_POSITIONS");
1733 "DISPLACEMENTS",
"MESH_NODE_POSITIONS",
false,
true);
1751 list_of_operators_rhs.push_back(
1753 list_of_operators_rhs.push_back(
1755 list_of_operators_rhs.push_back(
new OpGetRhoTimeDirevative(
commonData));
1760 list_of_operators_rhs.push_back(
new OpAssmbleStressRhs(
commonData));
1761 list_of_operators_rhs.push_back(
new OpAssmbleRhoRhs(
commonData));
1768 list_of_operators_lhs.push_back(
1770 list_of_operators_rhs.push_back(
1776 list_of_operators_lhs.push_back(
1777 new OpCalculateStressTangentWithAdolc(
commonData));
1778 list_of_operators_lhs.push_back(
1779 new OpAssmbleStressLhs_dF<true>(
commonData));
1781 list_of_operators_lhs.push_back(
new OpCalculateStressTangent(
commonData));
1782 list_of_operators_lhs.push_back(
1783 new OpAssmbleStressLhs_dF<false>(
commonData));
1785 list_of_operators_lhs.push_back(
new OpAssmbleRhoLhs_dRho(
commonData));
1786 list_of_operators_lhs.push_back(
new OpAssmbleRhoLhs_dF(
commonData));
1787 list_of_operators_lhs.push_back(
new OpAssmbleStressLhs_dRho(
commonData));
◆ addElementsTestingDensity()
MoFEMErrorCode BoneRemodeling::Remodeling::addElementsTestingDensity |
( |
| ) |
|
(Testing only) Set finite element to run mass transport problem only
- Returns
- Error code
- Examples
- Remodeling.hpp.
◆ addElementsTestingElasticty()
MoFEMErrorCode BoneRemodeling::Remodeling::addElementsTestingElasticty |
( |
| ) |
|
(Testing only) Set finite element to run elastic problem only
- Returns
- Error code
- Examples
- Remodeling.hpp.
◆ addFields()
Set and add entities to approximation fields.
- Returns
- Error code
- Examples
- bone_adaptation.cpp, and Remodeling.hpp.
Definition at line 1607 of file Remodeling.cpp.
1628 bool add_rho_field =
false;
1636 add_rho_field =
true;
1676 if (add_rho_field) {
1688 "MESH_NODE_POSITIONS");
◆ addMomentumFluxes()
Finite elements to calculate tractions.
- Returns
- Error code
- Examples
- bone_adaptation.cpp, and Remodeling.hpp.
Definition at line 1792 of file Remodeling.cpp.
1796 CHKERR MetaNeummanForces::addNeumannBCElements(
mField,
"DISPLACEMENTS");
1801 CHKERR MetaNeummanForces::setMomentumFluxOperators(
1805 PETSC_NULL,
"DISPLACEMENTS");
1810 for (boost::ptr_map<string, NeummanForcesSurface>::iterator mit =
1813 mit->second->methodsOp.push_back(
1816 for (boost::ptr_map<string, NodalForce>::iterator mit =
1819 mit->second->methodsOp.push_back(
1822 for (boost::ptr_map<string, EdgeForce>::iterator mit =
1825 mit->second->methodsOp.push_back(
◆ buildDM()
◆ getParameters()
Get parameters form line command or config file.
Read command line and config file to setup material and model parameters.
- Returns
- Error code
- Examples
- bone_adaptation.cpp, and Remodeling.hpp.
Definition at line 1579 of file Remodeling.cpp.
1582 CHKERR PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"Bone remodeling",
"none");
1585 CHKERR PetscOptionsInt(
"-my_order",
"default approximation order",
"", 2,
1588 ierr = PetscOptionsEnd();
1593 string name = it->getName();
1594 if (name.compare(0, 14,
"NO_REMODELLING") == 0) {
◆ solveDM()
Solve problem set up in DM.
- Returns
- Error code
- Examples
- bone_adaptation.cpp, and Remodeling.hpp.
Definition at line 1863 of file Remodeling.cpp.
1873 CHKERR TSSetIFunction(ts,
F, PETSC_NULL, PETSC_NULL);
1874 CHKERR TSSetIJacobian(ts,
A,
A, PETSC_NULL, PETSC_NULL);
1876 #if PETSC_VERSION_GE(3, 8, 0)
1877 CHKERR TSSetMaxTime(ts, ftime);
1879 CHKERR TSSetFromOptions(ts);
1883 CHKERR TSGetSNES(ts, &snes);
1885 CHKERR SNESGetKSP(snes, &ksp);
1887 CHKERR KSPGetPC(ksp, &pc);
1888 PetscBool is_pcfs = PETSC_FALSE;
1889 PetscObjectTypeCompare((PetscObject)pc, PCFIELDSPLIT, &is_pcfs);
1893 if (is_pcfs == PETSC_TRUE) {
1898 problem_ptr->
getName(),
ROW,
"DISPLACEMENTS", 0, 3, &is_disp);
1900 problem_ptr->
getName(),
ROW,
"RHO", 0, 1, &is_rho);
1903 CHKERR PCFieldSplitSetIS(pc, NULL, is_disp);
1904 CHKERR PCFieldSplitSetIS(pc, NULL, is_rho);
1905 CHKERR ISDestroy(&is_disp);
1906 CHKERR ISDestroy(&is_rho);
1918 #if PETSC_VERSION_GE(3, 7, 0)
1919 CHKERR TSSetExactFinalTime(ts, TS_EXACTFINALTIME_STEPOVER);
1922 CHKERR TSGetTime(ts, &ftime);
1923 PetscInt steps, snesfails, rejects, nonlinits, linits;
1924 #if PETSC_VERSION_LE(3, 8, 0)
1925 CHKERR TSGetTimeStepNumber(ts, &steps);
1927 CHKERR TSGetStepNumber(ts, &steps);
1930 CHKERR TSGetSNESFailures(ts, &snesfails);
1931 CHKERR TSGetStepRejections(ts, &rejects);
1932 CHKERR TSGetSNESIterations(ts, &nonlinits);
1933 CHKERR TSGetKSPIterations(ts, &linits);
1934 PetscPrintf(PETSC_COMM_WORLD,
1935 "steps %D (%D rejected, %D SNES fails), ftime %g, nonlinits %D, "
1937 steps, rejects, snesfails, ftime, nonlinits, linits);
◆ commonData
CommonData& BoneRemodeling::Remodeling::commonData |
◆ mField
The documentation for this struct was generated from the following files:
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
MoFEM::Interface & mField
boost::shared_ptr< Fe > feRhs
FE to make right hand side.
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
boost::ptr_map< string, NeummanForcesSurface > neumannForces
Forces on surface.
Problem manager is used to build and partition problems.
DMType dm_name
dm (problem) name
MoFEMErrorCode addHOOpsVol(const std::string field, E &e, bool h1, bool hcurl, bool hdiv, bool l2)
boost::ptr_map< string, NodalForce > nodalForces
Nodal forces.
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
structure grouping operators and data used for calculation of nonlinear elastic element
BasicMethodsSequence & getPostProcessMonitor()
Get the postProcess to do Monitor object.
UBlasMatrix< double > MatrixDouble
double rHo_ref
reference density
double cUrrent_psi
current free energy for evaluating equilibrium state
Projection of edge entities with one mid-node on hierarchical basis.
Manage setting parameters and constitutive equations for nonlinear/linear elastic materials.
boost::shared_ptr< VectorDouble > rhoPtr
Ptr to density matrix container.
virtual MoFEMErrorCode add_ents_to_field_by_type(const Range &ents, const EntityType type, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
PetscErrorCode DMMoFEMAddElement(DM dm, std::string fe_name)
add element to dm
boost::shared_ptr< MatrixDouble > gradDispPtr
Ptr to gradient of displacements matrix container.
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
Set monitor for TS solver.
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
#define CHKERR
Inline error check.
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
virtual moab::Interface & get_moab()=0
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
Section manager is used to create indexes and sections.
PetscBool is_atom_testing
for atom tests
Force scale operator for reading two columns.
boost::shared_ptr< NonlinearElasticElement > elasticPtr
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
boost::shared_ptr< MatrixDouble > gradRhoPtr
Gradient of density field.
Get value at integration points for scalar field.
boost::ptr_map< string, EdgeForce > edgeForces
Forces on edges.
Interface for Time Stepping (TS) solver.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
virtual bool check_field(const std::string &name) const =0
check if field is in database
PetscErrorCode DMMoFEMCreateMoFEM(DM dm, MoFEM::Interface *m_field_ptr, const char problem_name[], const MoFEM::BitRefLevel bit_level, const MoFEM::BitRefLevel bit_mask=MoFEM::BitRefLevel().set())
Must be called by user to set MoFEM data structures.
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_field)=0
set finite element field data
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
boost::shared_ptr< Fe > feLhs
FE to make left hand side.
#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.
boost::shared_ptr< ElasticMaterials > elasticMaterialsPtr
DM dm
Discretization manager.
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
const FTensor::Tensor2< T, Dim, Dim > Vec
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
PetscErrorCode DMMoFEMGetTsCtx(DM dm, MoFEM::TsCtx **ts_ctx)
get MoFEM::TsCtx data structure
DEPRECATED MoFEMErrorCode synchronise_field_entities(const std::string &name, int verb=DEFAULT_VERBOSITY)
UBlasVector< double > VectorDouble
const double D
diffusivity
@ MOFEM_ATOM_TEST_INVALID
virtual MoFEMErrorCode build_adjacencies(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
build adjacencies
keeps basic data about problem
virtual bool check_finite_element(const std::string &name) const =0
Check if finite element is in database.
virtual MoFEMErrorCode set_field_order(const EntityHandle meshset, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
Set order approximation of the entities in the field.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
virtual MoFEMErrorCode add_field(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_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add field.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
PetscErrorCode DMMoFEMSetIsPartitioned(DM dm, PetscBool is_partitioned)