Skip to content

Commit

Permalink
Moving BlockSize to data container
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenzorrilla committed Dec 12, 2024
1 parent 81170f6 commit 51b3e46
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ using NodalVectorData = typename FluidElementData<TDim,TNumNodes, true>::NodalVe
using ShapeFunctionsType = typename FluidElementData<TDim,TNumNodes, true>::ShapeFunctionsType;
using MatrixRowType = typename FluidElementData<TDim,TNumNodes, true>::MatrixRowType;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ using NodalVectorData = typename TFluidData::NodalVectorData;
typedef GeometryData::ShapeFunctionsGradientsType ShapeFunctionsGradientsType;
typedef std::vector<array_1d<double,3>> InterfaceNormalsType;

static constexpr std::size_t BlockSize = TFluidData::BlockSize;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ using NodalVectorData = typename TFluidData::NodalVectorData;
typedef GeometryData::ShapeFunctionsGradientsType ShapeFunctionsGradientsType;
typedef std::vector<array_1d<double,3>> InterfaceNormalsType;

/// Number of nodal unknowns (taken from underlying element data)
static constexpr std::size_t BlockSize = TFluidData::BlockSize;

/// Number of edges of the element (simplex elements are assumed)
constexpr static std::size_t NumEdges = (TFluidData::NumNodes == 3) ? 3 : 6;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class FICData : public FluidElementData<TDim,TNumNodes, TElementIntegratesInTime
using NodalScalarData = typename FluidElementData<TDim,TNumNodes, false>::NodalScalarData;
using NodalVectorData = typename FluidElementData<TDim,TNumNodes, false>::NodalVectorData;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ class KRATOS_API(FLUID_DYNAMICS_APPLICATION) FluidElementData
/// Number of nodes of the element.
constexpr static unsigned int NumNodes = TNumNodes;

/// Number of local unknowns (assuming velocity and pressure)
constexpr static unsigned int BlockSize = TDim + 1;

/// Size of the strain and stress vectors (in Voigt notation) for the formulation
constexpr static unsigned int StrainSize = (TDim-1)*3; // 3 in 2D, 6 in 3D

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class QSVMSData : public FluidElementData<TDim,TNumNodes, TElementIntegratesInTi
using NodalScalarData = typename FluidElementData<TDim,TNumNodes, false>::NodalScalarData;
using NodalVectorData = typename FluidElementData<TDim,TNumNodes, false>::NodalVectorData;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ class QSVMSDEMCoupledData : public QSVMSData<TDim, TNumNodes, TElementIntegrates

constexpr static unsigned int Dim = TDim;
constexpr static unsigned int NumNodes = TNumNodes;
constexpr static unsigned int BlockSize = Dim + 2;
constexpr static unsigned int DofSize = NumNodes * BlockSize;
constexpr static unsigned int BlockSize = Dim + 1;
constexpr static bool ElementIntegratesInTime = TElementIntegratesInTime;

using NodalScalarData = typename FluidElementData<TDim,TNumNodes, false>::NodalScalarData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ using NodalVectorData = typename FluidElementData<TDim, TNumNodes, true>::NodalV
using ShapeFunctionsType = typename FluidElementData<TDim, TNumNodes, true>::ShapeFunctionsType;
using MatrixRowType = typename FluidElementData<TDim, TNumNodes, true>::MatrixRowType;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class TimeIntegratedFICData : public FICData<TDim,TNumNodes,true>
using NodalScalarData = typename FluidElementData<TDim,TNumNodes, false>::NodalScalarData;
using NodalVectorData = typename FluidElementData<TDim,TNumNodes, false>::NodalVectorData;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class TimeIntegratedQSVMSData : public QSVMSData<TDim,TNumNodes,true>
using NodalScalarData = typename FluidElementData<TDim,TNumNodes, false>::NodalScalarData;
using NodalVectorData = typename FluidElementData<TDim,TNumNodes, false>::NodalVectorData;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ using MatrixRowType = typename FluidElementData<TDim, TNumNodes, true>::MatrixRo
typedef Geometry<Node> GeometryType;
typedef GeometryType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ using MatrixRowType = typename FluidElementData<TDim, TNumNodes, true>::MatrixRo
typedef Geometry<Node> GeometryType;
typedef GeometryType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ using NodalVectorData = typename FluidElementData<TDim,TNumNodes, true>::NodalVe
using ShapeFunctionsType = typename FluidElementData<TDim,TNumNodes, true>::ShapeFunctionsType;
using MatrixRowType = typename FluidElementData<TDim,TNumNodes, true>::MatrixRowType;

static constexpr std::size_t BlockSize = TDim + 1;

///@}
///@name Public Members
///@{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class FluidElement : public Element

static constexpr unsigned int NumNodes = TElementData::NumNodes;

static constexpr unsigned int BlockSize = Dim + 1;
static constexpr unsigned int BlockSize = TElementData::BlockSize;

static constexpr unsigned int LocalSize = NumNodes * BlockSize;

Expand Down

0 comments on commit 51b3e46

Please sign in to comment.