void BeamPointPressureCondition::GetDofList(DofsVectorType& rConditionDofList,
				    ProcessInfo& rCurrentProcessInfo)
{
    KRATOS_TRY

    rConditionDofList.resize(0);
    const unsigned int number_of_nodes = GetGeometry().PointsNumber();
    const unsigned int dimension = GetGeometry().WorkingSpaceDimension();

    for (unsigned int i = 0; i < number_of_nodes; i++)
    {
        rConditionDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_X));
        rConditionDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_Y));

	if( dimension == 3 ){
	  rConditionDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_Z));
	  rConditionDofList.push_back(GetGeometry()[i].pGetDof(ROTATION_X)); 
	  rConditionDofList.push_back(GetGeometry()[i].pGetDof(ROTATION_Y));
	}
	
        rConditionDofList.push_back(GetGeometry()[i].pGetDof(ROTATION_Z));

    }


    KRATOS_CATCH( "" )
}
//***********************************************************************************
void FaceHeatConvection::GetDofList( DofsVectorType& ElementalDofList, ProcessInfo& rCurrentProcessInfo )
{
    ElementalDofList.resize( 0 );

    for ( unsigned int i = 0;i < GetGeometry().size();i++ )
        ElementalDofList.push_back( GetGeometry()[i].pGetDof( TEMPERATURE ) );
}
Example #3
0
//************************************************************************************
//************************************************************************************
void Electrostatic2D::GetDofList(DofsVectorType& ElementalDofList,ProcessInfo& CurrentProcessInfo)
{
    unsigned int number_of_nodes = GetGeometry().PointsNumber();
    if(ElementalDofList.size() != number_of_nodes)
        ElementalDofList.resize(number_of_nodes);

    for (unsigned int i=0; i<number_of_nodes; i++)
        ElementalDofList[i] = GetGeometry()[i].pGetDof(ELECTROSTATIC_POTENTIAL);

}
/**
 * REMOVED: the DOFs are managed by the linking conditions
 */
void MasterContactPoint2D::GetDofList( DofsVectorType& ConditionalDofList,
                                       ProcessInfo& CurrentProcessInfo)
{
    ConditionalDofList.resize(0);

    for (unsigned int i=0; i<GetGeometry().size(); i++)
    {
        ConditionalDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_X));
        ConditionalDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_Y));
    }

}
Example #5
0
//***********************************************************************************
//***********************************************************************************
void FaceForce3D::GetDofList( DofsVectorType& ElementalDofList,
                              ProcessInfo& rCurrentProcessInfo )
{
    ElementalDofList.resize( 0 );

    for ( unsigned int i = 0; i < GetGeometry().size(); i++ )
    {
        ElementalDofList.push_back( GetGeometry()[i].pGetDof( DISPLACEMENT_X ) );
        ElementalDofList.push_back( GetGeometry()[i].pGetDof( DISPLACEMENT_Y ) );
        ElementalDofList.push_back( GetGeometry()[i].pGetDof( DISPLACEMENT_Z ) );
    }
}
void PeriodicConditionLM2D2N::GetDofList(DofsVectorType& ConditionalDofList,ProcessInfo& CurrentProcessInfo)
{
	if(ConditionalDofList.size() != 6) ConditionalDofList.resize(6);
	GeometryType& geom = GetGeometry();
	
	ConditionalDofList[0] = geom[0].pGetDof( DISPLACEMENT_X );
	ConditionalDofList[1] = geom[0].pGetDof( DISPLACEMENT_Y );
	
	ConditionalDofList[2] = geom[1].pGetDof( DISPLACEMENT_X );
	ConditionalDofList[3] = geom[1].pGetDof( DISPLACEMENT_Y );
	
	ConditionalDofList[4] = geom[0].pGetDof( DISPLACEMENT_LAGRANGE_X );
	ConditionalDofList[5] = geom[0].pGetDof( DISPLACEMENT_LAGRANGE_Y );
}
//************************************************************************************
//************************************************************************************
void UpdatedLagrangianFluid3Dinc::GetDofList(DofsVectorType& ElementalDofList,ProcessInfo& CurrentProcessInfo)
{
    unsigned int number_of_nodes = GetGeometry().PointsNumber();
    unsigned int dim = 3;

    if(ElementalDofList.size() != number_of_nodes*dim)
        ElementalDofList.resize(number_of_nodes*dim);

    for (unsigned int i=0; i<number_of_nodes; i++)
    {
        ElementalDofList[i*dim] = GetGeometry()[i].pGetDof(DISPLACEMENT_X);
        ElementalDofList[i*dim+1] = GetGeometry()[i].pGetDof(DISPLACEMENT_Y);
        ElementalDofList[i*dim+2] = GetGeometry()[i].pGetDof(DISPLACEMENT_Z);
    }
}
Example #8
0
//***********************************************************************************
//***********************************************************************************
void LineForce::GetDofList( DofsVectorType& ElementalDofList,
                              ProcessInfo& rCurrentProcessInfo )
{
    const unsigned int dim = GetGeometry().WorkingSpaceDimension();

    ElementalDofList.resize( 0 );

    for ( unsigned int i = 0; i < GetGeometry().size(); ++i )
    {
        ElementalDofList.push_back( GetGeometry()[i].pGetDof( DISPLACEMENT_X ) );
        ElementalDofList.push_back( GetGeometry()[i].pGetDof( DISPLACEMENT_Y ) );
        if(dim == 3)
            ElementalDofList.push_back( GetGeometry()[i].pGetDof( DISPLACEMENT_Z ) );
    }
}
void TwoStepPeriodicCondition<TDim>::GetPressureDofList(DofsVectorType& rElementalDofList,
                                              ProcessInfo& rCurrentProcessInfo)
{
    GeometryType& rGeom = this->GetGeometry();
    const SizeType NumNodes = rGeom.PointsNumber();

    if (rElementalDofList.size() != NumNodes)
        rElementalDofList.resize(NumNodes);

    SizeType LocalIndex = 0;

    for (SizeType i = 0; i < NumNodes; ++i)
    {
        rElementalDofList[LocalIndex++] = rGeom[i].pGetDof(PRESSURE);
    }
}
Example #10
0
//************************************************************************************
//************************************************************************************
void Monolithic2DNeumann::GetDofList(DofsVectorType& ElementalDofList,ProcessInfo& CurrentProcessInfo)
{
    KRATOS_TRY
    unsigned int number_of_nodes = GetGeometry().PointsNumber();
    unsigned int dim = 2;
    unsigned int node_size = dim;

    if(ElementalDofList.size() != number_of_nodes*node_size)
        ElementalDofList.resize(number_of_nodes*node_size);

    for (unsigned int i=0; i<number_of_nodes; i++)
    {
        ElementalDofList[i*node_size] = GetGeometry()[i].pGetDof(VELOCITY_X);
        ElementalDofList[i*node_size+1] = GetGeometry()[i].pGetDof(VELOCITY_Y);
    }
    KRATOS_CATCH("");
}
Example #11
0
//************************************************************************************
//************************************************************************************
void MeshlessLagrangeCouplingCondition::GetDofList(DofsVectorType& ElementalDofList, ProcessInfo& CurrentProcessInfo)
{
	ElementalDofList.resize(0);

	for (unsigned int i = 0; i < GetGeometry().size(); i++)
	{
		ElementalDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_X));
		ElementalDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_Y));
		ElementalDofList.push_back(GetGeometry()[i].pGetDof(DISPLACEMENT_Z));
	}
	for (unsigned int i = 0; i<GetGeometry().size(); i++)
	{
		ElementalDofList.push_back(GetGeometry()[i].pGetDof(VECTOR_LAGRANGE_MULTIPLIER_X));
		ElementalDofList.push_back(GetGeometry()[i].pGetDof(VECTOR_LAGRANGE_MULTIPLIER_Y));
		ElementalDofList.push_back(GetGeometry()[i].pGetDof(VECTOR_LAGRANGE_MULTIPLIER_Z));
	}
}
void TwoStepPeriodicCondition<2>::GetVelocityDofList(DofsVectorType& rElementalDofList,
                                           ProcessInfo& rCurrentProcessInfo)
{
    GeometryType& rGeom = this->GetGeometry();
    const SizeType NumNodes = rGeom.PointsNumber();
    const SizeType LocalSize = 2*NumNodes;

    if (rElementalDofList.size() != LocalSize)
        rElementalDofList.resize(LocalSize);

    SizeType LocalIndex = 0;

    for (SizeType i = 0; i < NumNodes; ++i)
    {
        rElementalDofList[LocalIndex++] = rGeom[i].pGetDof(VELOCITY_X);
        rElementalDofList[LocalIndex++] = rGeom[i].pGetDof(VELOCITY_Y);
    }
}
//************************************************************************************
//************************************************************************************
void NDFluid2DCrankNicolson::GetDofList(DofsVectorType& ElementalDofList,ProcessInfo& CurrentProcessInfo)
{
    unsigned int number_of_nodes = GetGeometry().PointsNumber();
    if(ElementalDofList.size() != number_of_nodes)
        ElementalDofList.resize(number_of_nodes);

    unsigned int FractionalStepNumber = CurrentProcessInfo[FRACTIONAL_STEP];

    if(FractionalStepNumber == 1) //step 1
        for (unsigned int i=0; i<number_of_nodes; i++)
            ElementalDofList[i] = GetGeometry()[i].pGetDof(FRACT_VEL_X);
    else if(FractionalStepNumber == 2) //step 2
        for (unsigned int i=0; i<number_of_nodes; i++)
            ElementalDofList[i] = GetGeometry()[i].pGetDof(FRACT_VEL_Y);
    else if(FractionalStepNumber == 4) // pressure correction step
        for (unsigned int i=0; i<number_of_nodes; i++)
            ElementalDofList[i] = GetGeometry()[i].pGetDof(PRESSURE);

}
Example #14
0
//************************************************************************************
//************************************************************************************
void ThermalFace2D::GetDofList(DofsVectorType& ConditionalDofList,ProcessInfo& CurrentProcessInfo)
{
    ConvectionDiffusionSettings::Pointer my_settings = CurrentProcessInfo.GetValue(CONVECTION_DIFFUSION_SETTINGS);
    const Variable<double>& rUnknownVar = my_settings->GetUnknownVariable();

    ConditionalDofList.resize(GetGeometry().size());
    for (unsigned int i=0; i<GetGeometry().size(); i++)
    {
        ConditionalDofList[i] = (GetGeometry()[i].pGetDof(rUnknownVar));
    }
}
Example #15
0
void BeamElement::GetDofList(DofsVectorType& ElementalDofList,ProcessInfo&
                             CurrentProcessInfo)
{
    ElementalDofList.resize(0);

    ElementalDofList.push_back(GetGeometry()[0].pGetDof(DISPLACEMENT_X));
    ElementalDofList.push_back(GetGeometry()[0].pGetDof(DISPLACEMENT_Y));
    ElementalDofList.push_back(GetGeometry()[0].pGetDof(DISPLACEMENT_Z));
    ElementalDofList.push_back(GetGeometry()[0].pGetDof(ROTATION_X));
    ElementalDofList.push_back(GetGeometry()[0].pGetDof(ROTATION_Y));
    ElementalDofList.push_back(GetGeometry()[0].pGetDof(ROTATION_Z));
    ElementalDofList.push_back(GetGeometry()[1].pGetDof(DISPLACEMENT_X));
    ElementalDofList.push_back(GetGeometry()[1].pGetDof(DISPLACEMENT_Y));
    ElementalDofList.push_back(GetGeometry()[1].pGetDof(DISPLACEMENT_Z));
    ElementalDofList.push_back(GetGeometry()[1].pGetDof(ROTATION_X));
    ElementalDofList.push_back(GetGeometry()[1].pGetDof(ROTATION_Y));
    ElementalDofList.push_back(GetGeometry()[1].pGetDof(ROTATION_Z));

}