Peano 4
Loading...
Searching...
No Matches
applications::exahype2::swe::adjoint::SWEAdjoint Class Reference

#include <SWEAdjoint.hpp>

Collaboration diagram for applications::exahype2::swe::adjoint::SWEAdjoint:

Public Member Functions

 SWEAdjoint (const char *output_file_name, const char *bathymetry_file_path, double width_x, double width_y, double cell_size, double end_time, double area_of_interest_coord_0, double area_of_interest_coord_1, double area_of_interest_coord_2, double area_of_interest_coord_3=INFINITY, double start_time=0, size_t checkpoints=0, size_t flush=0, const char *nc_key_x="x", const char *nc_key_y="y", const char *nc_key_bathymetry="z")
 Construct a new swe adjoint object.
 
 ~SWEAdjoint ()
 

Private Member Functions

void set_ghost_layer ()
 Set the ghost layer of all simulation arrays.
 
bool hump_criterion_square (double x, double y)
 Define square area of interest.
 
bool hump_criterion_circle (double x, double y)
 Define circular area of interest.
 
void run_simulation ()
 

Private Attributes

size_t l_nX_ = 0
 
size_t l_nY_ = 0
 
double width_x_ = 0
 
double width_y_ = 0
 
double cell_size_ = 0
 
double end_time_ = 0
 
double start_time_ = 0
 
size_t number_of_checkpoints_ = 0
 
double * checkpoints_ = nullptr
 
applications::exahype2::swe::parser::TopologyParsertopology_parser_
 
applications::exahype2::swe::adjoint::NetCDFWriternetcdf_writer_
 
double * h_ = nullptr
 
double * hu_ = nullptr
 
double * hv_ = nullptr
 
double * b_ = nullptr
 
double max_x_bathymetry_ = -1
 
double max_y_bathymetry_ = -1
 
double min_x_bathymetry_ = 1
 
double min_y_bathymetry_ = 1
 
double area_of_interest_coord_0_ = -1
 
double area_of_interest_coord_1_ = -1
 
double area_of_interest_coord_2_ = -1
 
double area_of_interest_coord_3_ = -1
 

Detailed Description

Definition at line 10 of file SWEAdjoint.hpp.

Constructor & Destructor Documentation

◆ SWEAdjoint()

applications::exahype2::swe::adjoint::SWEAdjoint::SWEAdjoint ( const char * output_file_name,
const char * bathymetry_file_path,
double width_x,
double width_y,
double cell_size,
double end_time,
double area_of_interest_coord_0,
double area_of_interest_coord_1,
double area_of_interest_coord_2,
double area_of_interest_coord_3 = INFINITY,
double start_time = 0,
size_t checkpoints = 0,
size_t flush = 0,
const char * nc_key_x = "x",
const char * nc_key_y = "y",
const char * nc_key_bathymetry = "z" )

Construct a new swe adjoint object.

Parameters
output_file_name
bathymetry_file_path
width_xwidth of simulation plane in x-dimension
width_ywidth of simulation plane in y-dimension
cell_sizesize of cell used in simulation
end_timeend time of simulation and also end time for temporal region of interest
area_of_interest_coord_0spacial region of interest: If square, this is one x value of a corner of the square. If circle, this is the x coordinate of the center
area_of_interest_coord_1spacial region of interest: If square, this is another x value of a corner of the square. If circle, this is the y coordinate of the center
area_of_interest_coord_2spacial region of interest: If square, this is one y value of a corner of the square. If circle, this is the radius
area_of_interest_coord_3spacial region of interest: If square, this is another y value of a corner of the square. If circle, this is INFINITY
start_timestart time of temporal region of interest
checkpointsnumber of checkpoints at which output is to be written. If 0, then every timestep output is written
nc_key_xkey of x values in netCDF file
nc_key_ykey of y values in netCDF file
nc_key_bathymetrykey of bathymetry values in netCDF file

Definition at line 82 of file SWEAdjoint.cpp.

References area_of_interest_coord_0_, area_of_interest_coord_1_, area_of_interest_coord_2_, area_of_interest_coord_3_, b_, cell_size_, checkpoints_, end_time_, applications::exahype2::swe::parser::TopologyParser::get_max_x_bathymetry(), applications::exahype2::swe::parser::TopologyParser::get_max_y_bathymetry(), applications::exahype2::swe::parser::TopologyParser::get_min_x_bathymetry(), applications::exahype2::swe::parser::TopologyParser::get_min_y_bathymetry(), h_, hu_, hump_criterion_circle(), hump_criterion_square(), hv_, j, l_nX_, l_nY_, max_x_bathymetry_, max_y_bathymetry_, min_x_bathymetry_, min_y_bathymetry_, netcdf_writer_, number_of_checkpoints_, run_simulation(), applications::exahype2::swe::parser::TopologyParser::sample_bathymetry(), set_ghost_layer(), start_time_, topology_parser_, width_x_, width_y_, and applications::exahype2::swe::adjoint::NetCDFWriter::~NetCDFWriter().

Here is the call graph for this function:

◆ ~SWEAdjoint()

applications::exahype2::swe::adjoint::SWEAdjoint::~SWEAdjoint ( )

Definition at line 203 of file SWEAdjoint.cpp.

Member Function Documentation

◆ hump_criterion_circle()

bool applications::exahype2::swe::adjoint::SWEAdjoint::hump_criterion_circle ( double x,
double y )
private

Define circular area of interest.

Parameters
xx coordinate
yy coordinate
Returns
true iff (x,y) in area of interest
false otherwise

Definition at line 49 of file SWEAdjoint.cpp.

References tarch::la::smaller(), and applications::exahype2::swe::parser::NetCDFHelper::transformIndexSimulationToCDFRange().

Referenced by SWEAdjoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hump_criterion_square()

bool applications::exahype2::swe::adjoint::SWEAdjoint::hump_criterion_square ( double x,
double y )
private

Define square area of interest.

Parameters
xx coordinate
yy coordinate
Returns
true iff (x,y) in area of interest
false otherwise

Definition at line 38 of file SWEAdjoint.cpp.

References tarch::la::greater(), tarch::la::smaller(), and applications::exahype2::swe::parser::NetCDFHelper::transformIndexSimulationToCDFRange().

Referenced by SWEAdjoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run_simulation()

void applications::exahype2::swe::adjoint::SWEAdjoint::run_simulation ( )
private

Definition at line 61 of file SWEAdjoint.cpp.

References tarch::la::smallerEquals().

Referenced by SWEAdjoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_ghost_layer()

void applications::exahype2::swe::adjoint::SWEAdjoint::set_ghost_layer ( )
private

Set the ghost layer of all simulation arrays.

This function sets the ghost layers of h, hu and hv.

Definition at line 5 of file SWEAdjoint.cpp.

References h_, hu_, hv_, j, l_nX_, and l_nY_.

Referenced by swe_adjoint.SWE_Adjoint_Solver::run_simulation(), and SWEAdjoint().

Here is the caller graph for this function:

Field Documentation

◆ area_of_interest_coord_0_

double applications::exahype2::swe::adjoint::SWEAdjoint::area_of_interest_coord_0_ = -1
private

Definition at line 39 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ area_of_interest_coord_1_

double applications::exahype2::swe::adjoint::SWEAdjoint::area_of_interest_coord_1_ = -1
private

Definition at line 40 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ area_of_interest_coord_2_

double applications::exahype2::swe::adjoint::SWEAdjoint::area_of_interest_coord_2_ = -1
private

Definition at line 41 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ area_of_interest_coord_3_

double applications::exahype2::swe::adjoint::SWEAdjoint::area_of_interest_coord_3_ = -1
private

Definition at line 42 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ b_

double* applications::exahype2::swe::adjoint::SWEAdjoint::b_ = nullptr
private

Definition at line 32 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ cell_size_

double applications::exahype2::swe::adjoint::SWEAdjoint::cell_size_ = 0
private

Definition at line 19 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ checkpoints_

double* applications::exahype2::swe::adjoint::SWEAdjoint::checkpoints_ = nullptr
private

Definition at line 24 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ end_time_

double applications::exahype2::swe::adjoint::SWEAdjoint::end_time_ = 0
private

Definition at line 20 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ h_

double* applications::exahype2::swe::adjoint::SWEAdjoint::h_ = nullptr
private

Definition at line 29 of file SWEAdjoint.hpp.

Referenced by set_ghost_layer(), and SWEAdjoint().

◆ hu_

double* applications::exahype2::swe::adjoint::SWEAdjoint::hu_ = nullptr
private

Definition at line 30 of file SWEAdjoint.hpp.

Referenced by set_ghost_layer(), and SWEAdjoint().

◆ hv_

double* applications::exahype2::swe::adjoint::SWEAdjoint::hv_ = nullptr
private

Definition at line 31 of file SWEAdjoint.hpp.

Referenced by set_ghost_layer(), and SWEAdjoint().

◆ l_nX_

size_t applications::exahype2::swe::adjoint::SWEAdjoint::l_nX_ = 0
private

Definition at line 14 of file SWEAdjoint.hpp.

Referenced by set_ghost_layer(), and SWEAdjoint().

◆ l_nY_

size_t applications::exahype2::swe::adjoint::SWEAdjoint::l_nY_ = 0
private

Definition at line 15 of file SWEAdjoint.hpp.

Referenced by set_ghost_layer(), and SWEAdjoint().

◆ max_x_bathymetry_

double applications::exahype2::swe::adjoint::SWEAdjoint::max_x_bathymetry_ = -1
private

Definition at line 34 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ max_y_bathymetry_

double applications::exahype2::swe::adjoint::SWEAdjoint::max_y_bathymetry_ = -1
private

Definition at line 35 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ min_x_bathymetry_

double applications::exahype2::swe::adjoint::SWEAdjoint::min_x_bathymetry_ = 1
private

Definition at line 36 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ min_y_bathymetry_

double applications::exahype2::swe::adjoint::SWEAdjoint::min_y_bathymetry_ = 1
private

Definition at line 37 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ netcdf_writer_

applications::exahype2::swe::adjoint::NetCDFWriter* applications::exahype2::swe::adjoint::SWEAdjoint::netcdf_writer_
private

Definition at line 27 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ number_of_checkpoints_

size_t applications::exahype2::swe::adjoint::SWEAdjoint::number_of_checkpoints_ = 0
private

Definition at line 23 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ start_time_

double applications::exahype2::swe::adjoint::SWEAdjoint::start_time_ = 0
private

Definition at line 21 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ topology_parser_

applications::exahype2::swe::parser::TopologyParser* applications::exahype2::swe::adjoint::SWEAdjoint::topology_parser_
private

Definition at line 26 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ width_x_

double applications::exahype2::swe::adjoint::SWEAdjoint::width_x_ = 0
private

Definition at line 17 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().

◆ width_y_

double applications::exahype2::swe::adjoint::SWEAdjoint::width_y_ = 0
private

Definition at line 18 of file SWEAdjoint.hpp.

Referenced by SWEAdjoint().


The documentation for this class was generated from the following files: