This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <array> | |
#include <iostream> | |
#include <chrono> | |
#include <cassert> | |
#include <cmath> | |
#include <omp.h> | |
template< | |
class TContainerType, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ 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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <numeric> | |
int main() { | |
constexpr int size = 1024*1024; | |
std::vector<double> x; | |
x.reserve(size); | |