Reference
Common
-
void akantu::initialize(const std::string &input_file, int &argc, char **&argv)
initialize the static part of akantu and read the global input_file
-
void akantu::initialize(int &argc, char **&argv)
initialize the static part of akantu
-
using akantu::UInt = unsigned int
-
using akantu::Int = int
-
using akantu::Real = double
-
enum akantu::ElementType
type of elements
Values:
-
enumerator _not_defined
-
enumerator _not_defined
For not defined cases.
-
enumerator BOOST_PP_SEQ_ENUM = ((_point_1)(_segment_2)(_segment_3)(_triangle_3)(_triangle_6)(_quadrangle_4)(_quadrangle_8)(_tetrahedron_4)(_tetrahedron_10)(_pentahedron_6)(_pentahedron_15)(_hexahedron_8)(_hexahedron_20))
-
enumerator _max_element_type
-
enumerator _not_defined
-
enumerator _not_defined
For not defined cases.
-
enumerator _cohesive_1d_2
-
enumerator _cohesive_2d_4
-
enumerator _cohesive_2d_6
-
enumerator _cohesive_3d_12
-
enumerator _cohesive_3d_16
-
enumerator _cohesive_3d_6
-
enumerator _cohesive_3d_8
-
enumerator _point_1
-
enumerator _segment_2
-
enumerator _segment_3
-
enumerator _triangle_3
-
enumerator _triangle_6
-
enumerator _quadrangle_4
-
enumerator _quadrangle_8
-
enumerator _tetrahedron_4
-
enumerator _tetrahedron_10
-
enumerator _pentahedron_6
-
enumerator _pentahedron_15
-
enumerator _hexahedron_8
-
enumerator _hexahedron_20
-
enumerator _bernoulli_beam_2
-
enumerator _bernoulli_beam_3
-
enumerator _discrete_kirchhoff_triangle_18
-
enumerator _max_element_type
-
enumerator _not_defined
-
enum class akantu::ModelType
Values:
-
enumerator model
-
enumerator solid_mechanics_model
-
enumerator solid_mechanics_model_cohesive
-
enumerator heat_transfer_model
-
enumerator structural_mechanics_model
-
enumerator embedded_model
-
enumerator model
-
enum akantu::AnalysisMethod
enum AnalysisMethod type of solving method used to solve the equation of motion
Values:
-
enumerator _static = 0
-
enumerator _implicit_dynamic = 1
-
enumerator _explicit_lumped_mass = 2
-
enumerator _explicit_lumped_capacity = 2
-
enumerator _explicit_consistent_mass = 3
-
enumerator _explicit_contact = 4
-
enumerator _implicit_contact = 5
-
enumerator _static = 0
-
enum class akantu::SolveConvergenceCriteria
enum SolveConvergenceCriteria different convergence criteria
Values:
-
enumerator _residual
Use residual to test the convergence.
-
enumerator _solution
Use solution to test the convergence.
-
enumerator _residual_mass_wgh
Use residual weighted by inv. nodal mass to testb
-
enumerator _residual
-
class ArrayBase
class that afford to store vectors in static memory
Subclassed by akantu::ArrayDataLayer< T, allocation_trait >, akantu::ArrayDataLayer< T, ArrayAllocationType::_pod >
Public Functions
-
inline explicit ArrayBase(const ID &id = "")
-
virtual ~ArrayBase() = default
-
inline bool empty() const
-
virtual void printself(std::ostream &stream, int indent = 0) const = 0
function to print the content of the class
-
inline decltype(auto) getNbComponent() const
Get the number of components.
-
inline decltype(auto) getID() const
Get the name of the array.
-
inline void setID(const ID &id)
Set the name of th array.
-
inline explicit ArrayBase(const ID &id = "")
-
template<typename T, ArrayAllocationType allocation_trait = ArrayAllocationTrait<T>::value>
class ArrayDataLayer : public akantu::ArrayBase Subclassed by akantu::Array< akantu::ContactElement >, akantu::Array< Idx >, akantu::Array< Element >, akantu::Array< Entity >, akantu::Array< T >, akantu::Array< Int >, akantu::Array< PetscInt >, akantu::Array< char >, akantu::Array< bool >, akantu::Array< NodeFlag >, akantu::Array< UInt >, akantu::Array< Real >, akantu::Array< akantu::Element >, akantu::Array< T, is_scal >
Public Types
-
using reference = value_type&
-
using pointer_type = value_type*
-
using const_reference = const value_type&
Public Functions
-
~ArrayDataLayer() override = default
-
explicit ArrayDataLayer(Int size = 0, Int nb_component = 1, const ID &id = "")
Allocation of a new vector.
-
ArrayDataLayer(Int size, Int nb_component, const_reference value, const ID &id = "")
Allocation of a new vector with a default value.
-
ArrayDataLayer(const ArrayDataLayer &vect, const ID &id = "")
Copy constructor (deep copy)
-
explicit ArrayDataLayer(const std::vector<value_type> &vect)
Copy constructor (deep copy)
-
ArrayDataLayer &operator=(const ArrayDataLayer &other)
-
ArrayDataLayer(ArrayDataLayer &&other) noexcept = default
-
ArrayDataLayer &operator=(ArrayDataLayer &&other) noexcept = default
-
inline void push_back(const_reference value)
append a tuple of size nb_component containing value
-
template<typename Derived>
inline void push_back(const Eigen::MatrixBase<Derived> &new_elem) append a vector
append a Vector or a Matrix
append a matrix or a vector to the array
- Parameters:
new_elem – a reference to a Matrix<T> or Vector<T>
-
using reference = value_type&
-
template<typename T, bool is_scal>
class Array : public akantu::ArrayDataLayer<T> Public Types
-
using value_type = typename parent::value_type
-
using size_type = typename parent::size_type
-
using reference = typename parent::reference
-
using pointer_type = typename parent::pointer_type
-
using const_reference = typename parent::const_reference
-
using const_scalar_iterator = const_view_iterator<const T>
const_iterator for Array of nb_component = 1
-
using vector_iterator = view_iterator<VectorProxy<T>>
iterator returning Vectors of size n on entries of Array with nb_component = n
-
using const_vector_iterator = const_view_iterator<VectorProxy<const T>>
const_iterator returning Vectors of n size on entries of Array with nb_component = n
Public Functions
-
~Array() override
-
inline Array()
-
explicit Array(Int size, Int nb_component, const_reference value, const ID &id = "")
Allocation of a new vector with a default value.
-
Idx find(const_reference elem) const
search elem in the vector, return the position of the first occurrence or -1 if not found
search elem in the array, return the position of the first occurrence or -1 if not found
- Parameters:
elem – the element to look for
- Returns:
index of the first occurrence of elem or -1 if elem is not present
-
inline void push_back(const_reference value)
append a value to the end of the Array
-
template<typename Derived>
inline void push_back(const Eigen::MatrixBase<Derived> &new_elem) append a Vector or a Matrix
-
inline void erase(Idx i)
erase the value at position i
erase an element. If the erased element is not the last of the array, the last element is moved into the hole in order to maintain contiguity. This may invalidate existing iterators (For instance an iterator obtained by Array::end() is no longer correct) and will change the order of the elements.
- Parameters:
i – index of element to erase
-
template<typename R>
inline auto erase(const view_iterator<R> &it) erase the entry corresponding to the iterator
-
template<typename C, std::enable_if_t<aka::is_tensor<C>::value>* = nullptr>
inline Idx find(const C &elem)
-
inline void set(T t)
set all entries of the array to the value t
- Parameters:
t – value to fill the array with
-
template<typename C, std::enable_if_t<aka::is_tensor<C>::value>* = nullptr>
inline void set(const C &vm) set all tuples of the array to a given vector or matrix
- Parameters:
vm – Matrix or Vector to fill the array with
-
inline void zero()
set the array to T{}
-
inline void clear()
resize the array to 0
-
void copy(const Array &other, bool no_sanity_check = false)
copy another Array in the current Array, the no_sanity_check allows you to force the copy in cases where you know what you do with two non matching Arrays in terms of n
copy the content of another array. This overwrites the current content.
- Parameters:
other – Array to copy into this array. It has to have the same nb_component as this. If compiled in debug mode, an incorrect other will result in an exception being thrown. Optimised code may result in unpredicted behaviour.
no_sanity_check – turns off all checkes
-
virtual void printself(std::ostream &stream, int indent = 0) const override
function to print the containt of the class
-
template<typename OT = T, std::enable_if_t<std::is_arithmetic<OT>::value>* = nullptr>
bool isFinite() const noexcept Tests if all elements are finite.
-
Array &operator-=(const Array &vect)
substraction entry-wise
Subtract another array entry by entry from this array in place. Both arrays must have the same size and nb_component. If the arrays have different shapes, code compiled in debug mode will throw an expeption and optimised code will behave in an unpredicted manner
- Parameters:
other – array to subtract from this
- Returns:
reference to modified this
-
Array &operator+=(const Array &vect)
addition entry-wise
Add another array entry by entry to this array in place. Both arrays must have the same size and nb_component. If the arrays have different shapes, code compiled in debug mode will throw an expeption and optimised code will behave in an unpredicted manner
- Parameters:
other – array to add to this
- Returns:
reference to modified this
-
Array &operator*=(const T &alpha)
multiply evry entry by alpha
Multiply all entries of this array by a scalar in place
- Parameters:
alpha – scalar multiplicant
- Returns:
reference to modified this
-
bool operator==(const Array<T, is_scal> &other) const
check if the array are identical entry-wise
Compare this array element by element to another.
- Parameters:
other – array to compare to
- Returns:
true it all element are equal and arrays have the same shape, else false
-
inline reference operator()(Idx i, Idx j = 0)
return a reference to the j-th entry of the i-th tuple
-
inline const_reference operator()(Idx i, Idx j = 0) const
return a const reference to the j-th entry of the i-th tuple
-
inline const_reference operator[](Idx i) const
return a const reference to the ith component of the 1D array
-
auto operator*=(const ElementType&) -> Array&
-
using value_type = typename parent::value_type
-
template<typename T, typename SupportType>
class ElementTypeMapArray : public akantu::ElementTypeMap<std::unique_ptr<Array<T>>, SupportType> Public Types
-
using type_iterator = typename parent::type_iterator
Public Functions
-
auto operator=(const ElementTypeMapArray &other) -> ElementTypeMapArray&
standard assigment (copy) operator
-
ElementTypeMapArray(const ElementTypeMapArray &other)
-
void copy(const ElementTypeMapArray &other)
explicit copy
-
inline ElementTypeMapArray(const ID &id = "by_element_type_array", const ID &parent_id = "no_parent")
Constructor
- Parameters:
id – optional: identifier (string)
parent_id – optional: parent identifier. for organizational purposes only
-
inline auto alloc(Int size, Int nb_component, SupportType type, GhostType ghost_type, const T &default_value = T()) -> Array<T>&
allocate memory for a new array
- Parameters:
size – number of tuples of the new array
nb_component – tuple size
type – the type under which the array is indexed in the map
ghost_type – whether to add the field to the data map or the ghost_data map
default_value – the default value to use to fill the array
- Returns:
a reference to the allocated array
-
inline void alloc(Int size, Int nb_component, SupportType type, const T &default_value = T())
allocate memory for a new array in both the data and the ghost_data map
- Parameters:
size – number of tuples of the new array
nb_component – tuple size
type – the type under which the array is indexed in the map
-
inline auto operator()(SupportType type, GhostType ghost_type = _not_ghost) const -> const Array<T>&
-
inline auto operator()(const Element &element, Int component = 0) const -> const T&
access the data of an element, this combine the map and array accessor
-
inline auto operator()(const Element &element, Int component = 0) -> T&
access the data of an element, this combine the map and array accessor
-
inline auto operator()(const IntegrationPoint &point, Int component = 0) const -> const T&
access the data of an element, this combine the map and array accessor
-
inline auto operator()(const IntegrationPoint &point, Int component = 0) -> T&
access the data of an element, this combine the map and array accessor
-
inline decltype(auto) get(const Element &element)
access the data of an element, this combine the map and array accessor
-
inline decltype(auto) get(const IntegrationPoint &point)
-
inline decltype(auto) get(const IntegrationPoint &point) const
- template<typename... Ns, std::enable_if_t< std::conjunction_v< std::is_integral< std::decay_t< Ns >>... > and sizeof...(Ns) > = 1> inline **auto operator() (SupportType type, GhostType ghost_type=_not_ghost) -> Array< T > &
-
inline void setArray(SupportType type, GhostType ghost_type, Array<T> &vect)
insert data of a new type (not yet present) into the map.
- Parameters:
type – type of data (if this type is already present in the map, an exception is thrown).
ghost_type – optional: by default, the data map for non-ghost elements is searched
vect – the vector to include into the map
- Returns:
stored data corresponding to type.
-
inline void free()
frees all memory related to the data
-
inline void clear()
-
inline bool empty() const
-
inline void zero()
set all values in the ElementTypeMap to zero
-
template<typename ST>
inline void set(const ST &value) set all values in the ElementTypeMap to value
-
inline void onElementsRemoved(const ElementTypeMapArray<Int> &new_numbering)
deletes and reorders entries in the stored arrays
- Parameters:
new_numbering – a ElementTypeMapArray of new indices. UInt(-1) indicates deleted entries.
-
virtual void printself(std::ostream &stream, int indent = 0) const override
text output helper
-
inline void setID(const ID &id)
set the id
- Parameters:
id – the new name
-
inline auto getID() const -> ID
return the id
-
inline auto getNbComponents(Int dim = _all_dimensions, GhostType requested_ghost_type = _not_ghost, ElementKind kind = _ek_not_defined) const -> ElementTypeMap<Int>
-
template<class Func>
void initialize(const Func &f, const T &default_value, bool do_not_default) initialize the arrays in accordance to a functor
-
template<typename ...pack>
void initialize(const Mesh &mesh, pack&&... _pack) initialize with sizes and number of components in accordance of a mesh content
-
template<typename ...pack>
void initialize(const FEEngine &fe_engine, pack&&... _pack) initialize with sizes and number of components in accordance of a fe engine content (aka integration points)
-
ID getName() const
get the name of the internal field
-
template<typename ...pack>
auto size(pack&&... _pack) const -> Int get the size of the ElementTypeMapArray<T>
- Parameters:
_pack – [in]
optional arguments can be any of:
_spatial_dimension
the dimension to consider (default: _all_dimensions)_ghost_type
(default: _not_ghost)_element_kind
(default: _ek_not_defined)_all_ghost_types
(default: false)
-
inline auto isNodal() const -> bool
-
inline void isNodal(bool is_nodal)
-
using type_iterator = typename parent::type_iterator
Warning
doxygenclass: Cannot find class “akantu::Vector” in doxygen xml output for project “Akantu” from directory: ./xml
Warning
doxygenclass: Cannot find class “akantu::Matrix” in doxygen xml output for project “Akantu” from directory: ./xml
Mesh
-
class Mesh : public akantu::EventHandlerManager<MeshEventHandler>, public akantu::GroupManager, public akantu::MeshData, public akantu::Dumpable
This class contaisn the coordinates of the nodes in the Mesh.nodes akant::Array, and the connectivity. The connectivity are stored in by element types.
In order to loop on all element you have to loop on all types like this :
for(auto & type : mesh.elementTypes()) { Int nb_element = mesh.getNbElement(type); const auto & conn = mesh.getConnectivity(type); for(Int e = 0; e < nb_element; ++e) { ... } } or for_each_element(mesh, [](Element & element) { std::cout << element << std::endl });
Public Types
-
using ElementTypesIteratorHelper = ElementTypeMapArray<Idx, ElementType>::ElementTypesIteratorHelper
Public Functions
-
Mesh(Int spatial_dimension, Communicator &communicator, const ID &id = "mesh")
mesh not distributed and not using the default communicator
constructor that use an existing nodes coordinates array, by getting the vector of coordinates
-
~Mesh() override
-
void read(const std::string &filename, const MeshIOType &mesh_io_type = _miot_auto)
read the mesh from a file
-
void write(const std::string &filename, const MeshIOType &mesh_io_type = _miot_auto)
write the mesh to a file
-
template<typename ...pack>
inline std::enable_if_t<are_named_argument<pack...>::value> distribute(pack&&... _pack) with the arguments to pass to the partitionner
-
inline bool isDistributed() const
defines is the mesh is distributed or not
-
void makePeriodic(const SpatialDirection &direction)
set the periodicity in a given direction
-
void makePeriodic(const SpatialDirection &direction, const ID &list_1, const ID &list_2)
-
inline bool isPeriodic() const
defines if the mesh is periodic or not
-
inline bool isPeriodic(const SpatialDirection&) const
-
inline Idx getPeriodicMaster(Idx slave) const
get the master node for a given slave nodes, except if node not a slave
-
inline decltype(auto) getPeriodicSlaves(Idx master) const
get an iterable list of slaves for a given master node
-
virtual void printself(std::ostream &stream, int indent = 0) const override
function to print the containt of the class
-
template<typename T, class Derived1, class Derived2, std::enable_if_t<aka::is_vector_v<Derived2>>* = nullptr>
inline void extractNodalValuesFromElement(const Array<T> &nodal_values, Eigen::MatrixBase<Derived1> &elemental_values, const Eigen::MatrixBase<Derived2> &connectivity) const extract coordinates of nodes from an element
-
template<typename T>
inline decltype(auto) extractNodalValuesFromElement(const Array<T> &nodal_values, const Element &element) const extract coordinates of nodes from an element
-
inline void addConnectivityType(ElementType type, GhostType ghost_type = _not_ghost)
add a Array of connectivity for the given ElementType and GhostType .
-
template<typename T>
inline void removeNodesFromArray(Array<T> &vect, const Array<Int> &new_numbering)
-
void getGlobalConnectivity(ElementTypeMapArray<Int> &global_connectivity)
get global connectivity array
-
inline decltype(auto) getAssociatedElements(const Idx &node) const
-
void fillNodesToElements(Int dimension = _all_dimensions)
fills the nodes_to_elements for given dimension elements
-
const ID &getID() const
get the id of the mesh
-
Int getSpatialDimension() const
get the spatial dimension of the mesh = number of component of the coordinates
-
inline auto getNbNodes() const
get the number of nodes
-
inline decltype(auto) getGlobalNodesIds() const
get the Array of global ids of the nodes (only used in parallel)
-
inline auto getNodeGlobalId(Idx local_id) const
get the global id of a node
-
inline auto getNodeLocalId(Idx global_id) const
get the global id of a node
-
inline auto getNbGlobalNodes() const
get the global number of nodes
-
inline NodeFlag getNodeFlag(Idx local_id) const
-
inline auto getNodePrank(Idx local_id) const
-
inline bool isPureGhostNode(Idx n) const
say if a node is a pure ghost node
-
inline bool isLocalOrMasterNode(Idx n) const
say if a node is pur local or master node
-
inline bool isLocalNode(Idx n) const
-
inline bool isMasterNode(Idx n) const
-
inline bool isSlaveNode(Idx n) const
-
inline bool isPeriodicSlave(Idx n) const
-
inline bool isPeriodicMaster(Idx n) const
-
const BBox &getBBox() const
-
const BBox &getLocalBBox() const
-
inline auto getConnectivity(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Idx>&
get the connectivity Array for a given type
-
inline auto getConnectivity(const ElementType &el_type, GhostType ghost_type = _not_ghost) -> Array<Idx>&
-
const ElementTypeMapArray<Idx> &getConnectivities() const
-
inline auto getNbElement(ElementType type, GhostType ghost_type = _not_ghost) const
get the number of element of a type in the mesh
-
inline auto getNbElement(Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind kind = _ek_not_defined) const
get the number of element for a given ghost_type and a given dimension
-
template<class D, std::enable_if_t<aka::is_vector_v<D>>* = nullptr>
inline void getBarycenter(const Element &element, const Eigen::MatrixBase<D> &barycenter) const compute the barycenter of a given element
-
void getBarycenters(Array<Real> &barycenter, ElementType type, GhostType ghost_type) const
-
decltype(auto) getElementToSubelement() const
get the element connected to a subelement (element of lower dimension)
-
inline const auto &getElementToSubelement(ElementType el_type, GhostType ghost_type = _not_ghost) const
get the element connected to a subelement
-
decltype(auto) getElementToSubelement(const Element &element) const
get the elements connected to a subelement
-
decltype(auto) getSubelementToElement() const
get the subelement (element of lower dimension) connected to a element
-
inline const auto &getSubelementToElement(ElementType el_type, GhostType ghost_type = _not_ghost) const
get the subelement connected to an element
-
decltype(auto) getSubelementToElement(const Element &element) const
get the subelement (element of lower dimension) connected to a element
-
inline decltype(auto) getConnectivity(const Element &element) const
get connectivity of a given element
-
template<typename T>
inline decltype(auto) getData(const ID &data_name, ElementType el_type, GhostType ghost_type = _not_ghost) const get a name field associated to the mesh
-
template<typename T>
inline decltype(auto) getData(const ID &data_name, ElementType el_type, GhostType ghost_type = _not_ghost) get a name field associated to the mesh
-
template<typename T>
inline decltype(auto) getData(const ID &data_name) const get a name field associated to the mesh
-
template<typename T>
inline decltype(auto) getData(const ID &data_name) get a name field associated to the mesh
-
template<typename T>
auto getNbDataPerElem(ElementTypeMapArray<T> &array) -> ElementTypeMap<Int>
-
template<typename T>
inline decltype(auto) getDataPointer(const std::string &data_name, ElementType el_type, GhostType ghost_type = _not_ghost, Int nb_component = 1, bool size_to_nb_element = true, bool resize_with_parent = false) templated getter returning the pointer to data in MeshData (modifiable)
-
template<typename T>
inline decltype(auto) getDataPointer(const ID &data_name, ElementType el_type, GhostType ghost_type, Int nb_component, bool size_to_nb_element, bool resize_with_parent, const T &defaul_)
-
inline auto hasMeshFacets() const
-
inline auto isMeshFacets() const
-
auto getGroupDumper(const std::string &dumper_name, const std::string &group_name) -> DumperIOHelper&
return the dumper from a group and and a dumper name
-
inline auto getFacetConnectivity(const Element &element, Idx t = 0) const -> Matrix<Idx>
get connectivity of facets for a given element
-
template<typename ...pack>
auto elementTypes(pack&&... _pack) const -> ElementTypesIteratorHelper
-
inline const auto &getElementSynchronizer() const
-
inline decltype(auto) getElementSynchronizer()
-
inline const auto &getNodeSynchronizer() const
-
inline decltype(auto) getNodeSynchronizer()
-
inline const auto &getPeriodicNodeSynchronizer() const
-
inline decltype(auto) getPeriodicNodeSynchronizer()
-
inline const auto &getCommunicator() const
-
inline decltype(auto) getCommunicator()
-
inline decltype(auto) getPeriodicMasterSlaves() const
-
template<>
void sendEvent(MeshIsDistributedEvent &event)
-
template<>
void sendEvent(NewNodesEvent &event)
-
template<typename T>
ElementTypeMap<Int> getNbDataPerElem(ElementTypeMapArray<T> &arrays)
-
template<>
inline void sendEvent(NewElementsEvent &event)
-
template<>
inline void sendEvent(RemovedElementsEvent &event)
-
template<>
inline void sendEvent(RemovedNodesEvent &event)
Public Static Functions
-
static inline constexpr auto getNbNodesPerElement(ElementType type) -> Int
get the number of nodes per element for a given element type
-
static inline constexpr auto getP1ElementType(ElementType type) -> ElementType
get the number of nodes per element for a given element type considered as a first order element
-
static inline constexpr auto getKind(ElementType type) -> ElementKind
get the kind of the element type
-
static inline constexpr auto getSpatialDimension(ElementType type) -> Int
get spatial dimension of a type of element
-
static inline constexpr auto getNaturalSpaceDimension(ElementType type) -> Int
get the natural space dimension of a type of element
-
static inline constexpr auto getNbFacetsPerElement(ElementType type) -> Int
get number of facets of a given element type
-
static inline constexpr auto getNbFacetsPerElement(ElementType type, Idx t) -> Int
get number of facets of a given element type
-
static inline decltype(auto) getFacetLocalConnectivity(ElementType type, Idx t = 0)
get local connectivity of a facet for a given facet type
-
static inline constexpr auto getNbFacetTypes(ElementType type, Idx t = 0) -> Int
get the number of type of the surface element associated to a given element type
-
static inline constexpr auto getFacetType(ElementType type, Idx t = 0) -> ElementType
get the type of the surface element associated to a given element
-
static inline decltype(auto) getAllFacetTypes(ElementType type)
get all the type of the surface element associated to a given element
-
class PeriodicSlaves
Public Functions
-
PeriodicSlaves(const PeriodicSlaves &other) = default
-
PeriodicSlaves(PeriodicSlaves &&other) noexcept = default
-
auto operator=(const PeriodicSlaves &other) -> PeriodicSlaves& = default
-
inline auto begin() const
-
inline auto end() const
-
class const_iterator
Public Functions
-
inline const_iterator(internal_iterator it)
-
inline const_iterator operator++()
-
inline bool operator!=(const const_iterator &other)
-
inline bool operator==(const const_iterator &other)
-
inline auto operator*()
-
inline const_iterator(internal_iterator it)
-
PeriodicSlaves(const PeriodicSlaves &other) = default
-
using ElementTypesIteratorHelper = ElementTypeMapArray<Idx, ElementType>::ElementTypesIteratorHelper
-
class FEEngine : public akantu::MeshEventHandler
The generic FEEngine class derived in a FEEngineTemplate class containing the shape functions and the integration method
Subclassed by akantu::FEEngineTemplate< I, S, kind, IntegrationOrderFunctor >
Public Types
-
using ElementTypesIteratorHelper = ElementTypeMapArray<Real, ElementType>::ElementTypesIteratorHelper
Public Functions
-
~FEEngine() override
-
virtual void initShapeFunctions(GhostType ghost_type = _not_ghost) = 0
pre-compute all the shape functions, their derivatives and the jacobians
-
virtual void integrate(const Array<Real> &f, Array<Real> &intf, Int nb_degree_of_freedom, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
integrate f for all elements of type “type”
-
virtual Real integrate(const Array<Real> &f, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
integrate a scalar value f on all elements of type “type”
-
inline Real integrate(const Ref<const VectorXr> f, const Element &element) const
integrate one element scalar value on all elements of type “type”
-
virtual Int getNbIntegrationPoints(ElementType type, GhostType ghost_type = _not_ghost) const = 0
get the number of integration points
-
virtual const Array<Real> &getShapes(ElementType type, GhostType ghost_type = _not_ghost, Idx id = 0) const = 0
get the precomputed shapes
-
virtual const Array<Real> &getShapesDerivatives(ElementType type, GhostType ghost_type = _not_ghost, Idx id = 0) const = 0
get the derivatives of shapes
-
virtual const MatrixXr &getIntegrationPoints(ElementType type, GhostType ghost_type = _not_ghost) const = 0
get integration points
-
virtual void gradientOnIntegrationPoints(const Array<Real> &u, Array<Real> &nablauq, Int nb_degree_of_freedom, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
Compute the gradient nablauq on the integration points of an element type from nodal values u
-
virtual void interpolateOnIntegrationPoints(const Array<Real> &u, Array<Real> &uq, Int nb_degree_of_freedom, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
Interpolate a nodal field u at the integration points of an element type -> uq
-
virtual void interpolateOnIntegrationPoints(const Array<Real> &u, ElementTypeMapArray<Real> &uq, const ElementTypeMapArray<Idx> *filter_elements = nullptr) const = 0
Interpolate a nodal field u at the integration points of many element types -> uq
-
virtual void computeBtD(const Array<Real> &Ds, Array<Real> &BtDs, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
pre multiplies a tensor by the shapes derivaties
-
virtual void computeBtDB(const Array<Real> &Ds, Array<Real> &BtDBs, Int order_d, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
left and right multiplies a tensor by the shapes derivaties
-
virtual void computeNtb(const Array<Real> &bs, Array<Real> &Ntbs, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
left multiples a vector by the shape functions
-
virtual void computeNtbN(const Array<Real> &bs, Array<Real> &NtbNs, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
left and right multiplies a tensor by the shapes
-
virtual void computeIntegrationPointsCoordinates(ElementTypeMapArray<Real> &integration_points_coordinates, const ElementTypeMapArray<Idx> *filter_elements = nullptr) const = 0
Compute the interpolation point position in the global coordinates for many element types
-
virtual void computeIntegrationPointsCoordinates(Array<Real> &integration_points_coordinates, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) const = 0
Compute the interpolation point position in the global coordinates for an element type
-
virtual void initElementalFieldInterpolationFromIntegrationPoints(const ElementTypeMapArray<Real> &interpolation_points_coordinates, ElementTypeMapArray<Real> &interpolation_points_coordinates_matrices, ElementTypeMapArray<Real> &integration_points_coordinates_inv_matrices, const ElementTypeMapArray<Idx> *element_filter) const = 0
Build pre-computed matrices for interpolation of field form integration points at other given positions (interpolation_points)
-
virtual void interpolateElementalFieldFromIntegrationPoints(const ElementTypeMapArray<Real> &field, const ElementTypeMapArray<Real> &interpolation_points_coordinates, ElementTypeMapArray<Real> &result, const GhostType ghost_type, const ElementTypeMapArray<Idx> *element_filter) const = 0
interpolate field at given position (interpolation_points) from given values of this field at integration points (field)
-
virtual void interpolateElementalFieldFromIntegrationPoints(const ElementTypeMapArray<Real> &field, const ElementTypeMapArray<Real> &interpolation_points_coordinates_matrices, const ElementTypeMapArray<Real> &integration_points_coordinates_inv_matrices, ElementTypeMapArray<Real> &result, const GhostType ghost_type, const ElementTypeMapArray<Idx> *element_filter) const = 0
Interpolate field at given position from given values of this field at integration points (field) using matrices precomputed with initElementalFieldInterplationFromIntegrationPoints
-
virtual void interpolate(const Ref<const VectorXr> real_coords, const Ref<const MatrixXr> nodal_values, Ref<VectorXr> interpolated, const Element &element) const = 0
interpolate on a phyiscal point inside an element
-
virtual void computeShapes(const Ref<const VectorXr> real_coords, Int elem, ElementType type, Ref<VectorXr> shapes, GhostType ghost_type = _not_ghost) const = 0
compute the shape on a provided point
-
virtual void computeShapeDerivatives(const Ref<const VectorXr> real_coords, Int element, ElementType type, Ref<MatrixXr> shape_derivatives, GhostType ghost_type = _not_ghost) const = 0
compute the shape derivatives on a provided point
-
virtual void assembleFieldLumped(const std::function<void(Matrix<Real>&, const Element&)> &field_funct, const ID &matrix_id, const ID &dof_id, DOFManager &dof_manager, ElementType type, GhostType ghost_type = _not_ghost) const = 0
assembles the lumped version of
\[ \int N^t rho N \]
-
virtual void assembleFieldMatrix(const std::function<void(Matrix<Real>&, const Element&)> &field_funct, const ID &matrix_id, const ID &dof_id, DOFManager &dof_manager, ElementType type, GhostType ghost_type = _not_ghost) const = 0
assembles the matrix
\[ \int N^t rho N \]
-
virtual void computeNormalsOnIntegrationPoints(GhostType ghost_type = _not_ghost) = 0
pre-compute normals on integration points
-
inline virtual void computeNormalsOnIntegrationPoints(const Array<Real>&, GhostType = _not_ghost)
pre-compute normals on integration points
-
inline virtual void computeNormalsOnIntegrationPoints(const Array<Real>&, Array<Real>&, ElementType, GhostType = _not_ghost) const
pre-compute normals on integration points
-
virtual void printself(std::ostream &stream, int indent = 0) const
function to print the containt of the class
-
ElementTypesIteratorHelper elementTypes(Int dim = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind kind = _ek_regular) const
-
inline decltype(auto) getElementDimension() const
get the dimension of the element handeled by this fe_engine object
-
inline decltype(auto) getMesh() const
get the mesh contained in the fem object
-
inline auto getNormalsOnIntegrationPoints(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
get the normals on integration points
-
virtual const ShapeFunctions &getShapeFunctionsInterface() const = 0
get the shape function class (probably useless: see getShapeFunction in fe_engine_template.hh)
-
virtual const Integrator &getIntegratorInterface() const = 0
get the integrator class (probably useless: see getIntegrator in fe_engine_template.hh)
-
ID getID() const
Public Static Functions
-
template<typename T>
static void extractNodalToElementField(const Mesh &mesh, const Array<T> &nodal_f, Array<T> &elemental_f, ElementType type, GhostType ghost_type = _not_ghost, const Array<Int> &filter_elements = empty_filter) extract the nodal values and store them per element
-
template<typename T>
static void filterElementalData(const Mesh &mesh, const Array<T> &quad_f, Array<T> &filtered_f, ElementType type, GhostType ghost_type = _not_ghost, const Array<Idx> &filter_elements = empty_filter) filter a field
-
template<class Derived>
static inline Real getElementInradius(const Eigen::MatrixBase<Derived> &coord, ElementType type) get the in-radius of an element
-
static inline constexpr ElementType getCohesiveElementType(ElementType type_facet)
get cohesive element type for a given facet type
- Todo:
rewrite this function in order to get the cohesive element type directly from the facet
-
static inline Vector<ElementType> getIGFEMElementTypes(ElementType type)
get igfem element type for a given regular type
-
static inline constexpr auto getInterpolationType(ElementType el_type)
get the interpolation element associated to an element type
-
using ElementTypesIteratorHelper = ElementTypeMapArray<Real, ElementType>::ElementTypesIteratorHelper
-
class Element
Subclassed by akantu::IntegrationPoint
Public Functions
-
inline constexpr ElementKind kind() const
-
inline constexpr ElementKind kind() const
-
class GroupManager
Subclassed by akantu::FragmentManager, akantu::Mesh
Public Types
-
using node_group_iterator = NodeGroups::iterator
-
using element_group_iterator = ElementGroups::iterator
-
using const_node_group_iterator = NodeGroups::const_iterator
-
using const_element_group_iterator = ElementGroups::const_iterator
Public Functions
-
virtual ~GroupManager()
- inline BOOST_PP_CAT (BOOST_PP_CAT(const_, node_group), _iterator) BOOST_PP_CAT(BOOST_PP_CAT(node_group
-
inline begin(BOOST_PP_EMPTY()) const
- inline BOOST_PP_CAT (node_group, _iterator) BOOST_PP_CAT(BOOST_PP_CAT(node_group
-
inline begin(BOOST_PP_EMPTY())
- inline BOOST_PP_CAT (BOOST_PP_CAT(const_, node_group), _iterator) BOOST_PP_CAT(BOOST_PP_CAT(node_group
-
inline end(BOOST_PP_EMPTY()) const
- inline BOOST_PP_CAT (node_group, _iterator) BOOST_PP_CAT(BOOST_PP_CAT(node_group
-
inline end(BOOST_PP_EMPTY())
- inline BOOST_PP_CAT (BOOST_PP_CAT(const_, element_group), _iterator) BOOST_PP_CAT(BOOST_PP_CAT(element_group
-
inline begin(BOOST_PP_EMPTY()) const
- inline BOOST_PP_CAT (element_group, _iterator) BOOST_PP_CAT(BOOST_PP_CAT(element_group
-
inline begin(BOOST_PP_EMPTY())
- inline BOOST_PP_CAT (BOOST_PP_CAT(const_, element_group), _iterator) BOOST_PP_CAT(BOOST_PP_CAT(element_group
-
inline end(BOOST_PP_EMPTY()) const
- inline BOOST_PP_CAT (element_group, _iterator) BOOST_PP_CAT(BOOST_PP_CAT(element_group
-
inline end(BOOST_PP_EMPTY())
- inline BOOST_PP_CAT (BOOST_PP_CAT(const_, element_group), _iterator) BOOST_PP_CAT(BOOST_PP_CAT(element_group
-
inline find(const std::string &name) const
- inline BOOST_PP_CAT (element_group, _iterator) BOOST_PP_CAT(BOOST_PP_CAT(element_group
-
inline find(const std::string &name)
- inline BOOST_PP_CAT (BOOST_PP_CAT(const_, node_group), _iterator) BOOST_PP_CAT(BOOST_PP_CAT(node_group
-
inline find(const std::string &name) const
- inline BOOST_PP_CAT (node_group, _iterator) BOOST_PP_CAT(BOOST_PP_CAT(node_group
-
inline find(const std::string &name)
-
inline decltype(auto) iterateNodeGroups()
-
inline decltype(auto) iterateNodeGroups() const
-
inline decltype(auto) iterateElementGroups()
-
inline decltype(auto) iterateElementGroups() const
-
NodeGroup &createNodeGroup(const std::string &group_name, bool replace_group = false)
create an empty node group
-
ElementGroup &createElementGroup(const std::string &group_name, Int dimension = _all_dimensions, bool replace_group = false)
create an element group and the associated node group
-
void renameElementGroup(const std::string &name, const std::string &new_name)
renames an element group
-
void renameNodeGroup(const std::string &name, const std::string &new_name)
renames a node group
-
void copyElementGroup(const std::string &name, const std::string &new_name)
copy an existing element group
-
void copyNodeGroup(const std::string &name, const std::string &new_name)
copy an existing node group
-
template<typename T>
NodeGroup &createFilteredNodeGroup(const std::string &group_name, const NodeGroup &node_group, T &filter) create a node group from another node group but filtered
-
template<typename T>
ElementGroup &createFilteredElementGroup(const std::string &group_name, Int dimension, const NodeGroup &node_group, T &filter) create an element group from another element group but filtered
-
void destroyNodeGroup(const std::string &group_name)
destroy a node group
-
void destroyElementGroup(const std::string &group_name, bool destroy_node_group = false)
destroy an element group and the associated node group
-
ElementGroup &createElementGroup(const std::string &group_name, Int dimension, NodeGroup &node_group)
create a element group using an existing node group
-
template<typename T>
void createGroupsFromMeshData(const std::string &dataset_name) create groups based on values stored in a given mesh data
-
Int createBoundaryGroupFromGeometry()
create boundaries group by a clustering algorithm
- Todo:
extend to parallel
- Todo:
this function doesn’t work in 1D
-
Int createClusters(Int element_dimension, Mesh &mesh_facets, std::string cluster_name_prefix = "cluster", const ClusteringFilter &filter = ClusteringFilter())
create element clusters for a given dimension
-
Int createClusters(Int element_dimension, std::string cluster_name_prefix = "cluster", const ClusteringFilter &filter = ClusteringFilter())
create element clusters for a given dimension
-
void createElementGroupFromNodeGroup(const std::string &name, const std::string &node_group, Int dimension = _all_dimensions)
Create an ElementGroup based on a NodeGroup.
-
virtual void printself(std::ostream &stream, int indent = 0) const
-
void synchronizeGroupNames()
this function insure that the group names are present on all processors /!\ it is a SMP call
< type of InternalMaterialField
register an elemental field to the given group name (overloading for ElementalPartionField)
register an elemental field to the given group name (overloading for ElementalField)
register an elemental field to the given group name (overloading for MaterialInternalField)
-
const ElementGroup &getElementGroup(const std::string &name) const
-
ElementGroup &getElementGroup(const std::string &name)
-
inline bool elementGroupExists(const std::string &name) const
-
inline bool nodeGroupExists(const std::string &name) const
Public Members
- _
-
class ClusteringFilter
Subclassed by akantu::CohesiveElementFilter, akantu::PhaseFieldElementFilter
-
using node_group_iterator = NodeGroups::iterator
-
class ElementGroup : public akantu::Dumpable
Public Types
-
using ElementList = ElementTypeMapArray<Idx>
-
using type_iterator = ElementList::type_iterator
Public Functions
-
ElementGroup(const std::string &name, const Mesh &mesh, NodeGroup &node_group, Int dimension = _all_dimensions, const std::string &id = "element_group")
-
inline auto begin(ElementType type, GhostType ghost_type = _not_ghost) const
-
inline auto end(ElementType type, GhostType ghost_type = _not_ghost) const
-
void clear()
empty the element group
-
void clear(ElementType type, GhostType ghost_type = _not_ghost)
-
bool empty() const
-
void append(const ElementGroup &other_group)
append another group to this group BE CAREFUL: it doesn’t conserve the element order
-
inline void add(const Element &el, bool add_nodes = false, bool check_for_duplicate = true)
add an element to the group. By default the it does not add the nodes to the group
-
inline void add(ElementType type, Idx element, GhostType ghost_type = _not_ghost, bool add_nodes = true, bool check_for_duplicate = true)
- Todo:
fix the default for add_nodes : make it coherent with the other method
-
inline void addNode(Idx node_id, bool check_for_duplicate = true)
-
inline void removeNode(Idx node_id)
-
virtual void printself(std::ostream &stream, int indent = 0) const
function to print the contain of the class
-
virtual void fillFromNodeGroup()
fill the elements based on the underlying node group.
-
void optimize()
-
inline const Array<Idx> &getElements(ElementType type, GhostType ghost_type = _not_ghost) const
-
inline decltype(auto) getElements() const
-
inline decltype(auto) getElements()
-
decltype(auto) getElementsIterable(ElementType type, GhostType ghost_type = _not_ghost) const
-
inline decltype(auto) getNodeGroup() const
-
inline decltype(auto) getNodeGroup()
-
inline decltype(auto) getDimension() const
-
inline decltype(auto) getName() const
-
using ElementList = ElementTypeMapArray<Idx>
-
class NodeGroup : public akantu::Dumpable
Public Functions
-
~NodeGroup() override
-
void clear()
empty the node group
-
inline bool empty() const
returns treu if the group is empty
Warning
this changed beahavior if you want to empty the group use clear
-
inline auto begin() const
iterator to the beginning of the node group
-
inline auto end() const
iterator to the end of the node group
-
inline auto cbegin() const
iterator to the beginning of the node group
-
inline auto cend() const
iterator to the end of the node group
-
inline auto add(Idx node, bool check_for_duplicate = true)
add a node and give the local position through an iterator
-
inline void remove(Idx node)
remove a node
-
inline decltype(auto) find(Idx node) const
-
void optimize()
remove duplicated nodes
-
virtual void printself(std::ostream &stream, int indent = 0) const
function to print the contain of the class
-
inline decltype(auto) getNodes()
-
inline decltype(auto) getNodes() const
-
inline decltype(auto) getName() const
-
inline Idx size() const
give the number of nodes in the current group
Friends
- friend class GroupManager
-
~NodeGroup() override
Models
Common
-
class FixedValue : public akantu::BC::Dirichlet::DirichletFunctor
-
class FlagOnly : public akantu::BC::Dirichlet::DirichletFunctor
-
class IncrementValue : public akantu::BC::Dirichlet::DirichletFunctor
-
class FromHigherDim : public akantu::BC::Neumann::NeumannFunctor
-
class FromSameDim : public akantu::BC::Neumann::NeumannFunctor
-
template<class ModelType>
class BoundaryCondition Public Functions
-
inline BoundaryCondition()
-
void initBC(ModelType &model, Array<Real> &primal, Array<Real> &dual)
Initialize the boundary conditions.
-
void initBC(ModelType &model, Array<Real> &primal, Array<Real> &primal_increment, Array<Real> &dual)
-
template<typename FunctorType>
inline void applyBC(FunctorType &&func) Apply the boundary conditions.
-
template<class FunctorType>
inline void applyBC(FunctorType &&func, const std::string &group_name)
-
template<class FunctorType>
inline void applyBC(FunctorType &&func, const ElementGroup &element_group)
-
template<class FunctorType, BC::Functor::Type type = std::decay_t<FunctorType>::type>
struct TemplateFunctionWrapper
- template<typename FunctorType> _dirichlet >
Public Static Functions
-
static inline void applyBC(FunctorType &&func, const ElementGroup &group, BoundaryCondition<ModelType> &bc_instance)
-
static inline void applyBC(FunctorType &&func, const ElementGroup &group, BoundaryCondition<ModelType> &bc_instance)
- template<typename FunctorType> _neumann >
Public Static Functions
-
static inline void applyBC(FunctorType &&func, const ElementGroup &group, BoundaryCondition<ModelType> &bc_instance)
-
static inline void applyBC(FunctorType &&func, const ElementGroup &group, BoundaryCondition<ModelType> &bc_instance, GhostType ghost_type)
-
static inline void applyBC(FunctorType &&func, const ElementGroup &group, BoundaryCondition<ModelType> &bc_instance)
-
inline BoundaryCondition()
Warning
doxygenclass: Cannot find class “akantu::BoundaryConditionFunctor” in doxygen xml output for project “Akantu” from directory: ./xml
-
template<class EventHandler>
class EventHandlerManager Public Functions
-
virtual ~EventHandlerManager() = default
-
inline void registerEventHandler(EventHandler &event_handler, EventHandlerPriority priority = _ehp_highest)
register a new EventHandler to the Manager. The register object will then be informed about the events the manager observes.
-
inline void unregisterEventHandler(EventHandler &event_handler)
unregister a EventHandler object. This object will not be notified anymore about the events this manager observes.
-
virtual ~EventHandlerManager() = default
-
class Model : public akantu::ModelSolver, public akantu::MeshEventHandler
Subclassed by akantu::ContactMechanicsModel, akantu::CouplerSolidContactTemplate< SolidMechanicsModelType >, akantu::CouplerSolidPhaseField, akantu::StructuralMechanicsModel
Public Functions
-
Model(Mesh &mesh, const ModelType &type, Int dim = _all_dimensions, const ID &id = "model")
Normal constructor where the DOFManager is created internally.
-
~Model() override
-
template<typename ...pack>
inline std::enable_if_t<are_named_argument<pack...>::value> initFull(pack&&... _pack)
-
template<typename ...pack>
inline std::enable_if_t<not are_named_argument<pack...>::value> initFull(pack&&... _pack)
-
void initNewSolver(const AnalysisMethod &method)
initialize a new solver if needed
-
void dumpGroup(const std::string &group_name)
Dump the data for a given group.
-
void dumpGroup(const std::string &group_name, const std::string &dumper_name)
-
void dumpGroup()
Dump the data for all boundaries.
-
void setGroupDirectory(const std::string &directory, const std::string &group_name)
Set the directory for a given group.
-
void setGroupDirectory(const std::string &directory)
Set the directory for all boundaries.
-
void setGroupBaseName(const std::string &basename, const std::string &group_name)
Set the base name for a given group.
-
DumperIOHelper &getGroupDumper(const std::string &group_name)
Get the internal dumper of a given group.
-
inline virtual void updateDataForNonLocalCriterion(ElementTypeMapReal&)
-
inline virtual void synchronizeBoundaries()
synchronize the boundary in case of parallel run
-
inline FEEngine &getFEEngine(const ID &name = "") const
return the fem object associated with a provided name
-
inline virtual FEEngine &getFEEngineBoundary(const ID &name = "")
return the fem boundary object associated with a provided name
-
inline bool hasFEEngineBoundary(const ID &name = "")
-
template<typename FEEngineClass>
inline void registerFEEngineObject(const ID &name, Mesh &mesh, Int spatial_dimension = _all_dimensions, bool do_not_precompute = false) register a fem object associated with name
-
inline void unRegisterFEEngineObject(const ID &name)
unregister a fem object associated with name
-
SynchronizerRegistry &getSynchronizerRegistry()
return the synchronizer registry
-
template<typename FEEngineClass>
inline FEEngineClass &getFEEngineClass(const ID &name = "") const return the fem object associated with a provided name
-
template<typename FEEngineClass>
inline FEEngineClass &getFEEngineClassBoundary(const ID &name = "") return the fem boundary object associated with a provided name
-
AnalysisMethod getAnalysisMethod() const
Get the type of analysis method used.
-
void setTextModeToDumper()
-
virtual void addDumpField(const std::string &field_id)
-
virtual void addDumpFieldVector(const std::string &field_id)
-
virtual void addDumpFieldToDumper(const std::string &dumper_name, const std::string &field_id)
-
virtual void addDumpFieldVectorToDumper(const std::string &dumper_name, const std::string &field_id)
-
virtual void addDumpFieldTensorToDumper(const std::string &dumper_name, const std::string &field_id)
-
virtual void addDumpFieldTensor(const std::string &field_id)
-
virtual void setBaseName(const std::string &field_id)
-
virtual void setBaseNameToDumper(const std::string &dumper_name, const std::string &basename)
-
virtual void addDumpGroupField(const std::string &field_id, const std::string &group_name)
-
virtual void addDumpGroupFieldToDumper(const std::string &dumper_name, const std::string &field_id, const std::string &group_name, ElementKind element_kind, bool padding_flag)
-
virtual void addDumpGroupFieldToDumper(const std::string &dumper_name, const std::string &field_id, const std::string &group_name, Int spatial_dimension, ElementKind element_kind, bool padding_flag)
-
virtual void removeDumpGroupField(const std::string &field_id, const std::string &group_name)
-
virtual void removeDumpGroupFieldFromDumper(const std::string &dumper_name, const std::string &field_id, const std::string &group_name)
-
virtual void addDumpGroupFieldVector(const std::string &field_id, const std::string &group_name)
-
virtual void addDumpGroupFieldVectorToDumper(const std::string &dumper_name, const std::string &field_id, const std::string &group_name)
-
inline virtual std::shared_ptr<dumpers::Field> createNodalFieldReal(const std::string&, const std::string&, bool)
-
inline virtual std::shared_ptr<dumpers::Field> createNodalFieldInt(const std::string&, const std::string&, bool)
-
inline virtual std::shared_ptr<dumpers::Field> createNodalFieldBool(const std::string&, const std::string&, bool)
-
inline virtual std::shared_ptr<dumpers::Field> createElementalField(const std::string&, const std::string&, bool, Int, ElementKind)
-
void setDirectory(const std::string &directory)
-
void setDirectoryToDumper(const std::string &dumper_name, const std::string &directory)
-
virtual void dump(const std::string &dumper_name)
-
virtual void dump()
-
Model(Mesh &mesh, const ModelType &type, Int dim = _all_dimensions, const ID &id = "model")
-
class NonLocalManagerCallback
Public Functions
-
NonLocalManagerCallback() = default
-
NonLocalManagerCallback(const NonLocalManagerCallback&) = default
-
NonLocalManagerCallback(NonLocalManagerCallback&&) = default
-
NonLocalManagerCallback &operator=(const NonLocalManagerCallback&) = default
-
NonLocalManagerCallback &operator=(NonLocalManagerCallback&&) = default
-
virtual ~NonLocalManagerCallback() = default
-
inline virtual void initializeNonLocal()
-
inline virtual void insertIntegrationPointsInNeighborhoods(GhostType)
-
inline virtual void computeNonLocalContribution(GhostType)
-
inline virtual void updateLocalInternal(ElementTypeMapReal&, GhostType, ElementKind)
update the values of the non local internal
-
inline virtual void updateNonLocalInternal(ElementTypeMapReal&, GhostType, ElementKind)
copy the results of the averaging in the materials
-
NonLocalManagerCallback() = default
Solvers
-
class ModelSolver : public akantu::Parsable, public akantu::SolverCallback, public akantu::SynchronizerRegistry
Subclassed by akantu::Model
Public Functions
initialize the dof manager based on solver type passed in the input file
-
std::shared_ptr<DOFManager> initDOFManager(const ID &solver_type)
initialize the dof manager based on the used chosen solver type
-
inline virtual void initSolver(TimeStepSolverType, NonLinearSolverType)
Callback for the model to instantiate the matricees when needed.
-
std::tuple<ParserSection, bool> getParserSection()
get the section in the input file (if it exsits) corresponding to this model
-
virtual void solveStep(const ID &solver_id = "")
solve a step using a given pre instantiated time step solver and non linear solver
-
virtual void solveStep(SolverCallback &callback, const ID &solver_id = "")
solve a step using a given pre instantiated time step solver and non linear solver with a user defined callback instead of the model itself /!\ This can mess up everything
-
void getNewSolver(const ID &solver_id, TimeStepSolverType time_step_solver_type, NonLinearSolverType non_linear_solver_type = NonLinearSolverType::_auto)
Initialize a time solver that can be used afterwards with its id.
-
void setIntegrationScheme(const ID &solver_id, const ID &dof_id, const IntegrationSchemeType &integration_scheme_type, IntegrationScheme::SolutionType solution_type = IntegrationScheme::_not_defined)
set an integration scheme for a given dof and a given solver
-
void setIntegrationScheme(const ID &solver_id, const ID &dof_id, std::unique_ptr<IntegrationScheme> &integration_scheme, IntegrationScheme::SolutionType solution_type = IntegrationScheme::_not_defined)
set an externally instantiated integration scheme
-
virtual void predictor() override
Predictor interface for the callback.
-
virtual void corrector() override
Corrector interface for the callback.
-
virtual TimeStepSolverType getDefaultSolverType() const
Default time step solver to instantiate for this model.
-
virtual ModelSolverOptions getDefaultSolverOptions(const TimeStepSolverType &type) const
Default configurations for a given time step solver.
-
inline DOFManager &getDOFManager()
get access to the internal dof manager
-
virtual void setTimeStep(Real time_step, const ID &solver_id = "")
set the time step of a given solver
-
bool hasSolver(const ID &solver_id) const
answer to the question “does the solver exists ?”
-
void setDefaultSolver(const ID &solver_id)
changes the current default solver
-
bool hasDefaultSolver() const
is a default solver defined
-
bool hasIntegrationScheme(const ID &solver_id, const ID &dof_id) const
is an integration scheme set for a given solver and a given dof
-
TimeStepSolver &getTimeStepSolver(const ID &solver_id = "")
-
NonLinearSolver &getNonLinearSolver(const ID &solver_id = "")
-
const TimeStepSolver &getTimeStepSolver(const ID &solver_id = "") const
-
const NonLinearSolver &getNonLinearSolver(const ID &solver_id = "") const
-
const ID &getID() const
get id of model
-
class DOFManager : protected akantu::MeshEventHandler
Subclassed by akantu::DOFManagerDefault, akantu::DOFManagerPETSc
Public Functions
-
DOFManager(const ID &id = "dof_manager")
-
~DOFManager() override
-
virtual void registerDOFs(const ID &dof_id, Array<Real> &dofs_array, DOFSupportType support_type)
register an array of degree of freedom
-
virtual void registerDOFs(const ID &dof_id, Array<Real> &dofs_array, const ID &support_group)
the dof as an implied type of _dst_nodal and is defined only on a subset of nodes
-
virtual void registerDOFsPrevious(const ID &dof_id, Array<Real> &dofs_array)
register an array of previous values of the degree of freedom
-
virtual void registerDOFsIncrement(const ID &dof_id, Array<Real> &dofs_array)
register an array of increment of degree of freedom
-
virtual void registerDOFsDerivative(const ID &dof_id, Int order, Array<Real> &dofs_derivative)
register an array of derivatives for a particular dof array
-
virtual void registerBlockedDOFs(const ID &dof_id, Array<bool> &blocked_dofs)
register array representing the blocked degree of freedoms
-
virtual void assembleToResidual(const ID &dof_id, Array<Real> &array_to_assemble, Real scale_factor = 1.)
Assemble an array to the global residual array.
-
virtual void assembleToLumpedMatrix(const ID &dof_id, Array<Real> &array_to_assemble, const ID &lumped_mtx, Real scale_factor = 1.)
Assemble an array to the global lumped matrix array.
-
virtual void assembleElementalArrayLocalArray(const Array<Real> &elementary_vect, Array<Real> &array_assembeled, ElementType type, GhostType ghost_type, Real scale_factor = 1., const Array<Int> &filter_elements = empty_filter)
Assemble elementary values to a local array of the size nb_nodes * nb_dof_per_node. The dof number is implicitly considered as conn(el, n) * nb_nodes_per_element + d. With 0 < n < nb_nodes_per_element and 0 < d < nb_dof_per_node
-
virtual void assembleElementalArrayToResidual(const ID &dof_id, const Array<Real> &elementary_vect, ElementType type, GhostType ghost_type, Real scale_factor = 1., const Array<Int> &filter_elements = empty_filter)
Assemble elementary values to the global residual array. The dof number is implicitly considered as conn(el, n) * nb_nodes_per_element + d. With 0 < n < nb_nodes_per_element and 0 < d < nb_dof_per_node
-
virtual void assembleElementalArrayToLumpedMatrix(const ID &dof_id, const Array<Real> &elementary_vect, const ID &lumped_mtx, ElementType type, GhostType ghost_type, Real scale_factor = 1., const Array<Int> &filter_elements = empty_filter)
Assemble elementary values to a global array corresponding to a lumped matrix
-
virtual void assembleElementalMatricesToMatrix(const ID &matrix_id, const ID &dof_id, const Array<Real> &elementary_mat, ElementType type, GhostType ghost_type = _not_ghost, const MatrixType &elemental_matrix_type = _symmetric, const Array<Int> &filter_elements = empty_filter) = 0
Assemble elementary values to the global residual array. The dof number is implicitly considered as conn(el, n) * nb_nodes_per_element + d. With 0 < n < nb_nodes_per_element and 0 < d < nb_dof_per_node
-
virtual void assembleMatMulVectToArray(const ID &dof_id, const ID &A_id, const Array<Real> &x, Array<Real> &array, Real scale_factor = 1) = 0
multiply a vector by a matrix and assemble the result to the residual
-
virtual void assembleLumpedMatMulVectToResidual(const ID &dof_id, const ID &A_id, const Array<Real> &x, Real scale_factor = 1) = 0
multiply a vector by a lumped matrix and assemble the result to the residual
-
virtual void assemblePreassembledMatrix(const ID &matrix_id, const TermsToAssemble &terms) = 0
assemble coupling terms between to dofs
-
virtual void assembleMatMulVectToResidual(const ID &dof_id, const ID &A_id, const Array<Real> &x, Real scale_factor = 1)
multiply a vector by a matrix and assemble the result to the residual
-
virtual void assembleMatMulDOFsToResidual(const ID &A_id, Real scale_factor = 1)
multiply the dofs by a matrix and assemble the result to the residual
-
virtual void updateGlobalBlockedDofs()
updates the global blocked_dofs array
-
virtual void zeroResidual()
sets the residual to 0
-
virtual void zeroMatrix(const ID &mtx)
sets the matrix to 0
-
virtual void zeroLumpedMatrix(const ID &mtx)
sets the lumped matrix to 0
-
virtual void applyBoundary(const ID &matrix_id = "J")
-
virtual void getLumpedMatrixPerDOFs(const ID &dof_id, const ID &lumped_mtx, Array<Real> &lumped)
extract a lumped matrix part corresponding to a given dof
-
void splitSolutionPerDOFs()
splits the solution storage from a global view to the per dof storages
-
inline bool isLocalOrMasterDOF(Idx local_dof_num)
Get the location type of a given dof.
-
inline bool isSlaveDOF(Idx local_dof_num)
Answer to the question is a dof a slave dof ?
-
inline bool isPureGhostDOF(Idx local_dof_num)
Answer to the question is a dof a slave dof ?
-
inline bool hasGlobalEquationNumber(Idx global) const
tells if the dof manager knows about a global dof
-
inline Idx globalToLocalEquationNumber(Idx global) const
return the local index of the global equation number
-
inline Idx localToGlobalEquationNumber(Idx local) const
converts local equation numbers to global equation numbers;
-
inline NodeFlag getDOFFlag(Idx local_id) const
get the array of dof types (use only if you know what you do…)
-
inline bool hasBlockedDOFsChanged() const
defines if the boundary changed
-
inline decltype(auto) getSystemSize() const
Global number of dofs.
-
inline decltype(auto) getLocalSystemSize() const
Local number of dofs.
-
inline decltype(auto) getPureLocalSystemSize() const
Pure local number of dofs.
-
std::vector<ID> getDOFIDs() const
Retrieve all the registered DOFs.
-
inline Array<Real> &getDOFs(const ID &dofs_id)
Get a reference to the registered dof array for a given id.
-
inline DOFSupportType getSupportType(const ID &dofs_id) const
Get the support type of a given dof.
-
inline bool hasDOFs(const ID &dof_id) const
are the dofs registered
-
inline Array<Real> &getDOFsDerivatives(const ID &dofs_id, Int order)
Get a reference to the registered dof derivatives array for a given id.
-
inline const Array<bool> &getBlockedDOFs(const ID &dofs_id) const
Get a reference to the blocked dofs array registered for the given id.
-
inline bool hasBlockedDOFs(const ID &dofs_id) const
Does the dof has a blocked array.
-
inline Array<Real> &getDOFsIncrement(const ID &dofs_id)
Get a reference to the registered dof increment array for a given id.
-
inline bool hasDOFsIncrement(const ID &dofs_id) const
Does the dof has a increment array.
-
inline bool hasPreviousDOFs(const ID &dofs_id) const
Get a reference to the registered dof array for previous step values a given id
-
virtual void savePreviousDOFs(const ID &dofs_id)
saves the values from dofs to previous dofs
-
inline const Array<Real> &getSolution(const ID &dofs_id) const
Get a reference to the solution array registered for the given id.
-
inline Array<Real> &getSolution(const ID &dofs_id)
Get a reference to the solution array registered for the given id.
-
inline decltype(auto) getGlobalBlockedDOFs() const
Get the blocked dofs array.
-
inline decltype(auto) getPreviousGlobalBlockedDOFs() const
Get the blocked dofs array.
-
virtual SparseMatrix &getNewMatrix(const ID &matrix_id, const MatrixType &matrix_type) = 0
Get an instance of a new SparseMatrix.
-
virtual SparseMatrix &getNewMatrix(const ID &matrix_id, const ID &matrix_to_copy_id) = 0
Get an instance of a new SparseMatrix as a copy of the SparseMatrix matrix_to_copy_id
-
inline decltype(auto) getLocalEquationsNumbers(const ID &dof_id) const
Get the equation numbers corresponding to a dof_id. This might be used to access the matrix.
-
virtual void getArrayPerDOFs(const ID &dof_id, const SolverVector &global, Array<Real> &local) = 0
extract degrees of freedom (identified by ID) from a global solver array
-
SparseMatrix &getMatrix(const ID &matrix_id)
Get the reference of an existing matrix.
-
bool hasMatrix(const ID &matrix_id) const
check if the given matrix exists
-
virtual SolverVector &getNewLumpedMatrix(const ID &matrix_id) = 0
Get an instance of a new lumped matrix.
-
const SolverVector &getLumpedMatrix(const ID &matrix_id) const
Get the lumped version of a given matrix.
-
SolverVector &getLumpedMatrix(const ID &matrix_id)
Get the lumped version of a given matrix.
-
bool hasLumpedMatrix(const ID &matrix_id) const
check if the given matrix exists
-
virtual NonLinearSolver &getNewNonLinearSolver(const ID &nls_solver_id, const NonLinearSolverType &_non_linear_solver_type) = 0
Get instance of a non linear solver.
-
virtual NonLinearSolver &getNonLinearSolver(const ID &nls_solver_id)
get instance of a non linear solver
-
bool hasNonLinearSolver(const ID &solver_id) const
check if the given solver exists
-
virtual TimeStepSolver &getNewTimeStepSolver(const ID &time_step_solver_id, const TimeStepSolverType &type, NonLinearSolver &non_linear_solver, SolverCallback &solver_callback) = 0
Get instance of a time step solver.
-
virtual TimeStepSolver &getTimeStepSolver(const ID &time_step_solver_id)
get instance of a time step solver
-
bool hasTimeStepSolver(const ID &solver_id) const
check if the given solver exists
-
inline decltype(auto) getCommunicator() const
-
inline decltype(auto) getCommunicator()
-
inline const auto &getSolution() const
-
inline decltype(auto) getSolution()
-
inline const auto &getResidual() const
-
inline decltype(auto) getResidual()
-
virtual void onNodesAdded(const Array<Idx> &nodes_list, const NewNodesEvent &event) override
function to implement to react on akantu::NewNodesEvent
-
virtual void onNodesRemoved(const Array<Idx> &nodes_list, const Array<Idx> &new_numbering, const RemovedNodesEvent &event) override
function to implement to react on akantu::RemovedNodesEvent
-
virtual void onElementsAdded(const Array<Element> &elements_list, const NewElementsEvent &event) override
function to implement to react on akantu::NewElementsEvent
-
virtual void onElementsRemoved(const Array<Element> &elements_list, const ElementTypeMapArray<Idx> &new_numbering, const RemovedElementsEvent &event) override
function to implement to react on akantu::RemovedElementsEvent
-
virtual void onElementsChanged(const Array<Element> &old_elements_list, const Array<Element> &new_elements_list, const ElementTypeMapArray<Idx> &new_numbering, const ChangedElementsEvent &event) override
function to implement to react on akantu::ChangedElementsEvent
-
virtual void onMeshIsDistributed(const MeshIsDistributedEvent &event) override
function to implement to react on akantu::MeshIsDistributedEvent
-
DOFManager(const ID &id = "dof_manager")
-
class NonLinearSolver : public akantu::Parsable
Subclassed by akantu::NonLinearSolverLinear, akantu::NonLinearSolverLumped, akantu::NonLinearSolverNewtonRaphson, akantu::NonLinearSolverPETSc
Public Functions
-
NonLinearSolver(DOFManager &dof_manager, const NonLinearSolverType &non_linear_solver_type, const ID &id = "non_linear_solver")
-
~NonLinearSolver() override
-
virtual void solve(SolverCallback &callback) = 0
solve the system described by the jacobian matrix, and rhs contained in the dof manager
-
NonLinearSolver(DOFManager &dof_manager, const NonLinearSolverType &non_linear_solver_type, const ID &id = "non_linear_solver")
-
class NonLinearSolverNewtonRaphson : public akantu::NonLinearSolver
Public Functions
-
NonLinearSolverNewtonRaphson(DOFManagerDefault &dof_manager, const NonLinearSolverType &non_linear_solver_type, const ID &id = "non_linear_solver_newton_raphson")
-
~NonLinearSolverNewtonRaphson() override
-
virtual void solve(SolverCallback &solver_callback) override
Function that solve the non linear system described by the dof manager and the solver callback functions
-
SparseSolver &getSolver()
-
const SparseSolver &getSolver() const
-
NonLinearSolverNewtonRaphson(DOFManagerDefault &dof_manager, const NonLinearSolverType &non_linear_solver_type, const ID &id = "non_linear_solver_newton_raphson")
Solid Mechanics Model
-
class SolidMechanicsModel : public ConstitutiveLawsHandler<Material, Model>, public akantu::BoundaryCondition<SolidMechanicsModel>, public akantu::EventHandlerManager<SolidMechanicsModelEventHandler>
Subclassed by akantu::EmbeddedInterfaceModel, akantu::SolidMechanicsModelCohesive
Public Types
-
using MyFEEngineType = FEEngineTemplate<IntegratorGauss, ShapeLagrange>
Public Functions
A solid mechanics model need a mesh and a dimension to be created. the model by it self can not do a lot, the good init functions should be called in order to configure the model depending on what we want to do.
- Parameters:
mesh – mesh representing the model we want to simulate
dim – spatial dimension of the problem, if dim = 0 (default value) the dimension of the problem is assumed to be the on of the mesh
id – an id to identify the model
model_type – this is an internal parameter for inheritance purposes
-
void printself(std::ostream &stream, int indent = 0) const override
function to print the containt of the class
-
std::tuple<ID, TimeStepSolverType> getDefaultSolverID(const AnalysisMethod &method) override
get some default values for derived classes
-
virtual void assembleStiffnessMatrix(bool need_to_reassemble = false)
assembles the stiffness matrix,
-
virtual void assembleInternalForces()
assembles the internal forces in the array internal_forces
This function computes the internal forces as \(F_{int} = \int_{\Omega} N \sigma d\Omega@\)
-
TimeStepSolverType getDefaultSolverType() const override
-
ModelSolverOptions getDefaultSolverOptions(const TimeStepSolverType &type) const override
-
inline bool isDefaultSolverExplicit()
-
virtual void applyEigenGradU(const Matrix<Real> &prescribed_eigen_grad_u, const ID &material_name, GhostType ghost_type = _not_ghost)
apply a constant eigen_grad_u on all quadrature points of a given material
-
void computeNonLocalContribution(GhostType ghost_type) override
-
void assembleMassLumped()
assemble the lumped mass matrix
-
void assembleMass()
assemble the mass matrix for consistent mass resolutions
-
void assembleMassLumped(GhostType ghost_type)
assemble the lumped mass matrix for local and ghost elements
-
void assembleMass(GhostType ghost_type)
assemble the mass matrix for either _ghost or _not_ghost elements
-
void computeRho(Array<Real> &rho, ElementType type, GhostType ghost_type)
fill a vector of rho
-
inline Real getEnergy(const std::string &energy_id, ElementType type, Idx index)
compute the energy for an element
-
Real getEnergy(const std::string &energy_id, const Element &element)
compute the energy for an element
-
void packData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) const override
-
void unpackData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) override
-
void packData(CommunicationBuffer &buffer, const Array<Idx> &dofs, const SynchronizationTag &tag) const override
-
void unpackData(CommunicationBuffer &buffer, const Array<Idx> &dofs, const SynchronizationTag &tag) override
-
virtual void onDump()
-
std::shared_ptr<dumpers::Field> createNodalFieldReal(const std::string &field_name, const std::string &group_name, bool padding_flag) override
-
std::shared_ptr<dumpers::Field> createNodalFieldBool(const std::string &field_name, const std::string &group_name, bool padding_flag) override
-
std::shared_ptr<dumpers::Field> createElementalField(const std::string &field_name, const std::string &group_name, bool padding_flag, Int spatial_dimension, ElementKind kind) override
-
void dump(const std::string &dumper_name) override
-
void dump() override
-
inline decltype(auto) getDisplacement()
get the SolidMechanicsModel::displacement array
-
inline const auto &getDisplacement() const
get the SolidMechanicsModel::displacement array
-
inline const auto &getPreviousDisplacement() const
get the SolidMechanicsModel::previous_displacement array
-
inline const auto &getIncrement() const
get the SolidMechanicsModel::displacement_increment array
-
inline decltype(auto) getIncrement()
get the SolidMechanicsModel::displacement_increment array
-
inline const auto &getMass() const
get the lumped SolidMechanicsModel::mass array
-
inline decltype(auto) getVelocity()
get the SolidMechanicsModel::velocity array
-
inline const auto &getVelocity() const
get the SolidMechanicsModel::velocity array
-
inline decltype(auto) getAcceleration()
get the SolidMechanicsModel::acceleration array
-
inline const auto &getAcceleration() const
get the SolidMechanicsModel::acceleration array
-
inline decltype(auto) getExternalForce()
get the SolidMechanicsModel::external_force array
-
inline const auto &getExternalForce() const
get the SolidMechanicsModel::external_force array
-
inline decltype(auto) getInternalForce()
get the SolidMechanicsModel::internal_force array (internal forces)
-
inline const auto &getInternalForce() const
get the SolidMechanicsModel::internal_force array (internal forces)
-
inline decltype(auto) getBlockedDOFs()
get the SolidMechanicsModel::blocked_dofs array
-
inline const auto &getBlockedDOFs() const
get the SolidMechanicsModel::blocked_dofs array
-
inline decltype(auto) getDisplacementRelease() const
-
inline decltype(auto) getCurrentPositionRelease() const
-
inline decltype(auto) getMaterials()
get an iterable on the materials
-
inline decltype(auto) getMaterials() const
get an iterable on the materials
-
inline Material &getMaterial(Idx mat_index)
get a particular material (by numerical material index)
-
inline const Material &getMaterial(Idx mat_index) const
get a particular material (by numerical material index)
-
inline const Material &getMaterial(const std::string &name) const
get a particular material (by material name)
-
inline const Material &getMaterial(const Element &element) const
get a particular material (by material name)
-
inline auto getMaterialIndex(const std::string &name) const
get a particular material id from is name
-
inline auto getNbMaterials() const
give the number of materials
-
inline void reassignMaterial()
-
void registerNewMaterial(const ID &mat_name, const ID &mat_type, const ID &opt_param)
-
inline decltype(auto) getMaterialByElement() const
-
inline decltype(auto) getMaterialLocalNumbering() const
-
inline decltype(auto) getMaterialByElement(ElementType type, GhostType ghost_type = _not_ghost) const
-
inline decltype(auto) getMaterialLocalNumbering(ElementType type, GhostType ghost_type = _not_ghost) const
-
inline decltype(auto) getMaterialSelector()
-
using MyFEEngineType = FEEngineTemplate<IntegratorGauss, ShapeLagrange>
Warning
doxygenclass: Cannot find class “akantu::SolidMechanicsModelOptions” in doxygen xml output for project “Akantu” from directory: ./xml
Warning
doxygenclass: Cannot find class “akantu::MaterialSelector” in doxygen xml output for project “Akantu” from directory: ./xml
Warning
doxygenclass: Cannot find class “akantu::MeshDataMaterialSelector” in doxygen xml output for project “Akantu” from directory: ./xml
-
class Material : public akantu::ConstitutiveLaw<SolidMechanicsModel>, protected akantu::SolidMechanicsModelEventHandler
Interface of all materials Prerequisites for a new material
inherit from this class
implement the following methods:
virtual Real getStableTimeStep(Real h, const Element & element = ElementNull); virtual void computeStress(ElementType el_type, GhostType ghost_type = _not_ghost); virtual void computeTangentStiffness(ElementType el_type, Array<Real> & tangent_matrix, GhostType ghost_type = _not_ghost);
Subclassed by akantu::MaterialElasticLinearAnisotropic< Dim >, akantu::PlaneStressToolbox< dim, Material >, akantu::MaterialCohesive, akantu::MaterialElasticLinearAnisotropic< dim >, akantu::PlaneStressToolbox< dim, ParentMaterial >
Public Functions
-
Material(SolidMechanicsModel &model, const ID &id = "material", const ID &fe_engine_id = "")
Initialize material with defaults.
-
virtual void extrapolateInternal(const ID &id, const Element &element, const Matrix<Real> &points, Matrix<Real> &extrapolated)
extrapolate internal values
-
inline virtual Real getPushWaveSpeed(const Element&) const
compute the p-wave speed in the material
-
inline virtual Real getShearWaveSpeed(const Element&) const
compute the s-wave speed in the material
-
inline virtual Real getCelerity(const Element &element) const
get a material celerity to compute the stable time step (default: is the push wave speed)
-
virtual void initMaterial()
initialize the material computed parameter
-
inline virtual void initConstitutiveLaw() override
initialize the constitutive law computed parameter
-
virtual void assembleInternalForces(GhostType ghost_type)
assemble the residual for this material
Compute the internal forces by assembling \(\int_{e} \sigma_e \frac{\partial \varphi}{\partial X} dX \)
- Parameters:
ghost_type – [in] compute the internal forces for _ghost or _not_ghost element
-
virtual void computeAllStresses(GhostType ghost_type = _not_ghost)
compute the stresses for this material
Compute the stress from the gradu
- Parameters:
ghost_type – [in] compute the residual for _ghost or _not_ghost element
-
virtual void computeAllCauchyStresses(GhostType ghost_type = _not_ghost)
-
void setToSteadyState(GhostType ghost_type = _not_ghost)
set material to steady state
-
virtual void assembleStiffnessMatrix(GhostType ghost_type)
compute the stiffness matrix
Compute the stiffness matrix by assembling \(\int_{\omega} B^t \times D \times B d\omega \)
- Parameters:
ghost_type – [in] compute the residual for _ghost or _not_ghost element
-
void interpolateStress(ElementTypeMapArray<Real> &result, GhostType ghost_type = _not_ghost)
interpolate stress on given positions for each element by means of a geometrical interpolation on quadrature points
-
void interpolateStressOnFacets(ElementTypeMapArray<Real> &result, ElementTypeMapArray<Real> &by_elem_result, GhostType ghost_type = _not_ghost)
interpolate stress on given positions for each element by means of a geometrical interpolation on quadrature points and store the results per facet
-
void initElementalFieldInterpolation(const ElementTypeMapArray<Real> &interpolation_points_coordinates)
function to initialize the elemental field interpolation function by inverting the quadrature points’ coordinates
-
template<Int dim>
void StoCauchy(ElementType el_type, GhostType ghost_type = _not_ghost) Computation of Cauchy stress tensor in the case of finite deformation from the 2nd Piola-Kirchhoff for a given element type
-
inline virtual Int getNbData(const Array<Element> &elements, const SynchronizationTag &tag) const override
-
inline virtual void packData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) const override
-
inline virtual void unpackData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) override
-
virtual void beforeSolveStep()
-
virtual void afterSolveStep(bool converged = true)
-
virtual void onDamageIteration() override
function to implement to react on akantu::BeginningOfDamageIterationEvent
-
virtual void onDamageUpdate() override
function to implement to react on akantu::AfterDamageEvent
-
virtual void onDump() override
function to implement to react on akantu::BeforeDumpEvent
-
inline const SolidMechanicsModel &getModel() const
-
inline SolidMechanicsModel &getModel()
-
Real getPotentialEnergy()
return the potential energy for the subset of elements contained by the material
-
Real getPotentialEnergy(const Element &element)
return the potential energy for the provided element
-
Real getPotentialEnergy(ElementType type, Int index)
-
virtual Real getEnergy(const std::string &type) override
return the energy (identified by id) for the subset of elements contained by the material
-
virtual Real getEnergy(const std::string &energy_id, const Element &element) override
return the energy (identified by id) for the provided element
-
inline virtual Real getEnergy(const std::string &energy_id, ElementType type, Idx index) final
-
inline auto getGradU(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
-
inline auto getStress(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
-
inline auto getPotentialEnergy(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
-
inline decltype(auto) getGradU() const
-
inline decltype(auto) getStress() const
-
inline bool isNonLocal() const
-
inline bool isFiniteDeformation() const
-
inline bool isInelasticDeformation() const
-
virtual void applyEigenGradU(const Matrix<Real> &prescribed_eigen_grad_u, GhostType = _not_ghost)
apply a constant eigengrad_u everywhere in the material
-
inline bool hasMatrixChanged(const ID &id)
-
inline MatrixType getMatrixType(const ID &id)
-
inline virtual bool hasStiffnessMatrixChanged()
specify if the matrix need to be recomputed for this material
-
inline virtual MatrixType getTangentType()
specify the type of matrix, if not overloaded the material is not valid for static or implicit computations
Public Static Functions
-
static inline constexpr Int getCauchyStressMatrixSize(Int dim)
Size of the Stress matrix for the case of finite deformation see: Bathe et al, IJNME, Vol 9, 353-386, 1975
-
template<Int dim, typename D1, typename D2>
static inline constexpr void setCauchyStressMatrix(const Eigen::MatrixBase<D1> &S_t, Eigen::MatrixBase<D2> &sigma) Sets the stress matrix according to Bathe et al, IJNME, Vol 9, 353-386, 1975
-
template<Int dim, typename D1>
static inline constexpr decltype(auto) stressToVoigt(const Eigen::MatrixBase<D1> &stress) write the stress tensor in the Voigt notation.
-
template<Int dim, typename D1>
static inline constexpr decltype(auto) strainToVoigt(const Eigen::MatrixBase<D1> &strain) write the strain tensor in the Voigt notation.
-
template<Int dim, typename D1, typename D2>
static inline constexpr void voigtToStress(const Eigen::MatrixBase<D1> &voigt, Eigen::MatrixBase<D2> &stress) write a voigt vector to stress
-
template<Int dim, typename D1, typename D2, typename D3>
static inline constexpr void StoCauchy(const Eigen::MatrixBase<D1> &F, const Eigen::MatrixBase<D2> &S, Eigen::MatrixBase<D3> &sigma, const Real &C33 = 1.0) Computation the Cauchy stress the 2nd Piola-Kirchhoff and the deformation gradient
-
template<Int dim, typename D1, typename D2>
static inline constexpr decltype(auto) StoCauchy(const Eigen::MatrixBase<D1> &F, const Eigen::MatrixBase<D2> &S, const Real &C33 = 1.0)
-
template<Int dim, typename D1, typename D2>
static inline constexpr void gradUToF(const Eigen::MatrixBase<D1> &grad_u, Eigen::MatrixBase<D2> &F)
-
template<Int dim, typename D>
static inline constexpr decltype(auto) gradUToF(const Eigen::MatrixBase<D> &grad_u)
-
template<typename D1, typename D2>
static inline constexpr void rightCauchy(const Eigen::MatrixBase<D1> &F, Eigen::MatrixBase<D2> &C)
-
template<Int dim, typename D>
static inline constexpr decltype(auto) rightCauchy(const Eigen::MatrixBase<D> &F)
-
template<typename D1, typename D2>
static inline constexpr void leftCauchy(const Eigen::MatrixBase<D1> &F, Eigen::MatrixBase<D2> &B)
-
template<Int dim, typename D>
static inline constexpr decltype(auto) leftCauchy(const Eigen::MatrixBase<D> &F)
-
template<Int dim, typename D1, typename D2>
static inline constexpr void gradUToEpsilon(const Eigen::MatrixBase<D1> &grad_u, Eigen::MatrixBase<D2> &epsilon)
-
template<Int dim, typename D1>
static inline constexpr decltype(auto) gradUToEpsilon(const Eigen::MatrixBase<D1> &grad_u)
-
template<Int dim, typename D1, typename D2>
static inline constexpr void gradUToE(const Eigen::MatrixBase<D1> &grad_u, Eigen::MatrixBase<D2> &E)
-
template<Int dim, typename D1>
static inline constexpr decltype(auto) gradUToE(const Eigen::MatrixBase<D1> &grad_u)
-
template<Int dim, typename D1, typename D2>
static inline constexpr void computeDeviatoric(const Eigen::MatrixBase<D1> &sigma, Eigen::MatrixBase<D2> &sigma_dev)
-
template<Int dim, typename D>
static inline constexpr decltype(auto) computeDeviatoric(const Eigen::MatrixBase<D> &sigma)
-
static MaterialFactory &getFactory()
static method to retrieve the material factory
-
template<typename T>
class InternalField : public akantu::InternalFieldBase, public akantu::ElementTypeMapArray<T> class for the internal fields of constitutive law to store values for each quadrature
Subclassed by akantu::CohesiveInternalField< bool >, akantu::CohesiveInternalField< T >, akantu::FacetInternalField< T >, akantu::RandomInternalField< T, BaseField, Generator >
Public Functions
-
virtual void setElementKind(ElementKind element_kind)
function to reset the element kind for the internal
-
virtual void initializeHistory() override
activate the history of this field
-
virtual void resize() override
resize the arrays and set the new element to 0
-
virtual void reset()
reset all the fields to the default value
-
virtual void saveCurrentValues() override
save the current values in the history
-
virtual void restorePreviousValues() override
restore the previous values from the history
-
virtual void removeIntegrationPoints(const ElementTypeMapArray<Idx> &new_numbering) override
remove the quadrature points corresponding to suppressed elements
-
virtual void printself(std::ostream &stream, int = 0) const override
print the content
-
inline decltype(auto) filterTypes(GhostType ghost_type = _not_ghost) const
get filter types for range loop
-
inline decltype(auto) getFilter(ElementType type, GhostType ghost_type = _not_ghost) const
get the array for a given type of the element_filter
-
inline virtual auto previous(ElementType type, GhostType ghost_type = _not_ghost) -> Array<T>&
-
inline virtual auto previous(ElementType type, GhostType ghost_type = _not_ghost) const -> const Array<T>&
-
inline virtual InternalField<T> &previous()
-
inline virtual const InternalField<T> &previous() const
-
inline virtual auto hasHistory() const -> bool override
check if the history is used or not
-
inline decltype(auto) getElementKind() const
get the kind treated by the internal
-
inline decltype(auto) getNbComponent() const
return the number of components
-
inline decltype(auto) getSpatialDimension() const
return the spatial dimension corresponding to the internal element type loop filter
-
inline Int &getRelease(ElementType type, GhostType ghost_type)
-
inline Int getRelease(ElementType type, GhostType ghost_type) const
-
virtual void setElementKind(ElementKind element_kind)
Solid Mechanics Model Cohesive
-
class SolidMechanicsModelCohesive : public akantu::SolidMechanicsModel, public akantu::SolidMechanicsModelEventHandler
Public Types
-
using MyFEEngineCohesiveType = FEEngineTemplate<IntegratorGauss, ShapeLagrange, _ek_cohesive>
-
using MyFEEngineFacetType = FEEngineTemplate<IntegratorGauss, ShapeLagrange, _ek_regular, FacetsCohesiveIntegrationOrderFunctor>
Public Functions
-
virtual void assembleInternalForces() override
assemble the residual for the explicit scheme
-
UInt checkCohesiveStress()
function to perform a stress check on each facet and insert cohesive elements if needed (returns the number of new cohesive elements)
-
void interpolateStress()
interpolate stress on facets
-
void updateAutomaticInsertion()
update automatic insertion after a change in the element inserter
-
void insertIntrinsicElements()
insert intrinsic cohesive elements
-
void afterSolveStep(bool converged = true) override
-
virtual void onDump() override
-
void addDumpGroupFieldToDumper(const std::string &dumper_name, const std::string &field_id, const std::string &group_name, ElementKind element_kind, bool padding_flag) override
-
void packData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) const override
-
void unpackData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) override
- AKANTU_GET_MACRO_AUTO (MeshFacets, mesh.getMeshFacets())
get facet mesh
-
AKANTU_GET_MACRO_BY_ELEMENT_TYPE_CONST(StressOnFacets, facet_stress, Real)
get stress on facets vector
-
AKANTU_GET_MACRO_BY_ELEMENT_TYPE(FacetMaterial, facet_material, Idx)
get facet material
-
AKANTU_GET_MACRO_BY_ELEMENT_TYPE_CONST(FacetMaterial, facet_material, Idx)
get facet material
-
AKANTU_GET_MACRO_AUTO(FacetMaterial, facet_material)
get facet material
-
CohesiveElementInserter &getElementInserter()
get element inserter
-
bool getIsExtrinsic() const
get is_extrinsic boolean
-
ElementSynchronizer &getCohesiveSynchronizer()
get cohesive elements synchronizer
-
class NewCohesiveNodesEvent : public akantu::NewNodesEvent
-
using MyFEEngineCohesiveType = FEEngineTemplate<IntegratorGauss, ShapeLagrange, _ek_cohesive>
-
class FragmentManager : public akantu::GroupManager
Public Functions
-
FragmentManager(SolidMechanicsModelCohesive &model, bool dump_data = true, const ID &id = "fragment_manager")
-
void buildFragments(Real damage_limit = 1.)
build fragment list (cohesive elements are considered broken if damage >= damage_limit)
-
void computeCenterOfMass()
compute fragments’ center of mass
-
void computeVelocity()
compute fragments’ velocity
-
void computeInertiaMoments()
computes principal moments of inertia with respect to the center of mass of each fragment
Given the distance \( \mathbf{r} \) between a quadrature point and its center of mass, the moment of inertia is computed as
\[ I_\mathrm{CM} = \mathrm{tr}(\mathbf{r}\mathbf{r}^\mathrm{T}) \mathbf{I} - \mathbf{r}\mathbf{r}^\mathrm{T} \]for more information check Wikipedia (http://en.wikipedia.org/wiki/Moment_of_inertia#Identities_for_a_skew-symmetric_matrix)
-
void computeNbElementsPerFragment()
compute number of elements per fragment
-
FragmentManager(SolidMechanicsModelCohesive &model, bool dump_data = true, const ID &id = "fragment_manager")
Heat Transfer Model
-
class HeatTransferModel : public akantu::DiffusionModel
Phase Field Model
-
class PhaseFieldModel : public ConstitutiveLawsHandler<PhaseField, Model>, public akantu::BoundaryCondition<PhaseFieldModel>
Public Types
-
using FEEngineType = FEEngineTemplate<IntegratorGauss, ShapeLagrange>
Public Functions
-
virtual void assembleStiffnessMatrix()
assembles the phasefield stiffness matrix
-
virtual void assembleInternalForces()
compute the internal forces
-
void assembleInternalForces(GhostType ghost_type)
-
void packData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) const override
-
void unpackData(CommunicationBuffer &buffer, const Array<Element> &elements, const SynchronizationTag &tag) override
-
void packData(CommunicationBuffer &buffer, const Array<Idx> &indexes, const SynchronizationTag &tag) const override
-
void unpackData(CommunicationBuffer &buffer, const Array<Idx> &indexes, const SynchronizationTag &tag) override
-
inline const auto &getDamage() const
return the damage array
-
inline decltype(auto) getDamage()
-
inline const auto &getInternalForce() const
get the PhaseFieldModel::internal_force vector (internal forces)
-
inline decltype(auto) getInternalForce()
-
inline const auto &getExternalForce() const
get the PhaseFieldModel::external_force vector (external forces)
-
inline decltype(auto) getExternalForce()
-
inline const auto &getBlockedDOFs() const
get the PhaseFieldModel::blocked_dofs vector
-
inline decltype(auto) getBlockedDOFs()
get the PhaseFieldModel::blocked_dofs vector
-
virtual Real getEnergy(const ID &energy_id, const Element &element)
Compute dissipated energy for an individual element.
-
virtual Real getEnergy(const ID &energy_id, const ID &group_id)
Compute dissipated energy for an element group.
-
inline PhaseField &getPhaseField(const ID &id)
-
inline PhaseField &getPhaseField(Idx id)
-
inline const PhaseField &getPhaseField(const ID &id) const
-
inline const PhaseField &getPhaseField(Idx id) const
-
std::shared_ptr<dumpers::Field> createNodalFieldReal(const std::string &field_name, const std::string &group_name, bool padding_flag) override
-
using FEEngineType = FEEngineTemplate<IntegratorGauss, ShapeLagrange>
-
class PhaseField : public akantu::ConstitutiveLaw<PhaseFieldModel>
Subclassed by akantu::PhaseFieldExponential< dim >
Public Functions
-
PhaseField(PhaseFieldModel &model, const ID &id = "", const ID &fe_engine_id = "")
-
inline virtual void initPhaseField()
initialize the phasefield computed parameter
-
inline virtual void initConstitutiveLaw() override
initialize the constitutive law computed parameter
-
virtual void beforeSolveStep()
-
virtual void assembleInternalForces(GhostType ghost_type)
assemble the residual for this phasefield
-
virtual void assembleStiffnessMatrix(GhostType ghost_type)
assemble the stiffness matrix for this phasefield
-
virtual void computeAllDrivingForces(GhostType ghost_type = _not_ghost)
compute the driving force for this phasefield
-
virtual Real getEnergy(const ID &energy_id) override
return the damage energyfor the subset of elements contained by the phasefield
-
virtual Real getEnergy(const ID &energy_id, const Element &element) override
Compute dissipated energy for an individual element.
-
inline auto getStrain(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
-
inline decltype(auto) getStrain() const
-
inline decltype(auto) getStrain()
-
inline auto getDamage(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
-
inline decltype(auto) getDamage()
-
inline decltype(auto) getDamage() const
Public Static Functions
-
static PhaseFieldFactory &getFactory()
static method to reteive the material factory
-
PhaseField(PhaseFieldModel &model, const ID &id = "", const ID &fe_engine_id = "")
Structural Mechanics Model
Warning
doxygenclass: Cannot find class “akantu::StructuralMaterial” in doxygen xml output for project “Akantu” from directory: ./xml
-
class StructuralMechanicsModel : public akantu::Model
Public Types
-
using MyFEEngineType = FEEngineTemplate<IntegratorGauss, ShapeStructural, _ek_structural>
Public Functions
-
StructuralMechanicsModel(Mesh &mesh, Int dim = _all_dimensions, const ID &id = "structural_mechanics_model")
-
~StructuralMechanicsModel() override
-
virtual void initFullImpl(const ModelOptions &options) override
Init full model.
-
virtual MatrixType getMatrixType(const ID &matrix_id) const override
get the type of matrix needed
-
virtual void assembleMatrix(const ID &matrix_id) override
callback to assemble a Matrix
-
virtual void assembleLumpedMatrix(const ID &matrix_id) override
callback to assemble a lumped Matrix
-
virtual void assembleResidual() override
callback to assemble the residual (rhs)
callback to assemble the residual StructuralMechanicsModel::(rhs)
-
virtual void assembleResidual(const ID &residual_part) override
callback to assemble the rhs parts, (e.g. internal_forces + external_forces)
-
inline virtual bool canSplitResidual() const override
tells if the residual can be computed in separated parts
-
virtual void afterSolveStep(bool converged) override
-
void assembleLumpedMassMatrix()
This function computes the an approximation of the lumped mass.
The mass is computed by looping over all beams and computing their mass. The mass of a single beam is computed by the (initial) length of the beam, its cross sectional area and its density. The beam mass is then equaly distributed among the two nodes.
For computing the rotational inertia, the function assumes that the mass of a node is uniformaly distributed inside a disc (2D) or a sphere (3D). The size of that disc, depends on the volume of the beam.
Note that the computation of the mass is not unambigius. The reason for this is, that the units of
StructralMaterial::rho
are not clear. By default the function assumes that its unit are ‘Mass per Volume’. However, this makes the computed mass different than the consistent mass, which seams to assume that its units are ‘mass per unit length’. The main difference between thge two are not the values, but that the first version depends onStructuralMaterial::A
while the later does not. By defining the macroAKANTU_STRUCTURAL_MECHANICS_CONSISTENT_LUMPED_MASS
the function will compute the mass in a way that is consistent with the consistent mass matrix.Note
The lumped mass is not stored inside the DOFManager.
- Parameters:
ghost_type – Should ghost types be computed.
-
virtual std::shared_ptr<dumpers::Field> createNodalFieldReal(const std::string &field_name, const std::string &group_name, bool padding_flag) override
-
virtual std::shared_ptr<dumpers::Field> createNodalFieldBool(const std::string &field_name, const std::string &group_name, bool padding_flag) override
-
virtual std::shared_ptr<dumpers::Field> createElementalField(const std::string &field_name, const std::string &group_name, bool padding_flag, Int spatial_dimension, ElementKind kind) override
-
virtual void setTimeStep(Real time_step, const ID &solver_id = "") override
set the value of the time step
-
Array<Real> &getAcceleration() const
get the StructuralMechanicsModel::acceleration vector, updated by StructuralMechanicsModel::updateAcceleration
-
Array<Real> &getInternalForce() const
get the StructuralMechanicsModel::internal_force vector (boundary forces)
-
inline const Array<Real> &getLumpedMass() const
Returns a const reference to the array that stores the lumped mass.
The returned array has dimension
N x d
whereN
is the number of nodes andd
, is the number of degrees of freedom per node.
-
bool allocateLumpedMassArray()
-
inline bool hasLumpedMass() const
Tests if *this has a lumped mass pointer.
-
inline auto getRotationMatrix(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
-
inline auto getStress(const ElementType &el_type, GhostType ghost_type = _not_ghost) const -> const Array<Real>&
-
inline auto getElementMaterial(const ElementType &el_type, GhostType ghost_type = _not_ghost) -> Array<UInt>&
-
inline auto getSet_ID(const ElementType &el_type, GhostType ghost_type = _not_ghost) -> Array<UInt>&
-
inline UInt addMaterial(StructuralMaterial &material, const ID &name = "")
This function adds the
StructuralMaterial
material to the list of materials managed by *this.It is important that this function might invalidate all references to structural materials, that were previously optained by
getMaterial()
.Note
The return type is is new.
- Parameters:
material – The new material.
name – the name associated to this material
- Returns:
The ID of the material that was added.
-
inline const StructuralMaterial &getMaterial(UInt material_index) const
Returns the ith material of *this.
- Parameters:
material_index – The index of requested material
-
inline const StructuralMaterial &getMaterial(const ID &name) const
-
void computeForcesByGlobalTractionArray(const Array<Real> &traction_global, ElementType type)
Compute Linear load function set in global axis.
-
void computeForcesByLocalTractionArray(const Array<Real> &tractions, ElementType type)
Compute Linear load function set in local axis.
-
using MyFEEngineType = FEEngineTemplate<IntegratorGauss, ShapeStructural, _ek_structural>
Coupler Solid PhaseField
-
class CouplerSolidPhaseField : public akantu::Model, public akantu::DataAccessor<Element>, public akantu::DataAccessor<Idx>, public akantu::BoundaryCondition<CouplerSolidPhaseField>
Public Functions
-
CouplerSolidPhaseField(Mesh &mesh, Int dim = _all_dimensions, const ID &id = "coupler_solid_phasefield", ModelType model_type = ModelType::_coupler_solid_phasefield)
-
~CouplerSolidPhaseField() override
-
virtual void assembleStiffnessMatrix()
assembles the contact stiffness matrix
-
virtual void assembleInternalForces()
assembles the contant internal forces
-
void computeDamageOnQuadPoints(GhostType ghost_type)
computes damage on quad points for solid mechanics model from damage array from phasefield model
-
void computeStrainOnQuadPoints(GhostType ghost_type)
computes strain on quadrature points for phasefield model from displacement gradient from solid mechanics model
-
void solve(const ID &solid_solver_id = "", const ID &phase_solver_id = "")
solve the coupled model
-
void assembleMassLumped()
solve the coupled model
solve a step using a given pre instantiated time step solver and non linear solver with a user defined callback instead of the model itself /!\ This can mess up everything assemble the lumped mass matrix
-
void assembleMass()
assemble the mass matrix for consistent mass resolutions
-
inline bool isDefaultSolverExplicit()
-
virtual FEEngine &getFEEngineBoundary(const ID &name = "") override
return the fem boundary object associated with a provided name
-
SolidMechanicsModel &getSolidMechanicsModel() const
get the solid mechanics model
-
PhaseFieldModel &getPhaseFieldModel() const
get the contact mechanics model
-
virtual std::shared_ptr<dumpers::Field> createNodalFieldReal(const std::string &field_name, const std::string &group_name, bool padding_flag) override
-
virtual std::shared_ptr<dumpers::Field> createNodalFieldBool(const std::string &field_name, const std::string &group_name, bool padding_flag) override
-
virtual std::shared_ptr<dumpers::Field> createElementalField(const std::string &field_name, const std::string &group_name, bool padding_flag, Int spatial_dimension, ElementKind kind) override
-
virtual void dump(const std::string &dumper_name) override
-
virtual void dump() override
-
CouplerSolidPhaseField(Mesh &mesh, Int dim = _all_dimensions, const ID &id = "coupler_solid_phasefield", ModelType model_type = ModelType::_coupler_solid_phasefield)
Synchronizers
-
template<class T>
class DataAccessor : public virtual akantu::DataAccessorBase Public Functions
-
DataAccessor() = default
-
virtual Int getNbData(const Array<T> &elements, const SynchronizationTag &tag) const = 0
get the number of data to exchange for a given array of T (elements or dofs) and a given akantu::SynchronizationTag
-
DataAccessor() = default
Input/Output
-
class Dumpable
Subclassed by akantu::ElementGroup, akantu::Mesh, akantu::NodeGroup
Public Functions
-
Dumpable()
-
virtual ~Dumpable()
-
template<class T>
inline void registerDumper(const std::string &dumper_name, const std::string &file_name = "", bool is_default = false) create a new dumper (of templated type T) and register it under dumper_name. file_name is used for construction of T. is default states if this dumper is the default dumper.
register an externally created dumper
-
void addDumpMesh(const Mesh &mesh, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
register a mesh to the default dumper
-
void addDumpMeshToDumper(const std::string &dumper_name, const Mesh &mesh, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
register a mesh to the default identified by its name
-
void addDumpFilteredMesh(const Mesh &mesh, const ElementTypeMapArray<Idx> &elements_filter, const Array<Idx> &nodes_filter, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
register a filtered mesh as the default dumper
-
void addDumpFilteredMeshToDumper(const std::string &dumper_name, const Mesh &mesh, const ElementTypeMapArray<Idx> &elements_filter, const Array<Idx> &nodes_filter, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
register a filtered mesh and provides a name
-
virtual void addDumpField(const std::string &field_id)
to implement
-
virtual void addDumpFieldToDumper(const std::string &dumper_name, const std::string &field_id)
to implement
add a field
-
template<typename T>
inline void addDumpFieldExternal(const std::string &field_id, const Array<T> &field)
-
template<typename T>
inline void addDumpFieldExternalToDumper(const std::string &dumper_name, const std::string &field_id, const Array<T> &field)
-
template<typename T>
inline void addDumpFieldExternal(const std::string &field_id, const ElementTypeMapArray<T> &field, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
-
template<typename T>
inline void addDumpFieldExternalToDumper(const std::string &dumper_name, const std::string &field_id, const ElementTypeMapArray<T> &field, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
-
void removeDumpField(const std::string &field_id)
-
void removeDumpFieldFromDumper(const std::string &dumper_name, const std::string &field_id)
-
virtual void addDumpFieldVector(const std::string &field_id)
-
virtual void addDumpFieldVectorToDumper(const std::string &dumper_name, const std::string &field_id)
-
virtual void addDumpFieldTensor(const std::string &field_id)
-
virtual void addDumpFieldTensorToDumper(const std::string &dumper_name, const std::string &field_id)
-
void setDirectory(const std::string &directory)
-
void setDirectoryToDumper(const std::string &dumper_name, const std::string &directory)
-
void setBaseName(const std::string &basename)
-
void setBaseNameToDumper(const std::string &dumper_name, const std::string &basename)
-
void setTextModeToDumper(const std::string &dumper_name)
-
void setTextModeToDumper()
-
virtual void dump()
-
virtual void dump(const std::string &dumper_name)
-
DumperIOHelper &getDumper()
-
DumperIOHelper &getDumper(const std::string &dumper_name)
-
std::string getDefaultDumperName() const
-
Dumpable()
-
class DumperIOHelper : public std::enable_shared_from_this<DumperIOHelper>
Subclassed by akantu::DumperParaview, akantu::DumperText
Public Functions
-
DumperIOHelper()
-
virtual ~DumperIOHelper()
-
virtual void registerMesh(const Mesh &mesh, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
register a given Mesh for the current dumper
-
virtual void registerFilteredMesh(const Mesh &mesh, const ElementTypeMapArray<Idx> &elements_filter, const Array<Idx> &nodes_filter, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined)
register a filtered Mesh (provided filter lists) for the current dumper
register a Field object identified by name and provided by pointer
-
void unRegisterField(const std::string &field_id)
remove the Field identified by name from managed fields
register a VariableBase object identified by name and provided by pointer
-
void unRegisterVariable(const std::string &variable_id)
remove a VariableBase identified by name from managed fields
-
virtual void dump()
request dump: this calls IOHelper dump routine
-
virtual void dump(Int step)
request dump: this first set the current step and then calls IOHelper dump routine
-
virtual void dump(Real current_time, Int step)
request dump: this first set the current step and current time and then calls IOHelper dump routine
-
virtual void setParallelContext(bool is_parallel)
set the parallel context for IOHeper
-
virtual void setDirectory(const std::string &directory)
set the directory where to generate the dumped files
-
virtual void setBaseName(const std::string &basename)
set the base name (needed by most IOHelper dumpers)
-
iohelper::Dumper &getDumper() const
direct access to the iohelper::Dumper object
-
DumperIOHelper()
-
class DumperParaview : public akantu::DumperIOHelper
-
class DumperText : public akantu::DumperIOHelper
Public Functions
-
DumperText(const std::string &basename = "dumper_text", iohelper::TextDumpMode mode = iohelper::_tdm_space, bool parallel = true)
-
~DumperText() override = default
-
virtual void registerMesh(const Mesh &mesh, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined) override
register a given Mesh for the current dumper
-
virtual void registerFilteredMesh(const Mesh &mesh, const ElementTypeMapArray<Idx> &elements_filter, const Array<Idx> &nodes_filter, Int spatial_dimension = _all_dimensions, GhostType ghost_type = _not_ghost, ElementKind element_kind = _ek_not_defined) override
register a filtered Mesh (provided filter lists) for the current dumper
-
virtual void setBaseName(const std::string &basename) override
set the base name (needed by most IOHelper dumpers)
-
DumperText(const std::string &basename = "dumper_text", iohelper::TextDumpMode mode = iohelper::_tdm_space, bool parallel = true)
-
class Field : public std::enable_shared_from_this<Field>
Field interface.
Subclassed by akantu::dumpers::GenericElementalField< SingleType< T, Vector< T >, false >, quadrature_point_iterator >, akantu::dumpers::GenericElementalField< SingleType< Int, Vector< Int >, false >, element_partition_field_iterator >, akantu::dumpers::GenericElementalField< SingleType< Idx, Vector< Idx >, true >, filtered_connectivity_field_iterator >, akantu::dumpers::GenericElementalField< SingleType< T, Vector< T >, false >, elemental_field_iterator >, akantu::dumpers::FieldCompute< SubFieldCompute, _return_type, support_type_ >, akantu::dumpers::FieldCompute< SubFieldCompute, _return_type, Element >, akantu::dumpers::GenericElementalField< _types, iterator_type >, akantu::dumpers::NodalField< T, filtered, Container, Filter >
Public Functions
-
Field() = default
-
virtual ~Field() = default
-
virtual void registerToDumper(const std::string &id, iohelper::Dumper &dumper) = 0
register this to the provided dumper
-
inline virtual void setNbData(Int)
set the number of data per item (used for elements fields at the moment)
-
inline virtual void setNbDataPerElem([[gnu::unused]] const ElementTypeMap<Int> &nb_data)
set the number of data per elem (used for elements fields at the moment)
-
inline virtual void setNbDataPerElem([[gnu::unused]] Int nb_data)
set the number of data per elem (used for elements fields at the moment)
-
inline virtual ElementTypeMap<Int> getNbComponents(Int = _all_dimensions, GhostType = _not_ghost, ElementKind = _ek_not_defined)
get the number of components of the hosted field
-
inline virtual std::unique_ptr<ComputeFunctorInterface> connect(HomogenizerProxy&)
for connection to a FieldCompute
-
virtual void checkHomogeneity() = 0
check if the same quantity of data for all element types
-
inline std::string getGroupName()
return the dumper name
-
inline std::string getID()
return the id of the field
-
inline virtual bool isHomogeneous()
return the flag to know if the field is homogeneous/contiguous
-
Field() = default
-
class Parser : public akantu::ParserSection
Root of parsing tree, represents the global ParserSection.
Public Functions
-
inline Parser()
-
void parse(const std::string &filename)
-
std::string getLastParsedFile() const
Public Static Functions
-
static inline bool isPermissive()
-
static Real parseReal(const std::string &value, const ParserSection §ion)
Parse real scalar.
-
static Vector<Real> parseVector(const std::string &value, const ParserSection §ion)
Parse real vector.
-
static Matrix<Real> parseMatrix(const std::string &value, const ParserSection §ion)
Parse real matrix.
-
static RandomParameter<Real> parseRandomParameter(const std::string &value, const ParserSection §ion)
Parse real random parameter.
-
inline Parser()
-
class ParserParameter
The ParserParameter objects represent the end of tree branches as they are the different informations contained in the input file.
Public Functions
-
inline ParserParameter()
-
inline ParserParameter(const std::string &name, const std::string &value, const ParserSection &parent_section)
-
ParserParameter(const ParserParameter ¶m) = default
-
virtual ~ParserParameter() = default
-
inline const std::string &getName() const
Get parameter name.
-
inline const std::string &getValue() const
Get parameter value.
-
inline void setDebugInfo(const std::string &filename, Int line, Int column)
Set info for debug output.
-
template<typename T, Int m, Int n, std::enable_if_t<n == 1>* = nullptr>
inline operator Matrix<T, m, n>() const
-
template<typename T, Int m, Int n, std::enable_if_t<n != 1>* = nullptr>
inline operator Matrix<T, m, n>() const
-
inline void printself(std::ostream &stream, __attribute__((unused)) unsigned int indent = 0) const
Print parameter info in stream.
-
inline ParserParameter()
-
class ParserSection
ParserSection represents a branch of the parsing tree.
Subclassed by akantu::Parser
Public Types
-
using SubSections = std::multimap<ParserType, ParserSection>
-
using Parameters = std::map<std::string, ParserParameter>
Public Functions
-
inline ParserSection()
-
inline ParserSection(const std::string &name, ParserType type)
-
inline ParserSection(const std::string &name, ParserType type, const std::string &option, const ParserSection &parent_section)
-
inline ParserSection(const ParserSection §ion)
-
inline ParserSection &operator=(const ParserSection &other)
-
virtual ~ParserSection()
-
virtual void printself(std::ostream &stream, unsigned int indent = 0) const
-
ParserParameter &addParameter(const ParserParameter ¶m)
-
ParserSection &addSubSection(const ParserSection §ion)
-
inline auto getSubSections(ParserType type = ParserType::_not_defined) const
Get begin and end iterators on subsections of certain type.
-
inline Int getNbSubSections(ParserType type = ParserType::_not_defined) const
Get number of subsections of certain type.
-
inline auto getParameters() const
Get begin and end iterators on parameters.
-
inline const ParserParameter &getParameter(const std::string &name, ParserParameterSearchCxt search_ctx = _ppsc_current_scope) const
Get parameter within specified context.
-
template<class T>
inline T getParameter(const std::string &name, const T &default_value, ParserParameterSearchCxt search_ctx = _ppsc_current_scope) const Get parameter within specified context, with a default value in case the parameter does not exists
-
inline bool hasParameter(const std::string &name, ParserParameterSearchCxt search_ctx = _ppsc_current_scope) const
Check if parameter exists within specified context.
-
template<class T>
inline T getParameterValue(const std::string &name, ParserParameterSearchCxt search_ctx = _ppsc_current_scope) const Get value of given parameter in context.
-
inline std::string getName() const
Get section name.
-
inline ParserType getType() const
Get section type.
-
inline std::string getOption(const std::string &def = "") const
Get section option.
-
class const_parameter_iterator
Iterator on parameters.
Public Functions
-
const_parameter_iterator(const const_parameter_iterator &other) = default
-
inline const_parameter_iterator(const Parameters::const_iterator &it)
-
inline const_parameter_iterator &operator=(const const_parameter_iterator &other)
-
inline const ParserParameter &operator*() const
-
inline const ParserParameter *operator->()
-
inline bool operator==(const const_parameter_iterator &other) const
-
inline bool operator!=(const const_parameter_iterator &other) const
-
inline const_parameter_iterator &operator++()
-
inline const_parameter_iterator operator++(int)
-
const_parameter_iterator(const const_parameter_iterator &other) = default
-
class const_section_iterator
Iterator on sections.
Public Types
-
using iterator_category = std::forward_iterator_tag
-
using value_type = ParserSection
-
using pointer = ParserSection*
-
using reference = ParserSection&
Public Functions
-
const_section_iterator() = default
-
inline const_section_iterator(const const_section_iterator_ &it)
-
const_section_iterator(const const_section_iterator &other) = default
-
const_section_iterator &operator=(const const_section_iterator &other) = default
-
inline const ParserSection &operator*() const
-
inline const ParserSection *operator->() const
-
inline bool operator==(const const_section_iterator &other) const
-
inline bool operator!=(const const_section_iterator &other) const
-
inline const_section_iterator &operator++()
-
inline const_section_iterator operator++(int)
-
using iterator_category = std::forward_iterator_tag
-
class SubSectionsRange : public std::pair<const_section_iterator, const_section_iterator>
Public Functions
-
inline SubSectionsRange(const const_section_iterator &first, const const_section_iterator &second)
-
inline auto begin()
-
inline auto end()
-
inline SubSectionsRange(const const_section_iterator &first, const const_section_iterator &second)
-
using SubSections = std::multimap<ParserType, ParserSection>
-
enum class akantu::ParserType
Values:
-
enumerator cohesive_inserter
-
enumerator contact
-
enumerator embedded_interface
-
enumerator friction
-
enumerator global
-
enumerator heat
-
enumerator integration_scheme
-
enumerator material
-
enumerator phasefield
-
enumerator mesh
-
enumerator model
-
enumerator model_solver
-
enumerator neighborhood
-
enumerator neighborhoods
-
enumerator non_linear_solver
-
enumerator non_local
-
enumerator rules
-
enumerator solver
-
enumerator time_step_solver
-
enumerator user
-
enumerator weight_function
-
enumerator not_defined
-
enumerator cohesive_inserter