-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgsMuscleAssembler.h
72 lines (55 loc) · 2.63 KB
/
gsMuscleAssembler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/** @file gsMuscleAssembler.h
@brief Provides elasticity systems for muscle simulations.
This file is part of the G+Smo library.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Author(s):
A.Shamanskiy (2016 - ...., TU Kaiserslautern)
*/
#pragma once
#include <gsElasticity/gsElasticityAssembler.h>
namespace gismo
{
/** @brief Assembler for incompressible nonlinear elasticity problem with a muscle material model.
* The material model is based on the paper by M.H.Gfrerer and B.Simeon
"Fiber-based modeling and simulation of skeletal muscles"
*/
template <class T>
class gsMuscleAssembler : public gsElasticityAssembler<T>
{
public:
typedef gsElasticityAssembler<T> Base;
/// @brief Constructor of mixed formulation (displacement + pressure)
gsMuscleAssembler(const gsMultiPatch<T> & patches,
const gsMultiBasis<T> & basisDisp,
const gsMultiBasis<T> & basisPres,
const gsBoundaryConditions<T> & bconditions,
const gsFunction<T> & body_force,
const gsPiecewiseFunction<T> & tendonMuscleDistribution,
const gsVector<T> & fiberDirection);
//--------------------- SYSTEM ASSEMBLY ----------------------------------//
/// Assembles the tangential linear system for Newton's method given the current solution
/// in the form of free and fixed/Dirichelt degrees of freedom.
/// Checks if the current solution is valid (Newton's solver can exit safely if invalid).
using Base::assemble;
virtual bool assemble(const gsMatrix<T> & solutionVector,
const std::vector<gsMatrix<T> > & fixedDoFs);
//--------------------- SPECIALS ----------------------------------//
/// @brief Construct Cauchy stresses for evaluation or visualization
using Base::constructCauchyStresses;
virtual void constructCauchyStresses(const gsMultiPatch<T> & displacement,
const gsMultiPatch<T> & pressure,
gsPiecewiseFunction<T> & result,
stress_components::components component = stress_components::von_mises) const;
protected:
using Base::m_options;
using Base::m_pde_ptr;
using Base::m_system;
gsPiecewiseFunction<T> const & muscleTendon;
gsVector<T> const & fiberDir;
};
} // namespace gismo ends
#ifndef GISMO_BUILD_LIB
#include GISMO_HPP_HEADER(gsMuscleAssembler.hpp)
#endif