Skip to content

Instantly share code, notes, and snippets.

View RiccardoRossi's full-sized avatar

Riccardo Rossi RiccardoRossi

  • UPC & CIMNE
  • Barcelona
View GitHub Profile
#include <iostream>
#include <vector>
#include <numeric>
int main() {
constexpr int size = 1024*1024;
std::vector<double> x;
x.reserve(size);
from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
# Importing Kratos
import KratosMultiphysics
class BaseKratosAnalysisStage(object):
"""The base class for the analysis classes in the applications
"""
#TODO: (using TODO to get syntax hightlighting) Pass the Model here. it will pervive through all the AnalysisStage
#note that for example for doing FSI passing one single modelpart is not enough!
+ def RunSolutionLoop(self):
+ """This function executes the temporal loop of the analysis
+ It is NOT intended to be overridden in deriving classes!
+ """
+ while self.time < self.end_time:
fl.Predict
str.Predict
fl.InitializeSolutionStep
str.InitializeSolutionStep
while(not converged):
@RiccardoRossi
RiccardoRossi / stage.py
Last active April 6, 2018 10:10
stage for discussion
from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
# Importing Kratos
import KratosMultiphysics
class AnalysisStage(object):
"""The base class for the AnalysisStage-classes in the applications
Changes to this BaseClass have to be discussed first!
"""
def __init__(self, model, project_parameters):
#include <vector>
#include <array>
#include <iostream>
#include <chrono>
#include <cassert>
#include <cmath>
#include <omp.h>
template<
class TContainerType,