Commit a99415c3 authored by m.tavelli's avatar m.tavelli

Bugfix in the boundary conditions

parent 07304b3f
......@@ -97,9 +97,9 @@ void FOCCZ4::FOCCZ4Solver_ADERDG::boundaryValues(const double* const x,const dou
std::memset(stateOut, 0, nVar * sizeof(double));
std::memset(fluxOut , 0, nVar * sizeof(double));
std::copy_n(stateIn,nVar,stateOut);
std::copy_n(fluxIn,nVar,fluxOut);
/*for(int dd=0; dd<nDim; dd++) F[dd] = Fs[dd];
//std::copy_n(stateIn,nVar,stateOut);
//std::copy_n(fluxIn,nVar,fluxOut);
for(int dd=0; dd<nDim; dd++) F[dd] = Fs[dd];
for(int i=0; i < basisSize; i++) { // i == time
const double weight = kernels::legendre::weights[order][i];
......@@ -111,14 +111,37 @@ void FOCCZ4::FOCCZ4Solver_ADERDG::boundaryValues(const double* const x,const dou
flux(Qgp, F);
for(int m=0; m < nVar; m++) {
stateOut[m] += weight * Qgp[m];
//fluxOut[m] += weight * Fs[direction][m];
fluxOut[m] += weight * Fs[direction][m];
}
}*/
}
}
exahype::solvers::Solver::RefinementControl FOCCZ4::FOCCZ4Solver_ADERDG::refinementCriterion(const double* const luh,const tarch::la::Vector<DIMENSIONS,double>& cellCentre,const tarch::la::Vector<DIMENSIONS,double>& cellSize,double t,const int level) {
// @todo Please implement/augment if required
return exahype::solvers::Solver::RefinementControl::Keep;
//return exahype::solvers::Solver::RefinementControl::Keep;
if(DIMENSIONS == 2){
if(std::abs(cellCentre[0]) < 10){
if(std::abs(cellCentre[1]) < 10){
return exahype::solvers::Solver::RefinementControl::Refine;
}
}
}else{
if(std::abs(cellCentre[0]) < 5){
if(std::abs(cellCentre[1]) < 5){
if(std::abs(cellCentre[2]) < 5){
return exahype::solvers::Solver::RefinementControl::Refine;
}
}
}
};
//return exahype::solvers::Solver::RefinementControl::Keep;
if ( level > getCoarsestMeshLevel() ) {
return exahype::solvers::Solver::RefinementControl::Erase;
}
return exahype::solvers::Solver::RefinementControl::Keep;
}
//*****************************************************************************
......@@ -212,6 +235,11 @@ bool FOCCZ4::FOCCZ4Solver_ADERDG::isPhysicallyAdmissible(
return ret_value;
}
void FOCCZ4::FOCCZ4Solver_ADERDG::fusedSource(const double* const restrict Q, const double* const restrict gradQ, double* const restrict S){
//static tarch::multicore::BooleanSemaphore initializationSemaphoreDG;
//tarch::multicore::Lock lock(initializationSemaphoreDG);
pdefusedsrcncp_(S,Q,gradQ);
//fusedSource(Q, gradQ, S);
//lock.free();
}
......@@ -2591,11 +2591,12 @@ RECURSIVE SUBROUTINE PDEFusedSrcNCP(Src_BgradQ,Q,gradQin)
Christoffel_kind1(i,j,k) = DD(k,i,j)+DD(j,i,k)-DD(i,j,k) ! this definition seems to work !
DO l = 1, 3
Christoffel_tilde(i,j,k) = Christoffel_tilde(i,j,k) + g_contr(k,l)*( DD(i,j,l)+DD(j,i,l)-DD(l,i,j) )
mytmp1(i,j,k,l) = DD(i,j,l)+DD(j,i,l)-DD(l,i,j)
Christoffel(i,j,k) = Christoffel(i,j,k) + g_contr(k,l)*( mytmp1(i,j,k,l) )
mytmp2(i,j,k,l)=( g_cov(j,l)*PP(i)+g_cov(i,l)*PP(j)-g_cov(i,j)*PP(l) )
Christoffel(i,j,k) = Christoffel(i,j,k) -g_contr(k,l)*mytmp2(i,j,k,l)
!mytmp1(i,j,k,l) = DD(i,j,l)+DD(j,i,l)-DD(l,i,j)
!Christoffel(i,j,k) = Christoffel(i,j,k) + g_contr(k,l)*( mytmp1(i,j,k,l) )
!mytmp2(i,j,k,l)=( g_cov(j,l)*PP(i)+g_cov(i,l)*PP(j)-g_cov(i,j)*PP(l) )
!Christoffel(i,j,k) = Christoffel(i,j,k) -g_contr(k,l)*mytmp2(i,j,k,l)
!Gtilde(i) = Gtilde(i)+2*g_contr(i,j)*g_contr(k,l)*DD(l,j,k)
Christoffel(i,j,k) = Christoffel(i,j,k) + g_contr(k,l)*(DD(i,j,l)+DD(j,i,l)-DD(l,i,j))-g_contr(k,l)*( g_cov(j,l)*PP(i)+g_cov(i,l)*PP(j)-g_cov(i,j)*PP(l) )
!PRINT *, Christoffel(i,j,k) ,I,J,K
ENDDO
ENDDO
......
......@@ -7,17 +7,17 @@
"output_directory": "./ApplicationExamples/FOCCZ4/FOCCZ4",
"log_file": "whatever.log"
},
"architecture": "skx",
"architecture": "noarch",
"computational_domain": {
"dimension": 2,
"end_time": 3.0,
"end_time": 101.0,
"offset": [
-20.0,
-20.0
-100.0,
-100.0
],
"width": [
40.0,
40.0
200.0,
200.0
]
},
"shared_memory": {
......@@ -52,8 +52,8 @@
"type": "Limiting-ADER-DG",
"name": "FOCCZ4Solver",
"order": 3,
"maximum_mesh_size": 1.0,
"maximum_mesh_depth": 2,
"maximum_mesh_size": 5.0,
"maximum_mesh_depth": 0,
"time_stepping": "global",
"aderdg_kernel": {
"language": "C",
......@@ -68,7 +68,7 @@
"fusedsource"
],
"optimised_kernel_debugging": [],
"implementation": "optimised"
"implementation": "generic"
},
"point_sources": 0,
"limiter": {
......
......@@ -10,7 +10,7 @@
"architecture": "skx",
"computational_domain": {
"dimension": 3,
"end_time": 3.0,
"end_time": 11.0,
"offset": [
-20.0,
-20.0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment