All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BridgeVessel.h
Go to the documentation of this file.
1 /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2  Copyright (c) 2013 The plumed team
3  (see the PEOPLE file at the root of the distribution for a list of names)
4 
5  See http://www.plumed-code.org for more information.
6 
7  This file is part of plumed, version 2.0.
8 
9  plumed is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  plumed is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with plumed. If not, see <http://www.gnu.org/licenses/>.
21 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
22 #ifndef __PLUMED_vesselbase_BridgeVessel_h
23 #define __PLUMED_vesselbase_BridgeVessel_h
24 
25 #include <string>
26 #include <cstring>
27 #include <vector>
28 #include "Vessel.h"
29 #include "core/Value.h"
30 
31 namespace PLMD {
32 namespace vesselbase {
33 
34 /**
35 \ingroup TOOLBOX
36 This class allows you to calculate the vessel in one ActionWithVessel. The user thinks
37 it is created in a different Action however. At the moment this is used for region
38 */
39 
40 class BridgeVessel : public Vessel {
41 private:
42  std::vector<double> forces;
43  unsigned inum;
44  std::vector<double> mynumerical_values;
47 public:
48  BridgeVessel( const VesselOptions& );
49 /// Resize the quantities in the vessel
50  void resize();
51 /// Setup the action we are outputting to
52  void setOutputAction( ActionWithVessel* myOutputAction );
53 /// Apply some force
54  bool applyForce( std::vector<double>& forces );
55 /// Should not be called
56  std::string description();
57 /// Want to get rid of this function
58  unsigned getNumberOfTerms(){ return 2; }
59 /// Jobs to do before the task list starts
60  void prepare();
61 /// Actually do the calculation
62  bool calculate();
63 /// Finish the calculation
64  void finish();
65 /// Calculate numerical derivatives
67 };
68 
69 }
70 }
71 #endif
72 
73 
std::string description()
Should not be called.
bool calculate()
Actually do the calculation.
void prepare()
Jobs to do before the task list starts.
Used to create a PLMD::Action that has some scalar or vectorial output that may or may not have some ...
void setOutputAction(ActionWithVessel *myOutputAction)
Setup the action we are outputting to.
This class allows you to calculate the vessel in one ActionWithVessel.
Definition: BridgeVessel.h:40
void resize()
Resize the quantities in the vessel.
bool applyForce(std::vector< double > &forces)
Apply some force.
unsigned getNumberOfTerms()
Want to get rid of this function.
Definition: BridgeVessel.h:58
This class is used to pass the input to Vessels.
Definition: Vessel.h:53
void finish()
Finish the calculation.
ActionWithValue * myOutputValues
Definition: BridgeVessel.h:46
void completeNumericalDerivatives()
Calculate numerical derivatives.
ActionWithVessel * myOutputAction
Definition: BridgeVessel.h:45
std::vector< double > mynumerical_values
Definition: BridgeVessel.h:44
std::vector< double > forces
Definition: BridgeVessel.h:42
This is used to create PLMD::Action objects that are computed by calculating the same function multip...
BridgeVessel(const VesselOptions &)