Skip to content
Snippets Groups Projects
Commit 54e60b32 authored by akbib's avatar akbib Committed by akbib
Browse files

Abstract base class for hyperelastic materials. Provides methods to compute...

Abstract base class for hyperelastic materials. Provides methods to compute the first and second derivative of a hyperelastic material at some configuration and evaluate the strain energy.

[[Imported from SVN: r12640]]
parent 4e249bdb
No related branches found
No related tags found
No related merge requests found
// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set ts=8 sw=4 et sts=4:
#ifndef DUNE_ELASTICITY_MATERIALS_HYPERELASTIC_MATERIAL_HH
#define DUNE_ELASTICITY_MATERIALS_HYPERELASTIC_MATERIAL_HH
#include <dune/common/fvector.hh>
#include <dune/common/fmatrix.hh>
#include <dune/istl/bvector.hh>
#include <dune/fufem/functions/virtualgridfunction.hh>
#include <dune/fufem/assemblers/localfunctionalassembler.hh>
#include <dune/fufem/assemblers/localoperatorassembler.hh>
/* \brief Base class for hyperelastic materials. */
template <class Basis>
class Material
{
public:
typedef Basis GlobalBasis;
typedef typename Basis::GridView::Grid GridType;
typedef typename Basis::LocalFiniteElement Lfe;
typedef typename Basis::ReturnType ReturnType;
static const int dim = GridType::dimension;
static const int dimworld = GridType::dimensionworld;
typedef Dune::FieldVector<ReturnType,dim> block_type;
typedef Dune::BlockVector<block_type> VectorType;
typedef LocalFunctionalAssembler<GridType,Lfe, block_type > LocalLinearization;
typedef LocalOperatorAssembler<GridType,Lfe,Lfe,Dune::FieldMatrix<ReturnType,dim,dim> > LocalHessian;
typedef Dune::VirtualFunction<block_type,block_type> Function;
typedef VirtualGridFunction<GridType, block_type> GridFunction;
public:
Material() {};
Material(const Basis& basis)
{
basis_ = &basis;
}
//! Evaluate the strain energy
virtual ReturnType energy(const GridFunction& displace) = 0;
//! Return the local assembler of the first derivative of the strain energy at some displacement
virtual LocalLinearization& firstDerivative(const GridFunction& displace) = 0;
//! Return the local assembler of the second derivative of the strain energy at some displacement
virtual LocalHessian& secondDerivative(const GridFunction& displace) = 0;
//! Return the global basis
const Basis& basis() {return *basis_;}
protected:
//! Global basis used for the spatial discretization
const Basis* basis_;
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment