10.12., 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 860bb58b authored by Anne Reinarz's avatar Anne Reinarz

fixes to easi interface

parent b3ff35cc
......@@ -27,11 +27,7 @@ InitialData::InitialData()
asagiReader = new AsagiReader("");
parser = new easi::YAMLParser(3, asagiReader);
model = parser->parse("data.yaml");
//Easi binding point for topography
adapter = new easi::ArraysAdapter();
adapter->addBindingPoint("b",bathymetry );
adapter->addBindingPoint("d",displacement);
lock.free();
lock.free();
#endif
}
......@@ -44,10 +40,7 @@ InitialData::InitialData(int a_scenario)
parser = new easi::YAMLParser(3, asagiReader);
model = parser->parse("data.yaml");
//Easi binding point for topography
adapter = new easi::ArraysAdapter();
adapter->addBindingPoint("b",bathymetry);
adapter->addBindingPoint("d",displacement);
lock.free();
lock.free();
#endif
}
......@@ -325,12 +318,18 @@ void InitialData::SolitaryWaveOnSimpleBeach(const double*const x, double* Q){
}
#if defined(USE_ASAGI)
void InitialData::readAsagiData(const double* const x,double* Q){
double bathymetry[1], displacement[1];
bathymetry[0] = 0.0; displacement[0] = 0.0;
easi::ArraysAdapter adapter;
adapter.addBindingPoint("b",bathymetry);
adapter.addBindingPoint("d",displacement);
easi::Query query(1,3);
query.x(0,0)=x[0];
query.x(0,1)=x[1];
query.x(0,2)=0;
model->evaluate(query,*adapter);
model->evaluate(query,adapter);
Q[0]=max(0.0,-bathymetry[0]); //h = H-b
if(std::isnan(Q[0]))
......
......@@ -22,9 +22,6 @@ class InitialData {
easi::YAMLParser* parser;
easi::Component* model;
AsagiReader* asagiReader;
easi::ArraysAdapter* adapter;
double bathymetry [1];
double displacement[1];
#endif
void ShockShockProblem(const double* const x,double* Q);
......
......@@ -10,6 +10,7 @@ components:
[b]:
!ASAGI
file: tohoku_2011/tohoku_gebco_ucsb3_2000m_hawaii_bath.nc
interpolation: linear
parameters: [b]
var: z
components:
......@@ -23,11 +24,12 @@ components:
components:
- !AxisAlignedCuboidalDomainFilter
limits:
x: [-249750.0, 249750.0]
y: [-399750.0, 399750.0]
x: [-249000.0, 249000.0]
y: [-399000.0, 399000.0]
components:
!ASAGI
file: tohoku_2011/tohoku_gebco_ucsb3_2000m_hawaii_displ.nc
interpolation: linear
parameters: [d]
var: z
components:
......
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