Merge pull request #799 from hnil/geomech

added enableMech
This commit is contained in:
Atgeirr Flø Rasmussen authored and GitHub committed 2023-07-26 19:26:17 +02:00
commit ecfb186c38
2 files changed
+23 -1

No files matched your search

@@ -77,6 +77,9 @@ struct EnableMICP { using type = UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct EnableTemperature { using type = UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct EnableMech { using type = UndefinedProperty; };
//! The relative weight of the residual of the energy equation compared to the mass
//! residuals
//!
+20 -1
View File
@@ -83,7 +83,7 @@ class BaseOutputModule
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { dim = GridView::dimension };
enum { dimWorld = GridView::dimensionworld };
using Vector = BaseOutputWriter::Vector;
using Tensor = BaseOutputWriter::Tensor;
public:
@@ -196,6 +196,25 @@ protected:
std::fill(buffer.begin(), buffer.end(), nullMatrix);
}
void resizeVectorBuffer_(VectorBuffer& buffer,
BufferType bufferType = DofBuffer)
{
size_t n;
if (bufferType == VertexBuffer)
n = static_cast<size_t>(simulator_.gridView().size(dim));
else if (bufferType == ElementBuffer)
n = static_cast<size_t>(simulator_.gridView().size(0));
else if (bufferType == DofBuffer)
n = simulator_.model().numGridDof();
else
throw std::logic_error("bufferType must be one of Dof, Vertex or Element");
buffer.resize(n);
Vector zerovector(dimWorld,0.0);
zerovector = 0.0;
std::fill(buffer.begin(), buffer.end(), zerovector);
}
/*!
* \brief Allocate the space for a buffer storing a equation specific
* quantity