Skip to content

Commit

Permalink
Merge branch 'master' into PfemFluid/add-constitutive-laws
Browse files Browse the repository at this point in the history
  • Loading branch information
MZecchetto committed Apr 30, 2020
2 parents e09481d + 3df3a95 commit 0b7dd9e
Show file tree
Hide file tree
Showing 496 changed files with 17,164 additions and 61,974 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build_docker_image_wheelbuilder_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

name: Build docker image wheelbuilder-linux

on:
push:
branches:
- 'master'
paths:
- 'scripts/docker_files/docker_file_wheelbuilder_linux/*'
- '.github/workflows/build_docker_image_wheelbuilder_linux.yml'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build scripts/docker_files/docker_file_wheelbuilder_linux/ --tag kratosmultiphysics/kratos-wheelbuilder-linux
- name: Docker Login
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish the Docker image
run: docker push kratosmultiphysics/kratos-wheelbuilder-linux
26 changes: 26 additions & 0 deletions .github/workflows/build_docker_image_wheelbuilder_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

name: Build docker image wheelbuilder-windows

on:
push:
branches:
- 'master'
paths:
- 'scripts/docker_files/docker_file_wheelbuilder_windows/*'
- '.github/workflows/build_docker_image_wheelbuilder_windows.yml'

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build scripts/docker_files/docker_file_wheelbuilder_windows/ --tag kratosmultiphysics/kratos-wheelbuilder-windows
- name: Docker Login
uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish the Docker image
run: docker push kratosmultiphysics/kratos-wheelbuilder-windows
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ jobs:
set KRATOS_APP_DIR=applications
set KRATOS_APPLICATIONS=
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ConvectionDiffusionApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\FluidDynamicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MeshingApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MeshMovingApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\EigenSolversApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\StructuralMechanicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ChimeraApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\IgaApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ParticleMechanicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MappingApplication;
Expand All @@ -119,8 +121,7 @@ jobs:
-G"Visual Studio 16 2019" ^
-H"%KRATOS_SOURCE%" ^
-B"%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" ^
-DBOOST_ROOT="%BOOST_ROOT%" ^
-DINCLUDE_FEAST=OFF ^
-DBOOST_ROOT="%BOOST_ROOT_1_72_0%" ^
-DINSTALL_RUNKRATOS=OFF ^
-DCMAKE_CXX_FLAGS="/Od" ^
-DUSE_COTIRE=ON || goto :error
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export PYTHON_EXECUTABLE="/usr/bin/python3.6"
export KRATOS_INSTALL_PYTHON_USING_LINKS=ON

# Set applications to compile
add_app ${KRATOS_APP_DIR}/ConvectionDiffusionApplication;
add_app ${KRATOS_APP_DIR}/ExternalSolversApplication;
add_app ${KRATOS_APP_DIR}/EigenSolversApplication;
add_app ${KRATOS_APP_DIR}/StructuralMechanicsApplication;
Expand All @@ -41,6 +42,7 @@ add_app ${KRATOS_APP_DIR}/HDF5Application;
add_app ${KRATOS_APP_DIR}/ContactStructuralMechanicsApplication;
add_app ${KRATOS_APP_DIR}/IgaApplication;
add_app ${KRATOS_APP_DIR}/ParticleMechanicsApplication;
add_app ${KRATOS_APP_DIR}/ChimeraApplication;

# Clean
clear
Expand Down Expand Up @@ -73,4 +75,3 @@ ${KRATOS_CMAKE_OPTIONS_FLAGS} \
# Buid
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target all_unity -- -j1 && \
cmake --build "${KRATOS_BUILD}/${KRATOS_BUILD_TYPE}" --target install/fast -- -j1

7 changes: 5 additions & 2 deletions .github/workflows/nightly_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
set KRATOS_APP_DIR=applications
set KRATOS_APPLICATIONS=
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ConvectionDiffusionApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\FluidDynamicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\StructuralMechanicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ContactStructuralMechanicsApplication;
Expand All @@ -89,6 +90,9 @@ jobs:
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\EigenSolversApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\IgaApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ParticleMechanicsApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\ChimeraApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\MappingApplication;
set KRATOS_APPLICATIONS=%KRATOS_APPLICATIONS%%KRATOS_APP_DIR%\CoSimulationApplication;
del /F /Q "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%\cmake_install.cmake"
del /F /Q "%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%\CMakeCache.txt"
Expand All @@ -98,8 +102,7 @@ jobs:
-G"Visual Studio 16 2019" ^
-H"%KRATOS_SOURCE%" ^
-B"%KRATOS_BUILD%\%KRATOS_BUILD_TYPE%" ^
-DBOOST_ROOT="%BOOST_ROOT%" ^
-DINCLUDE_FEAST=OFF ^
-DBOOST_ROOT="%BOOST_ROOT_1_72_0%" ^
-DINSTALL_RUNKRATOS=OFF ^
-DCMAKE_CXX_FLAGS="/Od" ^
-DUSE_COTIRE=ON || goto :error
Expand Down
40 changes: 18 additions & 22 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
# Contents
* [Basic Configuration](#basic-configuration)
* [Adding Applications](#basic-configuration)
* [Adding Kratos to Path](#adding-kratos-to-path)
* [Examples](#examples)
* [Linux](#linux)
* [Windows](#windows)
* [MacOS](#macos)
* [Advanced Configuration](#advanced-configuration)
* [Building Environment](#building-environments)
* [Common Flags](#common-flags)
* [Compilation Performance](#compilation-performance)
* [Parallelism](#parallelism)
* [External Libraries](#external-libraries)
* [Feast](#feast)
* [Metis](#metis)
* [Trilinos](#trilinos)
* [Applications](#applications)
- [Contents](#contents)
- [Basic Configuration](#basic-configuration)
- [Adding Applications](#adding-applications)
- [Adding Kratos to Path](#adding-kratos-to-path)
- [Examples](#examples)
- [Linux](#linux)
- [Windows](#windows)
- [MacOS](#macos)
- [Advanced Configuration](#advanced-configuration)
- [Building Environment](#building-environment)
- [Common Flags](#common-flags)
- [Compilation Performance](#compilation-performance)
- [Parallelism](#parallelism)
- [Logging](#logging)
- [External libraries](#external-libraries)
- [Metis](#metis)
- [Trilinos](#trilinos)
- [Applications](#applications)


## Basic Configuration
Expand Down Expand Up @@ -315,11 +316,6 @@ Enables or Disables(default) the modules and code for mpi. This option is needed
Enables colored output of the Logger. If switched on, e.g. warning level messages will be printed in yellow to the terminal. Please notice that colored output is not supported by all terminals.

### External libraries
#### Feast
`-DINCLUDE_FEAST`

Enables or Disables(default) the use of FEAST

#### Metis

`-DUSE_METIS_5=ON/OFF`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

// Project includes
#include "includes/define.h"
#include "includes/variables.h"
#include "includes/kratos_application.h"
#include "containers/variable.h"
#include "includes/ublas_interface.h"

namespace Kratos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

// Project includes
#include "custom_elements/empirical_spring.hpp"
#include "includes/define.h"
#include "structural_mechanics_application_variables.h"
#include "cable_net_application_variables.h"
#include "includes/checks.h"
#include "custom_utilities/structural_mechanics_element_utilities.h"
#include "includes/variables.h"


namespace Kratos {
Expand Down Expand Up @@ -53,7 +53,7 @@ EmpiricalSpringElement3D2N::Create(IndexType NewId, GeometryType::Pointer pGeom,
EmpiricalSpringElement3D2N::~EmpiricalSpringElement3D2N() {}

void EmpiricalSpringElement3D2N::EquationIdVector(EquationIdVectorType& rResult,
ProcessInfo& rCurrentProcessInfo)
const ProcessInfo& rCurrentProcessInfo) const
{

if (rResult.size() != msLocalSize) {
Expand All @@ -70,7 +70,7 @@ void EmpiricalSpringElement3D2N::EquationIdVector(EquationIdVectorType& rResult,
}
}
void EmpiricalSpringElement3D2N::GetDofList(DofsVectorType& rElementalDofList,
ProcessInfo& rCurrentProcessInfo)
const ProcessInfo& rCurrentProcessInfo) const
{

if (rElementalDofList.size() != msLocalSize) {
Expand All @@ -90,7 +90,7 @@ void EmpiricalSpringElement3D2N::GetDofList(DofsVectorType& rElementalDofList,
BoundedMatrix<double, EmpiricalSpringElement3D2N::msLocalSize,
EmpiricalSpringElement3D2N::msLocalSize>
EmpiricalSpringElement3D2N::CreateElementStiffnessMatrix(
ProcessInfo& rCurrentProcessInfo)
const ProcessInfo& rCurrentProcessInfo)
{
BoundedMatrix<double, msLocalSize, msLocalSize> stiffness_matrix =
ZeroMatrix(msLocalSize, msLocalSize);
Expand Down Expand Up @@ -128,9 +128,8 @@ double EmpiricalSpringElement3D2N::EvaluatePolynomialFirstDerivative(const Vecto
}


void EmpiricalSpringElement3D2N::GetValuesVector(Vector& rValues, int Step)
void EmpiricalSpringElement3D2N::GetValuesVector(Vector& rValues, int Step) const
{

KRATOS_TRY
if (rValues.size() != msLocalSize) {
rValues.resize(msLocalSize, false);
Expand All @@ -148,7 +147,7 @@ void EmpiricalSpringElement3D2N::GetValuesVector(Vector& rValues, int Step)
KRATOS_CATCH("")
}

void EmpiricalSpringElement3D2N::GetFirstDerivativesVector(Vector& rValues, int Step)
void EmpiricalSpringElement3D2N::GetFirstDerivativesVector(Vector& rValues, int Step) const
{

KRATOS_TRY
Expand All @@ -168,7 +167,7 @@ void EmpiricalSpringElement3D2N::GetFirstDerivativesVector(Vector& rValues, int
KRATOS_CATCH("")
}

void EmpiricalSpringElement3D2N::GetSecondDerivativesVector(Vector& rValues, int Step)
void EmpiricalSpringElement3D2N::GetSecondDerivativesVector(Vector& rValues, int Step) const
{

KRATOS_TRY
Expand All @@ -190,8 +189,8 @@ void EmpiricalSpringElement3D2N::GetSecondDerivativesVector(Vector& rValues, int
}

void EmpiricalSpringElement3D2N::CalculateLocalSystem(MatrixType& rLeftHandSideMatrix,
VectorType& rRightHandSideVector,
ProcessInfo& rCurrentProcessInfo)
VectorType& rRightHandSideVector,
const ProcessInfo& rCurrentProcessInfo)
{
KRATOS_TRY;
CalculateRightHandSide(rRightHandSideVector,rCurrentProcessInfo);
Expand All @@ -200,7 +199,7 @@ void EmpiricalSpringElement3D2N::CalculateLocalSystem(MatrixType& rLeftHandSideM
}

void EmpiricalSpringElement3D2N::CalculateRightHandSide(
VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo)
VectorType& rRightHandSideVector, const ProcessInfo& rCurrentProcessInfo)
{

KRATOS_TRY
Expand All @@ -220,7 +219,7 @@ void EmpiricalSpringElement3D2N::CalculateRightHandSide(
}

void EmpiricalSpringElement3D2N::CalculateLeftHandSide(MatrixType& rLeftHandSideMatrix,
ProcessInfo& rCurrentProcessInfo)
const ProcessInfo& rCurrentProcessInfo)
{

KRATOS_TRY;
Expand All @@ -232,7 +231,7 @@ void EmpiricalSpringElement3D2N::CalculateLeftHandSide(MatrixType& rLeftHandSide
KRATOS_CATCH("")
}

int EmpiricalSpringElement3D2N::Check(const ProcessInfo& rCurrentProcessInfo)
int EmpiricalSpringElement3D2N::Check(const ProcessInfo& rCurrentProcessInfo) const
{
KRATOS_TRY
const double numerical_limit = std::numeric_limits<double>::epsilon();
Expand All @@ -250,7 +249,7 @@ int EmpiricalSpringElement3D2N::Check(const ProcessInfo& rCurrentProcessInfo)

// Check that the element's nodes contain all required SolutionStepData and Degrees of freedom
for (IndexType i = 0; i < number_of_nodes; ++i) {
NodeType& rnode = GetGeometry()[i];
const NodeType& rnode = GetGeometry()[i];
KRATOS_CHECK_VARIABLE_IN_NODAL_DATA(DISPLACEMENT, rnode);

KRATOS_CHECK_DOF_IN_NODE(DISPLACEMENT_X, rnode);
Expand Down Expand Up @@ -445,7 +444,7 @@ void EmpiricalSpringElement3D2N::CalculateLumpedMassVector(VectorType& rMassVect

void EmpiricalSpringElement3D2N::CalculateMassMatrix(
MatrixType& rMassMatrix,
ProcessInfo& rCurrentProcessInfo
const ProcessInfo& rCurrentProcessInfo
)
{
KRATOS_TRY
Expand All @@ -469,7 +468,7 @@ void EmpiricalSpringElement3D2N::CalculateMassMatrix(
}

void EmpiricalSpringElement3D2N::CalculateDampingMatrix(
MatrixType& rDampingMatrix, ProcessInfo& rCurrentProcessInfo)
MatrixType& rDampingMatrix, const ProcessInfo& rCurrentProcessInfo)
{
StructuralMechanicsElementUtilities::CalculateRayleighDampingMatrix(
*this,
Expand All @@ -482,7 +481,7 @@ void EmpiricalSpringElement3D2N::CalculateDampingMatrix(
void EmpiricalSpringElement3D2N::AddExplicitContribution(
const VectorType& rRHSVector,
const Variable<VectorType>& rRHSVariable,
Variable<double >& rDestinationVariable,
const Variable<double >& rDestinationVariable,
const ProcessInfo& rCurrentProcessInfo
)
{
Expand All @@ -508,7 +507,7 @@ void EmpiricalSpringElement3D2N::AddExplicitContribution(

void EmpiricalSpringElement3D2N::AddExplicitContribution(
const VectorType& rRHSVector, const Variable<VectorType>& rRHSVariable,
Variable<array_1d<double, 3>>& rDestinationVariable,
const Variable<array_1d<double, 3>>& rDestinationVariable,
const ProcessInfo& rCurrentProcessInfo
)
{
Expand Down
Loading

0 comments on commit 0b7dd9e

Please sign in to comment.