|
| v0.14.0
|
Go to the documentation of this file.
24 #ifndef __REMODELING_HPP__
25 #define __REMODELING_HPP__
58 case CTX_TSSETIFUNCTION: {
59 snes_ctx = CTX_SNESSETFUNCTION;
85 case CTX_TSSETIJACOBIAN: {
86 snes_ctx = CTX_SNESSETJACOBIAN;
135 boost::ptr_map<string, NeummanForcesSurface>
184 boost::shared_ptr<MatrixDouble>
186 boost::shared_ptr<VectorDouble>
271 template <
class B1,
class B2,
class T>
278 const double mu = common_data.
mu;
287 B2 log_det = log(det);
288 psi = 0.5 *
mu * (traceC - 3.0) -
mu * log_det +
289 0.5 *
lambda * log_det * log_det;
304 template <
class B1,
class T>
311 trace_on(common_data.
tAg, common_data.
kEep);
312 common_data.
aC(
I,
J) <<= dC(
I,
J);
313 CHKERR freeEnergy<adouble, adouble, FTensor::Tensor2_symmetric<adouble, 3>>(
314 common_data, common_data.
aC, common_data.aPsi);
316 common_data.aPsi >>= psi_val;
382 std::vector<EntityHandle> &map_gauss_pts,
512 template <
bool ADOLC>
587 Vec energy_vec,
Vec mass_vec)
598 #endif //__REMODELING_HPP__
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
MoFEMErrorCode doWork(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
VolumeElementForcesAndSourcesCore(Interface &m_field, const EntityType type=MBTET)
OpAssmbleStressLhs_dRho(Remodeling::CommonData &common_data)
MoFEMErrorCode buildDM()
Set problem and DM.
MoFEMErrorCode addFields()
Set and add entities to approximation fields.
MoFEM::Interface & mField
boost::shared_ptr< Fe > feRhs
FE to make right hand side.
MoFEMErrorCode doWork(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
VectorDouble vecDetF
determinant of F
boost::ptr_map< string, NeummanForcesSurface > neumannForces
Forces on surface.
double n
porosity exponent [-]
MoFEMErrorCode postProcess()
MoFEMErrorCode doWork(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
VectorDouble nF
Vector of the right hand side (internal forces)
MoFEMErrorCode doWork(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
DMType dm_name
dm (problem) name
Remodeling::CommonData & commonData
MoFEMErrorCode operator()()
MatrixDouble transLocK_P_F
boost::ptr_map< string, NodalForce > nodalForces
Nodal forces.
Diagonal block of tangent matrix .
Implementation of bone remodeling finite element.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
UBlasMatrix< double > MatrixDouble
double rHo_ref
reference density
Fe(MoFEM::Interface &m_field)
Off diagonal block of tangent matrix .
moab::Interface & postProcMesh
Remodeling::CommonData & commonData
double cUrrent_psi
current free energy for evaluating equilibrium state
double cUrrent_mass
current free energy for evaluating equilibrium state
double rHo_max
max density
VectorDouble vecR
Mass sorce.
MoFEMErrorCode freeEnergy(Remodeling::CommonData &common_data, T &C, B1 &psi)
FTensor::Tensor2_symmetric< adouble, 3 > aC
right Cauchy-Green deformation tensor
double rHo_min
min density
FTensor::Index< 'J', DIM1 > J
OpAssmbleRhoLhs_dRho(Remodeling::CommonData &common_data)
boost::shared_ptr< VectorDouble > rhoPtr
Ptr to density matrix container.
OpCalculateStressTangent(Remodeling::CommonData &common_data)
MoFEMErrorCode preProcess()
double lambda
Lame parameter.
MoFEMErrorCode doWork(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
OpGetRhoTimeDirevative(Remodeling::CommonData &common_data)
boost::shared_ptr< MatrixDouble > gradDispPtr
Ptr to gradient of displacements matrix container.
Deprecated interface functions.
Remodeling::CommonData & commonData
Assemble residual for conservation of mass (density)
MoFEMErrorCode preProcess()
constexpr IntegrationType I
DeprecatedCoreInterface Interface
PetscBool less_post_proc
reduce file size
#define CHKERR
Inline error check.
MoFEMErrorCode recordFreeEnergy_dC(Remodeling::CommonData &common_data, T &dC, B1 &psi)
Remodeling::CommonData & commonData
MonitorPostProc(MoFEM::Interface &m_field, Remodeling::CommonData &common_data)
MoFEMErrorCode getParameters()
Get parameters form line command or config file.
MatrixDouble transLocK_rho_rho
implementation of Data Operators for Forces and Sources
OpCalculateStress(Remodeling::CommonData &common_data)
MatrixDouble locK_rho_rho
PetscBool is_atom_testing
for atom tests
PostProcVolumeOnRefinedMesh postProcElastic
boost::shared_ptr< NonlinearElasticElement > elasticPtr
OpAssmbleRhoRhs(Remodeling::CommonData &common_data)
Remodeling::CommonData & commonData
int b
b exponent for bell function
MoFEMErrorCode addElementsTestingElasticty()
(Testing only) Set finite element to run elastic problem only
PetscBool equilibrium_flg
boost::shared_ptr< MatrixDouble > gradRhoPtr
Gradient of density field.
MoFEMErrorCode preProcess()
Off diagonal block of tangent matrix .
Remodeling(MoFEM::Interface &m_field, CommonData &common_data)
MoFEMErrorCode postProcess()
boost::ptr_map< string, EdgeForce > edgeForces
Forces on edges.
VectorDouble vecPsi
Elastic energy density.
Not used at this stage. Could be used to do some calculations, before assembly of local elements.
Remodeling::CommonData & commonData
MoFEMErrorCode addMomentumFluxes()
Finite elements to calculate tractions.
double getCFromDensity(const double &rho)
Assemble residual for conservation of momentum (stresses)
MatrixDouble matGradientOfDeformation
Gradient of deformation.
Volume finite element base.
MoFEMErrorCode doWork(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
Remodeling::CommonData & commonData
FTensor::Tensor2< double, 3, 3 > diffDiff
EntitiesFieldData::EntData EntData
constexpr auto field_name
OpAssmbleStressRhs(Remodeling::CommonData &common_data)
Evaluate physical equations at integration points.
static auto determinantTensor3by3(T &t)
Calculate the determinant of a 3x3 matrix or a tensor of rank 2.
OpCalculateStressTangentWithAdolc(Remodeling::CommonData &common_data)
MoFEMErrorCode solveDM()
Solve problem set up in DM.
OpMassAndEnergyCalculation(const string &field_name, Remodeling::CommonData &common_data, Vec energy_vec, Vec mass_vec)
Evaluate density derivative with respect to time in case of Backward Euler Method.
MatrixDouble matPushedMaterialTangent
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
Remodeling::CommonData & commonData
double pSi_ref
reference free energy
boost::shared_ptr< Fe > feLhs
FE to make left hand side.
std::vector< EntityHandle > & mapGaussPts
double R0
mass conduction coefficient
Off diagonal block of tangent matrix /f[ K_{u \rho}=\intop_{V} \left[\frac{n}{\rho_{0}}\right] \left...
MoFEMErrorCode addElements()
Set and add finite elements.
PostProcVolumeOnRefinedMesh postProc
MoFEM::Interface & mField
MatrixDouble matP
1st Piola stress
boost::shared_ptr< ElasticMaterials > elasticMaterialsPtr
double getCFromDensityDiff(const double &rho)
int getRule(int order)
Set integrate rule.
MoFEMErrorCode getParameters()
DM dm
Discretization manager.
MoFEMErrorCode doWork(int row_side, EntityType row_type, DataForcesAndSourcesCore::EntData &row_data)
const FTensor::Tensor2< T, Dim, Dim > Vec
Remodeling::CommonData & commonData
MatrixDouble matInvF
inverse of deformation gradient
double m
algorithmic exponent [-]
UBlasVector< double > VectorDouble
Remodeling::CommonData & commonData
OpAssmbleRhoLhs_dF(Remodeling::CommonData &common_data)
MatrixDouble matS
2nd Piola stress
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
VectorDouble vecRhoDt
Time derivative of density.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
MatrixDouble matMaterialTangent
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
MoFEMErrorCode doWork(int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
OpAssmbleStressLhs_dF(Remodeling::CommonData &common_data)
Not used at this stage. Could be used to do some calculations, before assembly of local elements.
double c
density evolution (growth) velocity [d/m^2]
Remodeling::CommonData & commonData
MoFEMErrorCode addElementsTestingDensity()
(Testing only) Set finite element to run mass transport problem only
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Remodeling::CommonData & commonData
boost::shared_ptr< FePrePostProcessLhs > preProcLhs
MoFEMErrorCode postProcess()
MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
VectorDouble nF
Vector of the right hand side (internal forces)
OpPostProcStress(moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, Remodeling::CommonData &common_data)
Remodeling::CommonData & commonData
Used to post proc stresses, energy, source term.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
boost::shared_ptr< FePrePostProcessRhs > preProcRhs
@ OPROW
operator doWork function is executed on FE rows