...
 
Commits (461)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -2,6 +2,9 @@
*_generated.cpp
cfiles.mk
buildinfo.h
Demonstrators/**/kernels
TestCases/**/kernels
ApplicationExamples/**/kernels
# Any kind of log files created by some editors
# (swap files or temporary files)
......
[submodule "Submodules/Peano"]
path = Submodules/Peano
url = https://gitlab.lrz.de/gi26det/Peano.git
url = https://gitlab.lrz.de/hpcsoftware/Peano.git
ignore = untracked # .o from compilation
[submodule "Submodules/jinja"]
path = Submodules/jinja
......@@ -11,6 +11,7 @@
[submodule "Submodules/libxsmm"]
path = Submodules/libxsmm
url = https://github.com/hfp/libxsmm.git
branch = release
ignore = dirty #deleted documentation and sample + build
[submodule "Submodules/attrs"]
path = Submodules/attrs
......
......@@ -7,32 +7,32 @@
// ========================
#include "ConservedWriter.h"
MHD::ConservedWriter::ConservedWriter(MHD::MHDSolver& solver) {
ElasticWave::ConservedWriter::ConservedWriter(ElasticWave::MyElasticWaveSolver& solver) {
// @TODO Please insert your code here.
}
MHD::ConservedWriter::~ConservedWriter() {
ElasticWave::ConservedWriter::~ConservedWriter() {
}
void MHD::ConservedWriter::startPlotting( double time) {
void ElasticWave::ConservedWriter::startPlotting( double time) {
// @TODO Please insert your code here.
}
void MHD::ConservedWriter::finishPlotting() {
void ElasticWave::ConservedWriter::finishPlotting() {
// @TODO Please insert your code here.
}
void MHD::ConservedWriter::mapQuantities(
void ElasticWave::ConservedWriter::mapQuantities(
const tarch::la::Vector<DIMENSIONS, double>& offsetOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& x,
const tarch::la::Vector<DIMENSIONS, int>& pos,
double* Q,
double* outputQuantities,
double* const Q,
double* const outputQuantities,
double timeStamp
) {
const int writtenUnknowns = 9;
const int writtenUnknowns = 7;
for (int i=0; i<writtenUnknowns; i++){
outputQuantities[i] = Q[i];
}
......
......@@ -4,20 +4,20 @@
// ========================
// www.exahype.eu
// ========================
#ifndef POSTPROCESSING_ErrorWriter_CLASS_HEADER_
#define POSTPROCESSING_ErrorWriter_CLASS_HEADER_
#ifndef POSTPROCESSING_ConservedWriter_CLASS_HEADER_
#define POSTPROCESSING_ConservedWriter_CLASS_HEADER_
#include "exahype/plotters/Plotter.h"
namespace MHD {
class MHDSolver;
class ErrorWriter;
namespace ElasticWave {
class MyElasticWaveSolver;
class ConservedWriter;
}
class MHD::ErrorWriter : public exahype::plotters::Plotter::UserOnTheFlyPostProcessing {
class ElasticWave::ConservedWriter : public exahype::plotters::Plotter::UserOnTheFlyPostProcessing {
public:
ErrorWriter(MHD::MHDSolver& solver);
virtual ~ErrorWriter();
ConservedWriter(ElasticWave::MyElasticWaveSolver& solver);
virtual ~ConservedWriter();
void startPlotting(double time) override;
void finishPlotting() override;
......@@ -26,9 +26,9 @@ public:
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& x,
const tarch::la::Vector<DIMENSIONS, int>& pos,
double* Q,
double* outputQuantities,
double* const Q,
double* const outputQuantities,
double timeStamp) override;
};
#endif /* POSTPROCESSING_ErrorWriter_CLASS_HEADER_ */
\ No newline at end of file
#endif /* POSTPROCESSING_ConservedWriter_CLASS_HEADER_ */
\ No newline at end of file
{
"project_name": "ElasticWave",
"paths": {
"peano_kernel_path": "./Peano",
"exahype_path": "./ExaHyPE",
"output_directory": "./ApplicationExamples/AdjointTest2D"
},
"architecture": "noarch",
"computational_domain": {
"dimension": 2,
"end_time": 1.0,
"offset": [
0.0,
0.0
],
"width": [
10.0,
10.0
]
},
"solvers": [
{
"type": "ADER-DG",
"name": "MyElasticWaveSolver",
"order": 3,
"maximum_mesh_size": 0.5,
"time_stepping": "globalfixed",
"aderdg_kernel": {
"language": "C",
"nonlinear": false,
"terms": [
"flux",
"ncp",
"point_sources"
],
"space_time_predictor": {},
"optimised_terms": [],
"optimised_kernel_debugging": [],
"implementation": "generic"
},
"point_sources": 1,
"variables": [
{
"name": "v",
"multiplicity": 2
},
{
"name": "sigma",
"multiplicity": 3
},
{
"name": "lambda",
"multiplicity": 1
},
{
"name": "mu",
"multiplicity": 1
}
],
"plotters": [
{
"type": "vtu::Cartesian::cells::ascii",
"name": "ConservedWriter",
"time": 0.0,
"repeat": 0.05,
"output": "./output/plot",
"variables": 7
},
{
"type": "probe::ascii",
"name": "ProbeWriter",
"time": 0.0,
"repeat": 0.05,
"output": "./output/seismogram-1-",
"variables": 5,
"select": {
"x": 0.2,
"y": 9.99
}
},
{
"type": "probe::ascii",
"name": "ProbeWriter",
"time": 0.0,
"repeat": 0.05,
"output": "./output/seismogram-2-",
"variables": 5,
"select": {
"x": 0.5,
"y": 9.99
}
},
{
"type": "probe::ascii",
"name": "ProbeWriter",
"time": 0.0,
"repeat": 0.05,
"output": "./output/seismogram-3-",
"variables": 5,
"select": {
"x": 0.8,
"y": 9.99
}
}
]
}
]
}
......@@ -5,32 +5,31 @@
// ========================
// www.exahype.eu
// ========================
#include "NavierStokesWriter.h"
#include "ElasticWaveWriter.h"
NavierStokesFV::NavierStokesWriter::NavierStokesWriter(MyNavierStokesSolver& solver) {
ElasticWave::ElasticWaveWriter::ElasticWaveWriter(ElasticWave::MyElasticWaveSolver& solver) {
// @TODO Please insert your code here.
}
NavierStokesFV::NavierStokesWriter::~NavierStokesWriter() {
ElasticWave::ElasticWaveWriter::~ElasticWaveWriter() {
}
void NavierStokesFV::NavierStokesWriter::startPlotting( double time) {
void ElasticWave::ElasticWaveWriter::startPlotting( double time) {
// @TODO Please insert your code here.
}
void NavierStokesFV::NavierStokesWriter::finishPlotting() {
void ElasticWave::ElasticWaveWriter::finishPlotting() {
// @TODO Please insert your code here.
}
void NavierStokesFV::NavierStokesWriter::mapQuantities(
void ElasticWave::ElasticWaveWriter::mapQuantities(
const tarch::la::Vector<DIMENSIONS, double>& offsetOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& x,
const tarch::la::Vector<DIMENSIONS, int>& pos,
double* Q,
double* outputQuantities,
double* const Q,
double* const outputQuantities,
double timeStamp
) {
const int writtenUnknowns = 5;
......
// This file was generated by the ExaHyPE toolkit.
// It will not be overwritten.
//
// ========================
// www.exahype.eu
// ========================
#ifndef POSTPROCESSING_ElasticWaveWriter_CLASS_HEADER_
#define POSTPROCESSING_ElasticWaveWriter_CLASS_HEADER_
#include "exahype/plotters/Plotter.h"
namespace ElasticWave {
class MyElasticWaveSolver;
class ElasticWaveWriter;
}
class ElasticWave::ElasticWaveWriter : public exahype::plotters::Plotter::UserOnTheFlyPostProcessing {
public:
ElasticWaveWriter(ElasticWave::MyElasticWaveSolver& solver);
virtual ~ElasticWaveWriter();
void startPlotting(double time) override;
void finishPlotting() override;
void mapQuantities(
const tarch::la::Vector<DIMENSIONS, double>& offsetOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch,
const tarch::la::Vector<DIMENSIONS, double>& x,
const tarch::la::Vector<DIMENSIONS, int>& pos,
double* const Q,
double* const outputQuantities,
double timeStamp) override;
};
#endif /* POSTPROCESSING_ElasticWaveWriter_CLASS_HEADER_ */
\ No newline at end of file
// This file was generated by the ExaHyPE toolkit.
// It will NOT be regenerated or overwritten.
// Please adapt it to your own needs.
//
// ========================
// www.exahype.eu
// ========================
#include "MyElasticWaveSolver.h"
#include "MyElasticWaveSolver_Variables.h"
#include "kernels/KernelUtils.h"
#include "peano/utils/Loop.h"
tarch::logging::Log ElasticWave::MyElasticWaveSolver::_log( "ElasticWave::MyElasticWaveSolver" );
void ElasticWave::MyElasticWaveSolver::init(const std::vector<std::string>& cmdlineargs,const exahype::parser::ParserView& constants) {
// Tip: You find documentation for this method in header file "ElasticWave::MyElasticWaveSolver.h".
initPointSourceLocations(cmdlineargs,constants);
}
void ElasticWave::MyElasticWaveSolver::adjustPointSolution(const double* const x,const double t,const double dt,double* const Q) {
// Tip: You find documentation for this method in header file "ElasticWave::MyElasticWaveSolver.h".
// Tip: See header file "ElasticWave::AbstractMyElasticWaveSolver.h" for toolkit generated compile-time
// constants such as Order, NumberOfVariables, and NumberOfParameters.
if ( tarch::la::equals( t,0.0 ) ) {
Variables vars(Q);
// Read in values
float lambda = 2.0;
/*std::ifstream fp("x_zero.txt");
if (fp.is_open()) {
while(fp > >string line = ""; getline(infile, line); ){
std::cout << "lambda " << aandb[i] << std::endl;
line >>lambda;
}
}
fp.close();*/
//Initial velocities
Q[0] = 1 * exp(-((x[0] - 5) * (x[0] - 5) + (x[1] - 5) * (x[1] - 5)) / 4);//vx
Q[1] = 1 * exp(-((x[0] - 5) * (x[0] - 5) + (x[1] - 5) * (x[1] - 5)) / 4);//vy
// Initialise stresses to zero
Q[2] = 0.0;//sigma xx
Q[3] = 0.0;//yy
Q[4] = 0.0;//xy
//initialise material parameters
Q[5] = lambda;
Q[6] = 0.5;
}
for(int i=0; i< 7;i++)
assert(std::isfinite(Q[i]));
}
void ElasticWave::MyElasticWaveSolver::boundaryValues(const double* const x,const double t,const double dt,const int faceIndex,const int direction,const double* const fluxIn,const double* const stateIn,const double* const gradStateIn,double* const fluxOut,double* const stateOut) {
// Tip: You find documentation for this method in header file "ElasticWave::MyElasticWaveSolver.h".
// Tip: See header file "ElasticWave::AbstractMyElasticWaveSolver.h" for toolkit generated compile-time
// constants such as Order, NumberOfVariables, and NumberOfParameters.
ReadOnlyVariables varsInside(stateIn);
Variables varsOutside(stateOut);
for (int i = 0; i < (int) sizeof(stateIn); i++){
stateOut[i] = stateIn[i];
}
for (int i = 0; i< (int) sizeof(fluxIn); i++){
fluxOut[i] = fluxIn[i];
}
}