File field2d.cxx

Class for 2D X-Y profiles

Copyright 2010 B.D.Dudson, S.Farley, M.V.Umansky, X.Q.Xu

Contact: Ben Dudson, bd512@york.ac.uk

This file is part of BOUT++.

BOUT++ is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

BOUT++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with BOUT++. If not, see http://www.gnu.org/licenses/.

Functions

Field2D operator-(const Field2D &f)

Unary minus. Returns the negative of given field, iterates over whole domain including guard/boundary cells.

void checkData(const Field2D &f, const std::string &region = "RGN_NOBNDRY")

Check if the data is valid.

Throw an exception if f is not allocated or if any elements are non-finite (for CHECK > 2). Loops over all points including the boundaries by default (can be changed using the rgn argument

void invalidateGuards(Field2D &var)

Force guard cells of passed field var to NaN.

bool operator==(const Field2D &a, const Field2D &b)

Test if two fields are the same, by calculating the minimum absolute difference between them

std::ostream &operator<<(std::ostream &out, const Field2D &value)