Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fluid] Move BlockSize to data containers #12938

Merged
merged 10 commits into from
Dec 13, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// Aplication includes
#include "alternative_d_vms_dem_coupled.h"
#include "custom_utilities/qsvms_dem_coupled_data.h"
#include "custom_elements/data_containers/qs_vms_dem_coupled/qs_vms_dem_coupled_data.h"
#include "custom_utilities/fluid_element_utilities.h"
#include "fluid_dynamics_application_variables.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// Aplication includes
#include "alternative_qs_vms_dem_coupled.h"
#include "custom_utilities/qsvms_dem_coupled_data.h"
#include "custom_elements/data_containers/qs_vms_dem_coupled/qs_vms_dem_coupled_data.h"
#include "custom_utilities/fluid_element_utilities.h"
#include "fluid_dynamics_application_variables.h"
#include "utilities/sparse_matrix_multiplication_utility.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "includes/cfd_variables.h"
#include "includes/checks.h"

#include "custom_utilities/qsvms_data.h"
#include "custom_utilities/qsvms_dem_coupled_data.h"
//#include "custom_utilities/time_integrated_qsvms_data.h"
#include "custom_elements/data_containers/qs_vms/qs_vms_data.h"
#include "custom_elements/data_containers/qs_vms_dem_coupled/qs_vms_dem_coupled_data.h"
//#include "custom_elements/data_containers/time_integrated_qs_vms/time_integrated_qs_vms_data.h"
#include "custom_utilities/fluid_element_utilities.h"

namespace Kratos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

// Aplication includes
#include "d_vms_dem_coupled.h"
#include "custom_utilities/qsvms_dem_coupled_data.h"
#include "custom_elements/data_containers/qs_vms_dem_coupled/qs_vms_dem_coupled_data.h"
#include "custom_utilities/fluid_element_utilities.h"
#include "fluid_dynamics_application_variables.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

// Application includes
#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "utilities/element_size_calculator.h"

namespace Kratos {
Expand All @@ -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 @@ -14,7 +14,7 @@
#define KRATOS_EMBEDDED_DATA_H

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"

namespace Kratos {

Expand All @@ -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 @@ -14,7 +14,7 @@
#define KRATOS_EMBEDDED_DISCONTINUOUS_DATA_H

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"

namespace Kratos {

Expand All @@ -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 @@ -15,7 +15,7 @@
#define KRATOS_FIC_DATA_H

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"

namespace Kratos {

Expand All @@ -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 @@ -14,7 +14,7 @@
#define KRATOS_QSVMS_DATA_H

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "utilities/element_size_calculator.h"

namespace Kratos {
Expand All @@ -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 @@ -24,8 +24,8 @@

// Application includes
#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_utilities/qsvms_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "custom_elements/data_containers/qs_vms/qs_vms_data.h"

namespace Kratos {

Expand All @@ -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 @@ -22,7 +22,7 @@

// Application includes
#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "utilities/element_size_calculator.h"

namespace Kratos {
Expand All @@ -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 @@ -14,7 +14,7 @@
#define KRATOS_TIME_INTEGRATED_FIC_DATA_H

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fic_data.h"
#include "custom_elements/data_containers/fic/fic_data.h"

namespace Kratos {

Expand All @@ -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 @@ -14,7 +14,7 @@
#define KRATOS_TIME_INTEGRATED_QSVMS_DATA_H

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/qsvms_data.h"
#include "custom_elements/data_containers/qs_vms/qs_vms_data.h"

namespace Kratos {

Expand All @@ -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 @@ -17,7 +17,7 @@
#include "includes/constitutive_law.h"

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "utilities/element_size_calculator.h"
#include "custom_utilities/fluid_element_utilities.h"

Expand Down 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 Expand Up @@ -128,7 +130,7 @@ void Initialize(const Element& rElement, const ProcessInfo& rProcessInfo) overri
this->FillFromProcessInfo(DeltaTime,DELTA_TIME,rProcessInfo);
this->FillFromProcessInfo(DynamicTau,DYNAMIC_TAU,rProcessInfo);
this->FillFromProcessInfo(VolumeError,VOLUME_ERROR,rProcessInfo);

const Vector& BDFVector = rProcessInfo[BDF_COEFFICIENTS];
bdf0 = BDFVector[0];
bdf1 = BDFVector[1];
Expand Down Expand Up @@ -328,7 +330,7 @@ void CalculateEffectiveViscosityAtGaussPoint()
}
}
DynamicViscosity = dynamic_viscosity / navg;

if (SmagorinskyConstant > 0.0)
{
const double strain_rate_norm = ComputeStrainNorm();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "includes/constitutive_law.h"

#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "utilities/element_size_calculator.h"
#include "custom_utilities/fluid_element_utilities.h"

Expand Down 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 @@ -25,7 +25,7 @@

// Application includes
#include "fluid_dynamics_application_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "utilities/element_size_calculator.h"

namespace Kratos {
Expand All @@ -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 @@ -4,10 +4,10 @@
#include "custom_elements/qs_vms.h"
#include "custom_elements/weakly_compressible_navier_stokes.h"

#include "custom_utilities/embedded_data.h"
#include "custom_elements/data_containers/embedded_data.h"
#include "utilities/element_size_calculator.h"
#include "custom_utilities/time_integrated_qsvms_data.h"
#include "custom_utilities/weakly_compressible_navier_stokes_data.h"
#include "custom_elements/data_containers/time_integrated_qs_vms/time_integrated_qs_vms_data.h"
#include "custom_elements/data_containers/weakly_compressible_navier_stokes/weakly_compressible_navier_stokes_data.h"

#include "modified_shape_functions/triangle_2d_3_modified_shape_functions.h"
#include "modified_shape_functions/tetrahedra_3d_4_modified_shape_functions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "includes/cfd_variables.h"
#include "custom_elements/fluid_element.h"

#include "custom_utilities/embedded_data.h"
#include "custom_elements/data_containers/embedded_data.h"

namespace Kratos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include "custom_elements/weakly_compressible_navier_stokes.h"

#include "utilities/element_size_calculator.h"
#include "custom_utilities/embedded_discontinuous_data.h"
#include "custom_utilities/time_integrated_qsvms_data.h"
#include "custom_utilities/weakly_compressible_navier_stokes_data.h"
#include "custom_elements/data_containers/embedded_discontinuous_data.h"
#include "custom_elements/data_containers/time_integrated_qs_vms/time_integrated_qs_vms_data.h"
#include "custom_elements/data_containers/weakly_compressible_navier_stokes/weakly_compressible_navier_stokes_data.h"

#include "modified_shape_functions/triangle_2d_3_modified_shape_functions.h"
#include "modified_shape_functions/tetrahedra_3d_4_modified_shape_functions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "includes/cfd_variables.h"
#include "custom_elements/fluid_element.h"

#include "custom_utilities/embedded_discontinuous_data.h"
#include "custom_elements/data_containers/embedded_discontinuous_data.h"

namespace Kratos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "includes/cfd_variables.h"
#include "includes/checks.h"

#include "custom_utilities/fic_data.h"
#include "custom_utilities/time_integrated_fic_data.h"
#include "custom_elements/data_containers/fic/fic_data.h"
#include "custom_elements/data_containers/time_integrated_fic/time_integrated_fic_data.h"
#include "custom_utilities/fluid_element_utilities.h"
#include "utilities/element_size_calculator.h"
#include "custom_utilities/fluid_element_time_integration_detail.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
#include "includes/checks.h"

#include "data_containers/axisymmetric_navier_stokes/axisymmetric_navier_stokes_data.h"
#include "custom_utilities/qsvms_data.h"
#include "custom_utilities/time_integrated_qsvms_data.h"
#include "custom_utilities/qsvms_dem_coupled_data.h"
#include "custom_utilities/fic_data.h"
#include "custom_utilities/time_integrated_fic_data.h"
#include "custom_utilities/symbolic_stokes_data.h"
#include "custom_utilities/two_fluid_navier_stokes_data.h"
#include "custom_utilities/two_fluid_navier_stokes_alpha_method_data.h"
#include "custom_utilities/weakly_compressible_navier_stokes_data.h"
#include "custom_elements/data_containers/qs_vms/qs_vms_data.h"
#include "custom_elements/data_containers/time_integrated_qs_vms/time_integrated_qs_vms_data.h"
#include "custom_elements/data_containers/qs_vms_dem_coupled/qs_vms_dem_coupled_data.h"
#include "custom_elements/data_containers/fic/fic_data.h"
#include "custom_elements/data_containers/time_integrated_fic/time_integrated_fic_data.h"
#include "custom_elements/data_containers/stokes/stokes_data.h"
#include "custom_elements/data_containers/two_fluid_navier_stokes/two_fluid_navier_stokes_data.h"
#include "custom_elements/data_containers/two_fluid_navier_stokes_alpha_method/two_fluid_navier_stokes_alpha_method_data.h"
#include "custom_elements/data_containers/weakly_compressible_navier_stokes/weakly_compressible_navier_stokes_data.h"
#include "utilities/element_size_calculator.h"
#include "custom_utilities/vorticity_utilities.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "geometries/geometry.h"

#include "includes/cfd_variables.h"
#include "custom_utilities/fluid_element_data.h"
#include "custom_elements/data_containers/fluid_element_data.h"
#include "fluid_dynamics_application_variables.h"


Expand Down 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
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "includes/cfd_variables.h"
#include "includes/checks.h"

#include "custom_utilities/qsvms_data.h"
#include "custom_utilities/time_integrated_qsvms_data.h"
#include "custom_utilities/qsvms_dem_coupled_data.h"
#include "custom_elements/data_containers/qs_vms/qs_vms_data.h"
#include "custom_elements/data_containers/time_integrated_qs_vms/time_integrated_qs_vms_data.h"
#include "custom_elements/data_containers/qs_vms_dem_coupled/qs_vms_dem_coupled_data.h"
#include "custom_utilities/fluid_element_utilities.h"
#include "custom_utilities/fluid_element_time_integration_detail.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// Aplication includes
#include "qs_vms_dem_coupled.h"
#include "custom_utilities/qsvms_dem_coupled_data.h"
#include "custom_elements/data_containers/qs_vms_dem_coupled/qs_vms_dem_coupled_data.h"
#include "custom_utilities/fluid_element_utilities.h"
#include "fluid_dynamics_application_variables.h"

Expand Down
Loading
Loading